报告模版配置
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
:tree-data="treeDataForChild"
|
||||
v-if="showDictionary"
|
||||
@close="closeReportDictionary"
|
||||
@refreshTree="handleRefreshTree"
|
||||
/>
|
||||
|
||||
<el-dialog
|
||||
@@ -143,6 +144,15 @@ const openReportDictionary = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 监听子组件触发的刷新事件
|
||||
const handleRefreshTree = async () => {
|
||||
try {
|
||||
const res = await getDictTree({ type: Number(tableStore.table.params.type) })
|
||||
treeDataForChild.value = res.data // 更新树数据
|
||||
} catch (error) {
|
||||
ElMessage.error('刷新树数据失败')
|
||||
}
|
||||
}
|
||||
const closeReportDictionary = () => {
|
||||
showDictionary.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user