From 21d92eff0e23974d76e3e5a79ba50e3fc1c0b879 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 15 四月 2022 01:08:15 +0800
Subject: [PATCH] 2022-04-15

---
 src/menu/components/form/normal-form/index.jsx |   37 +++++++++++++++++++++++++++++--------
 1 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/src/menu/components/form/normal-form/index.jsx b/src/menu/components/form/normal-form/index.jsx
index ed6b947..7635452 100644
--- a/src/menu/components/form/normal-form/index.jsx
+++ b/src/menu/components/form/normal-form/index.jsx
@@ -59,7 +59,6 @@
       let _card = {
         uuid: card.uuid,
         type: card.type,
-        floor: card.floor,
         tabId: card.tabId || '',
         parentId: card.parentId || '',
         format: 'object',   // 缁勪欢灞炴�� - 鏁版嵁鏍煎紡
@@ -194,7 +193,21 @@
   }
 
   getStyle = (comIds, style) => {
-    const { card } = this.state
+    const { card, group } = this.state
+
+    if (comIds[0] === 'form') {
+      let Index = group.fields.findIndex(n => n.uuid === comIds[1])
+
+      if (Index === -1) return
+      
+      let _group = fromJS(group).toJS()
+
+      _group.fields[Index].style = style
+
+      this.updateGroup(_group)
+
+      return
+    }
 
     if (comIds.length !== 1 || comIds[0] !== card.uuid) return
 
@@ -398,7 +411,6 @@
       initval: '',
       type: 'text',
       resourceType: '0',
-      setAll: 'false',
       span: span,
       labelwidth: 33.3,
       options: [],
@@ -434,10 +446,7 @@
     let _inputfields = []
     let _tabfields = []
     let _linkableFields = []
-    let _linksupFields = [{
-      field: '',
-      label: '绌�'
-    }]
+    let _linksupFields = []
     let standardform = null
 
     let uniq = new Map()
@@ -476,8 +485,16 @@
           _tabIndex++
         }
       }
+
+      if (item.type === 'switch') {
+        _linksupFields.push({
+          field: item.field,
+          label: _linkIndex + '銆�' + item.label
+        })
+      }
       
       if (!['select', 'link', 'radio', 'checkcard'].includes(item.type)) return
+      if (item.type === 'checkcard' && item.multiple === 'true') return // 閫夐」鍗″閫�
       if (item.field && !uniq.has(item.field)) {
         uniq.set(item.field, true)
 
@@ -550,6 +567,9 @@
         }
 
         if (item.uuid === res.uuid) {
+          if (item.style) {
+            res.style = item.style
+          }
           return res
         } else {
           return item
@@ -718,7 +738,8 @@
         <Modal
           title={this.state.dict['model.edit']}
           visible={this.state.visible}
-          width={850}
+          width={950}
+          maskClosable={false}
           onCancel={this.editModalCancel}
           onOk={this.handleSubmit}
           confirmLoading={this.state.sqlVerifing}

--
Gitblit v1.8.0