king
2023-08-16 7e46c386be5c2cfc20af3936d26839ad3fce44b0
src/views/design/sidemenu/index.jsx
@@ -1,12 +1,10 @@
import React, {Component} from 'react'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Menu, Popover, Modal, notification } from 'antd'
import { EditOutlined, PlusOutlined, SettingOutlined } from '@ant-design/icons'
import moment from 'moment'
import asyncComponent from '@/utils/asyncComponent'
import { resetEditLevel } from '@/store/action'
import Utils from '@/utils/utils.js'
import Api from '@/api'
import MKEmitter from '@/utils/events.js'
@@ -109,6 +107,8 @@
  }
  editmenu = (cell) => {
    if (window.GLOB.systemType === 'production') return
    if (cell.type === 'CustomPage') {
      let _param = {
        MenuType: 'custom',
@@ -119,7 +119,7 @@
      }
      _param = window.btoa(window.encodeURIComponent(JSON.stringify(_param)))
      window.open(`#/menudesign/${_param}`)
    } else if (['CommonTable', 'TreePage', 'CalendarPage'].includes(cell.type)) {
    } else if (['CommonTable', 'TreePage'].includes(cell.type)) {
      sessionStorage.setItem('menuTree', JSON.stringify(this.props.menuTree))
      let _param = window.btoa(window.encodeURIComponent(JSON.stringify(cell)))
@@ -200,7 +200,7 @@
      this.setState({
        loading: true
      })
      Api.getSystemConfig(param).then(res => {
      Api.getCloudConfig(param).then(res => {
        if (res.status) {
          this.setState({
            loading: false,
@@ -260,7 +260,7 @@
        loading: true
      })
      Api.getSystemConfig(param).then(response => {
      Api.getCloudConfig(param).then(response => {
        if (response.status) {
          this.setState({
            loading: false,
@@ -347,6 +347,7 @@
            menulist={this.state.editMenu.children}
            supMenuList={mainMenu.children}
            supMenu={this.state.editMenu}
            menuTree={this.props.menuTree}
            exitEdit={this.exitEdit}
          /> : null
        }
@@ -367,7 +368,7 @@
        <Modal
          title="修改菜单"
          visible={thdVisible}
          width={600}
          width={700}
          onOk={this.thdSubmit}
          confirmLoading={loading}
          onCancel={() => {this.setState({thdVisible: false})}}
@@ -384,18 +385,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    mainMenu: state.mainMenu,
    menuTree: state.menuTree,
    editLevel: state.editLevel
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    resetEditLevel: (level) => dispatch(resetEditLevel(level))
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(Sidemenu)
export default Sidemenu