From 4141e18a9aee7c2a3887ff99bf0b1343d5771b79 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 十一月 2023 15:25:57 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/custom/components/form/tab-form/index.jsx    |   34 +++++
 src/menu/components/card/balcony/index.jsx                |    3 
 src/tabviews/custom/components/card/prop-card/index.jsx   |    1 
 src/menu/components/form/step-form/index.jsx              |   42 ++++++
 src/menu/components/form/tab-form/index.jsx               |   42 ++++++
 src/templates/zshare/verifycard/index.jsx                 |    8 +
 src/menu/components/form/simple-form/options.jsx          |   22 +++
 src/menu/components/form/simple-form/index.jsx            |   42 ++++++
 src/tabviews/custom/popview/index.jsx                     |    8 -
 src/tabviews/custom/components/form/step-form/index.jsx   |   34 +++++
 src/tabviews/custom/index.jsx                             |    4 
 src/tabviews/custom/components/card/balcony/index.jsx     |    1 
 src/menu/components/form/step-form/options.jsx            |   42 +++++++
 src/tabviews/custom/components/form/simple-form/index.jsx |   34 +++++
 src/menu/components/card/prop-card/index.jsx              |    3 
 15 files changed, 290 insertions(+), 30 deletions(-)

diff --git a/src/menu/components/card/balcony/index.jsx b/src/menu/components/card/balcony/index.jsx
index 756ffcc..4f030d2 100644
--- a/src/menu/components/card/balcony/index.jsx
+++ b/src/menu/components/card/balcony/index.jsx
@@ -249,6 +249,9 @@
 
       if (d) {
         _card.columns = fromJS(d.columns).toJS()
+
+        _card.setting = { interType: 'system' }
+        _card.scripts = []
       }
     }
 
diff --git a/src/menu/components/card/prop-card/index.jsx b/src/menu/components/card/prop-card/index.jsx
index 551e955..ff9f81e 100644
--- a/src/menu/components/card/prop-card/index.jsx
+++ b/src/menu/components/card/prop-card/index.jsx
@@ -330,6 +330,9 @@
 
       if (d) {
         _card.columns = fromJS(d.columns).toJS()
+
+        _card.setting = { interType: 'system' }
+        _card.scripts = []
       }
     }
 
diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx
index f267c58..c9e9664 100644
--- a/src/menu/components/form/simple-form/index.jsx
+++ b/src/menu/components/form/simple-form/index.jsx
@@ -82,6 +82,10 @@
     }
   }
 
+  componentDidMount () {
+    MKEmitter.addListener('mkUpdateInter', this.mkUpdateInter)
+  }
+
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.state), fromJS(nextState))
   }
@@ -92,6 +96,21 @@
   componentWillUnmount () {
     this.setState = () => {
       return
+    }
+    MKEmitter.removeListener('mkUpdateInter', this.mkUpdateInter)
+  }
+
+  mkUpdateInter = (inter, split) => {
+    const { card } = this.state
+    
+    if (card.wrap.datatype === 'public' && card.wrap.publicId === inter.uuid) {
+      let _card = {...card, columns: fromJS(inter.columns).toJS()}
+
+      split.delay = split.delay + 10
+
+      setTimeout(() => {
+        this.updateComponent(_card)
+      }, split.delay)
     }
   }
 
@@ -104,7 +123,7 @@
     card.errors = []
     let idCtrl = false
 
-    if (card.wrap.datatype !== 'static') {
+    if (card.wrap.datatype === 'dynamic') {
       let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
       if (supModule === 'empty') {
         supModule = ''
@@ -128,7 +147,10 @@
         })
       })
     } else {
-      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+      let supModule = ''
+      if (card.wrap.datatype === 'static') {
+        supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+      }
 
       card.$tables = getTables(card)
 
@@ -137,7 +159,7 @@
           if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
             idCtrl = true
           }
