feat(projects): 新增字典类型时默认选择该类型

This commit is contained in:
xlsea
2026-01-27 10:29:42 +08:00
parent 87e3c06a6e
commit 2f9cdfc51c
2 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -322,6 +322,12 @@ async function handleExportType() {
);
}
async function handleSubmitType(dictType: string) {
await getTreeData();
if (!dictType) return;
handleClickTree([dictType]);
}
const selectable = computed(() => {
return !loading.value;
});
@@ -446,7 +452,7 @@ const tableTitle = computed(() => {
v-model:visible="dictTypeDrawerVisible"
:operate-type="dictOperateType"
:row-data="dictTypeData"
@submitted="getTreeData"
@submitted="handleSubmitType"
/>
</NCard>
</div>
@@ -19,7 +19,7 @@ interface Props {
const props = defineProps<Props>();
interface Emits {
(e: 'submitted'): void;
(e: 'submitted', dictType: string): void;
}
const emit = defineEmits<Emits>();
@@ -89,7 +89,7 @@ async function handleSubmit() {
window.$message?.success($t('common.updateSuccess'));
closeDrawer();
emit('submitted');
emit('submitted', dictType!);
}
watch(visible, () => {