From 9c6795fd3c44e46cf3955fbfd8f8eeca23acb7a9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 08 十月 2022 00:31:51 +0800
Subject: [PATCH] 2022-10-08

---
 src/components/tabview/index.jsx                                               |    7 
 src/tabviews/treepage/index.jsx                                                |   19 -
 src/assets/css/viewstyle.scss                                                  |    6 
 src/tabviews/formtab/index.jsx                                                 |   19 -
 src/components/header/index.jsx                                                |   42 ++--
 src/tabviews/custom/components/card/cardItem/index.jsx                         |   48 +---
 src/tabviews/zshare/settingcomponent/index.jsx                                 |    5 
 src/tabviews/calendar/index.jsx                                                |   19 -
 public/options.json                                                            |   10 
 src/tabviews/basetable/index.jsx                                               |   24 -
 src/store/action.js                                                            |   16 -
 src/tabviews/home/index.jsx                                                    |   63 +++--
 src/tabviews/custom/components/form/simple-form/index.jsx                      |   15 -
 src/tabviews/subtable/index.jsx                                                |   20 -
 src/tabviews/subtabtable/index.jsx                                             |   17 -
 src/tabviews/commontable/index.jsx                                             |   24 -
 src/index.js                                                                   |    2 
 src/tabviews/custom/components/form/tab-form/index.jsx                         |   15 -
 src/tabviews/custom/components/card/table-card/index.jsx                       |   48 +---
 src/components/header/index.scss                                               |   29 ++
 src/tabviews/zshare/actionList/tabbutton/index.jsx                             |   28 --
 src/store/reducer.js                                                           |   18 -
 src/templates/sharecomponent/actioncomponent/actionform/index.jsx              |    5 
 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx |    4 
 src/menu/datasource/verifycard/settingform/index.jsx                           |    4 
 src/store/action-type.js                                                       |    6 
 src/tabviews/custom/components/chart/antv-pie/index.jsx                        |   18 -
 src/store/options.js                                                           |    2 
 src/components/breadview/index.jsx                                             |   16 -
 src/menu/components/share/actioncomponent/actionform/index.jsx                 |    5 
 src/tabviews/custom/components/form/step-form/index.jsx                        |   15 -
 src/tabviews/custom/index.jsx                                                  |   23 -
 32 files changed, 210 insertions(+), 382 deletions(-)

diff --git a/public/options.json b/public/options.json
index eb7e988..32085f0 100644
--- a/public/options.json
+++ b/public/options.json
@@ -1,7 +1,7 @@
 {
-  "appId": "",
-  "appkey": "",
-  "mainSystemApi": "",
+  "appId": "202108312122504607B107A83F55B40C98CCF",
+  "appkey": "20210831212235413F287EC3BF489424496C8",
+  "mainSystemApi": "http://sso.mk9h.cn/cloud/webapi/dostars",
   "systemType": "",
   "externalDatabase": "false",
   "lineColor": "",
@@ -17,6 +17,6 @@
   "transfer": "false",
   "keepPassword": "true",
   "platforms": ["H5", "wechat", "android", "ios", "wxMiniProgram"],
-  "host": "https://cloud.mk9h.cn",
-  "service": ""
+  "host": "http://demo.mk9h.cn",
+  "service": "erp_new/"
 }
\ No newline at end of file
diff --git a/src/assets/css/viewstyle.scss b/src/assets/css/viewstyle.scss
index 33dc189..0f54397 100644
--- a/src/assets/css/viewstyle.scss
+++ b/src/assets/css/viewstyle.scss
@@ -523,6 +523,12 @@
           }
         }
       }
+      .header-menu::-webkit-scrollbar-track {
+        box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
+        border: 1px solid rgba(255, 255, 255, 0.07);
+        background: rgba(255, 255, 255, 255);
+        border-radius: 3px;
+      }
     }
   }
 }
diff --git a/src/components/breadview/index.jsx b/src/components/breadview/index.jsx
index 4e4e3e6..62ae100 100644
--- a/src/components/breadview/index.jsx
+++ b/src/components/breadview/index.jsx
@@ -1,5 +1,4 @@
 import React, {Component} from 'react'
-import {connect} from 'react-redux'
 import { BackTop, Breadcrumb, notification} from 'antd'
 import { HomeOutlined, RightOutlined, RedoOutlined } from '@ant-design/icons'
 import moment from 'moment'
@@ -9,7 +8,6 @@
 import NotFount from '@/components/404'
 import options from '@/store/options.js'
 import MKEmitter from '@/utils/events.js'
-import { initActionPermission } from '@/store/action'
 import Api from '@/api'
 import './index.scss'
 
@@ -57,7 +55,7 @@
               })
             }
   
-            this.props.initActionPermission(_permAction)
+            window.GLOB.mkActions = _permAction
           }
 
           resolve()
@@ -189,14 +187,4 @@
   }
 }
 
-const mapStateToProps = () => {
-  return {}
-}
-
-const mapDispatchToProps = (dispatch) => {
-  return {
-    initActionPermission: (permAction) => dispatch(initActionPermission(permAction)),
-  }
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(BreadView)
\ No newline at end of file
+export default BreadView
\ No newline at end of file
diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 6ecc8a9..fb8308c 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -10,8 +10,6 @@
 import {
   toggleCollapse,
   modifyMainMenu,
-  initActionPermission,
-  initMenuPermission,
   logout
 } from '@/store/action'
 import asyncComponent from '@/utils/asyncSpinComponent'
@@ -185,7 +183,8 @@
       }
 
       this.props.modifyMainMenu(mainMenu)
