From c95918fb0fffb61b1117fbf4cd429e291b9594d0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 17 九月 2021 01:02:34 +0800
Subject: [PATCH] 2021-09-17

---
 src/views/design/header/index.jsx |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/views/design/header/index.jsx b/src/views/design/header/index.jsx
index 7313843..db4bf38 100644
--- a/src/views/design/header/index.jsx
+++ b/src/views/design/header/index.jsx
@@ -8,7 +8,6 @@
 import {
   modifyMenuTree,
   modifyMainMenu,
-  modifyTabview,
   resetEditLevel,
   logout
 } from '@/store/action'
@@ -19,6 +18,7 @@
 import Utils from '@/utils/utils.js'
 import avatar from '@/assets/img/avatar.jpg'
 import MainLogo from '@/assets/img/main-logo.png'
+import MKEmitter from '@/utils/events.js'
 import './index.scss'
 
 const EditMenu = asyncComponent(() => import('@/templates/menuconfig/editfirstmenu'))
@@ -214,7 +214,8 @@
 
     this.props.modifyMainMenu(menulist[0] || null)
     this.props.resetEditLevel(false)
-    this.props.modifyTabview([])
+
+    MKEmitter.emit('modifyTabs', null, 'replace')
   }
   
   exitEdit = () => {
@@ -300,7 +301,7 @@
   }
 
   render () {
-    const { mainMenu, editLevel, tabviews } = this.props
+    const { mainMenu, editLevel } = this.props
     const { menulist } = this.state
 
     return (
@@ -339,7 +340,7 @@
             </Button>
           </div> : null
         }
-        {editLevel === 'HS' && tabviews.length === 0 && options.sysType === 'local' && window.GLOB.systemType === 'production' && this.props.memberLevel >= 20 ?
+        {editLevel === 'HS' && options.sysType === 'local' && window.GLOB.systemType === 'production' && this.props.memberLevel >= 20 ?
           <div className="app-prod-entrance entrance">
             <div className="icon"><Icon type="appstore" /></div>
             <div className="title">搴旂敤绠$悊</div>
@@ -400,7 +401,6 @@
 
 const mapStateToProps = (state) => {
   return {
-    tabviews: state.tabviews,
     menuTree: state.menuTree,
     mainMenu: state.mainMenu,
     editLevel: state.editLevel,
@@ -411,7 +411,6 @@
 
 const mapDispatchToProps = (dispatch) => {
   return {
-    modifyTabview: (tabviews) => dispatch(modifyTabview(tabviews)),
     modifyMenuTree: (menuTree) => dispatch(modifyMenuTree(menuTree)),
     modifyMainMenu: (mainMenu) => dispatch(modifyMainMenu(mainMenu)),
     resetEditLevel: (level) => dispatch(resetEditLevel(level)),

--
Gitblit v1.8.0