From d916dfba2efa2d9359f5b432350a15e5ed1a0af4 Mon Sep 17 00:00:00 2001
From: houzhongjian <houzhongyi@126.com>
Date: 星期五, 18 十月 2024 13:58:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/model/mpk/project/ProjectForm.vue |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/views/model/mpk/project/ProjectForm.vue b/src/views/model/mpk/project/ProjectForm.vue
index 3f8f5be..d6937f7 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'))

--
Gitblit v1.9.3