diff --git a/src/views/project-management/filing/index.vue b/src/views/project-management/filing/index.vue index 561dcc9..a16caa3 100644 --- a/src/views/project-management/filing/index.vue +++ b/src/views/project-management/filing/index.vue @@ -318,10 +318,18 @@ const tableConfig = reactive({ width: 100, showOverflowTooltip: false, currentRender: ({row, index}) => { - if (row.state !== null) { - return () - } else { - return '--' + let buttons = new Set(Array.from(row.buttons)) + if (!buttons.has("openFileSwitch")&&row.state!=1) { + console.log('row',row) + return () + }else if (buttons.has("openFileSwitch")) { + return () + }else{ + if (row.state !== null) { + return () + } else { + return '--' + } } } }, @@ -348,10 +356,10 @@ const tableConfig = reactive({ btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'}) } if (buttons.has("openFileSwitch")) { - btn.push({label: '开启上传', prem: ['project:management:filing:conclusion'], func: () => handleOpenUpload(row,true), type: 'primary'}) + btn.push({label: '开启上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,true), type: 'primary'}) } if (buttons.has("closeFileSwitch")) { - btn.push({label: '关闭上传', prem: ['project:management:filing:conclusion'], func: () => handleOpenUpload(row,false), type: 'primary'}) + btn.push({label: '关闭上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,false), type: 'primary'}) } return (
@@ -426,6 +434,7 @@ const handleEdit = (row) => { }) } const handleOpenUpload=(row,flag)=>{ + console.log('tableIns',tableIns.value) ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消',