From 23c8b8154fcf7c9251d07f028f3e14737ba4cecd Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期二, 31 十二月 2024 19:04:35 +0800 Subject: [PATCH] 调度模型下发配置 --- 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