|
@ -32,8 +32,8 @@ |
|
|
<span>{{ row.recordNo }}</span> |
|
|
<span>{{ row.recordNo }}</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</template> |
|
|
</template> |
|
|
<template #action="{ row }"> |
|
|
<template #action="{ row,$index }"> |
|
|
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|
|
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> |
|
|
</template> |
|
|
</template> |
|
|
</Table> |
|
|
</Table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
@ -154,13 +154,24 @@ const buttonBaseClick = (val, item) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row,$index) => { |
|
|
const butttondata = [ |
|
|
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
//defaultButtons.mainListEditBtn({hasPermi:'eam:equipmentMaintenanceRecordMain:update'}), // 编辑 |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
//defaultButtons.mainListDeleteBtn({hasPermi:'eam:equipmentMaintenanceRecordMain:delete'}), // 删除 |
|
|
return [] |
|
|
defaultButtons.maintainExperienceBtn({ hasPermi: 'eam:equipmentMaintenanceRecordMain:maintainExperience' }) // 生成保养经验 |
|
|
} |
|
|
] |
|
|
return [ |
|
|
|
|
|
defaultButtons.repairExperienceBtn({ hide:isShowMainButton(row,['0']),hasPermi: 'eam:equipmentMaintenanceRecordMain:maintainExperience' }) // 生成维修经验 |
|
|
|
|
|
] |
|
|
|
|
|
} |
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
|
|
const isShowMainButton = (row,val) => { |
|
|
|
|
|
console.log(row.isExperience) |
|
|
|
|
|
if (val.indexOf(row.isExperience) > -1) { |
|
|
|
|
|
return false |
|
|
|
|
|
} else { |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'edit') { // 编辑 |
|
|
if (val == 'edit') { // 编辑 |
|
|