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