fix : 修复需求征集/汇总权限按钮

This commit is contained in:
2024-06-10 22:36:03 +08:00
parent 9c812af394
commit 15a2dda0fa
2 changed files with 20 additions and 11 deletions

View File

@@ -71,6 +71,11 @@ const searchConfig = reactive([
// colProps: {}
// },
])
const auths = {
edit: ['mosr:collect:resubmit'],
detail: ['mosr:collect:info'],
report: ['mosr:collect:reported'],
}
const tableConfig = reactive({
columns: [
{
@@ -161,14 +166,11 @@ const tableConfig = reactive({
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['mosr:collect:info'], func: () => handleDetail(row), type: 'primary'})
btn.push({label: '详情', prem: auths.detail, func: () => handleDetail(row), type: 'primary'})
}
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['mosr:collect:resubmit'], func: () => handleEdit(row), type: 'primary'})
btn.push({label: '编辑', prem: auths.edit, func: () => handleEdit(row), type: 'primary'})
}
// if (buttons.has("report")) {
// btn.push({label: '上报', prem: ['mosr:collect:reported'], func: () => handleAdd(row), type: 'primary'})
// }
return (
<div style={{width: '100%'}}>
{
@@ -197,7 +199,7 @@ const tableConfig = reactive({
api: '/workflow/mosr/requirement/collect',
params: {},
btns: [
{name: '新增上报', key: 'add', color: '#DED0B2', auth: ''},
{name: '新增上报', key: 'add', color: '#DED0B2', auth:auths.report},
{name: '年度计划导出', key: '_export', auth: ''},
{name: '经费预算生成', key: 'preMonty', auth: ''},
]