From 53b9fb93d0376eb02bb996935f1720b4e95cd897 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 12 十月 2022 14:41:06 +0800 Subject: [PATCH] 2022-10-12 --- src/components/breadview/index.jsx | 31 +++++++------------------------ 1 files changed, 7 insertions(+), 24 deletions(-) diff --git a/src/components/breadview/index.jsx b/src/components/breadview/index.jsx index 9f1a97d..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,26 +8,18 @@ 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' const Home = asyncComponent(() => import('@/tabviews/home')) 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')) - -let service = '' - -if (process.env.NODE_ENV === 'production') { - service = document.location.origin + '/' + window.GLOB.service + 'zh-CN/' -} else { - service = window.GLOB.location + '/' + window.GLOB.service + 'zh-CN/' -} class BreadView extends Component { state = { @@ -64,7 +55,7 @@ }) } - this.props.initActionPermission(_permAction) + window.GLOB.mkActions = _permAction } resolve() @@ -92,8 +83,10 @@ // 鏍规嵁tab椤典腑鑿滃崟淇℃伅锛岄�夋嫨鎵�闇�鐨勭粍浠� if (view.type === 'Home') { return (<Home MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID}/>) - } else if (view.type === 'CommonTable' || view.type === 'ManageTable') { + } else if (view.type === 'CommonTable') { return (<CommonTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>) + // } else if (view.type === 'BaseTable') { + // return (<BaseTable MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>) } else if (view.type === 'CustomPage') { return (<CustomPage MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} param={view.param}/>) } else if (view.type === 'TreePage') { @@ -105,7 +98,7 @@ } else if (view.type === 'FormTab') { return (<FormTab MenuNo={view.MenuNo} MenuID={view.MenuID} MenuName={view.MenuName} key={view.MenuID} 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={service + view.LinkUrl}/>) + 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}/>) } else { return (<NotFount key={view.MenuID} />) } @@ -194,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 -- Gitblit v1.8.0