-      this.props.initMenuPermission([...thdMenuList, {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}])
+
+      window.GLOB.mkThdMenus = [...thdMenuList, {MenuID: 'home_page_id', EasyCode: '', MenuName: 'home', type: 'CustomPage'}]
 
       if (_menu) { // 寤舵椂鎵撳紑锛岄槻姝㈡爣绛剧粍鏈畬鎴愬姞杞�
         setTimeout(() => {
@@ -196,6 +195,7 @@
           }
         }, 200)
       }
+      MKEmitter.emit('mkMenuLoaded')
     })
     
     // 鑾峰彇瑙掕壊鏉冮檺, edition_type 鎺ュ彛鐗堟湰鎺у埗 ''銆�'Y'銆�'A'
@@ -207,14 +207,14 @@
       }).then(result => {
         let _permAction = {loaded: true} // 鎸夐挳鏉冮檺
 
-        if (result && result.status) {
+        if (result.status) {
           if (result.UserRoles_Menu) {
             result.UserRoles_Menu.forEach(menu => {
               if (!menu.MenuID) return
               _permAction[menu.MenuID] = true
             })
           }
-        } else if (result) {
+        } else {
           notification.error({
             top: 92,
             message: result.message,
@@ -222,7 +222,8 @@
           })
         }
 
-        this.props.initActionPermission(_permAction)
+        MKEmitter.emit('mkActionLoaded')
+        window.GLOB.mkActions = _permAction
       })
     }, 50)
   }
@@ -617,9 +618,9 @@
     return (
       <header className="header-container ant-menu-dark" id="main-header-container">
         <div className={'header-logo ' + (collapse && navBar !== 'topmenu' ? 'collapse' : '')} onClick={this.changeToHome}><img src={this.state.logourl} alt=""/></div>
-        <div className={'header-collapse ' + (collapse && navBar !== 'topmenu' ? 'collapse' : '')}>
-          {navBar !== 'topmenu' ? (collapse ? <MenuUnfoldOutlined onClick={this.handleCollapse}/> : <MenuFoldOutlined onClick={this.handleCollapse}/>) : null}
-        </div>
+        {navBar !== 'topmenu' ? <div className={'header-collapse ' + (collapse ? 'collapse' : '')}>
+          {collapse ? <MenuUnfoldOutlined onClick={this.handleCollapse}/> : <MenuFoldOutlined onClick={this.handleCollapse}/>}
+        </div> : <div style={{width: '20px', height: '45px'}}></div>}
         {/* 姝e父鑿滃崟 */}
         {navBar !== 'topmenu' && menulist ?
           <ul className="header-menu">{
@@ -713,15 +714,9 @@
             })}
           </ul> : null
         }
-        {/* 澶村儚銆佺敤鎴峰悕 */}
-        <Dropdown className="header-setting" overlay={menu}>
-          <div>
-            <img src={this.state.avatar || avatar} alt=""/>
-            <span>
-              <span className="username"><span>{this.state.fullName}</span>{this.state.userName ? <span>{this.state.userName}</span> : null}</span> <DownOutlined />
-            </span>
-          </div>
-        </Dropdown>
+        {!menulist ?
+          <div className="header-menu"></div> : null
+        }
         {/* 鑿滃崟鎼滅储 */}
         {thdMenuList.length > 0 ?
           <Dropdown overlayClassName="menu-select-dropdown" getPopupContainer={() => document.getElementById('main-header-container')} overlay={
@@ -758,6 +753,15 @@
             <SearchOutlined className="search-menu" />
           </Dropdown> : null
         }
+        {/* 澶村儚銆佺敤鎴峰悕 */}
+        <Dropdown className="header-setting" overlay={menu}>
+          <div>
+            <img src={this.state.avatar || avatar} alt=""/>
+            <span>
+              <span className="username"><span>{this.state.fullName}</span>{this.state.userName ? <span>{this.state.userName}</span> : null}</span> <DownOutlined />
+            </span>
+          </div>
+        </Dropdown>
         {/* 淇敼瀵嗙爜 */}
         <Modal
           title={this.state.dict['main.password']}
@@ -797,8 +801,6 @@
   return {
     toggleCollapse: (collapse) => dispatch(toggleCollapse(collapse)),
     modifyMainMenu: (mainMenu) => dispatch(modifyMainMenu(mainMenu)),
-    initActionPermission: (permAction) => dispatch(initActionPermission(permAction)),
-    initMenuPermission: (permMenus) => dispatch(initMenuPermission(permMenus)),
     logout: () => dispatch(logout())
   }
 }
diff --git a/src/components/header/index.scss b/src/components/header/index.scss
index ee1530d..0c8a8d0 100644
--- a/src/components/header/index.scss
+++ b/src/components/header/index.scss
@@ -6,9 +6,9 @@
   font-weight: bold!important;
   width: 100%;
   height: 48px;
