|
|
@ -36,7 +36,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="操作" fixed="right" width="240"> |
|
|
|
<template #default="scope"> |
|
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event, scope.row)" /> |
|
|
|
<ButtonBase :Butttondata="butttondata(scope.row)" @button-base-click="buttonTableClick($event, scope.row)" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -132,11 +132,22 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
const isShowMainButton = (row,val) => { |
|
|
|
if (val == row.name) { |
|
|
|
return true |
|
|
|
} else { |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:itembasic:delete' }), // 删除 |
|
|
|
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['默认规则']), hasPermi: 'wms:itembasic:delete' }), // 删除 |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = (val, row) => { |
|
|
|