king
2021-04-07 9e100b8804d43d9f7559cdf41b67ed7475a809b8
2021-04-07
29个文件已修改
433 ■■■■ 已修改文件
public/index.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/index.jsx 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/prop-card/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/table-card/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/carousel/data-card/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/carousel/prop-card/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-bar/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/chart/antv-pie/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/code/sandbox/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/editor/braft-editor/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/index.jsx 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/normal-form/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/group/normal-group/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/search/main-search/index.jsx 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/index.jsx 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/searchcomponent/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/table/normal-table/index.jsx 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/tabs/antv-tabs/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/datasource/index.jsx 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/modalconfig/index.jsx 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/popview/index.jsx 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/modulesource/option.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/action-type.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/action.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/reducer.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html
@@ -3,6 +3,7 @@
  <head>
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit">
    <!-- <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> -->
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <link rel="shortcut icon" href="#">
src/menu/components/card/cardcellcomponent/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import {connect} from 'react-redux'
import { Modal, Button } from 'antd'
import zhCN from '@/locales/zh-CN/model.js'
@@ -277,7 +276,7 @@
   * @description 按钮编辑,获取按钮表单信息
   */
  handleAction = (card) => {
    const { menu, cards } = this.props
    const { cards } = this.props
    let usefulFields = sessionStorage.getItem('permFuncField')
    if (usefulFields) {
@@ -306,7 +305,7 @@
      menulist = []
    }
    let modules = MenuUtils.getSubModules(menu.components, cards.uuid)
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid)
    this.setState({
      actvisible: true,
@@ -707,14 +706,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(CardCellComponent)
export default CardCellComponent
src/menu/components/card/data-card/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Modal, Pagination, notification } from 'antd'
@@ -42,6 +41,7 @@
    const { card } = this.props
    if (card.isNew) {
      let ismob = sessionStorage.getItem('appType') === 'mob'
      let _card = {
        uuid: card.uuid,
        type: card.type,
@@ -66,7 +66,7 @@
        btnlog: [],
        subcards: [{
          uuid: Utils.getuuid(),
          setting: { width: 6, type: 'simple'},
          setting: { width: ismob ? 24 : 6, type: 'simple'},
          style: {
            borderWidth: '1px', borderColor: '#e8e8e8',
            paddingTop: '15px', paddingBottom: '15px', paddingLeft: '15px', paddingRight: '15px',
@@ -129,7 +129,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -424,14 +424,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(DataCardEditComponent)
export default DataCardEditComponent
src/menu/components/card/prop-card/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Modal, notification } from 'antd'
@@ -42,6 +41,7 @@
    const { card } = this.props
    if (card.isNew) {
      let ismob = sessionStorage.getItem('appType') === 'mob'
      let _card = {
        uuid: card.uuid,
        type: card.type,
@@ -63,7 +63,7 @@
        scripts: [],
        subcards: [{
          uuid: Utils.getuuid(),
          setting: { width: 6, type: 'simple'},
          setting: { width: ismob ? 24 : 6, type: 'simple'},
          style: {
            borderWidth: '1px', borderColor: '#e8e8e8',
            paddingTop: '15px', paddingBottom: '15px', paddingLeft: '15px', paddingRight: '15px',
@@ -115,7 +115,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -399,14 +399,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(PropCardEditComponent)
export default PropCardEditComponent
src/menu/components/card/table-card/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Modal, Pagination, notification } from 'antd'
@@ -353,14 +352,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TableCardEditComponent)
export default TableCardEditComponent
src/menu/components/carousel/data-card/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Modal, notification } from 'antd'
@@ -102,7 +101,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -274,14 +273,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(DataCardEditComponent)
export default DataCardEditComponent
src/menu/components/carousel/prop-card/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Modal, notification, Carousel } from 'antd'
@@ -101,7 +100,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -356,14 +355,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(PropCardEditComponent)
export default PropCardEditComponent
src/menu/components/chart/antv-bar/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, notification } from 'antd'
import { Chart } from '@antv/g2'
@@ -128,7 +127,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -909,14 +908,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(antvBarLineChart)
export default antvBarLineChart
src/menu/components/chart/antv-pie/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, notification } from 'antd'
import { Chart } from '@antv/g2'
@@ -112,7 +111,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -472,14 +471,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(antvBarLineChart)
export default antvBarLineChart
src/menu/components/code/sandbox/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover } from 'antd'
@@ -87,7 +86,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -175,14 +174,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(CodeSandBox)
export default CodeSandBox
src/menu/components/editor/braft-editor/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover } from 'antd'
@@ -86,7 +85,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -183,14 +182,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(BraftEditorComponent)
export default BraftEditorComponent
src/menu/components/form/formaction/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { Modal, Button, Popover, Icon } from 'antd'
import zhCN from '@/locales/zh-CN/model.js'
@@ -28,13 +27,6 @@
    formlist: null,      // 表单信息
    visible: false,      // 模态框控制
    profVisible: false,  // 验证信息编辑
  }
  /**
   * @description 搜索条件初始化
   */
  UNSAFE_componentWillMount () {
  }
  componentDidMount () {
@@ -88,7 +80,7 @@
   * @description 按钮编辑,获取按钮表单信息
   */
  handleAction = (card) => {
    const { menu, config } = this.props
    const { config } = this.props
    let usefulFields = sessionStorage.getItem('permFuncField')
    if (usefulFields) {
@@ -106,7 +98,7 @@
      <p style={{marginBottom: '5px'}}>{this.state.dict['model.tooltip.func.innerface'].replace('@ableField', ableField)}</p>
    </div>
    let modules = MenuUtils.getSubModules(menu.components, config.uuid)
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid)
    this.setState({
      visible: true,
@@ -258,14 +250,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(CardCellComponent)
export default CardCellComponent
src/menu/components/form/normal-form/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Modal, Button, Switch, notification } from 'antd'
import moment from 'moment'
@@ -119,7 +118,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -702,14 +701,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(PropCardEditComponent)
export default PropCardEditComponent
src/menu/components/group/normal-group/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Button } from 'antd'
@@ -183,14 +182,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(NormalGroup)
export default NormalGroup
src/menu/components/search/main-search/index.jsx
@@ -1,6 +1,5 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Modal, notification, Popover, Icon } from 'antd'
import moment from 'moment'
@@ -394,14 +393,5 @@
    )
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(MainSearchComponent)
export default MainSearchComponent
src/menu/components/share/actioncomponent/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Modal, notification, Button } from 'antd'
@@ -142,7 +141,7 @@
   * @description 按钮编辑,获取按钮表单信息
   */
  handleAction = (card) => {
    const { menu, config } = this.props
    const { config } = this.props
    let usefulFields = sessionStorage.getItem('permFuncField')
    if (usefulFields) {
@@ -171,7 +170,7 @@
      menulist = []
    }
    
    let modules = MenuUtils.getSubModules(menu.components, config.uuid)
    let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, config.uuid)
    this.setState({
      visible: true,
@@ -333,7 +332,7 @@
   * @description 创建按钮存储过程
   */
  creatFunc = () => {
    const { menu } = this.props
    const menu = window.GLOB.customMenu
    let _config = fromJS(this.props.config).toJS()
    this.actionFormRef.handleConfirm().then(res => {
@@ -529,14 +528,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(ActionComponent)
export default ActionComponent
src/menu/components/share/searchcomponent/index.jsx
@@ -1,7 +1,6 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import {connect} from 'react-redux'
import { Modal, notification } from 'antd'
import moment from 'moment'
@@ -319,14 +318,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(SearchComponent)
export default SearchComponent
src/menu/components/table/normal-table/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Popover, Modal, notification } from 'antd'
@@ -134,7 +133,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || (!this.props.menu && nextProps.menu)
    return !is(fromJS(this.state), fromJS(nextState))
  }
  /**
@@ -409,14 +408,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(TableCardEditComponent)
export default TableCardEditComponent
src/menu/components/tabs/antv-tabs/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { is, fromJS } from 'immutable'
import { Tabs, Icon, Popover, Modal } from 'antd'
@@ -354,14 +353,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(antvTabs)
export default antvTabs
src/menu/datasource/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { Icon, Modal } from 'antd'
@@ -35,7 +34,7 @@
  }
  editDataSource = () => {
    const { config, menu } = this.props
    const { config } = this.props
    let search = []
    let parents = []
@@ -50,7 +49,7 @@
            _conf = item
            if (_conf.parentId && _conf.tabId) {
              getParents(menu)
              getParents(tab)
            }
          } else {
            getParents(tab)
@@ -60,10 +59,10 @@
    }
    if (config.parentId && config.tabId) {
      getParents(menu)
      getParents(window.GLOB.customMenu)
    }
    parents.unshift(menu)
    parents.unshift(window.GLOB.customMenu)
    parents.forEach(parent => {
      parent.components.forEach(item => {
@@ -110,7 +109,7 @@
  }
  render () {
    const { config, menu } = this.props
    const { config } = this.props
    const { visible, dict, loading, mainSearch } = this.state
    return (
@@ -130,7 +129,7 @@
        >
          <VerifyCard
            dict={dict}
            menu={menu}
            menu={window.GLOB.customMenu}
            mainSearch={mainSearch}
            config={config}
            wrappedComponentRef={(inst) => this.verifyRef = inst}
@@ -141,14 +140,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(DataSource)
export default DataSource
src/menu/modalconfig/index.jsx
@@ -1,6 +1,5 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
import { is, fromJS } from 'immutable'
import { DndProvider } from 'react-dnd'
import HTML5Backend from 'react-dnd-html5-backend'
@@ -35,7 +34,6 @@
  }
  state = {
    menu: null,            // 上级菜单,三级菜单或标签
    dict: CommonDict,      // 字典
    config: null,          // 页面配置,包括模板类型、模态框设置、添加表名、表单列表
    visible: false,        // 表单编辑模态框,显示控制
@@ -522,14 +520,4 @@
  }
}
const mapStateToProps = (state) => {
  return {
    menu: state.customMenu
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default connect(mapStateToProps, mapDispatchToProps)(ComModalConfig)
export default ComModalConfig
src/menu/popview/index.jsx
@@ -1,6 +1,5 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { DndProvider } from 'react-dnd'
import { is, fromJS } from 'immutable'
import moment from 'moment'
@@ -13,7 +12,6 @@
import enUS from '@/locales/en-US/mob.js'
import MKEmitter from '@/utils/events.js'
import asyncComponent from '@/utils/asyncComponent'
import { modifyCustomMenu } from '@/store/action'
import './index.scss'
@@ -217,7 +215,7 @@
          config: fromJS(config).toJS()
        })
        this.props.modifyCustomMenu(config)
        window.GLOB.customMenu = config
      } else {
        notification.warning({
          top: 92,
@@ -526,7 +524,7 @@
      config: config
    })
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  /**
@@ -535,7 +533,7 @@
  updatetable = (config) => {
    this.setState({ config })
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  insert = (item) => {
@@ -544,7 +542,7 @@
    config.components.push(item)
    this.setState({config})
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  render () {
@@ -599,14 +597,4 @@
  }
}
const mapStateToProps = () => {
  return {}
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu))
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(MenuDesign)
export default MenuDesign
src/mob/modulesource/option.jsx
@@ -29,14 +29,14 @@
  { type: 'menu', url: Carousel, component: 'carousel', subtype: 'datacard', title: '轮播-动态数据', width: 24 },
  { type: 'menu', url: Carousel1, component: 'carousel', subtype: 'propcard', title: '轮播-静态数据', width: 24 },
  { type: 'menu', url: NormalTable, component: 'table', subtype: 'normaltable', title: '常用表', width: 24 },
  { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格', width: 12 },
  { type: 'menu', url: TableCard, component: 'table', subtype: 'tablecard', title: '表格', width: 24 },
  { type: 'menu', url: line, component: 'line', subtype: 'line', title: '折线图', width: 24 },
  { type: 'menu', url: line1, component: 'line', subtype: 'line1', title: '阶梯折线图', width: 24 },
  { type: 'menu', url: bar, component: 'bar', subtype: 'bar', title: '柱状图', width: 24 },
  { type: 'menu', url: bar1, component: 'bar', subtype: 'bar1', title: '条形图', width: 24 },
  { type: 'menu', url: Pie, component: 'pie', subtype: 'pie', title: '饼图', width: 12 },
  { type: 'menu', url: Pie1, component: 'pie', subtype: 'ring', title: '环图', width: 12 },
  { type: 'menu', url: Pie, component: 'pie', subtype: 'pie', title: '饼图', width: 24 },
  { type: 'menu', url: Pie1, component: 'pie', subtype: 'ring', title: '环图', width: 24 },
  { type: 'menu', url: SandBox, component: 'code', subtype: 'sandbox', title: '自定义', width: 24 },
  { type: 'menu', url: Pie2, component: 'pie', subtype: 'nightingale', title: '南丁格尔图', width: 12 },
  { type: 'menu', url: Pie2, component: 'pie', subtype: 'nightingale', title: '南丁格尔图', width: 24 },
  { type: 'menu', url: group, component: 'group', subtype: 'normalgroup', title: '分组', width: 24 },
]
src/store/action-type.js
@@ -28,8 +28,5 @@
// 修改会员等级
export const MODIFY_MEMBERLEVEL = 'MODIFY_MEMBERLEVEL'
// 修改自定义菜单
export const MODIFY_CUSTOMMENU = 'MODIFY_CUSTOMMENU'
// 退出
export const LOGOUT = 'LOGOUT'
src/store/action.js
@@ -72,14 +72,6 @@
  }
}
// 修改自定义菜单
export const modifyCustomMenu = (customMenu) => {
  return {
    type: user.MODIFY_CUSTOMMENU,
    customMenu: customMenu
  }
}
// 退出重置
export const logout = () => {
  return {
src/store/reducer.js
@@ -31,7 +31,6 @@
  permAction: {},       // 用户按钮权限
  permMenus: [],        // 用户三级菜单列表
  memberLevel: _level,  // 会员等级
  customMenu: null      // 编辑中的菜单(自定义页面)
}
// 用户消息
@@ -91,12 +90,6 @@
        ...state,
        memberLevel: action.memberLevel
      }
    case Type.MODIFY_CUSTOMMENU:
      // 修改自定义菜单信息
      return {
        ...state,
        customMenu: action.customMenu
      }
    case Type.LOGOUT:
      return {
        menuTree: null,
@@ -107,7 +100,6 @@
        editLevel: null,
        permAction: {},
        permMenus: [],
        customMenu: null
      }
    default:
      return state
src/views/menudesign/index.jsx
@@ -1,5 +1,4 @@
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { DndProvider } from 'react-dnd'
import { is, fromJS } from 'immutable'
import moment from 'moment'
@@ -17,7 +16,6 @@
import MKEmitter from '@/utils/events.js'
import MenuUtils from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
import { modifyCustomMenu } from '@/store/action'
import './index.scss'
@@ -49,6 +47,7 @@
document.body.className = ''
window.GLOB.UserComponentMap = new Map() // 缓存用户自定义组件
window.GLOB.urlFields = []               // url变量
window.GLOB.customMenu = null            // 保存菜单信息
class MenuDesign extends Component {
  state = {
@@ -248,7 +247,7 @@
  handleBack = () => {
    this.setState({popBtn: null, delButtons: [], copyButtons: []}, () => {
      sessionStorage.setItem('editMenuType', 'menu')
      this.props.modifyCustomMenu(this.state.config)
      window.GLOB.customMenu = this.state.config
      this.setState({visible: false})
    })
  }
@@ -342,8 +341,7 @@
          oriConfig: config,
          config: fromJS(config).toJS()
        })
        this.props.modifyCustomMenu(config)
        window.GLOB.customMenu = config
      } else {
        notification.warning({
          top: 92,
@@ -868,8 +866,7 @@
    this.setState({
      config: config
    })
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  insert = (item) => {
@@ -878,7 +875,7 @@
    config.components.push(item)
    this.setState({config})
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  render () {
@@ -965,14 +962,4 @@
  }
}
const mapStateToProps = () => {
  return {}
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu))
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(MenuDesign)
export default MenuDesign
src/views/mobdesign/index.jsx
@@ -16,7 +16,6 @@
import MKEmitter from '@/utils/events.js'
import MenuUtils from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
import { modifyCustomMenu } from '@/store/action'
import './index.scss'
@@ -46,6 +45,7 @@
window.GLOB.UserComponentMap = new Map() // 缓存用户自定义组件
window.GLOB.CacheIndependent = new Map()
window.GLOB.urlFields = []               // url变量
window.GLOB.customMenu = null            // 保存菜单信息
class MobDesign extends Component {
  state = {
@@ -445,8 +445,7 @@
            config: fromJS(config).toJS(),
            loading: false
          })
          this.props.modifyCustomMenu(config)
          window.GLOB.customMenu = config
        } else {
          this.jointComponents(config, indeComs, isCreate)
        }
@@ -561,7 +560,7 @@
          loading: false
        })
        this.props.modifyCustomMenu(config)
        window.GLOB.customMenu = config
      } else {
        this.jointComponents(config, indeComs, true)
      }
@@ -636,8 +635,7 @@
        config: config,
        loading: false
      })
      this.props.modifyCustomMenu(config)
      window.GLOB.customMenu = config
    })
  }
@@ -1280,7 +1278,7 @@
      config: config
    })
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  insert = (item) => {
@@ -1289,7 +1287,7 @@
    config.components.push(item)
    this.setState({config})
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  refreshView = () => {
@@ -1448,10 +1446,8 @@
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu))
  }
const mapDispatchToProps = () => {
  return {}
}
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MobDesign))
src/views/pcdesign/index.jsx
@@ -16,7 +16,6 @@
import MKEmitter from '@/utils/events.js'
import MenuUtils from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
import { modifyCustomMenu } from '@/store/action'
import './index.scss'
@@ -45,6 +44,7 @@
window.GLOB.UserComponentMap = new Map() // 缓存用户自定义组件
window.GLOB.CacheIndependent = new Map()
window.GLOB.urlFields = []               // url变量
window.GLOB.customMenu = null            // 保存菜单信息
class MenuDesign extends Component {
  state = {
@@ -470,7 +470,7 @@
            loading: false
          })
  
          this.props.modifyCustomMenu(config)
          window.GLOB.customMenu = config
        } else {
          this.jointComponents(config, indeComs, isCreate)
        }
@@ -584,8 +584,7 @@
          config: fromJS(config).toJS(),
          loading: false
        })
        this.props.modifyCustomMenu(config)
        window.GLOB.customMenu = config
      } else {
        this.jointComponents(config, indeComs, true)
      }
@@ -661,7 +660,7 @@
        loading: false
      })
      this.props.modifyCustomMenu(config)
      window.GLOB.customMenu = config
    })
  }
@@ -1306,7 +1305,7 @@
      config: config
    })
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  insert = (item) => {
@@ -1315,7 +1314,7 @@
    config.components.push(item)
    this.setState({config})
    this.props.modifyCustomMenu(config)
    window.GLOB.customMenu = config
  }
  refreshView = () => {
@@ -1479,10 +1478,8 @@
  }
}
const mapDispatchToProps = (dispatch) => {
  return {
    modifyCustomMenu: (customMenu) => dispatch(modifyCustomMenu(customMenu))
  }
const mapDispatchToProps = () => {
  return {}
}
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(MenuDesign))