From b223552a0c4bc787ad251add025a93d77527ffbe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 18 十二月 2021 23:36:28 +0800
Subject: [PATCH] 2021-12-18

---
 src/menu/components/share/actioncomponent/index.jsx |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/index.jsx b/src/menu/components/share/actioncomponent/index.jsx
index 32764df..a924679 100644
--- a/src/menu/components/share/actioncomponent/index.jsx
+++ b/src/menu/components/share/actioncomponent/index.jsx
@@ -160,7 +160,7 @@
     if (usefulFields) {
       try {
         usefulFields = JSON.parse(usefulFields)
-      } catch {
+      } catch (e) {
         usefulFields = []
       }
     } else {
@@ -176,14 +176,14 @@
     if (menulist) {
       try {
         menulist = JSON.parse(menulist)
-      } catch {
+      } catch (e) {
         menulist = []
       }
     } else {
       menulist = []
     }
     
-    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid)
+    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid) || []
 
     this.setState({
       visible: true,
@@ -415,11 +415,7 @@
     } else if (element.OpenType === 'innerpage' && element.pageTemplate === 'linkpage') {
       MKEmitter.emit('changeEditMenu', {MenuID: element.linkmenu})
     } else {
-      notification.warning({
-        top: 92,
-        message: '姝ゆ寜閽棤瀛愰厤缃」锛�',
-        duration: 5
-      })
+      this.handleAction(element)
     }
   }
 
@@ -453,13 +449,14 @@
   }
 
   render() {
-    const { config } = this.props
-    const { actionlist, visible, card, dict, profVisible } = this.state
+    const { config, type } = this.props
+    const { actionlist, visible, appType, card, dict, profVisible } = this.state
 
     return (
       <div className={'model-menu-action-list'}>
         <DragElement
           list={actionlist}
+          type={appType === 'mob' ? (type || '') : ''}
           handleList={this.handleList}
           dropButton={this.dropButton}
           handleMenu={this.handleAction}
@@ -494,13 +491,21 @@
         {/* 鎸夐挳浣跨敤绯荤粺瀛樺偍杩囩▼鏃讹紝楠岃瘉淇℃伅妯℃�佹 */}
         <Modal
           wrapClassName="model-table-action-verify-modal"
-          title={'楠岃瘉淇℃伅'}
+          title={(card && card.label ? card.label + ' - ' : '') + '楠岃瘉淇℃伅'}
           visible={profVisible}
           width={'75vw'}
           maskClosable={false}
           okText={dict['model.submit']}
           onOk={this.verifySubmit}
-          onCancel={() => { this.setState({ profVisible: false }) }}
+          onCancel={() => {
+            if (this.verifyRef.handleCancel) {
+              this.verifyRef.handleCancel().then(() => {
+                this.setState({ profVisible: false })
+              })
+            } else {
+              this.setState({ profVisible: false })
+            }
+          }}
           destroyOnClose
         >
           {card && !card.execMode && card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut' ?

--
Gitblit v1.8.0