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 a1bd3c3..433648d 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html @@ -242,15 +242,16 @@ formatter: function(value, row, index) { var actions = []; if (row.status === '1'){ - actions.push('上传附件 '); + actions.push('上传附件 '); }else if (row.status === '2'){ actions.push('待审核 '); - actions.push('上传附件 '); + actions.push('上传附件 '); }else if(row.status === '3'){ actions.push('已驳回 '); - actions.push('重新上传附件 '); + actions.push('重新上传附件 '); }else if (row.status === '4'){ actions.push('已完成 '); + actions.push('查看附件 '); } return actions.join(''); } @@ -263,6 +264,7 @@ let deptName = $(this)[0].dataset.deptname; let shotName = $(this)[0].dataset.shotname; let _files = $(this)[0].dataset.files; + let _type = $(this)[0].dataset.type; layer.open({ title:'上传附件', area:['80%','90%'], @@ -275,7 +277,8 @@ deptName:deptName, shotName:shotName, files:_files, - url:'/base/affairs/commit' + url:'/base/affairs/commit', + type:_type } parent.a_upload_index = index; }, 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 07fca26..27b7261 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/day.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/day.html @@ -267,15 +267,16 @@ formatter: function(value, row, index) { var actions = []; if (row.status === '1'){ - actions.push('上传附件 '); + actions.push('上传附件 '); }else if (row.status === '2'){ actions.push('待审核 '); - actions.push('上传附件 '); + actions.push('上传附件 '); }else if(row.status === '3'){ actions.push('已驳回 '); - actions.push('重新上传附件 '); + actions.push('重新上传附件 '); }else if (row.status === '4'){ actions.push('已完成 '); + actions.push('查看附件 '); } return actions.join(''); } @@ -288,6 +289,7 @@ let deptName = $(this)[0].dataset.deptname; let shotName = $(this)[0].dataset.shotname; let _files = $(this)[0].dataset.files; + let _type = $(this)[0].dataset.type; layer.open({ title:'上传附件', area:['80%','90%'], @@ -300,7 +302,8 @@ deptName:deptName, shotName:shotName, files:_files, - url:'/base/affairs/commit' + url:'/base/affairs/commit', + type:_type } parent.a_upload_index = index; }, 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 02be261..0db3750 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html @@ -236,15 +236,16 @@ formatter: function(value, row, index) { var actions = []; if (row.status === '1'){ - actions.push('上传附件 '); + actions.push('上传附件 '); }else if (row.status === '2'){ actions.push('待审核 '); - actions.push('上传附件 '); + actions.push('上传附件 '); }else if(row.status === '3'){ actions.push('已驳回 '); - actions.push('重新上传附件 '); + actions.push('重新上传附件 '); }else if (row.status === '4'){ actions.push('已完成 '); + actions.push('查看附件 '); } return actions.join(''); } @@ -257,6 +258,7 @@ let deptName = $(this)[0].dataset.deptname; let shotName = $(this)[0].dataset.shotname; let _files = $(this)[0].dataset.files; + let _type = $(this)[0].dataset.type; layer.open({ title:'上传附件', area:['80%','90%'], @@ -269,7 +271,8 @@ deptName:deptName, shotName:shotName, files:_files, - url:'/base/affairs/commit' + url:'/base/affairs/commit', + type:_type } parent.a_upload_index = index; }, 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 9400105..e16dd00 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/viewFiles.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/viewFiles.html @@ -100,6 +100,13 @@ }) }) + //判断是否是可编辑状态 + if(_data.type === 'edit'){ + $(".upload_btn").show(); + }else{ + $(".upload_btn").hide(); + } + //初始化文件列表 initFileList(_newFilesArr); @@ -225,22 +232,41 @@ if(data.length === 0){ _file_list_str += '
暂无数据
' }else{ - data.forEach((item,index) => { - let _nameFile = item.name.substr(item.name.lastIndexOf('/')+1,item.name.length-1); - if(item.name.indexOf('png') > -1 || item.name.indexOf('jpg')>-1){ - _file_list_str += '
' + - '
('+(index+1)+') '+_nameFile+'
' + - '
下载删除
'; - }else if(item.name.indexOf('pdf') > -1){ - _file_list_str += '
' + - '
('+(index+1)+') '+_nameFile+'
' + - '
预览下载删除
'; - }else{ - _file_list_str += '
' + - '
('+(index+1)+') '+_nameFile+'
' + - '
下载删除
'; - } - }) + if(_data.type === 'edit'){ + data.forEach((item,index) => { + let _nameFile = item.name.substr(item.name.lastIndexOf('/')+1,item.name.length-1); + if(item.name.indexOf('png') > -1 || item.name.indexOf('jpg')>-1){ + _file_list_str += '
' + + '
('+(index+1)+') '+_nameFile+'
' + + '
下载删除
'; + }else if(item.name.indexOf('pdf') > -1){ + _file_list_str += '
' + + '
('+(index+1)+') '+_nameFile+'
' + + '
预览下载删除
'; + }else{ + _file_list_str += '
' + + '
('+(index+1)+') '+_nameFile+'
' + + '
下载删除
'; + } + }) + }else{ + data.forEach((item,index) => { + let _nameFile = item.name.substr(item.name.lastIndexOf('/')+1,item.name.length-1); + if(item.name.indexOf('png') > -1 || item.name.indexOf('jpg')>-1){ + _file_list_str += '
' + + '
('+(index+1)+') '+_nameFile+'
' + + '
下载
'; + }else if(item.name.indexOf('pdf') > -1){ + _file_list_str += '
' + + '
('+(index+1)+') '+_nameFile+'
' + + '
预览下载
'; + }else{ + _file_list_str += '
' + + '
('+(index+1)+') '+_nameFile+'
' + + '
下载
'; + } + }) + } } $(".pre_view_list").append(_file_list_str); } diff --git a/cyx-admin/src/main/resources/templates/base/affairs/warn.html b/cyx-admin/src/main/resources/templates/base/affairs/warn.html index d203af6..46c0555 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/warn.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/warn.html @@ -212,12 +212,13 @@ 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('重新上传附件 '); } return actions.join(''); } @@ -268,6 +269,7 @@ let deptName = $(this)[0].dataset.deptname; let shotName = $(this)[0].dataset.shotname; let _files = $(this)[0].dataset.files; + let _type = $(this)[0].dataset.type; layer.open({ title:'上传附件', area:['80%','90%'], @@ -280,7 +282,8 @@ deptName:deptName, shotName:shotName, files:_files, - url:'/base/affairs/commit' + url:'/base/affairs/commit', + type:_type } parent.a_upload_index = index; }, diff --git a/cyx-admin/src/main/resources/templates/base/affairs/year.html b/cyx-admin/src/main/resources/templates/base/affairs/year.html index 6ee0939..e185cc3 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/year.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/year.html @@ -261,15 +261,16 @@ formatter: function(value, row, index) { var actions = []; if (row.status === '1'){ - actions.push('上传附件 '); + actions.push('上传附件 '); }else if (row.status === '2'){ actions.push('待审核 '); - actions.push('上传附件 '); + actions.push('上传附件 '); }else if(row.status === '3'){ actions.push('已驳回 '); - actions.push('重新上传附件 '); + actions.push('重新上传附件 '); }else if (row.status === '4'){ actions.push('已完成 '); + actions.push('查看附件 '); } return actions.join(''); } @@ -282,6 +283,7 @@ let deptName = $(this)[0].dataset.deptname; let shotName = $(this)[0].dataset.shotname; let _files = $(this)[0].dataset.files; + let _type = $(this)[0].dataset.type; layer.open({ title:'上传附件', area:['80%','90%'], @@ -294,7 +296,8 @@ deptName:deptName, shotName:shotName, files:_files, - url:'/base/affairs/commit' + url:'/base/affairs/commit', + type:_type } parent.a_upload_index = index; },