From 21e4dcd784ea0504c07d66befc19ccda110c58e4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 18 六月 2023 22:29:56 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/menu/components/form/formaction/formconfig.jsx             |    8 +-
 src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx  |    6 +
 src/menu/components/share/actioncomponent/actionform/index.jsx |   10 +++
 src/menu/components/form/formaction/actionform/index.jsx       |   10 +++
 src/tabviews/custom/components/chart/antv-G6/index.jsx         |   14 +++-
 src/tabviews/zshare/actionList/normalbutton/index.jsx          |  103 ++--------------------------------
 6 files changed, 42 insertions(+), 109 deletions(-)

diff --git a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx
index 9eed12a..4c4f683 100644
--- a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx
@@ -236,7 +236,7 @@
         label: '涓婄骇缁勪欢'
       }, {
         value: 'line',
-        label: '琛�'
+        label: '鏁版嵁婧�'
       }],
       controlFields: [
         {field: 'rootLabel', values: ['fixed', 'supvalue']},
@@ -249,6 +249,7 @@
       field: 'rootValue',
       label: '鏍硅妭鐐瑰��',
       initval: card.rootValue || '',
+      tooltip: '鏍硅妭鐐逛娇鐢ㄤ笂绾х粍浠舵椂锛岃濉啓涓婄骇缁勪欢涓搴旂殑瀛楁銆�',
       required: true
     },
     {
@@ -256,6 +257,7 @@
       field: 'rootLabel',
       label: '鏍硅妭鐐规枃鏈�',
       initval: card.rootLabel || '',
+      tooltip: '鏍硅妭鐐逛娇鐢ㄤ笂绾х粍浠舵椂锛岃濉啓涓婄骇缁勪欢涓搴旂殑瀛楁銆�',
       required: true
     },
     {
@@ -345,7 +347,7 @@
       field: 'collapsed',
       label: '鑺傜偣鍚堝苟',
       initval: card.collapsed || 'false',
-      tooltip: '涓�绾ц妭鐐规槸鍚﹀悎骞躲��',
+      tooltip: '鍒濆鍖栨椂锛屼竴绾ц妭鐐规槸鍚﹀悎骞躲��',
       required: false,
       options: [
         {value: 'false', label: '鍚�'},
diff --git a/src/menu/components/form/formaction/actionform/index.jsx b/src/menu/components/form/formaction/actionform/index.jsx
index 266c700..1a17b84 100644
--- a/src/menu/components/form/formaction/actionform/index.jsx
+++ b/src/menu/components/form/formaction/actionform/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 // import { fromJS } from 'immutable'
-import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader } from 'antd'
+import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, notification } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 import { formRule } from '@/utils/option.js'
 
