fix : 修复需求征集/汇总权限按钮
This commit is contained in:
@@ -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: ''},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user