+  display: flex;
 
   .header-logo {
-    float: left;
     width: 180px;
     line-height: 48px;
     text-align: center;
@@ -28,7 +28,6 @@
   }
 
   .header-collapse {
-    float: left;
     width: 35px;
     min-height: 48px;
     line-height: 48px;
@@ -48,13 +47,17 @@
     padding-left: 20px;
   }
   .header-menu {
-    float: left;
     margin: 0;
+    min-height: 20px;
     line-height: 48px;
+    flex: 1;
+    overflow-x: auto;
+    overflow-y: hidden;
+    white-space: nowrap;
     li {
-      float: left;
       font-size: 1.3rem;
       cursor: pointer;
+      display: inline-block;
       span {
         padding: 0 10px;
         height: 42px;
@@ -83,8 +86,22 @@
     }
   }
 
+  .header-menu::-webkit-scrollbar {
+    height: 5px;
+  }
+  .header-menu::-webkit-scrollbar-thumb {
+    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13);
+    background: rgba(0, 0, 0, 0.13);
+    border-radius: 5px;
+  }
+  .header-menu::-webkit-scrollbar-track {
+    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
+    border: 1px solid rgba(0, 0, 0, 0.07);
+    background: rgba(0, 0, 0, 0);
+    border-radius: 3px;
+  }
+
   .header-setting {
-    float: right;
     line-height: 48px;
     margin-right: 10px;
     img {
@@ -117,10 +134,10 @@
   }
 
   .search-menu {
-    float: right;
     font-size: 18px;
     margin-top: 17px;
     margin-right: 20px;
+    margin-left: 10px;
     cursor: pointer;
   }
   .menu-select-dropdown {
diff --git a/src/components/tabview/index.jsx b/src/components/tabview/index.jsx
index 82043c0..ffb0f08 100644
--- a/src/components/tabview/index.jsx
+++ b/src/components/tabview/index.jsx
@@ -7,7 +7,6 @@
 import moment from 'moment'
 import 'moment/locale/zh-cn'
 
-import { initActionPermission } from '@/store/action'
 import asyncComponent from '@/utils/asyncLoadComponent'
 import NotFount from '@/components/404'
 import options from '@/store/options.js'
@@ -101,7 +100,7 @@
               })
             }
   
-            this.props.initActionPermission(_permAction)
+            window.GLOB.mkActions = _permAction
           }
 
           resolve()
@@ -304,9 +303,7 @@
 }
 
 const mapDispatchToProps = (dispatch) => {
-  return {
-    initActionPermission: (permAction) => dispatch(initActionPermission(permAction))
-  }
+  return {}
 }
 
 export default connect(mapStateToProps, mapDispatchToProps)(TabViews)
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index f2e2251..d0ca76e 100644
--- a/src/index.js
+++ b/src/index.js
@@ -244,6 +244,8 @@
       }
     }
     GLOB.memberLevel = _level
+    GLOB.mkThdMenus = [] // 涓夌骇鑿滃崟
+    GLOB.mkActions = {}  // 鎸夐挳鏉冮檺闆�
 
     if (sessionStorage.getItem('breakpoint')) {
       window.debugger = true
diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx
index 29dcf6e..eb99135 100644
--- a/src/menu/components/share/actioncomponent/actionform/index.jsx
+++ b/src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -734,6 +734,11 @@
             { pattern: _patten, message: formRule.func.innerMessage },
             { max: formRule.func.max, message: formRule.func.maxMessage }
           )
+        } else if (item.key === 'sql' || item.key === 'sheet') {
+          rules.push(
+            { pattern: /^[a-zA-Z_]+$/, message: '琛ㄥ悕鍙彲浣跨敤瀛楁瘝浠ュ強_' },
+            { max: formRule.func.max, message: formRule.func.maxMessage }
+          )
         } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') {
           rules.push(
             { pattern: formRule.func.pattern, message: formRule.func.message },
diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx
index 5104ee6..f0ff0c4 100644
--- a/src/menu/datasource/verifycard/settingform/index.jsx
+++ b/src/menu/datasource/verifycard/settingform/index.jsx
@@ -198,6 +198,10 @@
                     {
                       max: 50,
                       message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
+                    },
+                    {
+                      pattern: /^[a-zA-Z_]+$/,
+                      message: '琛ㄥ悕鍙彲浣跨敤瀛楁瘝浠ュ強_'
                     }
                   ]
                 })(<Input placeholder={''} autoComplete="off" />)}
diff --git a/src/store/action-type.js b/src/store/action-type.js
index c65f4df..9443fa6 100644
--- a/src/store/action-type.js
+++ b/src/store/action-type.js
@@ -13,11 +13,5 @@
 // 閲嶇疆缂栬緫绾у埆
 export const RESET_EDITLEVEL = 'RESET_EDITLEVEL'
 
-// 鍒濆鍖栨寜閽潈闄�
-export const INIT_ACTIONPERMISSION = 'INIT_ACTIONPERMISSION'
-
-// 鍒濆鍖栬彍鍗曟潈闄�
-export const INIT_MENUPERMISSION = 'INIT_MENUPERMISSION'
-
 // 閫�鍑�
 export const LOGOUT = 'LOGOUT'
\ No newline at end of file
diff --git a/src/store/action.js b/src/store/action.js
index b4bbf15..c0115e7 100644
--- a/src/store/action.js
+++ b/src/store/action.js
@@ -32,22 +32,6 @@
   }
 }
 
