fix : 修复权限按钮细节
This commit is contained in:
@@ -106,6 +106,11 @@ const tableConfig = reactive({
|
||||
label: '所属公司',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'approveName',
|
||||
label: '审批人',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'projectType',
|
||||
label: '项目类型',
|
||||
@@ -131,6 +136,11 @@ const tableConfig = reactive({
|
||||
label: '起止时间',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'taskNode',
|
||||
label: '当前节点',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'state',
|
||||
label: '状态',
|
||||
@@ -150,23 +160,36 @@ const tableConfig = reactive({
|
||||
align: 'center',
|
||||
showOverflowTooltip: false,
|
||||
currentRender: ({row, index}) => {
|
||||
let btn = [{label: '详情', func: () => handleDetail(row), type: 'primary'}]
|
||||
// if (row.state === '3') {
|
||||
btn.push(
|
||||
{label: '验收', func: () => handleCheck(row), type: 'primary'},
|
||||
{label: '编辑', func: () => handleEdit(row), type: 'primary'},
|
||||
{label: '台账', func: () => handleStandingBook(row), type: 'primary'},
|
||||
{label: '附件', func: () => handleAttachment(row), type: 'primary'},
|
||||
{label: '查看分摊', func: () => handleShare(row), type: 'primary'}
|
||||
)
|
||||
// }
|
||||
let btn = []
|
||||
let buttons = new Set(Array.from(row.buttons))
|
||||
if (buttons.has("details")) {
|
||||
btn.push({label: '详情', prem: ['mosr:requirement:info'], func: () => handleDetail(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("check")) {
|
||||
btn.push({label: '验收',prem: ['mosr:requirement:resubmit'], func: () => handleCheck(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("edit")) {
|
||||
btn.push({label: '编辑',prem: ['mosr:requirement:del'], func: () => handleEdit(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("standing")) {
|
||||
btn.push({label: '台账',prem: ['mosr:requirement:info'], func: () => handleStandingBook(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("attachments")) {
|
||||
btn.push({label: '附件',prem: ['mosr:requirement:info'], func: () => handleAttachment(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("viewAllocation")) {
|
||||
btn.push({label: '查看分摊',prem: ['mosr:requirement:info'], func: () => handleShare(row), type: 'primary'})
|
||||
}
|
||||
if (buttons.has("phaseChange")) {
|
||||
btn.push({label: '阶段变更',prem: ['mosr:requirement:info'], func: () => handleChange(row), type: 'primary'})
|
||||
}
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
{
|
||||
btn.map(item => (
|
||||
<el-button
|
||||
type={item.type}
|
||||
// v-perm={item.auth}
|
||||
v-perm={item.prem}
|
||||
onClick={() => item.func()}
|
||||
link
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user