)
} else {
@@ -337,29 +342,59 @@ const tableConfig = reactive({
prop: 'oper',
label: '操作',
align: 'center',
- fixed:'right',
+ fixed: 'right',
width: 150,
showOverflowTooltip: false,
currentRender: ({row, index}) => {
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
- btn.push({label: '详情', prem: ['project:management:filing:detail'], func: () => handleDetail(row), type: 'primary'})
+ btn.push({
+ label: '详情',
+ prem: ['project:management:filing:detail'],
+ func: () => handleDetail(row),
+ type: 'primary'
+ })
}
if (buttons.has("attachments")) {
- btn.push({label: '附件', prem: ['project:management:filing:attachment'], func: () => handleAttachment(row), type: 'primary'})
+ btn.push({
+ label: '附件',
+ prem: ['project:management:filing:attachment'],
+ func: () => handleAttachment(row),
+ type: 'primary'
+ })
}
if (buttons.has("entry")) {
- btn.push({label: '结项', prem: ['project:management:filing:conclusion'], func: () => handleConclusion(row), type: 'primary'})
+ btn.push({
+ label: '结项',
+ prem: ['project:management:filing:conclusion'],
+ func: () => handleConclusion(row),
+ type: 'primary'
+ })
}
if (buttons.has("edit")) {
- 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")) {
- btn.push({label: '开启上传', prem: ['filing:attachment:switch'], 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: ['filing:attachment:switch'], func: () => handleOpenUpload(row,false), type: 'primary'})
+ btn.push({
+ label: '关闭上传',
+ prem: ['filing:attachment:switch'],
+ func: () => handleOpenUpload(row, false),
+ type: 'primary'
+ })
}
return (
@@ -411,7 +446,7 @@ const handleAttachment = (row) => {
name: 'Filing/attachment',
query: {
id: row.projectId,
- requirementId:row.requirementId
+ requirementId: row.requirementId
}
})
}
@@ -433,21 +468,21 @@ const handleEdit = (row) => {
}
})
}
-const handleOpenUpload=(row,flag)=>{
- console.log('tableIns',tableIns.value)
- ElMessageBox.confirm(`是否确认${flag?'开启':'关闭'}上传文件?`, '提示', {
+const handleOpenUpload = (row, flag) => {
+ console.log('tableIns', tableIns.value)
+ ElMessageBox.confirm(`是否确认${flag ? '开启' : '关闭'}上传文件?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- let params={
+ let params = {
open: flag,
- projectId: row.projectId
+ projectId: row.projectId
}
- switchAttachmentState(params).then(res=>{
- if(res.code==1000){
+ switchAttachmentState(params).then(res => {
+ if (res.code == 1000) {
tableIns.value.refresh()
- }else{
+ } else {
ElNotification({
title: '提示',
message: res.msg,
@@ -459,7 +494,7 @@ const handleOpenUpload=(row,flag)=>{
}
const init = async () => {
const res = await getSubCompOpt()
- searchConfig.value.find(item=>item.prop == 'affiliatedCompanyId').props.data = res.data
+ searchConfig.value.find(item => item.prop == 'affiliatedCompanyId').props.data = res.data
}
init()