From f89183feaeaf4d52b994bb4d3f9a8d7ca6dadec4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 一月 2021 16:58:14 +0800
Subject: [PATCH] 2021-01-26

---
 src/menu/popview/index.jsx |   92 +++++++++++++++++++++++----------------------
 1 files changed, 47 insertions(+), 45 deletions(-)

diff --git a/src/menu/popview/index.jsx b/src/menu/popview/index.jsx
index ade882c..83b58a1 100644
--- a/src/menu/popview/index.jsx
+++ b/src/menu/popview/index.jsx
@@ -344,52 +344,54 @@
       return
     }
 
-    config.components = this.filterConfig(config.components)
-
-    if (config.enabled && this.verifyConfig()) {
-      config.enabled = false
-    }
-
-    let _config = fromJS(config).toJS()
-    delete _config.tableFields
-
-    let _name = (btn.component.name ? btn.component.name + '-' : '') + btn.label
-
-    let param = {
-      func: 'sPC_ButtonParam_AddUpt',
-      ParentID: btn.config.uuid,
-      MenuID: _config.uuid,
-      MenuNo: _config.MenuNo || '',
-      Template: 'CustomPage',
-      MenuName: _name,
-      PageParam: JSON.stringify({Template: 'CustomPage'}),
-      LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
-    }
-
-    if (openEdition) { // 鐗堟湰绠$悊
-      param.open_edition = openEdition
-    }
-
-    let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
-      func: 'sPC_Button_AddUpt',
-      Type: 60,                  // 娣诲姞鑿滃崟涓嬬殑鎸夐挳type涓�40锛屾寜閽笅鐨勬寜閽畉ype涓�60
-      ParentID: _config.uuid,
-      MenuNo: _config.MenuNo,
-      Template: 'CustomPage',
-      PageParam: '',
-      LongParam: '',
-      LText: []
-    }
-
-    btnParam.LText = this.getMenuMessage()
-    btnParam.LText = btnParam.LText.join(' union all ')
-    btnParam.LText = Utils.formatOptions(btnParam.LText)
-    btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
-    btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
-
     this.setState({
       menuloading: true
-    }, () => {
+    })
+
+    setTimeout(() => {
+      config.components = this.filterConfig(config.components)
+
+      if (config.enabled && this.verifyConfig()) {
+        config.enabled = false
+      }
+
+      let _config = fromJS(config).toJS()
+      delete _config.tableFields
+
+      let _name = (btn.component.name ? btn.component.name + '-' : '') + btn.label
+
+      let param = {
+        func: 'sPC_ButtonParam_AddUpt',
+        ParentID: btn.config.uuid,
+        MenuID: _config.uuid,
+        MenuNo: _config.MenuNo || '',
+        Template: 'CustomPage',
+        MenuName: _name,
+        PageParam: JSON.stringify({Template: 'CustomPage'}),
+        LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
+      }
+
+      if (openEdition) { // 鐗堟湰绠$悊
+        param.open_edition = openEdition
+      }
+
+      let btnParam = {             // 娣诲姞鑿滃崟鎸夐挳
+        func: 'sPC_Button_AddUpt',
+        Type: 60,                  // 娣诲姞鑿滃崟涓嬬殑鎸夐挳type涓�40锛屾寜閽笅鐨勬寜閽畉ype涓�60
+        ParentID: _config.uuid,
+        MenuNo: _config.MenuNo,
+        Template: 'CustomPage',
+        PageParam: '',
+        LongParam: '',
+        LText: []
+      }
+
+      btnParam.LText = this.getMenuMessage()
+      btnParam.LText = btnParam.LText.join(' union all ')
+      btnParam.LText = Utils.formatOptions(btnParam.LText)
+      btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
+      btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
+
       new Promise(resolve => {
         if (delButtons.length === 0) {
           resolve({
@@ -476,7 +478,7 @@
           })
         }
       })
-    })
+    }, 300)
   }
 
   onEnabledChange = () => {

--
Gitblit v1.8.0