From d1d9dc29318cb2a9a466246adff7b78fe36cf623 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 11 三月 2023 17:51:29 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/templates/comtableconfig/index.jsx |   30 +++---------------------------
 1 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx
index 0a1e76b..62ac181 100644
--- a/src/templates/comtableconfig/index.jsx
+++ b/src/templates/comtableconfig/index.jsx
@@ -58,7 +58,6 @@
     delActions: [],          // 鍒犻櫎鎸夐挳鍒楄〃
     copyActions: [],         // 澶嶅埗鎸夐挳缁�
     tabviews: [],            // 鎵�鏈夋爣绛鹃〉
-    thawButtons: [],         // 宸查�夋嫨瑕佽В鍐荤殑鎸夐挳
     activeKey: '0',          // 榛樿灞曞紑鍩烘湰淇℃伅
     chartview: null,         // 褰撳墠瑙嗗浘
     openEdition: '',         // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣�
@@ -294,7 +293,7 @@
    */
   submitConfig = () => {
     const { menu } = this.props
-    const { delActions, thawButtons, openEdition } = this.state
+    const { delActions, openEdition } = this.state
 
     let _config = fromJS(this.state.config).toJS()
 
@@ -538,26 +537,7 @@
       }).then(resp => {
         if (resp === false) return
 
-        if (thawButtons.length > 0) {
-          let defers = thawButtons.map(item => {
-            return new Promise((resolve) => {
-              Api.getSystemConfig({
-                func: 'sPC_MainMenu_ReDel',
-                MenuID: item
-              }).then(res => {
-                if (res.status) {
-                  resolve('')
-                } else {
-                  resolve(res.message)
-                }
-              })
-            })
-          })
-
-          return Promise.all(defers)
-        } else {
-          return true
-        }
+        return true
       }).then(res => {
         if (res === true || res === false) return res
 
@@ -570,9 +550,6 @@
           })
           return false
         } else {
-          this.setState({
-            thawButtons: []
-          })
           return true
         }
       }).then(resp => {
@@ -1001,7 +978,6 @@
    */
   editConfig = (res) => {
     this.setState({
-      thawButtons: res.thawButtons,
       config: res.config
     })
   }
@@ -1227,7 +1203,7 @@
                 <Unattended config={config} updateConfig={this.updateconfig}/>
                 <Versions MenuId={menu.MenuID} open_edition={openEdition} updateConfig={this.refreshConfig}/>
                 <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/>
-                <EditComponent type="table" options={['search', 'form', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/>
+                <EditComponent type="table" options={['search', 'form', 'action', 'columns']} config={this.state.config} refresh={this.editConfig}/>
                 <UpdateTable config={config}/>
                 <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                 <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>淇濆瓨</Button>

--
Gitblit v1.8.0