-// 鍒濆鍖栨寜閽潈闄�
-export const initActionPermission = (permAction) => {
-  return {
-    type: user.INIT_ACTIONPERMISSION,
-    permAction: permAction
-  }
-}
-
-// 鍒濆鍖栬彍鍗曟潈闄�
-export const initMenuPermission = (permMenus) => {
-  return {
-    type: user.INIT_MENUPERMISSION,
-    permMenus: permMenus
-  }
-}
-
 // 閫�鍑洪噸缃�
 export const logout = () => {
   return {
diff --git a/src/store/options.js b/src/store/options.js
index 6219e45..1b683f6 100644
--- a/src/store/options.js
+++ b/src/store/options.js
@@ -6,7 +6,7 @@
  * 4銆乸ositecgroup ( aHR0cHM6Ly9jbG91ZC5$mkwb3NpdGVjZ3JvdXAuY29t )
  */
 export default {
-  sysType: 'Y2xv$mkdWQ=',
+  sysType: 'bG9j$mkYWw=',
   caId: 'MjAyMDAxMTYxMjMzMzU1MDd$mkGQzkyMzI1Rjk4MDY0QUNGQjQ2Mg==',
   cakey: 'MjAyMDAxMTYxMjQwMDQ2NDM$mk2N0QzODE2MjExNUI0MTc4OTVDMQ==',
   cdomain: 'aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'
diff --git a/src/store/reducer.js b/src/store/reducer.js
index 4729c77..b33716d 100644
--- a/src/store/reducer.js
+++ b/src/store/reducer.js
@@ -8,8 +8,6 @@
   mainMenu: _mainMenu,  // 宸查�変富鑿滃崟
   collapse: _collapse,  // 鏄惁鏀惰捣渚ц竟鏍忓鑸�
   editLevel: null,      // 缂栬緫鑿滃崟绾у埆锛屽�间负level1銆乴evel2銆乴evel3銆丠S
-  permAction: {},       // 鐢ㄦ埛鎸夐挳鏉冮檺
-  permMenus: [],        // 鐢ㄦ埛涓夌骇鑿滃崟鍒楄〃
 }
 
 // 鐢ㄦ埛娑堟伅
@@ -39,26 +37,12 @@
         ...state,
         editLevel: action.editLevel
       }
-    case Type.INIT_ACTIONPERMISSION:
-    // 鍒濆鍖栨寜閽潈闄�
-      return {
-        ...state,
-        permAction: action.permAction
-      }
-    case Type.INIT_MENUPERMISSION:
-    // 鍒濆鍖栦笁绾ц彍鍗曟潈闄�
-      return {
-        ...state,
-        permMenus: action.permMenus
-      }
     case Type.LOGOUT:
       return {
         menuTree: null,
         mainMenu: null,
         collapse: localStorage.getItem('collapse') === 'true',
-        editLevel: null,
-        permAction: {},
-        permMenus: [],
+        editLevel: null
       }
     default:
       return state
diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index 14f6e16..a20277d 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/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 { notification, Spin, Tabs, Switch, Row, Col } from 'antd'
 
@@ -76,7 +75,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, permMenus, param, MenuName, MenuID } = this.props
+    const { param, MenuName, MenuID } = this.props
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -159,13 +158,13 @@
 
       // 鏉冮檺杩囨护
       if (!window.GLOB.mkHS) {
-        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
+        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
         config.tabgroups.forEach(group => {
           group.sublist = group.sublist.filter(tab => {
             if (tab.supMenu === 'mainTable') {
               tab.supMenu = MenuID
             }
-            return permAction[tab.linkTab]
+            return window.GLOB.mkActions[tab.linkTab]
           })
         })
       } else {
@@ -336,7 +335,7 @@
 
           if (col.linkmenu && col.linkmenu.length > 0) {
             let menu_id = col.linkmenu.slice(-1)[0]
-            col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
           } else {
             col.linkThdMenu = ''
           }
@@ -1266,22 +1265,11 @@
         }
         {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
         {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
-        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
+        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permAction: state.permAction,
-    permMenus: state.permMenus
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
\ No newline at end of file
+export default NormalTable
\ No newline at end of file
diff --git a/src/tabviews/calendar/index.jsx b/src/tabviews/calendar/index.jsx
index c7485e1..cd7b465 100644
--- a/src/tabviews/calendar/index.jsx
+++ b/src/tabviews/calendar/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 { notification, Spin, Modal, Button } from 'antd'
 import moment from 'moment'
@@ -22,7 +21,7 @@
 const SubTabTable = asyncSpinComponent(() => import('@/tabviews/subtabtable'))
 const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage'))
 
-class NormalTable extends Component {
+class MkCalendar extends Component {
   static propTpyes = {
     param: PropTypes.any,        // 鍏朵粬椤甸潰浼犻�掔殑鍙傛暟
     MenuID: PropTypes.string,    // 鑿滃崟Id
@@ -55,7 +54,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, param } = this.props
+    const { param } = this.props
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -107,7 +106,7 @@
 
       // 鏉冮檺杩囨护
       if (!window.GLOB.mkHS) {
-        if (config.tab && !permAction[config.tab.linkTab]) {
+        if (config.tab && !window.GLOB.mkActions[config.tab.linkTab]) {
           config.tab = null
         }
       }
@@ -574,14 +573,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permAction: state.permAction
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
\ No newline at end of file
+export default MkCalendar
\ No newline at end of file
diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx
index 5466607..e9d8ba6 100644
--- a/src/tabviews/commontable/index.jsx
+++ b/src/tabviews/commontable/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 { notification, Spin, Tabs, Switch, Row, Col } from 'antd'
 
@@ -77,7 +76,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, permMenus, param, MenuName, MenuID } = this.props
+    const { param, MenuName, MenuID } = this.props
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -160,13 +159,13 @@
 
       // 鏉冮檺杩囨护
       if (!window.GLOB.mkHS) {
-        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
+        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
         config.tabgroups.forEach(group => {
           group.sublist = group.sublist.filter(tab => {
             if (tab.supMenu === 'mainTable') {
               tab.supMenu = MenuID
             }
-            return permAction[tab.linkTab]
+            return window.GLOB.mkActions[tab.linkTab]
           })
         })
       } else {
@@ -337,7 +336,7 @@
 
           if (col.linkmenu && col.linkmenu.length > 0) {
             let menu_id = col.linkmenu.slice(-1)[0]
-            col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
           } else {
             col.linkThdMenu = ''
           }
@@ -1277,22 +1276,11 @@
         {setting && window.GLOB.breakpoint ? <DebugTable /> : null}
         {!window.GLOB.mkHS && autoMatic ? <AutoMatic autoMatic={autoMatic} config={config} /> : null}
         {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
-        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
+        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permAction: state.permAction,
-    permMenus: state.permMenus
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
\ No newline at end of file
+export default NormalTable
\ No newline at end of file
diff --git a/src/tabviews/custom/components/card/cardItem/index.jsx b/src/tabviews/custom/components/card/cardItem/index.jsx
index cc3c5e1..64f067d 100644
--- a/src/tabviews/custom/components/card/cardItem/index.jsx
+++ b/src/tabviews/custom/components/card/cardItem/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 { notification } from 'antd'
 
@@ -81,29 +80,26 @@
       } else {
         MKEmitter.emit('modifyTabs', newtab, 'plus', true)
       }
-    } else if (card.setting.click === 'menu') {
-      let menu = null
+    } else if (card.setting.click === 'menu' && card.setting.menu) {
+      let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0]
+      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
 
-      if (card.setting.MenuID) {
-        let _menu = this.props.permMenus.filter(m => m.MenuID === card.setting.MenuID)[0] || ''
+      if (!menu && card.setting.MenuName && card.setting.tabType) {
         menu = {
-          MenuID: card.setting.MenuID,
-          MenuName: _menu ? _menu.MenuName : card.setting.MenuName,
-          MenuNo: card.setting.MenuNo,
-          type: _menu ? _menu.type : card.setting.tabType
+          MenuID: menuId,
+          MenuName: card.setting.MenuName,
+          MenuNo: card.setting.MenuNo || '',
+          type: card.setting.tabType
         }
-      } else if (card.setting.menu && card.setting.menu.length > 0) {
-        let menu_id = card.setting.menu.slice(-1)[0]
-        menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+      }
 
-        if (!menu) {
-          notification.warning({
-            top: 92,
-            message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�',
-            duration: 5
-          })
-          return
-        }
+      if (!menu) {
+        notification.warning({
+          top: 92,
+          message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�',
+          duration: 5
+        })
+        return
       }
 
       let newtab = {
@@ -175,14 +171,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permMenus: state.permMenus
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(CardBoxComponent)
\ No newline at end of file
+export default CardBoxComponent
\ No newline at end of file
diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx
index 40dce07..f2616d8 100644
--- a/src/tabviews/custom/components/card/table-card/index.jsx
+++ b/src/tabviews/custom/components/card/table-card/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 { Spin, notification, Row, Col, Empty, Pagination } from 'antd'
 import { DownOutlined } from '@ant-design/icons'
@@ -348,29 +347,26 @@
   }
 
   openView = (card, data) => {
-    if (card.setting.click === 'menu') {
-      let menu = null
+    if (card.setting.click === 'menu' && card.setting.menu) {
+      let menuId = card.setting.MenuID || card.setting.menu.slice(-1)[0]
+      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
 
-      if (card.setting.MenuID) {
-        let _menu = this.props.permMenus.filter(m => m.MenuID === card.setting.MenuID)[0] || ''
+      if (!menu && card.setting.MenuName && card.setting.tabType) {
         menu = {
-          MenuID: card.setting.MenuID,
-          MenuName: _menu ? _menu.MenuName : card.setting.MenuName,
-          MenuNo: card.setting.MenuNo,
-          type: _menu ? _menu.type : card.setting.tabType
+          MenuID: menuId,
+          MenuName: card.setting.MenuName,
+          MenuNo: card.setting.MenuNo || '',
+          type: card.setting.tabType
         }
-      } else if (card.setting.menu && card.setting.menu.length > 0) {
-        let menu_id = card.setting.menu.slice(-1)[0]
-        menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+      }
 
-        if (!menu) {
-          notification.warning({
-            top: 92,
-            message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�',
-            duration: 5
-          })
-          return
-        }
+      if (!menu) {
+        notification.warning({
+          top: 92,
+          message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�',
+          duration: 5
+        })
+        return
       }
 
       let newtab = {
@@ -496,14 +492,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permMenus: state.permMenus,
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(TableCard)
\ No newline at end of file
+export default TableCard
\ No newline at end of file
diff --git a/src/tabviews/custom/components/chart/antv-pie/index.jsx b/src/tabviews/custom/components/chart/antv-pie/index.jsx
index 06c4b42..8916b90 100644
--- a/src/tabviews/custom/components/chart/antv-pie/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -2,7 +2,6 @@
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
 import { Chart } from '@antv/g2'
-import { connect } from 'react-redux'
 import DataSet, { DataView } from '@antv/data-set'
 import { Spin, Empty, notification } from 'antd'
 import { DownloadOutlined } from '@ant-design/icons'
@@ -923,9 +922,10 @@
     
     if (plot.linkmenu && plot.linkmenu.length > 0) {
       let menu_id = plot.linkmenu.slice(-1)[0]
-      let menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
-
+      
       chart.on('element:dblclick', (ev) => {
+        let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
+
         if (!menu) {
           notification.warning({
             top: 92,
@@ -1042,14 +1042,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permMenus: state.permMenus,
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(PieChart)
\ No newline at end of file
+export default PieChart
\ No newline at end of file
diff --git a/src/tabviews/custom/components/form/simple-form/index.jsx b/src/tabviews/custom/components/form/simple-form/index.jsx
index 74d5900..5711995 100644
--- a/src/tabviews/custom/components/form/simple-form/index.jsx
+++ b/src/tabviews/custom/components/form/simple-form/index.jsx
@@ -1,7 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { connect } from 'react-redux'
 import { Spin, notification } from 'antd'
 
 import Api from '@/api'
@@ -196,7 +195,7 @@
   execSuccess = (btn, id) => {
     if (btn.linkmenu && btn.linkmenu.length > 0) {
       let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
-      let menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
 
       if (!menu) return
 
@@ -312,14 +311,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permMenus: state.permMenus,
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(SimpleForm)
\ No newline at end of file
+export default SimpleForm
\ No newline at end of file
diff --git a/src/tabviews/custom/components/form/step-form/index.jsx b/src/tabviews/custom/components/form/step-form/index.jsx
index c034d19..d942371 100644
--- a/src/tabviews/custom/components/form/step-form/index.jsx
+++ b/src/tabviews/custom/components/form/step-form/index.jsx
@@ -1,7 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { connect } from 'react-redux'
 import { Spin, notification, Button } from 'antd'
 
 import Api from '@/api'
@@ -245,7 +244,7 @@
 
     if (btn.linkmenu && btn.linkmenu.length > 0) {
       let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
-      let menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
 
       if (!menu) return
 
@@ -411,14 +410,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permMenus: state.permMenus,
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(StepForm)
\ No newline at end of file
+export default StepForm
\ No newline at end of file
diff --git a/src/tabviews/custom/components/form/tab-form/index.jsx b/src/tabviews/custom/components/form/tab-form/index.jsx
index fd0f2a1..870b4ad 100644
--- a/src/tabviews/custom/components/form/tab-form/index.jsx
+++ b/src/tabviews/custom/components/form/tab-form/index.jsx
@@ -1,7 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { connect } from 'react-redux'
 import { Spin, notification } from 'antd'
 
 import Api from '@/api'
@@ -206,7 +205,7 @@
   execSuccess = (btn, id) => {
     if (btn.linkmenu && btn.linkmenu.length > 0) {
       let menu_id = btn.linkmenu[btn.linkmenu.length - 1]
-      let menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
 
       if (!menu) return
 
@@ -336,14 +335,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permMenus: state.permMenus,
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(TabForm)
\ No newline at end of file
+export default TabForm
\ No newline at end of file
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 5cf8beb..669e36e 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/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 { notification, Spin, Row, Col } from 'antd'
 
@@ -74,7 +73,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, MenuID } = this.props
+    const { MenuID } = this.props
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -145,7 +144,7 @@
 
       window.GLOB.CacheData.set(MenuID, param)
 
-      config.components = this.filterComponent(config.components, roleId, permAction, balMap, skip, param, MenuID)
+      config.components = this.filterComponent(config.components, roleId, window.GLOB.mkActions, balMap, skip, param, MenuID)
       
       // 鑾峰彇涓绘悳绱㈡潯浠�
       let mainSearch = []
@@ -618,7 +617,7 @@
       
             if (col.linkmenu && col.linkmenu.length > 0) {
               let menu_id = col.linkmenu.pop()
-              col.linkThdMenu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+              col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
             } else {
               col.linkThdMenu = ''
             }
@@ -1369,23 +1368,11 @@
         <Row className="component-wrap">{this.getComponents()}</Row>
         {config && window.GLOB.breakpoint ? <DebugTable /> : null}
         {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
-        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
+        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    refreshTab: state.refreshTab,
-    permAction: state.permAction,
-    permMenus: state.permMenus
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(CustomPage)
\ No newline at end of file
+export default CustomPage
\ No newline at end of file
diff --git a/src/tabviews/formtab/index.jsx b/src/tabviews/formtab/index.jsx
index 3ff7443..339e762 100644
--- a/src/tabviews/formtab/index.jsx
+++ b/src/tabviews/formtab/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 { notification, Spin, Tabs} from 'antd'
 import moment from 'moment'
@@ -48,7 +47,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, MenuID } = this.props
+    const { MenuID } = this.props
 
     let param = {
       func: 'sPC_Get_LongParam',
@@ -104,13 +103,13 @@
       }
 
       if (!window.GLOB.mkHS) {
-        config.action = config.action.filter(item => permAction[item.uuid])
+        config.action = config.action.filter(item => window.GLOB.mkActions[item.uuid])
         config.tabgroups.forEach(group => {
           group.sublist = group.sublist.filter(tab => {
             if (tab.supMenu === 'mainTable') {
               tab.supMenu = MenuID
             }
-            return permAction[tab.linkTab]
+            return window.GLOB.mkActions[tab.linkTab]
           })
         })
       } else {
@@ -669,14 +668,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permAction: state.permAction
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(NormalTable)
\ No newline at end of file
+export default NormalTable
\ No newline at end of file
diff --git a/src/tabviews/home/index.jsx b/src/tabviews/home/index.jsx
index ae14a8f..f79eb7e 100644
--- a/src/tabviews/home/index.jsx
+++ b/src/tabviews/home/index.jsx
@@ -1,10 +1,10 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { connect } from 'react-redux'
 import { notification, Spin } from 'antd'
 
 import Api from '@/api'
 import asyncComponent from '@/utils/asyncComponent'
+import MKEmitter from '@/utils/events.js'
 import './index.scss'
 
 const DefaultHome = asyncComponent(() => import('./defaulthome'))
@@ -18,25 +18,50 @@
   state = {
     loading: true,
     background: sessionStorage.getItem('home_background'),
-    waiting: true,
+    waitMenu: true,
+    waitAction: true,
     view: ''
   }
 
   componentDidMount () {
     this.loadHomeConfig()
-    if (this.props.permMenus.length > 0 && JSON.stringify(this.props.permAction) !== '{}') {
+    if (window.GLOB.mkThdMenus.length > 0) {
       this.setState({
-        waiting: false
+        waitMenu: false
       })
+    } else {
+      MKEmitter.addListener('mkMenuLoaded', this.mkMenuLoaded)
+    }
+    if (window.GLOB.mkActions.loaded) {
+      this.setState({
+        waitAction: false
+      })
+    } else {
+      MKEmitter.addListener('mkActionLoaded', this.mkActionLoaded)
     }
   }
 
-  UNSAFE_componentWillReceiveProps (nextProps) {
-    if (nextProps.permMenus.length > 0 && JSON.stringify(nextProps.permAction) !== '{}') {
-      this.setState({
-        waiting: false
-      })
+  /**
+   * @description 缁勪欢閿�姣侊紝娓呴櫎state鏇存柊
+   */
+  componentWillUnmount () {
+    this.setState = () => {
+      return
     }
+    MKEmitter.removeListener('mkMenuLoaded', this.mkMenuLoaded)
+    MKEmitter.removeListener('mkActionLoaded', this.mkActionLoaded)
+  }
+
+  mkMenuLoaded = () => {
+    this.setState({
+      waitMenu: false
+    })
+  }
+
+  mkActionLoaded = () => {
+    this.setState({
+      waitAction: false
+    })
   }
 
   loadHomeConfig = () => {
@@ -54,7 +79,8 @@
         } else {
           this.setState({
             loading: false,
-            waiting: false,
+            waitMenu: false,
+            waitAction: false,
             view: 'default'
           })
         }
@@ -73,9 +99,9 @@
   }
 
   render() {
-    const { loading, waiting, view, background } = this.state
+    const { loading, waitAction, waitMenu, view, background } = this.state
 
-    if (loading || waiting) {
+    if (loading || waitAction || waitMenu) {
       return (<div className="home-loading-view" style={{background: background}}><Spin className="home-box-spin" size="large" /></div>)
     } else if (view === 'custom') {
       return (<CustomPage MenuID={this.props.MenuID} MenuName="棣栭〉"/>)
@@ -85,15 +111,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permAction: state.permAction,
-    permMenus: state.permMenus
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(Home)
\ No newline at end of file
+export default Home
\ No newline at end of file
diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx
index bc460d3..7725c16 100644
--- a/src/tabviews/subtable/index.jsx
+++ b/src/tabviews/subtable/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 { notification, Spin, Switch, Row, Col, Tabs} from 'antd'
 
@@ -84,7 +83,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, permMenus, Tab } = this.props
+    const { Tab } = this.props
 
     let param = {
       func: 'sPC_Get_LongParam',
@@ -134,7 +133,7 @@
 
       // 鏉冮檺杩囨护
       if (!window.GLOB.mkHS) {
-        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
+        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
       } else {
         config.action = config.action.filter(item => item.hidden !== 'true')
       }
@@ -183,7 +182,7 @@
 
           if (col.linkmenu && col.linkmenu.length > 0) {
             let menu_id = col.linkmenu.slice(-1)[0]
-            col.linkThdMenu = permMenus.filter(m => m.MenuID === menu_id)[0] || ''
+            col.linkThdMenu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menu_id)[0] || ''
           } else {
             col.linkThdMenu = ''
           }
@@ -1129,15 +1128,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permAction: state.permAction,
-    permMenus: state.permMenus,
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(SubTabViewTable)
\ No newline at end of file
+export default SubTabViewTable
\ No newline at end of file
diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx
index 9b576d2..6a11de2 100644
--- a/src/tabviews/subtabtable/index.jsx
+++ b/src/tabviews/subtabtable/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 { notification, Spin} from 'antd'
 
@@ -61,7 +60,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, Tab } = this.props
+    const { Tab } = this.props
 
     let param = {
       func: 'sPC_Get_LongParam',
@@ -129,7 +128,7 @@
 
       // 鏉冮檺杩囨护
       if (!window.GLOB.mkHS) {
-        config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid])
+        config.action = config.action.filter(item => item.hidden !== 'true' && window.GLOB.mkActions[item.uuid])
       } else {
         config.action = config.action.filter(item => item.hidden !== 'true')
       }
@@ -891,14 +890,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permAction: state.permAction
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(SubTabModalTable)
\ No newline at end of file
+export default SubTabModalTable
\ No newline at end of file
diff --git a/src/tabviews/treepage/index.jsx b/src/tabviews/treepage/index.jsx
index f68831b..a173c8a 100644
--- a/src/tabviews/treepage/index.jsx
+++ b/src/tabviews/treepage/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 { notification, Spin, Tabs, Tree, Row, Col, Card, Input, Empty } from 'antd'
 import { FolderOpenOutlined, FolderOutlined, FileOutlined } from '@ant-design/icons'
@@ -59,7 +58,7 @@
    * @description 鑾峰彇椤甸潰閰嶇疆淇℃伅
    */
   async loadconfig () {
-    const { permAction, param, MenuName, MenuID } = this.props
+    const { param, MenuName, MenuID } = this.props
 
     let _param = {
       func: 'sPC_Get_LongParam',
@@ -123,7 +122,7 @@
           if (tab.supMenu === 'mainTable') {
             tab.supMenu = MenuID
           }
-          return permAction[tab.linkTab]}
+          return window.GLOB.mkActions[tab.linkTab]}
         )
       })
 
@@ -632,21 +631,11 @@
           </Col>
         </Row> : null}
         {!window.GLOB.mkHS && window.GLOB.systemType !== 'production' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null}
-        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts} permAction={this.props.permAction}/> : null}
+        {!window.GLOB.mkHS && shortcuts ? <SettingComponent config={config} dict={this.state.dict} shortcuts={shortcuts}/> : null}
         {viewlost ? <NotFount msg={this.state.lostmsg} /> : null}
       </div>
     )
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permAction: state.permAction
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(TreePage)
\ No newline at end of file
+export default TreePage
\ No newline at end of file
diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx
index 8a350a5..6158165 100644
--- a/src/tabviews/zshare/actionList/tabbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/tabbutton/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 { Button, notification } from 'antd'
 
@@ -153,20 +152,17 @@
           primaryId: primaryId
         }
       }
-    } else {
-      let menu = null
+    } else if (btn.MenuID || btn.linkmenu) {
+      let menuId = btn.MenuID || btn.linkmenu.slice(-1)[0]
+      let menu = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0]
 
-      if (btn.MenuID) {
-        let _menu = this.props.permMenus.filter(m => m.MenuID === btn.MenuID)[0] || ''
+      if (!menu && btn.MenuName && btn.tabType) {
         menu = {
           MenuID: btn.MenuID,
-          MenuName: _menu ? _menu.MenuName : btn.MenuName,
+          MenuName: btn.MenuName,
           MenuNo: btn.MenuNo,
-          type: _menu ? _menu.type : btn.tabType
+          type: btn.tabType
         }
-      } else if (btn.linkmenu && btn.linkmenu.length > 0) {
-        let menu_id = btn.linkmenu.slice(-1)[0]
-        menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || ''
       }
 
       if (!menu) {
@@ -242,14 +238,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    permMenus: state.permMenus,
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(TabButton)
\ No newline at end of file
+export default TabButton
\ No newline at end of file
diff --git a/src/tabviews/zshare/settingcomponent/index.jsx b/src/tabviews/zshare/settingcomponent/index.jsx
index c877b05..ce4540b 100644
--- a/src/tabviews/zshare/settingcomponent/index.jsx
+++ b/src/tabviews/zshare/settingcomponent/index.jsx
@@ -17,7 +17,6 @@
     dict: PropTypes.object,           // 瀛楀吀琛�
     config: PropTypes.object,         // 椤甸潰閰嶇疆淇℃伅
     shortcuts: PropTypes.any,         // 鑷畾涔夎缃�
-    permAction: PropTypes.object,     // 鎸夐挳鏉冮檺
   }
 
   state = {
@@ -183,7 +182,7 @@
   }
 
   getPageConfig = () => {
-    const { shortcuts, permAction } = this.props
+    const { shortcuts } = this.props
     let config = fromJS(this.props.config).toJS()
     let userConfig = {}
     let components = []
@@ -262,7 +261,7 @@
           let _comp = {title: res.tab.label, uuid: res.tab.uuid, action: []}
 
           subconfig.action.forEach(item => {
-            if (!permAction[item.uuid]) return
+            if (!window.GLOB.mkActions[item.uuid]) return
 
             item.$expanded = false
             if (item.OpenType === 'funcbutton' && item.funcType === 'print') {
diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
index c034b51..39fb5c9 100644
--- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -555,6 +555,11 @@
             { pattern: _patten, message: formRule.func.innerMessage },
             { max: formRule.func.max, message: formRule.func.maxMessage }
           )
+        } else if (item.key === 'sql' || item.key === 'sheet') {
+          rules.push(
+            { pattern: /^[a-zA-Z_]+$/, message: '琛ㄥ悕鍙彲浣跨敤瀛楁瘝浠ュ強_' },
+            { max: formRule.func.max, message: formRule.func.maxMessage }
+          )
         } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') {
           rules.push(
             { pattern: formRule.func.pattern, message: formRule.func.message },
diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
index 79e0fe0..5ce74b1 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -220,6 +220,10 @@
                   {
                     max: 50,
                     message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
+                  },
+                  {
+                    pattern: /^[a-zA-Z_]+$/,
+                    message: '琛ㄥ悕鍙彲浣跨敤瀛楁瘝浠ュ強_'
                   }
                 ]
               })(<Input placeholder={''} autoComplete="off" />)}

--
Gitblit v1.8.0