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 0000000..81d304c Binary files /dev/null and b/src/main/resources/static/img/synthesisQuery/list.png differ 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 0000000..81dc67a Binary files /dev/null and b/src/main/resources/static/img/synthesisQuery/list_check.png differ diff --git a/src/main/resources/static/img/synthesisQuery/photo.png b/src/main/resources/static/img/synthesisQuery/photo.png new file mode 100644 index 0000000..5be7024 Binary files /dev/null and b/src/main/resources/static/img/synthesisQuery/photo.png differ 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 0000000..90ebdc2 Binary files /dev/null and b/src/main/resources/static/img/synthesisQuery/photo_check.png differ 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 + "
" + + "违章地点:
" + + "" + item.id + "
" + + "违章描述:
" + + "施工人员未正确佩戴安全帽,存在安全隐患
" + + "检查地点
" + + "工地 A 区施工现场 3 号楼
" + + "检查描述:
" + + "施工人员未正确佩戴安全帽,存在安全隐患
" + + "检查地点
" + + "工地 A 区施工现场 3 号楼
" + + "检查描述:
" + + "施工人员未正确佩戴安全帽,存在安全隐患
" + + "建设前描述
" + + "工地 A 区施工现场 3 号楼
" + + "建设中描述:
" + + "施工人员未正确佩戴安全帽,存在安全隐患
" + + "恢复后描述:
" + + "施工人员未正确佩戴安全帽,存在安全隐患
" + + "标题
" + + "工地 A 区施工现场 3 号楼
" + + "内容:
" + + "施工人员未正确佩戴安全帽,存在安全隐患
" + + "整改说明:
" + + "施工人员已进行安全教育
" + + "
高级筛选
+
+
+