|
|
@ -230,6 +230,14 @@ const props = defineProps({ |
|
|
|
type: Array, |
|
|
|
required: false, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
// 详情列表扩展操作按钮 |
|
|
|
buttondataTable: { |
|
|
|
type: Array, |
|
|
|
required: false, |
|
|
|
default: ()=>{ |
|
|
|
return [] |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
const isShowDrawer = ref(false) |
|
|
@ -364,13 +372,14 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
} |
|
|
|
|
|
|
|
// 动态显示操作列按钮 |
|
|
|
buttondata.value = [ |
|
|
|
buttondata.value = [...[ |
|
|
|
defaultButtons.mainListEditBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']) |
|
|
|
}), // 编辑 |
|
|
|
defaultButtons.mainListDeleteBtn({ |
|
|
|
hide: isShowMainButton(row, ['1']) |
|
|
|
}) // 删除 |
|
|
|
})], // 删除 |
|
|
|
...props.buttondataTable |
|
|
|
] |
|
|
|
} finally { |
|
|
|
detailLoading.value = false |
|
|
@ -459,6 +468,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
} else if (val == 'delete') { |
|
|
|
// 删除 |
|
|
|
handleDelete(row.id) |
|
|
|
} else { |
|
|
|
emit('tableFormButton',val, row) |
|
|
|
} |
|
|
|
} |
|
|
|
/** 添加/修改操作 */ |
|
|
@ -497,7 +508,8 @@ const emit = defineEmits([ |
|
|
|
'searchTableSuccessDetail', |
|
|
|
'changeTabs', |
|
|
|
'selectChangeDetail', |
|
|
|
'detailOpenForm' |
|
|
|
'detailOpenForm', |
|
|
|
'tableFormButton' |
|
|
|
]) |
|
|
|
/** 删除按钮操作 */ |
|
|
|
const handleDelete = async (id: number) => { |
|
|
|