-          if (m.type === 'linkMain' && !supModule) {
+          if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') {
             card.errors.push({ level: 1, detail: `璇锋鏌ュ叧鑱斾富琛ㄢ��${m.label}鈥濇槸鍚︽湁鏁坄})
           }
         })
@@ -497,6 +519,17 @@
       } else {
         _card.setting.supModule = ''
       }
+    } else if (res.datatype === 'public') {
+      let interfaces = window.GLOB.customMenu.interfaces || []
+
+      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
+
+      if (d) {
+        _card.columns = fromJS(d.columns).toJS()
+
+        _card.setting = { interType: 'system' }
+        _card.scripts = []
+      }
     }
 
     _card.subcards[0].setting.focus = _card.wrap.focus
@@ -563,8 +596,7 @@
             <PasteForms config={card.subcards[0]} update={this.pasteForm} />
             <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/>
             <DeleteOutlined className="close" title="鍒犻櫎缁勪欢" onClick={() => this.props.deletecomponent(card.uuid)} />
-            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
-            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
+            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
           </div>
         } trigger="hover">
           <ToolOutlined />
diff --git a/src/menu/components/form/simple-form/options.jsx b/src/menu/components/form/simple-form/options.jsx
index 9df9c00..04b22fb 100644
--- a/src/menu/components/form/simple-form/options.jsx
+++ b/src/menu/components/form/simple-form/options.jsx
@@ -45,6 +45,18 @@
     }
   }
 
+  let interfaces = []
+  if (menu.interfaces) {
+    menu.interfaces.forEach(item => {
+      if (item.status === 'true') {
+        interfaces.push({
+          value: item.uuid,
+          label: item.name
+        })
+      }
+    })
+  }
+
   let buttons = []
 
   if (!wrap.enable || wrap.enable === 'true') {
@@ -94,14 +106,24 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
+        {value: 'public', label: '鍏叡鏁版嵁婧�'},
       ],
       controlFields: [
         {field: 'empty', values: ['dynamic']},
         {field: 'supModule', values: ['static']},
+        {field: 'publicId', values: ['public']},
       ]
     },
     {
       type: 'select',
+      field: 'publicId',
+      label: '鏁版嵁婧�',
+      initval: wrap.publicId || '',
+      required: true,
+      options: interfaces
+    },
+    {
+      type: 'select',
       field: 'focus',
       label: '鐒︾偣',
       initval: wrap.focus || '',
diff --git a/src/menu/components/form/step-form/index.jsx b/src/menu/components/form/step-form/index.jsx
index f4f7947..654f627 100644
--- a/src/menu/components/form/step-form/index.jsx
+++ b/src/menu/components/form/step-form/index.jsx
@@ -89,6 +89,10 @@
     }
   }
 
+  componentDidMount () {
+    MKEmitter.addListener('mkUpdateInter', this.mkUpdateInter)
+  }
+
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.state), fromJS(nextState))
   }
@@ -99,6 +103,21 @@
   componentWillUnmount () {
     this.setState = () => {
       return
+    }
+    MKEmitter.removeListener('mkUpdateInter', this.mkUpdateInter)
+  }
+
+  mkUpdateInter = (inter, split) => {
+    const { card } = this.state
+    
+    if (card.wrap.datatype === 'public' && card.wrap.publicId === inter.uuid) {
+      let _card = {...card, columns: fromJS(inter.columns).toJS()}
+
+      split.delay = split.delay + 10
+
+      setTimeout(() => {
+        this.updateComponent(_card)
+      }, split.delay)
     }
   }
 
@@ -111,7 +130,7 @@
     card.errors = []
     let idCtrl = false
 
-    if (card.wrap.datatype !== 'static') {
+    if (card.wrap.datatype === 'dynamic') {
       let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
       if (supModule === 'empty') {
         supModule = ''
@@ -135,7 +154,10 @@
         })
       })
     } else {
-      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+      let supModule = ''
+      if (card.wrap.datatype === 'static') {
+        supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+      }
 
       card.$tables = getTables(card)
 
@@ -144,7 +166,7 @@
           if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
             idCtrl = true
           }
-          if (m.type === 'linkMain' && !supModule) {
+          if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') {
             card.errors.push({ level: 1, detail: `璇锋鏌ュ垎缁勨��${item.setting.title}鈥濅腑鍏宠仈涓昏〃鈥�${m.label}鈥濇槸鍚︽湁鏁坄})
           }
         })
@@ -586,6 +608,17 @@
       } else {
         _card.setting.supModule = ''
       }
