From 4f4e6843b9c16ce646de41e5439fed57853b51d7 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期四, 24 八月 2023 14:19:08 +0800
Subject: [PATCH] 图片多传和查看
---
src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html | 9 +++++++--
src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html | 8 ++++++--
src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html | 8 ++++++--
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html
index c2202d7..cc0c2f2 100644
--- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html
+++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotDanger.html
@@ -161,11 +161,12 @@
imageUrlArray.forEach(function(url, index) {
var img = document.createElement('img');
img.setAttribute('src', url);
- img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;');
+ img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin: 10px');
img.setAttribute('title', '查看图片');
img.setAttribute('data-id', ids);
img.addEventListener('click', function() {
- showPicture(this.getAttribute('data-id'), 'preRectifyPhoto');
+ // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto');
+ openPicture(url)
});
imageContainer.appendChild(img);
});
@@ -178,6 +179,10 @@
$.operate.openDetailInfo("查看图片", urlLast);
}
+ function openPicture(url) {
+ window.open(url)
+ }
+
</script>
</body>
</html>
\ No newline at end of file
diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html
index 29adaa0..59799b6 100644
--- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html
+++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailNotJudge.html
@@ -160,11 +160,12 @@
imageUrlArray.forEach(function(url, index) {
var img = document.createElement('img');
img.setAttribute('src', url);
- img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;');
+ img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin: 10px');
img.setAttribute('title', '查看图片');
img.setAttribute('data-id', ids);
img.addEventListener('click', function() {
- showPicture(this.getAttribute('data-id'), 'preRectifyPhoto');
+ // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto');
+ openPicture(url)
});
imageContainer.appendChild(img);
});
@@ -175,6 +176,9 @@
var urlLast = showPictureUrl.replace("{type}", type).replace("{id}", id);
$.operate.openDetailInfo("查看图片", urlLast);
}
+ function openPicture(url) {
+ window.open(url)
+ }
</script>
</body>
diff --git a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html
index 2f97af7..0e53535 100644
--- a/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html
+++ b/src/main/resources/templates/tr/hiddenDangerCheck/dangerReport/detailYesDanger.html
@@ -214,11 +214,12 @@
imageUrlArray.forEach(function(url, index) {
var img = document.createElement('img');
img.setAttribute('src', url);
- img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;');
+ img.setAttribute('style', 'width: 100px; height: 100px; cursor: pointer;margin: 10px');
img.setAttribute('title', '查看图片');
img.setAttribute('data-id', ids);
img.addEventListener('click', function() {
- showPicture(this.getAttribute('data-id'), 'preRectifyPhoto');
+ // showPicture(this.getAttribute('data-id'), 'preRectifyPhoto');
+ openPicture(url)
});
imageContainer.appendChild(img);
});
@@ -229,6 +230,9 @@
var urlLast = showPictureUrl.replace("{type}", type).replace("{id}", id);
$.operate.openDetailInfo("查看图片", urlLast);
}
+ function openPicture(url) {
+ window.open(url)
+ }
</script>
</body>
--
Gitblit v1.9.2