diff --git a/src/main/resources/mappers/backstage/SynthesisQueryMapper.xml b/src/main/resources/mappers/backstage/SynthesisQueryMapper.xml index c4f6e3c..c7982f1 100644 --- a/src/main/resources/mappers/backstage/SynthesisQueryMapper.xml +++ b/src/main/resources/mappers/backstage/SynthesisQueryMapper.xml @@ -97,10 +97,10 @@ COUNT(IF(tcq.upload_type = '3', 1, NULL)) AS safetyMeasNum, COUNT(IF(tcq.upload_type = '4', 1, NULL)) AS coordinatedPhotoNum, COUNT(IF(tcq.upload_type = '5', 1, NULL)) AS importIssuesAndPublicityNum - FROM tb_comprehensive_query tcq - LEFT JOIN sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND - sfr.is_active = '1' - WHERE tcq.is_active = '1' + FROM sys_file_resource sfr + LEFT JOIN tb_comprehensive_query tcq ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND + tcq.is_active = '1' + WHERE sfr.is_active = '1' AND tcq.pro_id IN @@ -127,9 +127,9 @@ IF(tpc.file_resource_id IS NULL,'0','1') AS collectStatus, tcq.title, tcq.pro_name AS proName - FROM tb_comprehensive_query tcq - LEFT JOIN sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND - sfr.is_active = '1' + FROM sys_file_resource sfr + LEFT JOIN tb_comprehensive_query tcq ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND + tcq.is_active = '1' LEFT JOIN tb_photo_collect tpc ON sfr.id = tpc.file_resource_id AND tpc.collect_user_id = #{userId} LEFT JOIN ( SELECT sd.dict_value,sd.dict_name @@ -228,7 +228,7 @@ AND tcq.pro_id = #{id} - AND tcq.is_active = '1' + AND sfr.is_active = '1' ORDER BY sfr.create_time DESC @@ -250,10 +250,10 @@ tp.name AS proName, tcq.pro_id AS proId, MAX(sfr.create_time) AS lastUpdateTime - FROM tb_comprehensive_query tcq + FROM sys_file_resource sfr + LEFT JOIN tb_comprehensive_query tcq ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND + tcq.is_active = '1' LEFT JOIN tb_project tp ON tcq.pro_id = tp.id - LEFT JOIN sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND - sfr.is_active = '1' AND tcq.pro_id IN @@ -264,7 +264,7 @@ AND tcq.pro_id = #{id} - AND tcq.is_active = '1' + AND sfr.is_active = '1' GROUP BY tcq.pro_id @@ -283,9 +283,9 @@ IF(tpc.file_resource_id IS NULL,'0','1') AS collectStatus, tcq.title, tcq.pro_name AS proName - FROM tb_comprehensive_query tcq - LEFT JOIN sys_file_resource sfr ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND - sfr.is_active = '1' + FROM sys_file_resource sfr + LEFT JOIN tb_comprehensive_query tcq ON tcq.id = sfr.source_id AND tcq.upload_type = sfr.upload_type AND + tcq.is_active = '1' LEFT JOIN tb_photo_collect tpc ON sfr.id = tpc.file_resource_id AND tpc.collect_user_id = #{userId} LEFT JOIN ( SELECT sd.dict_value,sd.dict_name @@ -317,7 +317,7 @@ AND tcq.upload_type = #{uploadType} - AND tcq.is_active = '1' + AND sfr.is_active = '1' ORDER BY sfr.create_time DESC diff --git a/src/main/resources/static/js/imageUpload/importantMatter/child/importantMatterForm.js b/src/main/resources/static/js/imageUpload/importantMatter/child/importantMatterForm.js index 8bb562f..850a4c5 100644 --- a/src/main/resources/static/js/imageUpload/importantMatter/child/importantMatterForm.js +++ b/src/main/resources/static/js/imageUpload/importantMatter/child/importantMatterForm.js @@ -24,90 +24,6 @@ layui.use(['laydate', 'upload'], function () { sourceTypeName: "重要事项及宣传照片" // 来源类型名称 }) - // 已上传图片计数 - var uploadedCount = 0; - // 最大允许上传数量 - var maxCount = 9; - // 渲染上传组件 - upload.render({ - elem: '#uploadBtn', // 绑定按钮 - url: '/imgTool/sys/file/uploadFile?token=' + tokens, // 上传接口地址 - accept: 'images', // 只允许上传图片 - multiple: true, // 允许多文件上传 - auto: true, // 选择文件后自动上传 - number: 9, // 每次最多选择3个文件 - field: 'files', - data: {params: violation}, - choose: function(obj){ // 选择文件后的回调 - debugger; - // 检查已上传数量 - var files = obj.pushFile(); - console.log(files) - alert(uploadedCount) - // 如果已上传+新选择的数量超过限制 - alert(files.length) - if(uploadedCount + files.length > maxCount){ - var canUpload = maxCount - uploadedCount; - layer.msg('最多上传'+maxCount+'张图片,还可上传'+canUpload+'张'); - // 截断文件数组,只保留可上传数量 - this.files = files.slice(0, canUpload); - // 如果已经没有可上传数量,则阻止上传 - if(canUpload <= 0){ - return false; - } - } - - // 预览图片 - obj.preview(function(index, file, result){ - $('#previewBox').append( - '
' + - ''+ file.name +'' + - '
' + - '' + - '
' + - '
' - ); - }); - }, - before: function(obj){ - // 上传前可以做一些处理 - }, - done: function(res, index, upload){ - // 上传成功回调 - uploadedCount++; - - // 如果已达到最大数量,禁用上传按钮 - if(uploadedCount >= maxCount){ - $('#uploadBtn').addClass('layui-btn-disabled').prop('disabled', true); - } - - // 在实际应用中,这里可以处理服务器返回的数据 - console.log(res); - }, - error: function(index, upload){ - // 上传失败回调 - layer.msg('第'+(index+1)+'张图片上传失败'); - }, - allDone: function(obj){ - // 全部上传完成回调 - console.log('全部上传完成'); - } - }); - - // 删除图片函数 - window.deleteImg = function(index){ - // 这里应该添加删除服务器上图片的逻辑 - // 例如通过AJAX请求删除接口 - // 从预览中移除 - $('.img-item[data-index="'+ index +'"]').remove(); - // 减少计数 - uploadedCount--; - // 重新启用上传按钮 - $('#uploadBtn').removeClass('layui-btn-disabled').prop('disabled', false); - } - - - // 多图片上传 var uploadcom1 = upload.render({ elem: '#test1', diff --git a/src/main/resources/static/js/synthesisQuery/synthesisQuery.js b/src/main/resources/static/js/synthesisQuery/synthesisQuery.js index 25b4c3b..4cb784f 100644 --- a/src/main/resources/static/js/synthesisQuery/synthesisQuery.js +++ b/src/main/resources/static/js/synthesisQuery/synthesisQuery.js @@ -31,6 +31,7 @@ function dataFlow(queryParams) { console.error(page); pageNum = page; let lis = []; + queryParams.pageNum = page; let returnData = loadData(queryParams); if (returnData != null) { lis = initImgData(returnData.data.list) @@ -64,6 +65,7 @@ function changeType(type, that) { $(that).addClass("checkedElement"); $(that).prev().removeClass("checkedElement").addClass("noCheckedElement"); } + initImgNum(); searchData({ pageNum: pageNum, pageSize: pageSize, diff --git a/src/main/resources/static/pages/imageUpload/importantMatter/child/importantMatterForm.html b/src/main/resources/static/pages/imageUpload/importantMatter/child/importantMatterForm.html index 4a4d029..f95f2f8 100644 --- a/src/main/resources/static/pages/imageUpload/importantMatter/child/importantMatterForm.html +++ b/src/main/resources/static/pages/imageUpload/importantMatter/child/importantMatterForm.html @@ -104,7 +104,7 @@ - + -
+ diff --git a/src/main/resources/static/pages/imageUpload/safetyViolations/child/safetyViolationsForm.html b/src/main/resources/static/pages/imageUpload/safetyViolations/child/safetyViolationsForm.html index 0146791..8e218b4 100644 --- a/src/main/resources/static/pages/imageUpload/safetyViolations/child/safetyViolationsForm.html +++ b/src/main/resources/static/pages/imageUpload/safetyViolations/child/safetyViolationsForm.html @@ -2,7 +2,7 @@ - + - + +