+    } else if (res.datatype === 'public') {
+      let interfaces = window.GLOB.customMenu.interfaces || []
+
+      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
+
+      if (d) {
+        _card.columns = fromJS(d.columns).toJS()
+
+        _card.setting = { interType: 'system' }
+        _card.scripts = []
+      }
     }
 
     this.updateComponent(_card)
@@ -670,8 +703,7 @@
             <PasteComponent config={card} options={['formgroup', 'simpleform']} updateConfig={this.pasteForm} />
             <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/>
             <DeleteOutlined className="close" title="鍒犻櫎缁勪欢" onClick={() => this.props.deletecomponent(card.uuid)} />
-            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
-            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
+            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
           </div>
         } trigger="hover">
           <ToolOutlined />
diff --git a/src/menu/components/form/step-form/options.jsx b/src/menu/components/form/step-form/options.jsx
index dae0a31..1ec6a9e 100644
--- a/src/menu/components/form/step-form/options.jsx
+++ b/src/menu/components/form/step-form/options.jsx
@@ -29,6 +29,18 @@
     }
   }
 
+  let interfaces = []
+  if (menu.interfaces) {
+    menu.interfaces.forEach(item => {
+      if (item.status === 'true') {
+        interfaces.push({
+          value: item.uuid,
+          label: item.name
+        })
+      }
+    })
+  }
+
   const wrapForm = [
     {
       type: 'text',
@@ -59,14 +71,44 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
+        {value: 'public', label: '鍏叡鏁版嵁婧�'}
       ],
       controlFields: [
         {field: 'empty', values: ['dynamic']},
         {field: 'supModule', values: ['static']},
+        {field: 'publicId', values: ['public']},
       ]
     },
     {
       type: 'select',
+      field: 'publicId',
+      label: '鏁版嵁婧�',
+      initval: wrap.publicId || '',
+      required: true,
+      options: interfaces,
+      reset_source: config.subtype !== 'tabform',
+      callback: (map, record) => {
+        if (!record.publicId) return
+
+        let interfaces = window.GLOB.customMenu.interfaces || []
+
+        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
+
+        if (!d || !d.columns) return
+
+        let columns = JSON.parse(JSON.stringify(d.columns))
+
+        let _sCtrl = map.get('statusControl')
+
+        if (_sCtrl && !_sCtrl.forbid) {
+          _sCtrl.options = columns
+          _sCtrl.oriOptions = columns
+          map.set('statusControl', _sCtrl)
+        }
+      }
+    },
+    {
+      type: 'select',
       field: 'statusControl',
       label: '鐘舵�佹帶鍒�',
       initval: wrap.statusControl || '',
diff --git a/src/menu/components/form/tab-form/index.jsx b/src/menu/components/form/tab-form/index.jsx
index 847f7af..86c51fb 100644
--- a/src/menu/components/form/tab-form/index.jsx
+++ b/src/menu/components/form/tab-form/index.jsx
@@ -101,6 +101,10 @@
     }
   }
 
+  componentDidMount () {
+    MKEmitter.addListener('mkUpdateInter', this.mkUpdateInter)
+  }
+
   shouldComponentUpdate (nextProps, nextState) {
     return !is(fromJS(this.state), fromJS(nextState))
   }
@@ -111,6 +115,21 @@
   componentWillUnmount () {
     this.setState = () => {
       return
+    }
+    MKEmitter.removeListener('mkUpdateInter', this.mkUpdateInter)
+  }
+
+  mkUpdateInter = (inter, split) => {
+    const { card } = this.state
+    
+    if (card.wrap.datatype === 'public' && card.wrap.publicId === inter.uuid) {
+      let _card = {...card, columns: fromJS(inter.columns).toJS()}
+
+      split.delay = split.delay + 10
+
+      setTimeout(() => {
+        this.updateComponent(_card)
+      }, split.delay)
     }
   }
 
@@ -123,7 +142,7 @@
     card.errors = []
     let idCtrl = false
 
-    if (card.wrap.datatype !== 'static') {
+    if (card.wrap.datatype === 'dynamic') {
       let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
       if (supModule === 'empty') {
         supModule = ''
@@ -147,7 +166,10 @@
         })
       })
     } else {
-      let supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+      let supModule = ''
+      if (card.wrap.datatype === 'static') {
+        supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
+      }
 
       card.$tables = getTables(card)
 
@@ -156,7 +178,7 @@
           if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
             idCtrl = true
           }
