From 3e434574a05a3cc35ebb05256632dcdeee1ed6d3 Mon Sep 17 00:00:00 2001
From: cwchen <1048842385@qq.com>
Date: Tue, 1 Apr 2025 14:39:43 +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/highSearchForm.css | 8 +-
src/main/resources/static/js/openIframe.js | 21 ++
.../synthesisQuery/proClassifyStatistics.js | 169 +++++++++++++++
.../proClassifyStatisticsDetail.js | 192 ++++++++++++++++++
.../synthesisQuery/proClassifyStatistics.html | 55 +++++
.../proClassifyStatisticsDetail.html | 106 ++++++++++
6 files changed, 547 insertions(+), 4 deletions(-)
create mode 100644 src/main/resources/static/js/synthesisQuery/proClassifyStatistics.js
create mode 100644 src/main/resources/static/js/synthesisQuery/proClassifyStatisticsDetail.js
create mode 100644 src/main/resources/static/pages/synthesisQuery/proClassifyStatistics.html
create mode 100644 src/main/resources/static/pages/synthesisQuery/proClassifyStatisticsDetail.html
diff --git a/src/main/resources/static/css/synthesisQuery/highSearchForm.css b/src/main/resources/static/css/synthesisQuery/highSearchForm.css
index 669c6d9..a6ade31 100644
--- a/src/main/resources/static/css/synthesisQuery/highSearchForm.css
+++ b/src/main/resources/static/css/synthesisQuery/highSearchForm.css
@@ -4,7 +4,7 @@ body {
height: 100%;
margin: 0;
padding: 0;
- font-family: 'Microsoft YaHei';
+ font-family: 'Alibaba PuHuiTi R';
color: #262626;
letter-spacing: 1px;
}
@@ -18,15 +18,15 @@ body {
#main-box {
width: 100%;
- height: calc(100% - 80px);
+ height: calc(100% - 60px);
overflow-y: auto;
- padding: 2%;
+ padding: 1%;
box-sizing: border-box;
}
.btn-box {
width: 100%;
- height: 80px;
+ height: 60px;
box-sizing: border-box;
display: flex;
justify-content: center;
diff --git a/src/main/resources/static/js/openIframe.js b/src/main/resources/static/js/openIframe.js
index 332ea44..c59c230 100644
--- a/src/main/resources/static/js/openIframe.js
+++ b/src/main/resources/static/js/openIframe.js
@@ -39,4 +39,25 @@ function openIframe2(id, title, content, width, height, params) {
}
}
});
+}
+
+function openIframeByParamObj(id, title, content, width, height, paramsObj) {
+ let layerIndex = layer.open({
+ id: id,
+ type: 2,
+ title: ['
' + title + '
', 'font-size:16px;background-color:#f0f0f0;display: flex;align-items: center;'],
+ content: content,
+ shade: 0.3,
+ anim: 2,
+ shadeClose: false,
+ area: [width, height],
+ move: false,
+ success: function () {
+ if (paramsObj) {
+ let iframeWin = window["layui-layer-iframe" + layerIndex];
+ iframeWin.setParams(JSON.stringify(paramsObj));
+ }
+ },
+ end: function () { }
+ });
}
\ No newline at end of file
diff --git a/src/main/resources/static/js/synthesisQuery/proClassifyStatistics.js b/src/main/resources/static/js/synthesisQuery/proClassifyStatistics.js
new file mode 100644
index 0000000..eaa992a
--- /dev/null
+++ b/src/main/resources/static/js/synthesisQuery/proClassifyStatistics.js
@@ -0,0 +1,169 @@
+let form, layer, table, tableIns;
+let pageNum = 1, limitSize = 10; // 默认第一页,分页数量为10
+layui.use(['form', 'layer', 'table'], function () {
+ form = layui.form;
+ layer = layui.layer;
+ table = layui.table;
+ layui.form.render();
+ pages(1, 10, 1);
+})
+
+function pages(pageNum, pageSize, typeNum) {
+ let params = getReqParams(pageNum, pageSize, typeNum);
+ let url = dataUrl + "/users/getList"
+ ajaxRequest(url, "POST", params, true, function () {
+ }, function (result) {
+ console.log(result);
+ if (result.code === 200) {
+ if (result.data) {
+ initTable(result.data, result.limit, result.curr)
+ laypages(result.count, result.curr, result.limit)
+ }
+ } else if (result.code === 500) {
+ layer.alert(result.msg, {icon: 2})
+ }
+ }, function (xhr) {
+ error(xhr)
+ });
+
+}
+
+function laypages(total, page, limit) {
+ layui.use(['laypage'], function () {
+ let laypage = layui.laypage;
+ laypage.render({
+ elem: 'voi-page',
+ count: total,
+ curr: page,
+ limit: limit,
+ limits: [10, 20, 50, 100, 200, 500],
+ layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
+ groups: 5,
+ jump: function (obj, first) {
+ if (!first) {
+ pageNum = obj.curr, limitSize = obj.limit;
+ pages(obj.curr, obj.limit, null);
+ }
+ }
+ });
+ })
+}
+
+/*初始化表格*/
+function initTable(dataList, limit, page) {
+ let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
+ tableIns = table.render({
+ elem: "#table_data",
+ height: "full-130",
+ data: dataList,
+ limit: limit,
+ cols: [
+ [
+ //表头 return ' ● 已派车';
+ {
+ title: "序号", width: "5%", unresize: true, align: "center",
+ templet: function (d) {
+ return (page - 1) * limit + d.LAY_NUM;
+ }
+ },
+ {field: "loginName", title: "项目名称", width: "23%", unresize: true, align: "center"},
+ {
+ field: "username", title: "总照片数量", width: "8%", unresize: true, align: "center",
+ templet: function (d) {
+ return '0';
+ }
+ },
+ {
+ field: "username", title: "安全违章", width: "8%", unresize: true, align: "center",
+ templet: function (d) {
+ return '0';
+ }
+ },
+ {
+ field: "username", title: "质量检查", width: "8%", unresize: true, align: "center",
+ templet: function (d) {
+ return '0';
+ }
+ },
+ {
+ field: "username", title: "安全措施落实", width: "10%", unresize: true, align: "center",
+ templet: function (d) {
+ return '0';
+ }
+ },
+ {
+ field: "username", title: "协调照片 ", width: "8%", unresize: true, align: "center",
+ templet: function (d) {
+ return '0';
+ }
+ },
+ {
+ field: "username", title: "重要事项及宣传 ", width: "10%", unresize: true, align: "center",
+ templet: function (d) {
+ return '0';
+ }
+ },
+ {
+ field: "createTime", title: "最后更新时间", width: "10%", align: "center", templet: 'center',
+ },
+ {
+ title: "操作", unresize: true, width: "10%", align: "center",
+ templet: function (d) {
+ let html = '';
+ let view = ""
+ let originalDownload = ""
+ let waterDownload = "";
+ html = view + originalDownload + waterDownload;
+ return html;
+ }
+ },
+ ],
+ ],
+ done: function (res, curr, count) {
+ layer.close(loadingMsg);
+ table.resize("table_data");
+ count || this.elem.next(".layui-table-view").find(".layui-table-header").css("display", "inline-block");
+ count || this.elem.next(".layui-table-view").find(".layui-table-box").css("overflow", "auto");
+ },
+ });
+}
+
+
+// 获取参数
+function getReqParams(page, limit, type) {
+ let obj = {};
+ if (!type) {
+ obj = {
+ page: page + "",
+ limit: limit + "",
+ keyWord: $('#keyWord').val(),
+
+ };
+ } else {
+ obj = {
+ page: '1',
+ limit: '10',
+ keyWord: '',
+ };
+ }
+ obj = {
+ encryptedData: encryptCBC(JSON.stringify(obj))
+ }
+ return obj;
+}
+
+// 查询/重置
+function query(type) {
+ pageNum = 1;
+ pages(1, limitSize);
+}
+
+
+//重置
+function reset() {
+ pages(1, limitSize, 1)
+}
+/**详情*/
+function viewData(obj){
+ openIframeByParamObj("viewData", "详情", "./proClassifyStatisticsDetail.html", "92%", "95%", obj);
+}
diff --git a/src/main/resources/static/js/synthesisQuery/proClassifyStatisticsDetail.js b/src/main/resources/static/js/synthesisQuery/proClassifyStatisticsDetail.js
new file mode 100644
index 0000000..ca94697
--- /dev/null
+++ b/src/main/resources/static/js/synthesisQuery/proClassifyStatisticsDetail.js
@@ -0,0 +1,192 @@
+let form, laydate, flow,layer,rightPopup;
+let pageNum = 1, pageSize = 15; // 定义分页
+let queryType = 2; // 默认最近上传
+layui.config({
+ base: "../../js/layui-v2.9.14/layui/", //此处路径请自行处理, 可以使用绝对路径
+}).extend({
+ rightPopup: "rightPopup",
+}).use(["form", 'laydate', 'flow','layer','rightPopup'], function () {
+ form = layui.form;
+ laydate = layui.laydate;
+ flow = layui.flow;
+ layer = layui.layer;
+ rightPopup = layui.rightPopup;
+ dataFlow();
+});
+
+/**数据流加载*/
+function dataFlow() {
+ flow.load({
+ elem: '#ID-flow-demo', // 流加载容器
+ scrollElem: '#ID-flow-demo', // 滚动条所在元素,一般不用填,此处只是演示需要。
+ end: '数据加载完毕',
+ direction: 'bottom',
+ done: function (page, next) { // 执行下一页的回调
+ console.error(page);
+ pageNum = page;
+ 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';
+ });
+ }
+ }
+ });
+}
+
+
+/*切换查询类型*/
+function changeType(type, that) {
+ queryType = type;
+ pageNum = 1;
+ $(that).removeClass("noCheckedElement");
+ if ($(that).hasClass("checkedElement") && type === 1) {
+ $(that).next().removeClass("checkedElement").addClass("noCheckedElement");
+ } else if (!$(that).hasClass("checkedElement") && type === 1) {
+ $(that).addClass("checkedElement");
+ $(that).next().removeClass("checkedElement").addClass("noCheckedElement");
+ } else if ($(that).hasClass("checkedElement") && type === 2) {
+ $(that).prev().removeClass("checkedElement").addClass("noCheckedElement");
+ } else if (!$(that).hasClass("checkedElement") && type === 2) {
+ $(that).addClass("checkedElement");
+ $(that).prev().removeClass("checkedElement").addClass("noCheckedElement");
+ }
+ $('#ID-flow-demo').empty();
+ dataFlow();
+}
+
+/**加载图片数据*/
+function loadData() {
+ let returnData = null;
+ let url = dataUrl + "/backstage/synthesisQuery/getImgList"
+ let obj = {
+ pageNum: pageNum,
+ pageSize: pageSize,
+ queryType: queryType
+ }
+ let params = {
+ encryptedData: encryptCBC(JSON.stringify(obj))
+ }
+ ajaxRequest(url, "POST", params, false, function () {
+ }, function (result) {
+ if (result.status === 200) {
+ console.log(result)
+ returnData = result;
+ } else {
+ layer.msg(result.msg, {icon: 2})
+ }
+ }, function (xhr) {
+ error(xhr)
+ });
+ return returnData;
+}
+
+/**渲染图片*/
+function initImgData(list) {
+ let htmlArr = [];
+ if (list && list.length > 0) {
+ $.each(list, function (index, item) {
+ htmlArr.push("" +
+ "
\n" +
+ "

" +
+ "
" +
+ "
" +
+ "
" + item.uploadTime + "
" +
+ "
" + item.uploadTypeName + "
" +
+ "
" +
+ "
" +
+ "
" + item.sourceTypeName + "
" +
+ setCollectData(item) +
+ "
" +
+ "
" +
+ "
" +
+ "
" +
+ "
" +
+ setCollectImg(item) +
+ "
" +
+ "
");
+ })
+ }
+ return htmlArr;
+
+
+ // 设置收藏按钮
+ function setCollectImg(item) {
+ if (item.collectStatus === '0') {
+ return "" +
+ "";
+ } else {
+ return "" +
+ "";
+ }
+ }
+
+ // 设置收藏图标
+ function setCollectData(item) {
+ if (item.collectStatus === '1') {
+ return "
";
+ }
+ return "
";
+ }
+
+}
+
+/**放大*/
+function viewImg(item) {
+ layer.photos({
+ shade: 0.5,
+ footer: false,
+ photos: {
+ "title": "图片预览",
+ "start": 0,
+ "data": [
+ {
+ "pid": 1,
+ "src": "../../img/synthesisQuery/7.jpg",
+ }
+ ]
+ },
+ });
+}
+
+/**放大*/
+function imgDownLoad(item) {
+ alert(item.id)
+}
+
+/**水印下载*/
+function waterImgDownLoad(item) {
+ alert(item.id)
+}
+
+/**收藏*/
+function collectImg(that, item, type) {
+ if (type === 0) { // 收藏
+ $(that).next().removeAttr("style");
+ $(that).css({'display': 'none'})
+ $(that).parent().parent().prev().find('img').eq(0).removeAttr('style')
+ } else if (type === 1) { // 取消收藏
+ $(that).prev().removeAttr("style");
+ $(that).css({'display': 'none'});
+ $(that).parent().parent().prev().find('img').eq(0).css({'display': 'none'})
+ }
+}
+
+/**高级筛选*/
+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');
+}
diff --git a/src/main/resources/static/pages/synthesisQuery/proClassifyStatistics.html b/src/main/resources/static/pages/synthesisQuery/proClassifyStatistics.html
new file mode 100644
index 0000000..19adca2
--- /dev/null
+++ b/src/main/resources/static/pages/synthesisQuery/proClassifyStatistics.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 项目分类统计
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/static/pages/synthesisQuery/proClassifyStatisticsDetail.html b/src/main/resources/static/pages/synthesisQuery/proClassifyStatisticsDetail.html
new file mode 100644
index 0000000..d3ab1f0
--- /dev/null
+++ b/src/main/resources/static/pages/synthesisQuery/proClassifyStatisticsDetail.html
@@ -0,0 +1,106 @@
+
+
+
+
+ 照片综合查询
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+

+
+
+
+
+
+

+
+
+
+
+
+

+
+
+
+
+
+

+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
+
\ No newline at end of file