From f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 07 四月 2021 23:25:29 +0800
Subject: [PATCH] 2021-04-07

---
 src/templates/zshare/createinterface/index.jsx |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/templates/zshare/createinterface/index.jsx b/src/templates/zshare/createinterface/index.jsx
index 1583cd2..7f40704 100644
--- a/src/templates/zshare/createinterface/index.jsx
+++ b/src/templates/zshare/createinterface/index.jsx
@@ -7,6 +7,7 @@
 import MutilForm from './mutilform'
 import Utils from '@/utils/utils.js'
 import options from '@/store/options.js'
+import { updateForm } from '@/utils/utils-update.js'
 import Api from '@/api'
 import './index.scss'
 
@@ -422,20 +423,14 @@
                 _LongParam = ''
               }
             }
-            let fields = []
 
             if (_LongParam && _LongParam.type === 'Modal') {
-              if (_LongParam.groups.length > 0) {
-                _LongParam.groups.forEach(group => {
-                  fields = [...fields, ...group.sublist]
-                })
-              } else {
-                fields = _LongParam.fields
-              }
+              _LongParam = updateForm(_LongParam)
             }
 
-            if (fields && fields.length > 0) {
-              formlist = fields.map(cell => {
+            if (_LongParam && _LongParam.fields.length > 0) {
+              _LongParam.fields.forEach(cell => {
+                if (!cell.field) return 
                 let _fieldlen = cell.fieldlength || 50
 
                 if (cell.type === 'textarea' || cell.type === 'fileupload' || cell.type === 'multiselect') {
@@ -471,7 +466,7 @@
                   _field.value = ''
                 }
 
-                return _field
+                formlist.push(_field)
               })
             }
             resolve(true)

--
Gitblit v1.8.0