-          if (m.type === 'linkMain' && !supModule) {
+          if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') {
             card.errors.push({ level: 1, detail: `璇锋鏌ュ垎缁勨��${item.setting.title}鈥濅腑鍏宠仈涓昏〃鈥�${m.label}鈥濇槸鍚︽湁鏁坄})
           }
         })
@@ -587,6 +609,17 @@
       } else {
         _card.setting.supModule = ''
       }
+    } else if (res.datatype === 'public') {
+      let interfaces = window.GLOB.customMenu.interfaces || []
+
+      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
+
+      if (d) {
+        _card.columns = fromJS(d.columns).toJS()
+
+        _card.setting = { interType: 'system' }
+        _card.scripts = []
+      }
     }
 
     this.updateComponent(_card)
@@ -671,8 +704,7 @@
             <PasteComponent config={card} options={['formgroup', 'simpleform']} updateConfig={this.pasteForm} />
             <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/>
             <DeleteOutlined className="close" title="鍒犻櫎缁勪欢" onClick={() => this.props.deletecomponent(card.uuid)} />
-            {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}
-            {card.wrap.datatype === 'static' ? <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/> : null}
+            {card.wrap.datatype === 'dynamic' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : <SettingOutlined style={{color: '#eeeeee', cursor: 'not-allowed'}}/>}
           </div>
         } trigger="hover">
           <ToolOutlined />
diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx
index 8378215..b6fc340 100644
--- a/src/tabviews/custom/components/card/balcony/index.jsx
+++ b/src/tabviews/custom/components/card/balcony/index.jsx
@@ -252,7 +252,6 @@
 
       _data.$$BID = BID || ''
       _data.$$BData = BData || ''
-      _data.$$uuid = _data[config.setting.primaryKey] || ''
 
       this.setState({data: _data})
     }
diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index 340d871..c4d2b1c 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -352,7 +352,6 @@
 
       _data.$$BID = BID || ''
       _data.$$BData = BData || ''
-      _data.$$uuid = _data[config.setting.primaryKey] || ''
 
       this.loaded = true
 
diff --git a/src/tabviews/custom/components/form/simple-form/index.jsx b/src/tabviews/custom/components/form/simple-form/index.jsx
index e3c340c..3a87da3 100644
--- a/src/tabviews/custom/components/form/simple-form/index.jsx
+++ b/src/tabviews/custom/components/form/simple-form/index.jsx
@@ -57,6 +57,13 @@
   
         window.GLOB.SyncData.delete(_config.dataName)
       }
+    } else if (_config.wrap.datatype === 'public') {
+      if (window.GLOB.CacheData.has(_config.wrap.publicId)) {
+        _data = window.GLOB.CacheData.get(_config.wrap.publicId)
+        _data = fromJS(_data).toJS()
+        _data.$$BID = BID || ''
+        _data.$$BData = BData || ''
+      }
     } else {
       _data = {$$empty: true}
     }
@@ -93,6 +100,10 @@
       MKEmitter.addListener('transferSyncData', this.transferSyncData)
     }
 
+    if (config.wrap.datatype === 'public') {
+      MKEmitter.addListener('mkPublicData', this.mkPublicData)
+    }
+
     this.initExec()
   }
 
@@ -105,6 +116,7 @@
       return
     }
     MKEmitter.removeListener('reloadData', this.reloadData)
+    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
     MKEmitter.removeListener('mkFormSubmit', this.mkFormSubmit)
     MKEmitter.removeListener('searchRefresh', this.searchRefresh)
     MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
@@ -136,6 +148,23 @@
     window.GLOB.SyncData.delete(config.dataName)
 
     MKEmitter.removeListener('transferSyncData', this.transferSyncData)
+  }
+
+  mkPublicData = (publicId, data) => {
+    const { config, BID, BData } = this.state
+
+    if (config.wrap.datatype === 'public' && config.wrap.publicId === publicId) {
+      let _data = fromJS(data).toJS()
+
+      _data.$$BID = BID || ''
+      _data.$$BData = BData || ''
+
+      this.setState({
+        data: null
+      }, () => {
+        this.setState({data: _data})
+      })
+    }
   }
 
   searchRefresh = (searchId) => {
@@ -229,7 +258,10 @@
   async loadData () {
     const { config, BID } = this.state
 
-    if (config.wrap.datatype === 'static') {
+    if (config.wrap.datatype === 'public') {
+      MKEmitter.emit('reloadData', config.wrap.publicId)
+      return
+    } else if (config.wrap.datatype === 'static') {
       this.setState({
         data: {$$empty: true}
       })
diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx
index 6e08986..dca74c9 100644
--- a/src/tabviews/custom/components/form/step-form/index.jsx
+++ b/src/tabviews/custom/components/form/step-form/index.jsx
@@ -57,6 +57,13 @@
   
         window.GLOB.SyncData.delete(_config.dataName)
       }
+    } else if (_config.wrap.datatype === 'public') {
+      if (window.GLOB.CacheData.has(_config.wrap.publicId)) {
+        _data = window.GLOB.CacheData.get(_config.wrap.publicId)
+        _data = fromJS(_data).toJS()
+        _data.$$BID = BID || ''
+        _data.$$BData = BData || ''
+      }
     } else {
       _data = {$$empty: true}
     }
@@ -134,6 +141,10 @@
       MKEmitter.addListener('transferSyncData', this.transferSyncData)
     }
 
+    if (config.wrap.datatype === 'public') {
+      MKEmitter.addListener('mkPublicData', this.mkPublicData)
+    }
+
     this.initExec()
   }
 
@@ -146,6 +157,7 @@
       return
     }
     MKEmitter.removeListener('reloadData', this.reloadData)
+    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
     MKEmitter.removeListener('mkFormSubmit', this.mkFormSubmit)
     MKEmitter.removeListener('searchRefresh', this.searchRefresh)
     MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
@@ -185,6 +197,23 @@
     window.GLOB.SyncData.delete(config.dataName)
 
     MKEmitter.removeListener('transferSyncData', this.transferSyncData)
+  }
+
+  mkPublicData = (publicId, data) => {
+    const { config, BID, BData } = this.state
+
+    if (config.wrap.datatype === 'public' && config.wrap.publicId === publicId) {
+      let _data = fromJS(data).toJS()
+
+      _data.$$BID = BID || ''
+      _data.$$BData = BData || ''
+
+      this.setState({
+        data: null
+      }, () => {
+        this.setState({data: _data})
+      })
+    }
   }
 
   searchRefresh = (searchId) => {
@@ -290,7 +319,10 @@
   async loadData (type) {
     const { config, BID } = this.state
 
-    if (config.wrap.datatype === 'static') {
+    if (config.wrap.datatype === 'public') {
+      MKEmitter.emit('reloadData', config.wrap.publicId)
+      return
+    } else if (config.wrap.datatype === 'static') {
       this.setState({
         data: {$$empty: true}
       })
diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx
index 1d19f3d..6e921bb 100644
--- a/src/tabviews/custom/components/form/tab-form/index.jsx
+++ b/src/tabviews/custom/components/form/tab-form/index.jsx
@@ -56,6 +56,13 @@
   
         window.GLOB.SyncData.delete(_config.dataName)
       }
+    } else if (_config.wrap.datatype === 'public') {
+      if (window.GLOB.CacheData.has(_config.wrap.publicId)) {
+        _data = window.GLOB.CacheData.get(_config.wrap.publicId)
+        _data = fromJS(_data).toJS()
+        _data.$$BID = BID || ''
+        _data.$$BData = BData || ''
+      }
     } else {
       _data = {$$empty: true}
     }
@@ -108,6 +115,10 @@
       MKEmitter.addListener('transferSyncData', this.transferSyncData)
     }
 
+    if (config.wrap.datatype === 'public') {
+      MKEmitter.addListener('mkPublicData', this.mkPublicData)
+    }
+
     this.initExec()
   }
 
@@ -120,6 +131,7 @@
       return
     }
     MKEmitter.removeListener('reloadData', this.reloadData)
+    MKEmitter.removeListener('mkPublicData', this.mkPublicData)
     MKEmitter.removeListener('mkFormSubmit', this.mkFormSubmit)
     MKEmitter.removeListener('searchRefresh', this.searchRefresh)
     MKEmitter.removeListener('resetSelectLine', this.resetParentParam)
@@ -151,6 +163,23 @@
     window.GLOB.SyncData.delete(config.dataName)
 
     MKEmitter.removeListener('transferSyncData', this.transferSyncData)
+  }
+
+  mkPublicData = (publicId, data) => {
+    const { config, BID, BData } = this.state
+
+    if (config.wrap.datatype === 'public' && config.wrap.publicId === publicId) {
+      let _data = fromJS(data).toJS()
+
+      _data.$$BID = BID || ''
+      _data.$$BData = BData || ''
+
+      this.setState({
+        data: null
+      }, () => {
+        this.setState({data: _data})
+      })
+    }
   }
 
   searchRefresh = (searchId) => {
@@ -243,7 +272,10 @@
   async loadData () {
     const { config, BID } = this.state
 
-    if (config.wrap.datatype === 'static') {
+    if (config.wrap.datatype === 'public') {
+      MKEmitter.emit('reloadData', config.wrap.publicId)
+      return
+    } else if (config.wrap.datatype === 'static') {
       this.setState({
         data: {$$empty: true}
       })
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 9fc21a2..353ccd8 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -802,7 +802,7 @@
           }
 
           if (group.subButton.verify && group.subButton.verify.invalid === 'true') {
-            if (item.wrap.datatype === 'static') {
+            if (item.wrap.datatype === 'static' || item.wrap.datatype === 'public') {
               group.subButton.verify.invalid = 'false'
             } else if (group.subButton.sqlType === 'insert') {
               group.subButton.verify.invalid = 'false'
@@ -929,7 +929,7 @@
     }
 
     if (cell.verify && cell.verify.invalid === 'true') {
-      if (item.wrap && item.wrap.datatype === 'static') {
+      if (item.wrap && (item.wrap.datatype === 'static' || item.wrap.datatype === 'public')) {
         cell.verify.invalid = 'false'
       } else if (cell.intertype !== 'system' && cell.procMode !== 'system') {
         cell.verify.invalid = 'false'
diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx
index aa089dc..41b1473 100644
--- a/src/tabviews/custom/popview/index.jsx
+++ b/src/tabviews/custom/popview/index.jsx
@@ -736,12 +736,8 @@
       } else if (component.type === 'group') {
         component.components = this.formatSetting(component.components, params, regs, balMap)
         return component
-      } else if (component.wrap && component.wrap.datatype === 'public') {
-        component.setting.useMSearch = false
-        component.setting.sync = 'false'
-
-        return component
-      } else if (component.wrap && component.wrap.datatype === 'static') {
+      } else if (component.wrap && (component.wrap.datatype === 'static' || component.wrap.datatype === 'public')) {
+        component.wrap.datatype = 'static'
         component.format = ''
         component.setting = component.setting || {}
         component.setting.useMSearch = false
diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx
index 0c16e8e..6949347 100644
--- a/src/templates/zshare/verifycard/index.jsx
+++ b/src/templates/zshare/verifycard/index.jsx
@@ -542,7 +542,11 @@
     let _invalid = _verify.invalid || 'true'
 
     _verify.limitInvalid = false
-    if (config.wrap && config.wrap.datatype === 'static') {
+    if (config.wrap && config.wrap.datatype === 'public') {
+      _verify.limitInvalid = true
+      _verify.limitText = '鍏叡鏁版嵁婧愶紝涓嶅彲浣跨敤澶辨晥楠岃瘉'
+      _invalid = 'false'
+    } else if (config.wrap && config.wrap.datatype === 'static') {
       _verify.limitInvalid = true
       _verify.limitText = '闈欐�佹暟鎹簮锛屼笉鍙娇鐢ㄥけ鏁堥獙璇�'
       _invalid = 'false'
@@ -559,7 +563,7 @@
       _verify.limitText = '鎸夐挳銆婁笉閫夋嫨琛屻�嬫椂锛屼笉鑳戒娇鐢ㄥけ鏁堥獙璇侊紒'
       _invalid = 'false'
     }
-
+    
     if (card.sqlType === 'custom') { // 鑷畾涔夐獙璇佹椂锛屼笉浣跨敤榛樿sql
       _verify.default = 'false'
     }

--
Gitblit v1.8.0