king
2022-10-08 9c6795fd3c44e46cf3955fbfd8f8eeca23acb7a9
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'
@@ -22,14 +20,6 @@
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 = {
@@ -65,7 +55,7 @@
              })
            }
  
            this.props.initActionPermission(_permAction)
            window.GLOB.mkActions = _permAction
          }
          resolve()
@@ -108,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} />)
    }
@@ -197,14 +187,4 @@
  }
}
const mapStateToProps = () => {
  return {}
}
const mapDispatchToProps = (dispatch) => {
  return {
    initActionPermission: (permAction) => dispatch(initActionPermission(permAction)),
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(BreadView)
export default BreadView