From b45bad33154fb97b76e6c54a86609d446f02ad21 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期四, 10 十月 2024 14:22:44 +0800
Subject: [PATCH] 分页bug修复,打包历史发布功能

---
 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