|
@ -36,7 +36,7 @@ |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column align="center" label="操作" fixed="right" width="240"> |
|
|
<el-table-column align="center" label="操作" fixed="right" width="240"> |
|
|
<template #default="scope"> |
|
|
<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> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</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) => { |
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:itembasic:update' }), // 编辑 |
|
|
return [ |
|
|
defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:itembasic:delete' }), // 删除 |
|
|
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), // 编辑 |
|
|
] |
|
|
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['默认规则']), hasPermi: 'wms:itembasic:delete' }), // 删除 |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = (val, row) => { |
|
|
const buttonTableClick = (val, row) => { |
|
|