From f3167f8371d19d0ea8fe7d0e7af5517ff0b08cd2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 07 四月 2021 23:25:29 +0800
Subject: [PATCH] 2021-04-07

---
 src/menu/datasource/index.jsx |   28 ++++++++--------------------
 1 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/src/menu/datasource/index.jsx b/src/menu/datasource/index.jsx
index 1869282..9732b5a 100644
--- a/src/menu/datasource/index.jsx
+++ b/src/menu/datasource/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 { Icon, Modal } from 'antd'
 
@@ -16,7 +15,7 @@
   }
 
   state = {
-    dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
+    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     sourcelist: [],
     mainSearch: [],
     visible: false,
@@ -35,7 +34,7 @@
   }
 
   editDataSource = () => {
-    const { config, menu } = this.props
+    const { config } = this.props
 
     let search = []
     let parents = []
@@ -50,7 +49,7 @@
             _conf = item
 
             if (_conf.parentId && _conf.tabId) {
-              getParents(menu)
+              getParents(tab)
             }
           } else {
             getParents(tab)
@@ -60,10 +59,10 @@
     }
 
     if (config.parentId && config.tabId) {
-      getParents(menu)
+      getParents(window.GLOB.customMenu)
     }
 
-    parents.unshift(menu)
+    parents.unshift(window.GLOB.customMenu)
 
     parents.forEach(parent => {
       parent.components.forEach(item => {
@@ -110,7 +109,7 @@
   }
 
   render () {
-    const { config, menu } = this.props
+    const { config } = this.props
     const { visible, dict, loading, mainSearch } = this.state
 
     return (
@@ -122,7 +121,6 @@
           visible={visible}
           width={'75vw'}
           maskClosable={false}
-          style={{minWidth: '900px', maxWidth: '1200px'}}
           okText={dict['model.submit']}
           onOk={this.verifySubmit}
           confirmLoading={loading}
@@ -131,7 +129,7 @@
         >
           <VerifyCard
             dict={dict}
-            menu={menu}
+            menu={window.GLOB.customMenu}
             mainSearch={mainSearch}
             config={config}
             wrappedComponentRef={(inst) => this.verifyRef = inst}
@@ -142,14 +140,4 @@
   }
 }
 
-const mapStateToProps = (state) => {
-  return {
-    menu: state.customMenu
-  }
-}
-
-const mapDispatchToProps = () => {
-  return {}
-}
-
-export default connect(mapStateToProps, mapDispatchToProps)(DataSource)
\ No newline at end of file
+export default DataSource
\ No newline at end of file

--
Gitblit v1.8.0