From bdfec44c9f3a37dbbe05bf14a252ffec04132a86 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 06 九月 2022 21:24:28 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/menu/components/form/tab-form/index.jsx |   34 +++++++---------------------------
 1 files changed, 7 insertions(+), 27 deletions(-)

diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 2d8f7c6..711552c 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -131,7 +131,6 @@
   }
 
   componentDidMount () {
-    MKEmitter.addListener('submitStyle', this.getStyle)
     MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle)
   }
 
@@ -146,7 +145,6 @@
     this.setState = () => {
       return
     }
-    MKEmitter.removeListener('submitStyle', this.getStyle)
     MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle)
   }
 
@@ -181,7 +179,7 @@
         supModule = ''
       }
       let columns = card.columns.map(c => c.field)
-      let lowcols = card.columns.map(c => c.field.toLowerCase())
+      // let lowcols = card.columns.map(c => c.field.toLowerCase())
 
       if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) {
         card.errors.push({ level: 0, detail: '鏈缃暟鎹簮锛�'})
@@ -199,8 +197,8 @@
         item.fields.forEach(m => {
           if (m.type === 'linkMain' && !supModule) {
             card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑鍏宠仈涓昏〃琛ㄥ崟鈥�${m.label}鈥濇棤鏁坄})
-          } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
-            card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻})
+          // } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
+          //   card.errors.push({ level: 1, detail: `鍒嗙粍鈥�${item.setting.title}鈥濅腑琛ㄥ崟鈥�${m.label}鈥濆ぇ灏忓啓涓庡瓧娈甸泦涓嶄竴鑷碻})
           }
         })
       })
@@ -240,29 +238,11 @@
   changeStyle = () => {
     const { card } = this.state
 
-    MKEmitter.emit('changeStyle', [card.uuid], ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style)
+    MKEmitter.emit('changeStyle', ['height', 'background', 'border', 'padding', 'margin', 'shadow'], card.style, this.getStyle)
   }
 
-  getStyle = (comIds, style) => {
-    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
-
-    let _card = {...card, style}
+  getStyle = (style) => {
+    let _card = {...this.state.card, style}
 
     this.updateComponent(_card)
   }
@@ -641,7 +621,7 @@
           param.rduri = window.GLOB.mainSystemApi
         }
         
-        Api.getLocalConfig(param).then(result => {
+        Api.genericInterface(param).then(result => {
           if (result.status) {
             this.setState({
               sqlVerifing: false,

--
Gitblit v1.8.0