From 6257816acce548a113081578140058cd99e83160 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 05 十月 2020 10:01:16 +0800
Subject: [PATCH] 2020-10-05

---
 src/templates/sharecomponent/actioncomponent/index.jsx |   58 ++--------------------------------------------------------
 1 files changed, 2 insertions(+), 56 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx
index 730a43c..e834674 100644
--- a/src/templates/sharecomponent/actioncomponent/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/index.jsx
@@ -686,39 +686,13 @@
    * @description 鍒涘缓鎸夐挳瀛樺偍杩囩▼
    */
   creatFunc = () => {
-    const { config, menu } = this.props
+    const { menu } = this.props
     let _config = fromJS(this.props.config).toJS()
 
     this.actionFormRef.handleConfirm().then(res => {
       let btn = res         // 鎸夐挳淇℃伅
       let newLText = ''     // 鍒涘缓瀛樺偍杩囩▼sql
       let DelText = ''      // 鍒犻櫎瀛樺偍杩囩▼sql
-
-      let _actionlist = fromJS(this.state.actionlist).toJS()
-
-      _actionlist = _actionlist.filter(item => !item.origin || item.uuid === btn.uuid)
-
-      let labelrepet = false
-      _actionlist = _actionlist.map(item => {
-        if (item.uuid !== btn.uuid && item.label === btn.label) {
-          labelrepet = true
-        }
-
-        if (item.uuid === btn.uuid) {
-          return btn
-        } else {
-          return item
-        }
-      })
-
-      if (labelrepet) {
-        notification.warning({
-          top: 92,
-          message: this.state.dict['model.name.exist'] + ' !',
-          duration: 5
-        })
-        return
-      }
 
       // 鍒涘缓瀛樺偍杩囩▼锛屽繀椤诲~鍐欏唴閮ㄥ嚱鏁板悕
       if (btn.intertype !== 'inner') {
@@ -816,35 +790,7 @@
       }).then(res => {
         if (!res) return
 
-        this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText).then(result => {
-          if (result !== 'success') return
-
-          // 鍒ゆ柇鏄惁瀛樺湪鎿嶄綔鍒�
-          let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0
-          let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null
-
-          if (_gridBtn) {
-            _gridBtn.display = _hasGridbtn
-          } else {
-            _gridBtn = {
-              display: _hasGridbtn,
-              Align: 'center',
-              IsSort: 'false',
-              uuid: Utils.getuuid(),
-              label: this.state.dict['model.form.column.action'],
-              type: 'action',
-              style: 'button',
-              show: 'horizontal',
-              Width: 120
-            }
-          }
-
-          this.setState({
-            actionlist: _actionlist
-          }, () => {
-            this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn})
-          })
-        })
+        this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText)
       })
     })
   }

--
Gitblit v1.8.0