@@ -260,6 +265,7 @@
getAssociatedFileListUrl,
getCaseDefaultFields,
getCaseDetail,
+ getCaseModuleTree,
previewFile,
transferFileRequest,
updateFile,
@@ -311,14 +317,6 @@
const featureCaseStore = useFeatureCaseStore();
const modelId = computed(() => featureCaseStore.moduleId[0]);
- const caseTree = computed(() => {
- return mapTree
(featureCaseStore.caseTree, (e) => {
- return {
- ...e,
- draggable: false,
- };
- });
- });
const initForm: DetailCase = {
id: '',
@@ -560,7 +558,6 @@
async function getCaseInfo() {
try {
isLoading.value = true;
- // await getAllCaseFields();
const detailResult: DetailCase = await getCaseDetail(props.caseId);
const fileIds = (detailResult.attachments || []).map((item: any) => item.id);
if (fileIds.length) {
@@ -574,12 +571,23 @@
}
}
- watchEffect(() => {
+ const caseTree = ref([]);
+
+ async function initSelectTree() {
+ try {
+ caseTree.value = await getCaseModuleTree({ projectId: currentProjectId.value });
+ } catch (error) {
+ console.log(error);
+ }
+ }
+
+ onMounted(() => {
if (route.params.mode === 'edit' || route.params.mode === 'copy') {
getCaseInfo();
} else {
initDefaultFields();
}
+ initSelectTree();
});
// 处理关联文件和已关联文件本地文件和已上传文本文件
function getFilesParams() {
@@ -619,7 +627,7 @@
if (val) {
params.value.request = { ...form.value };
emit('update:formModeValue', params.value);
- featureCaseStore.setModuleId([form.value.moduleId], []);
+ featureCaseStore.setModuleId([form.value.moduleId]);
}
}
},
diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseTree.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseTree.vue
index cffb358414..a8a855bb48 100644
--- a/frontend/src/views/case-management/caseManagementFeature/components/caseTree.vue
+++ b/frontend/src/views/case-management/caseManagementFeature/components/caseTree.vue
@@ -96,6 +96,8 @@
import type { CreateOrUpdateModule, UpdateModule } from '@/models/caseManagement/featureCase';
import { ModuleTreeNode } from '@/models/projectManagement/file';
+ const featureCaseStore = useFeatureCaseStore();
+
const { t } = useI18n();
const { openModal } = useModal();
const appStore = useAppStore();
@@ -141,6 +143,7 @@
() => props.selectedKeys,
(val) => {
selectedNodeKeys.value = val || [];
+ featureCaseStore.setModuleId(val as string[]);
}
);
@@ -150,7 +153,6 @@
emits('update:selectedKeys', val);
}
);
- const featureCaseStore = useFeatureCaseStore();
/**
* 初始化模块树
* @param isSetDefaultKey 是否设置第一个节点为选中节点
@@ -169,6 +171,7 @@
};
});
featureCaseStore.setModulesTree(caseTree.value);
+ featureCaseStore.setModuleId(['all']);
if (isSetDefaultKey) {
selectedNodeKeys.value = [caseTree.value[0].id];
}
diff --git a/frontend/src/views/case-management/caseManagementFeature/components/export/exportCaseModal.vue b/frontend/src/views/case-management/caseManagementFeature/components/export/exportCaseModal.vue
index 3af9a38735..69fcd6543f 100644
--- a/frontend/src/views/case-management/caseManagementFeature/components/export/exportCaseModal.vue
+++ b/frontend/src/views/case-management/caseManagementFeature/components/export/exportCaseModal.vue
@@ -43,11 +43,12 @@
:auto-upload="false"
:disabled="confirmLoading"
>
-
+
+