From af89cc791fc928578740a62917e9ee32a8a23d6b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 17 五月 2022 23:24:23 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/form/tab-form/index.jsx |   73 +++++++++++++++++++++++++-----------
 1 files changed, 50 insertions(+), 23 deletions(-)

diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 5939b12..9457252 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-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',   // 缁勪欢灞炴�� - 鏁版嵁鏍煎紡
@@ -76,7 +75,21 @@
         scripts: [],
         subcards: [{
           uuid: Utils.getuuid(),
-          setting: {title: '绗竴姝�', align: 'left_right'},
+          setting: {title: '鍒嗙粍1', align: 'left_right'},
+          sort: 1,
+          style: {},
+          fields: [],
+          subButton: {label: '鎻愪氦', type: 'submit', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px'}},
+        }, {
+          uuid: Utils.getuuid(),
+          setting: {title: '鍒嗙粍2', align: 'left_right'},
+          sort: 1,
+          style: {},
+          fields: [],
+          subButton: {label: '鎻愪氦', type: 'submit', enable: 'true', style: {backgroundColor: '#1890ff', color: '#ffffff', paddingLeft: '25px', paddingRight: '25px', paddingTop: '5px', paddingBottom: '5px'}},
+        }, {
+          uuid: Utils.getuuid(),
+          setting: {title: '鍒嗙粍3', align: 'left_right'},
           sort: 1,
           style: {},
           fields: [],
@@ -192,7 +205,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
 
@@ -440,35 +467,30 @@
         index = i
       }
 
+      let label = item.label || ''
+      if (item.field && item.field.toLowerCase() !== label.toLowerCase()) {
+        label = label + ' (' + item.field + ')'
+      }
+
       if (['text', 'number', 'textarea', 'color'].includes(item.type) && _item.field !== item.field) {
         _inputfields.push({
           field: item.field,
-          label: _inputIndex + '銆�' + item.label
+          label: _inputIndex + '銆�' + label
         })
         _inputIndex++
       }
-      if (appType === 'mob') {
-        if (_form.field !== item.field && item.hidden !== 'true' && ['text', 'number'].includes(item.type)) {
-          _tabfields.push({
-            field: item.field,
-            label: _tabIndex + '銆�' + item.label
-          })
-          _tabIndex++
-        }
-      } else {
-        if (_form.field !== item.field && item.hidden !== 'true' && ['text', 'number', 'select', 'link'].includes(item.type)) {
-          _tabfields.push({
-            field: item.field,
-            label: _tabIndex + '銆�' + item.label
-          })
-          _tabIndex++
-        }
+      if (_form.field !== item.field && item.hidden !== 'true' && ['text', 'number', 'select', 'link'].includes(item.type)) {
+        _tabfields.push({
+          field: item.field,
+          label: _tabIndex + '銆�' + label
+        })
+        _tabIndex++
       }
 
       if (item.type === 'switch') {
         _linksupFields.push({
           field: item.field,
-          label: _linkIndex + '銆�' + item.label
+          label: _linkIndex + '銆�' + label
         })
       }
       
@@ -483,7 +505,7 @@
         })
         _linksupFields.push({
           value: item.field,
-          text: _linkIndex + '銆�' + item.label
+          text: _linkIndex + '銆�' + label
         })
 
         _linkIndex++
@@ -547,6 +569,9 @@
         }
 
         if (item.uuid === res.uuid) {
+          if (item.style) {
+            res.style = item.style
+          }
           return res
         } else {
           return item
@@ -713,10 +738,12 @@
           />}
           <FormAction config={card} group={group} updateconfig={this.updateGroup}/>
         </div> : null}
+        <div className="component-name"><div className="center">{card.name}</div></div>
         <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