From bcef9a2845e6800704fecb3eb60c204f80854a07 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 24 九月 2020 09:17:24 +0800
Subject: [PATCH] 2020-09-24

---
 src/menu/actioncomponent/actionform/index.jsx |   57 ++++++++++++++-------------------------------------------
 1 files changed, 14 insertions(+), 43 deletions(-)

diff --git a/src/menu/actioncomponent/actionform/index.jsx b/src/menu/actioncomponent/actionform/index.jsx
index 6a579a9..b383f2c 100644
--- a/src/menu/actioncomponent/actionform/index.jsx
+++ b/src/menu/actioncomponent/actionform/index.jsx
@@ -11,15 +11,15 @@
 
 const { TextArea } = Input
 const actionTypeOptions = {
-  pop: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError'],
-  prompt: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError'],
-  exec: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError'],
-  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'icon', 'class', 'sheet', 'execSuccess', 'execError'],
-  excelOut: ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'pagination', 'search'],
-  popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose'],
-  tab: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'linkmenu'],
-  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'],
-  funcbutton: ['label', 'OpenType', 'funcType', 'icon', 'class']
+  pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError'],
+  prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError'],
+  exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'icon', 'class', 'execSuccess', 'execError'],
+  excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'sheet', 'execSuccess', 'execError'],
+  excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'execSuccess', 'execError', 'pagination', 'search'],
+  popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'tabType', 'linkTab', 'popClose'],
+  tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'linkmenu'],
+  innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'icon', 'class'],
+  funcbutton: ['label', 'OpenType', 'funcType', 'show', 'icon', 'class']
 }
 
 class MainSearch extends Component {
@@ -37,7 +37,6 @@
     openType: null,  // 鎵撳紑鏂瑰紡
     interType: null, // 鎺ュ彛绫诲瀷锛氬唴閮ㄣ�佸閮�
     funcType: null,  // 鍔熻兘绫诲瀷
-    position: null,  // 鎸夐挳浣嶇疆
     requireOptions: [{
       value: 'notRequired',
       text: this.props.dict['header.form.notRequired']
@@ -98,7 +97,6 @@
       openType: _opentype,
       menulist: _menulist.options || [],
       interType: _intertype,
-      position: card.position || 'toolbar',
       funcType: _funcType,
       formlist: this.props.formlist.map(item => {
         if (item.key === 'class') {
@@ -106,7 +104,7 @@
         } else if (item.key === 'icon') {
           item.options = btnIcons
         } else if (item.key === 'Ot') {
-          if (card.position === 'grid' || card.pageTemplate === 'pay') { // 琛岀骇鎸夐挳銆佹敮浠樻寜閽紝鍙兘閫夊崟琛�
+          if (card.pageTemplate === 'pay') { // 琛岀骇鎸夐挳銆佹敮浠樻寜閽紝鍙兘閫夊崟琛�
             item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value))
           } else if (['innerpage', 'blank', 'tab', 'popview', 'excelIn'].includes(_opentype)) {
             item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
@@ -214,10 +212,7 @@
         if (item.key === 'intertype') {
           _fieldval.intertype = this.state.interType
         } else if (item.key === 'Ot') {
-          if (this.state.position === 'grid') {
-            item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value))
-            _fieldval.Ot = 'requiredSgl'
-          } else if (['innerpage', 'blank', 'tab', 'popview'].includes(value)) {
+          if (['innerpage', 'blank', 'tab', 'popview'].includes(value)) {
             item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
             _fieldval.Ot = 'requiredSgl'
           } else if (value === 'excelIn') {
@@ -250,28 +245,6 @@
           _fieldval.class = 'dgreen'
         }
 
-        this.props.form.setFieldsValue(_fieldval)
-      })
-    } else if (key === 'position') {
-      let _fieldval = {}
-
-      this.setState({
-        position: value,
-        formlist: this.state.formlist.map(item => {
-          if (item.key === 'Ot') {
-            if (value === 'grid') {
-              item.options = this.state.requireOptions.filter(op => ['requiredSgl'].includes(op.value))
-              _fieldval.Ot = 'requiredSgl'
-            } else if (['innerpage', 'blank', 'tab', 'popview'].includes(this.state.openType)) {
-              item.options = this.state.requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value))
-              _fieldval.Ot = 'requiredSgl'
-            } else {
-              item.options = this.state.requireOptions
-            }
-          }
-          return item
-        })
-      }, () => {
         this.props.form.setFieldsValue(_fieldval)
       })
     } else if (key === 'tabType') {
@@ -355,7 +328,7 @@
         this.props.form.setFieldsValue(_fieldval)
       })
     } else if (key === 'pageTemplate') {
-      let _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position']
+      let _options = ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class']
       let _fieldval = {}
       if (value === 'custom') {
         _options.push('url', 'joint')
@@ -670,8 +643,8 @@
           values.uuid = this.props.card.uuid
           values.verify = this.props.card.verify || null
 
-          if (values.OpenType === 'excelIn') {
-            values.position = 'toolbar'
+          if (values.show === 'icon') {
+
           } else if (values.OpenType === 'excelOut') {
             if (values.intertype === 'system' && setting.interType !== 'system') {
               notification.warning({
@@ -682,13 +655,11 @@
               return
             }
             
-            values.position = 'toolbar'
             values.Ot = 'notRequired'
           } else if (values.OpenType === 'popview' && !values.linkTab) { // 娌℃湁鍏宠仈鏍囩锛堟柊寤烘椂锛夛紝鍒涘缓鏂版爣绛綢d
             values.linkTab = Utils.getuuid()
             values.createTab = true // 鐢ㄤ簬鏍囪鎸夐挳澶嶅埗鏃讹紝鏄惁澶嶅埗鍘熸湁鏍囩
           } else if (values.OpenType === 'funcbutton') { // 杞崲鎵撳嵃鏃舵墦寮�鏂瑰紡
-            values.position = 'toolbar'
             if (values.funcType === 'print') {
               values.OpenType = values.execMode
             }

--
Gitblit v1.8.0