diff --git a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html index 64faa86..2520f16 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html @@ -230,58 +230,42 @@ formatter: function(value, row, index) { var actions = []; if (row.status === '1'){ - actions.push('上传附件 '); + actions.push('上传附件 '); }else if (row.status === '2'){ actions.push('待审核 '); + actions.push('上传附件 '); }else if(row.status === '3'){ actions.push('已驳回 '); - actions.push('重新上传附件 '); + actions.push('重新上传附件 '); }else if (row.status === '4'){ actions.push('已完成 '); } - if (row.files && row.status !=='3'){ - actions.push('查看附件 '); - } - // actions.push('查看详情 '); return actions.join(''); } }] }; $.table.init(options); - $("#bootstrap-table").on('click',".openUpload",function () { + $("#bootstrap-table").on("click",".viewFiles912",function () { let _id = $(this)[0].dataset.id; let header = $(this)[0].dataset.header; let deptName = $(this)[0].dataset.deptname; let shotName = $(this)[0].dataset.shotname; - layer.open({ - title:'上传附件', - area:['80%','80%'], - type:2, - content:'/base/affairs/upload', - success(res,index){ - //传值 - parent.a_upload_id = _id; - parent.a_header = header; - parent.a_deptName = deptName; - parent.a_shotName = shotName; - parent.a_upload_index = index; - parent.a_upload_type = "1"; - }, - end(){ - $.table.search() - } - }) - }) - $("#bootstrap-table").on("click",".viewFiles912",function () { let _files = $(this)[0].dataset.files; layer.open({ - title:'查看附件', + title:'上传附件', area:['80%','90%'], type:2, content:'/base/affairs/viewFiles', success(res,index){ + parent.a_upload_obj = { + id:_id, + header:header, + deptName:deptName, + shotName:shotName, + files:_files, + url:'/base/affairs/commit' + } parent.a_upload_index = index; - parent.a_upload_files = _files; }, end(){ $.table.search() diff --git a/cyx-admin/src/main/resources/templates/base/affairs/day.html b/cyx-admin/src/main/resources/templates/base/affairs/day.html index 5a5564c..9c58e3c 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/day.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/day.html @@ -255,52 +255,42 @@ formatter: function(value, row, index) { var actions = []; if (row.status === '1'){ - actions.push('上传附件 '); + actions.push('上传附件 '); }else if (row.status === '2'){ actions.push('待审核 '); + actions.push('上传附件 '); }else if(row.status === '3'){ actions.push('已驳回 '); - actions.push('重新上传附件 '); + actions.push('重新上传附件 '); }else if (row.status === '4'){ actions.push('已完成 '); } - if (row.files && row.status !=='3'){ - actions.push('查看附件 '); - } - // actions.push('查看详情 '); return actions.join(''); } }] }; $.table.init(options); - $("#bootstrap-table").on('click','.openUpload',function () { - let _id = $(this)[0].dataset.id; - layer.open({ - title:'上传附件', - area:['80%','80%'], - type:2, - content:'/base/affairs/upload', - success(res,index){ - //传值 - parent.a_upload_id = _id; - parent.a_upload_index = index; - parent.a_upload_type = "1"; - }, - end(){ - $.table.search() - } - }) - }); $("#bootstrap-table").on("click",".viewFiles912",function () { + let _id = $(this)[0].dataset.id; + let header = $(this)[0].dataset.header; + let deptName = $(this)[0].dataset.deptname; + let shotName = $(this)[0].dataset.shotname; let _files = $(this)[0].dataset.files; layer.open({ - title:'查看附件', + title:'上传附件', area:['80%','90%'], type:2, content:'/base/affairs/viewFiles', success(res,index){ + parent.a_upload_obj = { + id:_id, + header:header, + deptName:deptName, + shotName:shotName, + files:_files, + url:'/base/affairs/commit' + } parent.a_upload_index = index; - parent.a_upload_files = _files; }, end(){ $.table.search() diff --git a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html index d8805ee..0bc1605 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html @@ -224,52 +224,42 @@ formatter: function(value, row, index) { var actions = []; if (row.status === '1'){ - actions.push('上传附件 '); + actions.push('上传附件 '); }else if (row.status === '2'){ actions.push('待审核 '); + actions.push('上传附件 '); }else if(row.status === '3'){ actions.push('已驳回 '); - actions.push('重新上传附件 '); + actions.push('重新上传附件 '); }else if (row.status === '4'){ actions.push('已完成 '); } - if (row.files && row.status !=='3'){ - actions.push('查看附件 '); - } - // actions.push('查看详情 '); return actions.join(''); } }] }; $.table.init(options); - $("#bootstrap-table").on('click','.openUpload',function () { - let _id = $(this)[0].dataset.id; - layer.open({ - title:'上传附件', - area:['80%','80%'], - type:2, - content:'/base/affairs/upload', - success(res,index){ - //传值 - parent.a_upload_id = _id; - parent.a_upload_index = index; - parent.a_upload_type = "1"; - }, - end(){ - $.table.search() - } - }) - }); $("#bootstrap-table").on("click",".viewFiles912",function () { + let _id = $(this)[0].dataset.id; + let header = $(this)[0].dataset.header; + let deptName = $(this)[0].dataset.deptname; + let shotName = $(this)[0].dataset.shotname; let _files = $(this)[0].dataset.files; layer.open({ - title:'查看附件', + title:'上传附件', area:['80%','90%'], type:2, content:'/base/affairs/viewFiles', success(res,index){ + parent.a_upload_obj = { + id:_id, + header:header, + deptName:deptName, + shotName:shotName, + files:_files, + url:'/base/affairs/commit' + } parent.a_upload_index = index; - parent.a_upload_files = _files; }, end(){ $.table.search() diff --git a/cyx-admin/src/main/resources/templates/base/affairs/viewFiles.html b/cyx-admin/src/main/resources/templates/base/affairs/viewFiles.html index 25ff0ac..665cdf8 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/viewFiles.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/viewFiles.html @@ -6,22 +6,15 @@ .pre_view{ width: 100%; height: 100%; + box-sizing: border-box; + padding: 10px; position: relative; } - .pdf_pre_view{ - position: absolute; - width: 100%; - height: 100%; - background-color: rgba(61, 61, 61, 0.47); - top: 0; - left: 0; - display: none; - } .pre_view_list{ width: 100%; - height: 100%; - box-sizing: border-box; - padding: 10px; + height: 80vh; + overflow-y: auto; + margin-top: 10px; border:1px solid #e3e3e3; border-radius: 8px; display: flex; @@ -56,35 +49,86 @@ display: flex; justify-content: center; } + .upload_input{ + margin-bottom: 10px; + } + .err_tips{ + font-size: 14px; + color: #e32525; + } + .no_data{ + margin-top: 4%; + width: 100%; + font-size: 16px; + color: #5d5d5d; + text-align: center; + }