|
|
@ -33,7 +33,7 @@ |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
</ContentWrap> |
|
|
@ -138,10 +138,20 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi:'mes:product-backline:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'mes:product-backline:delete'}), // 删除 |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListEditBtn({hide: isShowMainButton(row,['1']),hasPermi:'mes:reworkSingle:update'}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({hide: isShowMainButton(row,['1']),hasPermi:'mes:reworkSingle:delete'}), // 删除 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
const isShowMainButton = (row,val) => { |
|
|
|
if (val.indexOf(row.status) > -1) { |
|
|
|
return false |
|
|
|
} else { |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|