From 1a67732f77de8afd138b6e75235edcc4c0e9a166 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 16 一月 2020 23:29:57 +0800
Subject: [PATCH] 2020-01-16

---
 src/templates/comtableconfig/index.jsx |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 5fcbc29..9977ac4 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -15,8 +15,7 @@
 
 import ActionForm from './actionform'
 import SettingForm from './settingform'
-import TabForm from './tabform'
-import TabDragElement from './tabdragelement'
+import TabForm from '@/templates/tableshare/tabform'
 import SearchForm from '@/templates/tableshare/searchform'
 import ColumnForm from '@/templates/tableshare/columnform'
 import DragElement from '@/templates/tableshare/dragelement'
@@ -25,6 +24,7 @@
 import EditCard from '@/templates/tableshare/editcard'
 import VerifyCard from '@/templates/tableshare/verifycard'
 import MenuForm from '@/templates/tableshare/menuform'
+import TabDragElement from '@/templates/tableshare/tabdragelement'
 import SourceElement from '@/templates/tableshare/dragelement/source'
 import Source from './source'
 import './index.scss'
@@ -347,7 +347,7 @@
     this.setState({
       modaltype: type === 'copy' ? 'actionCopy' : 'actionEdit',
       card: card,
-      formlist: getActionForm(card, functip, this.state.config, this.props.permFuncField, 'main')
+      formlist: getActionForm(card, functip, this.state.config, this.props.permFuncField)
     })
   }
 
@@ -612,9 +612,9 @@
       })
     } else if (modaltype === 'tabs') {
       this.tabsFormRef.handleConfirm().then(res => {
-        let _tabgroup = config[res.values.groupId].map(item => {
-          if (item.uuid === res.values.uuid) {
-            return res.values
+        let _tabgroup = config[res.groupId].map(item => {
+          if (item.uuid === res.uuid) {
+            return res
           } else {
             return item
           }
@@ -622,7 +622,7 @@
         _tabgroup = _tabgroup.filter(item => !item.origin)
 
         this.setState({
-          config: {...config, [res.values.groupId]: _tabgroup},
+          config: {...config, [res.groupId]: _tabgroup},
           modaltype: ''
         })
       })
@@ -1219,9 +1219,15 @@
           }
         }
 
+        // 鍒犻櫎鎸夐挳鍏冪礌
+        let _delActions = _this.state.delActions
+        if (element.type === 'action') {
+          _delActions.push(element.card.uuid)
+        }
+
         _this.setState({
           config: _config,
-          delActions: [..._this.state.delActions, element.card.uuid]
+          delActions: _delActions
         })
       },
       onCancel() {}
@@ -2162,8 +2168,7 @@
   render () {
     const { modaltype } = this.state
     const configAction = this.state.config.action.filter(_action =>
-      !_action.origin && (_action.OpenType === 'pop' || _action.OpenType === 'popview')
-      // !_action.origin && (_action.OpenType === 'pop' || _action.OpenType === 'popview' || _action.OpenType === 'blank' || _action.OpenType === 'tab')
+      !_action.origin && (_action.OpenType === 'pop' || _action.OpenType === 'popview' || _action.OpenType === 'blank' || _action.OpenType === 'tab')
     )
 
     let configTabs = []

--
Gitblit v1.8.0