From ca22cdd5550cfa0defb0f430c538698182cdaec1 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期一, 30 十二月 2024 16:42:49 +0800 Subject: [PATCH] Merge branch 'master' of http://dlindusit.com:53929/r/iailab-plat-ui-vue3 --- 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