feat(project-management): 优化文件归档表格状态展示和权限控制
This commit is contained in:
@@ -318,10 +318,18 @@ const tableConfig = reactive({
|
|||||||
width: 100,
|
width: 100,
|
||||||
showOverflowTooltip: false,
|
showOverflowTooltip: false,
|
||||||
currentRender: ({row, index}) => {
|
currentRender: ({row, index}) => {
|
||||||
if (row.state !== null) {
|
let buttons = new Set(Array.from(row.buttons))
|
||||||
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
if (!buttons.has("openFileSwitch")&&row.state!=1) {
|
||||||
} else {
|
console.log('row',row)
|
||||||
return '--'
|
return (<Tag dictType={'project_filing'} value={'0'}/>)
|
||||||
|
}else if (buttons.has("openFileSwitch")) {
|
||||||
|
return (<Tag dictType={'project_filing'} value={'4'}/>)
|
||||||
|
}else{
|
||||||
|
if (row.state !== null) {
|
||||||
|
return (<Tag dictType={'project_filing'} value={row.state}/>)
|
||||||
|
} else {
|
||||||
|
return '--'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -348,10 +356,10 @@ const tableConfig = reactive({
|
|||||||
btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
|
btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
|
||||||
}
|
}
|
||||||
if (buttons.has("openFileSwitch")) {
|
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")) {
|
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 (
|
return (
|
||||||
<div style={{width: '100%'}}>
|
<div style={{width: '100%'}}>
|
||||||
@@ -426,6 +434,7 @@ const handleEdit = (row) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const handleOpenUpload=(row,flag)=>{
|
const handleOpenUpload=(row,flag)=>{
|
||||||
|
console.log('tableIns',tableIns.value)
|
||||||
ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', {
|
ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|||||||
Reference in New Issue
Block a user