From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 八月 2022 11:42:43 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/templates/subtableconfig/index.jsx |   31 ++++++++++++++++++-------------
 1 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx
index 78e573a..4612793 100644
--- a/src/templates/subtableconfig/index.jsx
+++ b/src/templates/subtableconfig/index.jsx
@@ -1,6 +1,5 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
 import { DndProvider } from 'react-dnd'
 import HTML5Backend from 'react-dnd-html5-backend'
@@ -66,7 +65,8 @@
     thawButtons: [],         // 宸查�夋嫨瑕佽В鍐荤殑鎸夐挳
     activeKey: '0',          // 榛樿灞曞紑鍩烘湰淇℃伅
     chartview: null,         // 褰撳墠瑙嗗浘
-    openEdition: ''          // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣�
+    openEdition: '',         // 缂栬緫鐗堟湰鏍囪锛岄槻姝㈠浜烘搷浣�
+    modalStatus: false       // 寮圭獥鏄惁寮�鍚紝鍒ゆ柇ctrl+s鏄惁鍙敤
   }
 
   /**
@@ -152,6 +152,15 @@
       let _shortcut = `${preKey}+${keyCode}`
 
       if (_shortcut === 'ctrl+83') {
+        if (this.state.modalStatus) {
+          notification.warning({
+            top: 92,
+            message: '璇蜂繚瀛�' + this.state.modalStatus,
+            duration: 5
+          })
+          return false
+        }
+
         let node = document.getElementById('save-config')
         if (node && node.click) {
           node.click()
@@ -159,6 +168,7 @@
         return false
       }
     }
+    MKEmitter.addListener('modalStatus', this.modalStatus)
   }
 
   /**
@@ -219,6 +229,11 @@
       return
     }
     document.onkeydown = () => {}
+    MKEmitter.removeListener('modalStatus', this.modalStatus)
+  }
+
+  modalStatus = (val) => {
+    this.setState({modalStatus: val})
   }
 
   // 椤甸潰杩斿洖
@@ -1198,14 +1213,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    memberLevel: state.memberLevel
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(SubTableConfig)
+export default SubTableConfig

--
Gitblit v1.8.0