@@ -409,6 +409,14 @@
     return new Promise((resolve, reject) => {
       this.props.form.validateFieldsAndScroll((err, values) => {
         if (!err) {
+          if (values.intertype === 'outer' && values.sysInterface === 'true' && !values.outerFunc) {
+            notification.warning({
+              top: 92,
+              message: '浣跨敤鍗曠偣绯荤粺璇峰~鍐欏閮ㄥ嚱鏁帮紒',
+              duration: 10
+            })
+            return
+          }
           resolve(values)
         } else {
           reject(err)
diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx
index 823ad5f..6be2240 100644
--- a/src/menu/components/form/formaction/formconfig.jsx
+++ b/src/menu/components/form/formaction/formconfig.jsx
@@ -163,16 +163,16 @@
     {
       type: 'radio',
       key: 'sysInterface',
-      label: '绯荤粺鎺ュ彛',
+      label: '绯荤粺绫诲瀷',
       initVal: card.sysInterface || 'false',
-      tooltip: '鍗曠偣鐧诲綍绯荤粺',
+      tooltip: '涓氬姟绯荤粺鎸囧悓涓�sso涓嬬殑鍏朵粬涓氬姟绯荤粺',
       required: true,
       options: [{
         value: 'true',
-        text: '鏄�'
+        text: '鍗曠偣'
       }, {
         value: 'false',
-        text: '鍚�'
+        text: '涓氬姟'
       }]
     },
     {
diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index 3a832cd..1f430f5 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -194,6 +194,7 @@
           shows.push('cbTable')
         }
 
+        reRequired.outerFunc = false
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
@@ -202,6 +203,7 @@
         } else if (this.record.sysInterface === 'true') {
           reReadonly.interface = true
           reRequired.interface = false
+          reRequired.outerFunc = true
 
           shows.push('interface')
         } else if (this.record.sysInterface === 'external') {
@@ -273,6 +275,7 @@
           shows.push('cbTable')
         }
 
+        reRequired.outerFunc = false
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
           reRequired.interface = true
@@ -281,6 +284,7 @@
         } else if (this.record.sysInterface === 'true') {
           reReadonly.interface = true
           reRequired.interface = false
+          reRequired.outerFunc = true
 
           shows.push('interface')
         } else if (this.record.sysInterface === 'external') {
@@ -321,6 +325,7 @@
         shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
         reRequired.innerFunc = false
         reRequired.callbackFunc = false
+        reRequired.outerFunc = false
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -330,6 +335,7 @@
         } else if (this.record.sysInterface === 'true') {
           reReadonly.interface = true
           reRequired.interface = false
+          reRequired.outerFunc = true
 
           shows.push('interface')
         } else if (this.record.sysInterface === 'external') {
@@ -349,6 +355,7 @@
       if (this.record.intertype === 'outer') {
         shows.push('innerFunc', 'sysInterface', 'outerFunc')
         reRequired.innerFunc = false
+        reRequired.outerFunc = false
 
         if (this.record.sysInterface === 'false') {
           reReadonly.interface = false
@@ -358,6 +365,7 @@
         } else if (this.record.sysInterface === 'true') {
           reReadonly.interface = true
           reRequired.interface = false
+          reRequired.outerFunc = true
 
           shows.push('interface')
         } else if (this.record.sysInterface === 'external') {
@@ -421,6 +429,7 @@
           shows.push('innerFunc', 'sysInterface', 'outerFunc', 'callbackFunc')
           reRequired.innerFunc = false
           reRequired.callbackFunc = false
+          reRequired.outerFunc = false
 
           if (this.record.sysInterface === 'false') {
             reReadonly.interface = false
@@ -430,6 +439,7 @@
           } else if (this.record.sysInterface === 'true') {
             reReadonly.interface = true
             reRequired.interface = false
+            reRequired.outerFunc = true
   
             shows.push('interface')
           } else if (this.record.sysInterface === 'external') {
diff --git a/src/tabviews/custom/components/chart/antv-G6/index.jsx b/src/tabviews/custom/components/chart/antv-G6/index.jsx
index 8406f8d..31417fb 100644
--- a/src/tabviews/custom/components/chart/antv-G6/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-G6/index.jsx
@@ -1184,7 +1184,8 @@
       _options.push(_item)
     })
 
-    root = this.getTree(root, _options)
+    root.nodeNumber = 0
+    root = this.getTree(root, _options, root)
     root.children = root.children || []
 
     if (plot.subtype === 'mindmap') {
@@ -1248,13 +1249,16 @@
     return root
   }
 
-  getTree = (parent, options) => {
+  getTree = (parent, options, root) => {
     parent.children = []
     // 娣诲姞鑿滃崟鐨勫瓙鍏冪礌
     options = options.filter(option => {
       if (option.$parentId === parent.id) {
         delete option.$parentId
         parent.children.push(option)
+
+        root.nodeNumber++
+
         return false
       }
       return true
@@ -1264,7 +1268,7 @@
       parent.children = null
     } else {
       parent.children = parent.children.map(item => {
-        item = this.getTree(item, options)
+        item = this.getTree(item, options, root)
 
         return item
       })
@@ -1357,7 +1361,7 @@
     graph.render()
     graph.fitView()
 
-    if (plot.collapsed === 'true') {
+    if (plot.collapsed === 'true' || data.nodeNumber < 5) {
       graph.zoomTo(1, { x: 0, y: plot.height / 2 })
     }
   }
@@ -1480,7 +1484,7 @@
 
     if (plot.collapsed === 'true' && plot.dirField) {
       tree.zoomTo(1, { x: width / 2, y: plot.height / 2 })
-    } else if (plot.collapsed === 'true') {
+    } else if (plot.collapsed === 'true' || data.nodeNumber < 5) {
       tree.zoomTo(1, { x: 0, y: plot.height / 2 })
     }
   }
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 2c4b340..f49846b 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -748,8 +748,10 @@
     let _params = []
 
     if ( btn.Ot === 'notRequired' || btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce' ) {
-      let param = {
-        func: btn.innerFunc || ''
+      let param = {}
+
+      if (btn.innerFunc) {
+        param.func = btn.innerFunc
       }
 
       if (this.props.BID) {
@@ -762,9 +764,7 @@
         let ids = data.map(d => { return d[setting.primaryKey] || ''})
         ids = ids.filter(Boolean)
         primaryId = ids.join(',')
-      }
 
-      if (setting.primaryKey) {
         param[setting.primaryKey] = primaryId // 璁剧疆涓婚敭鍙傛暟
       }
 
@@ -823,93 +823,6 @@
           param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
           param.secretkey = Utils.encrypt(param.LTextOut, param.timestamp)
           param.open_key = Utils.encryptOpenKey(param.secretkey, param.timestamp)
-        }
-
-        if (retmsg) {
-          param.$callbacksql = this.getSysDeclareSql(btn, formdata, cell, columns, primaryId, this.props.BID)
-        }
-
-        return param
-      })
-    }
-
-    return _params
-  }
-
-  getLineParam = (data, formdata, retmsg) => {
-    const { setting, btn, columns } = this.props
-    let _params = []
-
-    if (btn.Ot === 'notRequired') {
-      if (retmsg) {
-        let param = {
-          $callbacksql: this.getSysDeclareSql(btn, formdata, data[0], columns, '', this.props.BID)
-        }
-        
-        _params.push(param)
-      } else {
-        _params.push({})
-      }
-    } else if ( btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce' ) {
-      let param = {}
-
-      if (this.props.BID) {
-        param.BID = this.props.BID
-      }
-      
-      let primaryId = ''
-
-      if ((btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') && setting.primaryKey) {
-        let ids = data.map(d => { return d[setting.primaryKey] || ''})
-        ids = ids.filter(Boolean)
-        primaryId = ids.join(',')
-      }
-
-      if (setting.primaryKey) {
-        param[setting.primaryKey] = primaryId // 璁剧疆涓婚敭鍙傛暟
-      }
-
-      if (btn.OpenType === 'pop' || btn.OpenType === 'formSubmit' || btn.OpenType === 'form') { // 琛ㄥ崟
-        formdata.forEach(_data => {
-          param[_data.key] = _data.value
-        })
-      }
-
-      if (retmsg) {
-        param.$callbacksql = this.getSysDeclareSql(btn, formdata, data[0], columns, primaryId, this.props.BID)
-      }
-
-      _params.push(param)
-    } else if (btn.Ot === 'required') {
-      _params = data.map((cell, index) => {
-        let param = {}
-
-        if (this.props.BID) {
-          param.BID = this.props.BID
-        }
-
-        let primaryId = setting.primaryKey ? cell[setting.primaryKey] || '' : ''
-
-        if (btn.OpenType === 'pop') { // 琛ㄥ崟
-          if (index !== 0) {
-            let _cell = {}
-            Object.keys(cell).forEach(key => {
-              _cell[key.toLowerCase()] = cell[key]
-            })
-            formdata = formdata.map(_data => {
-              if (_data.readin && _cell.hasOwnProperty(_data.key.toLowerCase())) {
-                _data.value = _cell[_data.key.toLowerCase()]
-              }
-              return _data
-            })
-          }
-
-          formdata.forEach(_data => {
-            param[_data.key] = _data.value
-          })
-        }
-        if (setting.primaryKey) {
-          param[setting.primaryKey] = primaryId
         }
 
         if (retmsg) {
@@ -1247,10 +1160,8 @@
           item.script_type = 'Y'
           return item
         })
-      } else if (btn.procMode === 'inner') {
-        _params = this.getInnerParam(data, formdata, btn.callbackType === 'script')
       } else {
-        _params = this.getLineParam(data, formdata, btn.callbackType === 'script')
+        _params = this.getInnerParam(data, formdata, btn.callbackType === 'script')
       }
 
       if (_params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) {
@@ -1270,10 +1181,8 @@
           item.script_type = 'Y'
           return item
         })
-      } else if (btn.procMode === 'inner') {
-        params = this.getInnerParam(data, formdata, btn.callbackType === 'script')
       } else {
-        params = this.getLineParam(data, formdata, btn.callbackType === 'script')
+        params = this.getInnerParam(data, formdata, btn.callbackType === 'script')
       }
 
       if (params.length > 1 && btn.progress === 'progressbar' && btn.$toolbtn) {

--
Gitblit v1.8.0