From da64ab0923bf8817fc8599a6e37b953ce38f64c8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 27 八月 2023 18:37:36 +0800
Subject: [PATCH] 2023-08-27

---
 src/components/breadview/index.jsx |   35 ++++++++++++-----------------------
 1 files changed, 12 insertions(+), 23 deletions(-)

diff --git a/src/components/breadview/index.jsx b/src/components/breadview/index.jsx
index b1f59ca..3a44900 100644
--- a/src/components/breadview/index.jsx
+++ b/src/components/breadview/index.jsx
@@ -6,7 +6,6 @@
 
 import asyncComponent from '@/utils/asyncLoadComponent'
 import NotFount from '@/components/404'
-import options from '@/store/options.js'
 import MKEmitter from '@/utils/events.js'
 import Api from '@/api'
 import './index.scss'
@@ -15,11 +14,11 @@
 const CustomPage = asyncComponent(() => import('@/tabviews/custom'))
 const CommonTable = asyncComponent(() => import('@/tabviews/commontable'))
 const BaseTable = asyncComponent(() => import('@/tabviews/basetable'))
-const CalendarPage = asyncComponent(() => import('@/tabviews/calendar'))
 const TreePage = asyncComponent(() => import('@/tabviews/treepage'))
 const Iframe = asyncComponent(() => import('@/tabviews/iframe'))
 const RoleManage = asyncComponent(() => import('@/tabviews/rolemanage'))
-const FormTab = asyncComponent(() => import('@/tabviews/formtab'))
+
+moment.locale('zh-cn')
 
 class BreadView extends Component {
   state = {
@@ -31,7 +30,7 @@
     const { tabview } = this.state
     window.GLOB.CacheMap = new Map()
 
-    if (options.sysType === 'local' && window.GLOB.systemType !== 'production') {
+    if (window.GLOB.sysType === 'local' && window.GLOB.systemType !== 'production') {
       let roledefer = new Promise(resolve => {
         Api.getSystemConfig({
           func: 's_Get_TrdMenu_Role',
@@ -88,35 +87,25 @@
   selectcomponent = (view) => {
     // 鏍规嵁tab椤典腑鑿滃崟淇℃伅锛岄�夋嫨鎵�闇�鐨勭粍浠�
     if (view.type === 'BaseTable') {
-      return (<BaseTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param} changeTemp={this.changeTemp}/>)
+      return (<BaseTable MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>)
     } else if (view.type === 'CustomPage') {
-      return (<CustomPage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param} changeTemp={this.changeTemp}/>)
+      return (<CustomPage MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>)
     } else if (view.type === 'Home') {
-      return (<Home MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
+      return (<Home MenuID={view.MenuID} MenuName={view.MenuName}/>)
     } else if (view.type === 'RolePermission') {
-      return (<RoleManage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>)
+      return (<RoleManage MenuID={view.MenuID}/>)
     } else if (view.type === 'CommonTable') {
-      return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param} changeTemp={this.changeTemp}/>)
+      return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param} changeTemp={this.changeTemp}/>)
     } else if (view.type === 'TreePage') {
-      return (<TreePage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>)
-    } else if (view.type === 'CalendarPage') {
-      return (<CalendarPage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>)
-    } else if (view.type === 'FormTab') {
-      return (<FormTab MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>)
+      return (<TreePage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} param={view.param}/>)
     } else if (view.type === 'iframe') {
-      return (<Iframe key={view.MenuID} MenuID={view.MenuID} MenuNo={view.MenuNo} title={view.MenuName} MenuName={view.MenuName} url={window.GLOB.baseurl + 'zh-CN/' + view.LinkUrl}/>)
+      return (<Iframe MenuID={view.MenuID} title={view.MenuName} url={view.src}/>)
     } else {
-      return (<NotFount key={view.MenuID} />)
+      return (<NotFount />)
     }
   }
 
   UNSAFE_componentWillMount () {
-    if (!sessionStorage.getItem('lang') || sessionStorage.getItem('lang') === 'zh-CN') {
-      moment.locale('zh-cn')
-    } else {
-      moment.locale('en')
-    }
-
     let home = {
       MenuID: 'home_page_id',
       MenuName: '棣栭〉',
@@ -163,7 +152,7 @@
     const { tabview, hasNavBar } = this.state
 
     return (
-      <section id="mk-breadview-wrap" className="mk-breadview-wrap">
+      <section id="mk-tabgroup-wrap" className="mk-breadview-wrap">
         {hasNavBar && tabview ? <Breadcrumb separator="">
           <Breadcrumb.Item>
             <HomeOutlined onClick={this.gotoHome} />

--
Gitblit v1.8.0