From 63d2786e8c990ac60d4959400a49bbd8c8dc5a8a Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Tue, 1 Apr 2025 18:12:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../css/synthesisQuery/synthesisQuery.css | 55 +++- .../static/img/synthesisQuery/list.png | Bin 0 -> 446 bytes .../static/img/synthesisQuery/list_check.png | Bin 0 -> 432 bytes .../static/img/synthesisQuery/photo.png | Bin 0 -> 605 bytes .../static/img/synthesisQuery/photo_check.png | Bin 0 -> 583 bytes .../js/layui-v2.9.14/layui/rightPopup2.js | 1 - .../proClassifyStatisticsDetail.js | 241 ++++++++++++++++-- .../js/synthesisQuery/synthesisQuery.js | 8 +- .../proClassifyStatisticsDetail.html | 4 + 9 files changed, 274 insertions(+), 35 deletions(-) create mode 100644 src/main/resources/static/img/synthesisQuery/list.png create mode 100644 src/main/resources/static/img/synthesisQuery/list_check.png create mode 100644 src/main/resources/static/img/synthesisQuery/photo.png create mode 100644 src/main/resources/static/img/synthesisQuery/photo_check.png diff --git a/src/main/resources/static/css/synthesisQuery/synthesisQuery.css b/src/main/resources/static/css/synthesisQuery/synthesisQuery.css index 1db1e1f..8cab3cb 100644 --- a/src/main/resources/static/css/synthesisQuery/synthesisQuery.css +++ b/src/main/resources/static/css/synthesisQuery/synthesisQuery.css @@ -127,10 +127,10 @@ body { height: 70%; } -.imgData img { +.imgData img, .info-img img { width: 100%; height: 100%; - object-fit: contain; /* 或 contain */ + /*object-fit: contain; !* 或 contain *!*/ } .imgData2 { @@ -192,7 +192,52 @@ body { padding: 2px 10px; } -.hidden-actions { +.list-info { + width: 100%; + margin: 0 1% 1% 0; + background-color: #fff; + padding: 0 2%; + box-sizing: border-box; +} + +.info-data, .info-data2 { + justify-content: space-between; + margin: 1% 0; +} + +.info-data2 { + justify-content: start; +} + +.info-data > p:nth-child(1) { + color: #999; + font-weight: bold; +} + +.info-data2 > p:nth-child(1) { + width: 5%; + color: #333; + font-weight: bold; +} + +.info-data2 > p:nth-child(2) { + width: 95%; + color: #333; +} + +.info-img { + width: 100%; + display: flex; + flex-wrap: wrap +} + +.info-img > div { + width: 19%; + height: 150px; + margin: 0 0.8% 1% 0; +} + +.hidden-actions,.hidden-actions2 { width: auto; height: 250px; display: none; @@ -202,6 +247,10 @@ body { border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } +.hidden-actions2{ + top: -150px; + height: 150px; +} .hidden-btn { width: 100%; diff --git a/src/main/resources/static/img/synthesisQuery/list.png b/src/main/resources/static/img/synthesisQuery/list.png new file mode 100644 index 0000000000000000000000000000000000000000..81d304cea059ad3e4ad2fa1ad0a821c212a78085 GIT binary patch literal 446 zcmV;v0YUzWP)Px$cu7P-R9HvtR?BU}FbpM;MUqXDNfHks0zM@<8K8!!J4xM1nhqkUpdlHwQ`d;) z-=V$<7WK$S@#!I~{Nc*@ujR%%2~`U&h*T@x7*1BB-KBGYsWOA@)*)@O5+Yu ox+Uyb{m>;;GD+xv0;@Cd1C3_OA-$F9@&Et;07*qoM6N<$f&hxaR{#J2 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/img/synthesisQuery/list_check.png b/src/main/resources/static/img/synthesisQuery/list_check.png new file mode 100644 index 0000000000000000000000000000000000000000..81dc67a94ba6609ebb21076f13970a91419f1ee3 GIT binary patch literal 432 zcmV;h0Z;ykP)Px$YDq*vR9HvtR?&6BFbq5~N!Y|p0)|1LgMiaXs!me62}jdl_JPKJJ%FI(18M)6*NBW*lR1UvTHx88FmXCU+4TU`@4+}Hd^Ccw zW1UjhyM|MKKBV?V;GqH`9|&|DB8Esi^v)dtWu&mSn}m}YBboOB8$kVtIa)*LvEiFCgA^QL?L6Q1dJ5*17y3u15Xmu-#hme-JvwdY(&iw$Et^R;qxM} axB@@ZT%jR0_aK@80000Px%7fD1xR9HvVSJ7<(F$}d827yTm8?+M?hB!-n6~2&i>~M4gHYlB>3_?idD5k#S z(2)=cHD7Q9`{nuhIfwA%g-^~8y#TDWO-W#gcm#m&)9G|vE|>iIvaSHsbv^aof0YE# ziM1f2ojmJhAc7bd2Jr#_Qvetv;;O2uHOFrO*ladqV+?O9wwQjQ-dZ~cfKXoN+=R<< z0bs3V+KVP{)jFO!>T8aOv#P2N0YE(YPyE9!ilzt)-g_=(pq@`18Dk`%~BQs z4mui*-q{~wumcgzbl{#ny(P*5Ac;6hcZ6#5Qhh-(J@I}4?+xuR{p~jD00000NkvXXu0mjfH$nw3 literal 0 HcmV?d00001 diff --git a/src/main/resources/static/img/synthesisQuery/photo_check.png b/src/main/resources/static/img/synthesisQuery/photo_check.png new file mode 100644 index 0000000000000000000000000000000000000000..90ebdc2571db18f0a86b01fef2809c909731f021 GIT binary patch literal 583 zcmV-N0=WH&P)Px%0ZBwbR9HvVSM7DeFbq5~2~2|7pq-$E4pJBdl5W5Tbth>iL9P6S4bB56Zh7@D zUhF5GPNxqD4?gr@|HuMRdv2=&o1q8r382>v$?tHk0H~G~7#~#u#Kstnex=TT$}=D! zPMB8)u>?T@nE&v;)eY^$egZ(XJjcmAs&_2?hI+NI4yVpZ(wZW+|==It%RrkUad!pXeJ zrf3uc-itW79HAz!=L+#pEmMr{lBG!iGIaaWv{$a9Ii1KnNv7Rs5oR3Ao*h;{gc{o znFa_)FrHjAlO2ajx}y)sg0K!WMmt+B&!yk)Nr44GIO>L;OC8*Le-8j#+kdc-h=^tN z_f=#!qVu+DlzuCs;(NCV=LT8472EOqTW3I5>Hh*@0$5hZFvI&$<0_u*wZT0cz&G&r V&oB-ZP~-pr002ovPDHLkV1h0s_m}_x literal 0 HcmV?d00001 diff --git a/src/main/resources/static/js/layui-v2.9.14/layui/rightPopup2.js b/src/main/resources/static/js/layui-v2.9.14/layui/rightPopup2.js index 01733a9..2e37016 100644 --- a/src/main/resources/static/js/layui-v2.9.14/layui/rightPopup2.js +++ b/src/main/resources/static/js/layui-v2.9.14/layui/rightPopup2.js @@ -20,7 +20,6 @@ layui.define(["layer"], function (exports) { } }); let op_width = $(".layui-anim-rl").outerWidth(); - alert(op_width) $(".layui-layer-shade") .off("click") .on("click", function () { diff --git a/src/main/resources/static/js/synthesisQuery/proClassifyStatisticsDetail.js b/src/main/resources/static/js/synthesisQuery/proClassifyStatisticsDetail.js index 7572d5c..f4acdf3 100644 --- a/src/main/resources/static/js/synthesisQuery/proClassifyStatisticsDetail.js +++ b/src/main/resources/static/js/synthesisQuery/proClassifyStatisticsDetail.js @@ -1,12 +1,13 @@ -let form, laydate, flow,layer,rightPopup; -let pageNum = 1, pageSize = 15; // 定义分页 -let queryType = 2; // 默认最近上传 -function setParams(obj){ +let form, laydate, flow, layer, rightPopup; +let pageNum = 1, pageSize = 15; // 图片定义分页 +let pageNum2 = 1, pageSize2 = 2; // 列表定义分页 +let queryType = 1; // 默认图片 +function setParams(obj) { layui.config({ base: "../../js/layui-v2.9.14/layui/", //此处路径请自行处理, 可以使用绝对路径 }).extend({ rightPopup: "rightPopup2", - }).use(["form", 'laydate', 'flow','layer','rightPopup'], function () { + }).use(["form", 'laydate', 'flow', 'layer', 'rightPopup'], function () { form = layui.form; laydate = layui.laydate; flow = layui.flow; @@ -29,14 +30,29 @@ function dataFlow() { let lis = []; let returnData = loadData(); if (returnData != null) { - lis = initImgData(returnData.data.list) - next(lis.join(''), page < returnData.data.total / 15); - $('.img-info').on('mouseenter', function () { - this.querySelector('.hidden-actions').style.display = 'block'; - }); - $('.img-info').on('mouseleave', function () { - this.querySelector('.hidden-actions').style.display = 'none'; - }); + if (queryType === 1) { // 图片 + lis = initImgData(returnData.data.list) + } else { // 列表 + lis = initListData(returnData.data.list) + + } + console.error(lis) + next(lis.join(''), page < returnData.data.total / (queryType === 1 ? pageSize : pageSize2)); + if (queryType === 1) { + $('.img-info').on('mouseenter', function () { + this.querySelector('.hidden-actions').style.display = 'block'; + }); + $('.img-info').on('mouseleave', function () { + this.querySelector('.hidden-actions').style.display = 'none'; + }); + } else { + $('.img-data').on('mouseenter', function () { + this.querySelector('.hidden-actions2').style.display = 'block'; + }); + $('.img-data').on('mouseleave', function () { + this.querySelector('.hidden-actions2').style.display = 'none'; + }); + } } } }); @@ -46,10 +62,19 @@ function dataFlow() { function loadData() { let returnData = null; let url = dataUrl + "/backstage/synthesisQuery/getImgList" - let obj = { - pageNum: pageNum, - pageSize: pageSize, - queryType: queryType + let obj = {} + if (queryType === 1) { // 图片 + obj = { + pageNum: pageNum, + pageSize: pageSize, + queryType: queryType + } + } else { // 列表 + obj = { + pageNum: pageNum2, + pageSize: pageSize2, + queryType: queryType + } } let params = { encryptedData: encryptCBC(JSON.stringify(obj)) @@ -118,6 +143,176 @@ function initImgData(list) { } +/**1.图片 2.列表*/ +function changeType(that, type) { + if (type === 1) { + $(that).attr('src', '../../img/synthesisQuery/photo_check.png'); + $(that).next().attr('src', '../../img/synthesisQuery/list.png'); + } else { + $(that).attr('src', '../../img/synthesisQuery/list_check.png'); + $(that).prev().attr('src', '../../img/synthesisQuery/photo.png'); + } + queryType = type; + pageNum = 1; + pageNum2 = 1; + $('#ID-flow-demo').empty(); + dataFlow(); +} + + +/*图片类型查询*/ +function queryByType(that, type) { + $('.type-num').each(function () { + $(this).removeClass('type-num-check'); + }) + $(that).addClass('type-num-check'); +} + +/**渲染列表图片*/ +function initListData(list) { + let htmlArr = []; + if (list && list.length > 0) { + $.each(list, function (index, item) { + let html = "
" + + "
" + + "

" + item.uploadTime + "

" + + "

" + item.uploadTypeName + "

" + + "
" + + setBasicInfo(item) + + "
" + console.log(html) + htmlArr.push(html); + }) + } + return htmlArr; + + /**设置安全违章\质量检测\安全措施落实\协调照片\重要事项及宣传类*/ + function setBasicInfo(item) { + let html = ''; + if (item.uploadType === '1') { // 安全违章 + html += "
" + + "

违章地点:

" + + "

" + item.id + "

" + + "
" + + "
" + + "

违章描述:

" + + "

施工人员未正确佩戴安全帽,存在安全隐患

" + + "
" + + "
" + + setImgData() + + "
" + + setRectData(item); + } else if (item.uploadType === '2') { // 质量检测 + html += "
" + + "

检查地点

" + + "

工地 A 区施工现场 3 号楼

" + + "
" + + "
" + + "

检查描述:

" + + "

施工人员未正确佩戴安全帽,存在安全隐患

" + + "
" + + "
" + + setImgData() + + "
" + + setRectData(item); + } else if (item.uploadType === '3') { // 安全措施落实 + html += "
" + + "

检查地点

" + + "

工地 A 区施工现场 3 号楼

" + + "
" + + "
" + + "

检查描述:

" + + "

施工人员未正确佩戴安全帽,存在安全隐患

" + + "
" + + "
" + + setImgData() + + "
"; + } else if (item.uploadType === '4') { // 协调照片 + html += "
" + + "

建设前描述

" + + "

工地 A 区施工现场 3 号楼

" + + "
" + + "
" + + setImgData() + + "
" + + "
" + + "

建设中描述:

" + + "

施工人员未正确佩戴安全帽,存在安全隐患

" + + "
" + + "
" + + setImgData() + + "
" + + "
" + + "

恢复后描述:

" + + "

施工人员未正确佩戴安全帽,存在安全隐患

" + + "
" + + "
" + + setImgData() + + "
"; + + } else if (item.uploadType === '5') { // 重要事项及宣传类 + html += "
" + + "

标题

" + + "

工地 A 区施工现场 3 号楼

" + + "
" + + "
" + + "

内容:

" + + "

施工人员未正确佩戴安全帽,存在安全隐患

" + + "
" + + "
" + + setImgData() + + "
"; + } + return html; + + function setImgData() { + let list = [{compressFilePath: '../../img/synthesisQuery/7.jpg'}, {compressFilePath: '../../img/synthesisQuery/7.jpg'}, {compressFilePath: '../../img/synthesisQuery/7.jpg'}, {compressFilePath: '../../img/synthesisQuery/7.jpg'}, {compressFilePath: '../../img/synthesisQuery/7.jpg'}, {compressFilePath: '../../img/synthesisQuery/7.jpg'}]; + let cent = ''; + $.each(list, function (index, item) { + cent += "
" + + "" + + "
" + + "
" + + "
" + + "
" + + setCollectImg(item) + + "
" + + "
"; + }) + return cent; + } + + /**设置整改数据*/ + function setRectData(item) { + let cent2 = ''; + if (item.rectStatus === '1') { // 已整改 + cent2 += "
" + + "

整改说明:

" + + "

施工人员已进行安全教育

" + + "
" + + "
" + + setImgData() + + "
"; + } + return cent2; + } + } + + + // 设置收藏按钮 + function setCollectImg(item) { + if (item.collectStatus === '0') { + return "
" + + ""; + } else { + return "" + + "
"; + } + } + +} + + /**放大*/ function viewImg(item) { layer.photos({ @@ -160,14 +355,6 @@ function collectImg(that, item, type) { } /**高级筛选*/ -function highSearch(){ - rightPopup.rightPopupLayer("../../pages/synthesisQuery/highSearchForm.html", JSON.stringify({}),["50%", "100%"]); -} - -/*图片类型查询*/ -function queryByType(that,type){ - $('.type-num').each(function(){ - $(this).removeClass('type-num-check'); - }) - $(that).addClass('type-num-check'); +function highSearch() { + rightPopup.rightPopupLayer("../../pages/synthesisQuery/highSearchForm.html", JSON.stringify({}), ["50%", "100%"]); } diff --git a/src/main/resources/static/js/synthesisQuery/synthesisQuery.js b/src/main/resources/static/js/synthesisQuery/synthesisQuery.js index d0ccb35..5ef4cf0 100644 --- a/src/main/resources/static/js/synthesisQuery/synthesisQuery.js +++ b/src/main/resources/static/js/synthesisQuery/synthesisQuery.js @@ -119,11 +119,11 @@ function initImgData(list) { // 设置收藏按钮 function setCollectImg(item) { if (item.collectStatus === '0') { - return "
" + - ""; + return "
" + + ""; } else { - return "" + - "
"; + return "" + + "
"; } } diff --git a/src/main/resources/static/pages/synthesisQuery/proClassifyStatisticsDetail.html b/src/main/resources/static/pages/synthesisQuery/proClassifyStatisticsDetail.html index 81b58dc..78a384f 100644 --- a/src/main/resources/static/pages/synthesisQuery/proClassifyStatisticsDetail.html +++ b/src/main/resources/static/pages/synthesisQuery/proClassifyStatisticsDetail.html @@ -31,6 +31,10 @@ 高级筛选

高级筛选

+
+ + +