From f4e6a890da2884777281031a9c736c7659c2a74a Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期四, 02 一月 2025 14:20:04 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/model/mpk/project/ProjectForm.vue | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/model/mpk/project/ProjectForm.vue b/src/views/model/mpk/project/ProjectForm.vue index 3f8f5be..585271e 100644 --- a/src/views/model/mpk/project/ProjectForm.vue +++ b/src/views/model/mpk/project/ProjectForm.vue @@ -56,6 +56,7 @@ id: undefined, projectName: undefined, projectCode: undefined, + models: undefined, }) @@ -106,9 +107,11 @@ const data = { ...formData.value } - data.models = data.models.map(e => { - return {id: e} - }) + if (data.models && data.models.length > 0) { + data.models = data.models.map(e => { + return {id: e} + }) + } if (formType.value === 'create') { await ProjectApi.createProject(data) message.success(t('common.createSuccess')) @@ -137,7 +140,7 @@ // 所有模型列表 const modelList = ref([]) const getModelList = async () => { - modelList.value = await MpkApi.list() + modelList.value = await MpkApi.list({}) } // 模型筛选 -- Gitblit v1.9.3