king
2022-07-28 639fad34874ff57f1de713a44bf2e796ea35f734
2022-07-28
24个文件已修改
2个文件已删除
686 ■■■■■ 已修改文件
src/tabviews/custom/components/card/balcony/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-bar-line/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-dashboard/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-pie/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/antv-scatter/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/chart/custom-chart/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/tree/antd-tree/index.jsx 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/calendarconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/calendarconfig/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/comtableconfig/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/modalconfig/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/subtableconfig/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/treepageconfig/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/treepageconfig/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basedesign/index.jsx 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basedesign/index.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/header/index.jsx 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/header/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/editthdmenu/index.jsx 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/editthdmenu/menuform/index.jsx 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/editthdmenu/menuform/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/index.jsx 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/menuform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/design/sidemenu/thdmenuplus/index.jsx 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/balcony/index.jsx
@@ -190,22 +190,30 @@
        })
        return
      } else if (result.run_type) {
        this.setState({timer})
        let repeats = config.timerRepeats || 0
        this.setState({timer, repeats})
        this.timer = setTimeout(() => {
          this.timerTask()
          this.timerTask(repeats)
        }, timer)
      }
    })
  }
  timerTask = () => {
    const { timer } = this.state
  timerTask = (times) => {
    const { timer, repeats } = this.state
    if (!timer) return
    
    this.loadData(true)
    if (repeats) {
      times = times - 1
      if (times <= 0) {
        clearTimeout(this.timer)
        return
      }
    }
    this.timer = setTimeout(() => {
      this.timerTask()
      this.timerTask(times)
    }, timer)
  }
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -230,22 +230,30 @@
        })
        return
      } else if (result.run_type) {
        this.setState({timer})
        let repeats = config.timerRepeats || 0
        this.setState({timer, repeats})
        this.timer = setTimeout(() => {
          this.timerTask()
          this.timerTask(repeats)
        }, timer)
      }
    })
  }
  timerTask = () => {
    const { timer } = this.state
  timerTask = (times) => {
    const { timer, repeats } = this.state
    if (!timer) return
    
    this.loadData(true)
    if (repeats) {
      times = times - 1
      if (times <= 0) {
        clearTimeout(this.timer)
        return
      }
    }
    this.timer = setTimeout(() => {
      this.timerTask()
      this.timerTask(times)
    }, timer)
  }
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -416,22 +416,30 @@
        })
        return
      } else if (result.run_type) {
        this.setState({timer})
        let repeats = config.timerRepeats || 0
        this.setState({timer, repeats})
        this.timer = setTimeout(() => {
          this.timerTask()
          this.timerTask(repeats)
        }, timer)
      }
    })
  }
  timerTask = () => {
    const { timer } = this.state
  timerTask = (times) => {
    const { timer, repeats } = this.state
    if (!timer) return
    
    this.loadData(true)
    
    if (repeats) {
      times = times - 1
      if (times <= 0) {
        clearTimeout(this.timer)
        return
      }
    }
    this.timer = setTimeout(() => {
      this.timerTask()
      this.timerTask(times)
    }, timer)
  }
src/tabviews/custom/components/chart/antv-dashboard/index.jsx
@@ -203,22 +203,30 @@
        })
        return
      } else if (result.run_type) {
        this.setState({timer})
        let repeats = config.timerRepeats || 0
        this.setState({timer, repeats})
        this.timer = setTimeout(() => {
          this.timerTask()
          this.timerTask(repeats)
        }, timer)
      }
    })
  }
  timerTask = () => {
    const { timer } = this.state
  timerTask = (times) => {
    const { timer, repeats } = this.state
    if (!timer) return
    
    this.loadData(true)
    
    if (repeats) {
      times = times - 1
      if (times <= 0) {
        clearTimeout(this.timer)
        return
      }
    }
    this.timer = setTimeout(() => {
      this.timerTask()
      this.timerTask(times)
    }, timer)
  }
src/tabviews/custom/components/chart/antv-pie/index.jsx
@@ -159,22 +159,30 @@
        })
        return
      } else if (result.run_type) {
        this.setState({timer})
        let repeats = config.timerRepeats || 0
        this.setState({timer, repeats})
        this.timer = setTimeout(() => {
          this.timerTask()
          this.timerTask(repeats)
        }, timer)
      }
    })
  }
  timerTask = () => {
    const { timer } = this.state
  timerTask = (times) => {
    const { timer, repeats } = this.state
    if (!timer) return
    
    this.loadData(true)
    
    if (repeats) {
      times = times - 1
      if (times <= 0) {
        clearTimeout(this.timer)
        return
      }
    }
    this.timer = setTimeout(() => {
      this.timerTask()
      this.timerTask(times)
    }, timer)
  }
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -153,22 +153,30 @@
        })
        return
      } else if (result.run_type) {
        this.setState({timer})
        let repeats = config.timerRepeats || 0
        this.setState({timer, repeats})
        this.timer = setTimeout(() => {
          this.timerTask()
          this.timerTask(repeats)
        }, timer)
      }
    })
  }
  timerTask = () => {
    const { timer } = this.state
  timerTask = (times) => {
    const { timer, repeats } = this.state
    if (!timer) return
    
    this.loadData(true)
    
    if (repeats) {
      times = times - 1
      if (times <= 0) {
        clearTimeout(this.timer)
        return
      }
    }
    this.timer = setTimeout(() => {
      this.timerTask()
      this.timerTask(times)
    }, timer)
  }
src/tabviews/custom/components/chart/custom-chart/index.jsx
@@ -148,22 +148,30 @@
        })
        return
      } else if (result.run_type) {
        this.setState({timer})
        let repeats = config.timerRepeats || 0
        this.setState({timer, repeats})
        this.timer = setTimeout(() => {
          this.timerTask()
          this.timerTask(repeats)
        }, timer)
      }
    })
  }
  timerTask = () => {
    const { timer } = this.state
  timerTask = (times) => {
    const { timer, repeats } = this.state
    if (!timer) return
    
    this.loadData(true)
    
    if (repeats) {
      times = times - 1
      if (times <= 0) {
        clearTimeout(this.timer)
        return
      }
    }
    this.timer = setTimeout(() => {
      this.timerTask()
      this.timerTask(times)
    }, timer)
  }
src/tabviews/custom/components/tree/antd-tree/index.jsx
@@ -145,22 +145,30 @@
        })
        return
      } else if (result.run_type) {
        this.setState({timer})
        let repeats = config.timerRepeats || 0
        this.setState({timer, repeats})
        this.timer = setTimeout(() => {
          this.timerTask()
          this.timerTask(repeats)
        }, timer)
      }
    })
  }
  timerTask = () => {
    const { timer } = this.state
  timerTask = (times) => {
    const { timer, repeats } = this.state
    if (!timer) return
    
    this.loadData(true)
    
    if (repeats) {
      times = times - 1
      if (times <= 0) {
        clearTimeout(this.timer)
        return
      }
    }
    this.timer = setTimeout(() => {
      this.timerTask()
      this.timerTask(times)
    }, timer)
  }
src/templates/calendarconfig/index.jsx
@@ -815,7 +815,7 @@
                <EditComponent dict={this.state.dict} type="table" options={['search', 'form']} config={this.state.config}/>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
                <Button onClick={this.cancelConfig}>关闭</Button>
              </div>
            } style={{ width: '100%' }}>
              <SettingComponent
src/templates/calendarconfig/index.scss
@@ -1,6 +1,6 @@
.model-calendar-board {
  position: fixed;
  z-index: 1070;
  z-index: 1;
  padding-top: 48px;
  top: 0px;
  left: 0px;
src/templates/comtableconfig/index.jsx
@@ -1268,7 +1268,7 @@
                <EditComponent dict={this.state.dict} type="table" options={['search', 'form', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/>
                <Switch className="big" checkedChildren={this.state.dict['model.enable']} unCheckedChildren={this.state.dict['model.disable']} checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
                <Button onClick={this.cancelConfig}>关闭</Button>
              </div>
            } style={{ width: '100%' }}>
              <SettingComponent
src/templates/comtableconfig/index.scss
@@ -1,6 +1,6 @@
.common-table-board {
  position: fixed;
  z-index: 1070;
  z-index: 1;
  padding-top: 48px;
  top: 0px;
  left: 0px;
src/templates/modalconfig/index.scss
@@ -1,6 +1,6 @@
.modal-form-board {
  position: fixed;
  z-index: 1070;
  z-index: 1;
  padding-top: 48px;
  top: 0px;
  left: 0px;
src/templates/subtableconfig/index.scss
@@ -1,6 +1,6 @@
.model-subtable-board {
  position: fixed;
  z-index: 1070;
  z-index: 1;
  padding-top: 48px;
  top: 0px;
  left: 0px;
src/templates/treepageconfig/index.jsx
@@ -754,7 +754,7 @@
              <div>
                <Switch className="big" checkedChildren="启" unCheckedChildren="停" checked={this.state.config.enabled} onChange={this.onEnabledChange} />
                <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button>
                <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button>
                <Button onClick={this.cancelConfig}>关闭</Button>
              </div>
            } style={{ width: '100%' }}>
              <Row gutter={16}>
src/templates/treepageconfig/index.scss
@@ -1,6 +1,6 @@
.tree-page-board {
  position: fixed;
  z-index: 1070;
  z-index: 1;
  padding-top: 48px;
  top: 0px;
  left: 0px;
src/views/basedesign/index.jsx
@@ -1,21 +1,15 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
// import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { notification, Spin } from 'antd'
// import moment from 'moment'
import { notification, Spin, ConfigProvider } from 'antd'
import enUS from 'antd/es/locale/en_US'
import zhCN from 'antd/es/locale/zh_CN'
import Api from '@/api'
import MKEmitter from '@/utils/events.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
// import Utils from '@/utils/utils.js'
import MenuUtils from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
import './index.scss'
const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
const Header = asyncComponent(() => import('@/menu/header'))
const ComTableConfig = asyncLoadComponent(() => import('@/templates/comtableconfig'))
const TreePageConfig = asyncLoadComponent(() => import('@/templates/treepageconfig'))
@@ -23,6 +17,9 @@
const FormTabConfig = asyncLoadComponent(() => import('@/templates/formtabconfig'))
const ModalConfig = asyncLoadComponent(() => import('@/templates/modalconfig'))
const SubTable = asyncLoadComponent(() => import('@/templates/subtableconfig'))
document.body.className = ''
sessionStorage.setItem('isEditState', 'true')
class BaseDesign extends Component {
  static propTpyes = {
@@ -33,7 +30,6 @@
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    loading: false,         // 编辑菜单或使用已使用模板时,获取配置信息
    btnParam: null,         // 编辑按钮的配置信息
    menulist: null,         // 编辑中的菜单
@@ -94,18 +90,56 @@
    Api.getSystemConfig(param).then(res => {
      if (res.status) {
        let _LongParam = ''
        editMenu.open_edition = res.open_edition || ''
        editMenu.LongParam = ''
        if (res.LongParam) {
          let _LongParam = ''
          try {
            _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam)))
          } catch (e) {
            console.warn('Parse Failure')
            _LongParam = ''
          }
          editMenu.LongParam = _LongParam
        } else if (editMenu.PageParam.copyMenuId) {
          let _param = {
            func: 'sPC_Get_LongParam',
            MenuID: editMenu.PageParam.copyMenuId
        }
          Api.getSystemConfig(_param).then(res => {
            if (res.status) {
              if (res.LongParam) {
                let _LongParam = ''
                try {
                  _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam)))
                  _LongParam.type = 'user'
                } catch (e) {
                  console.warn('Parse Failure')
                  _LongParam = ''
                }
        editMenu.LongParam = _LongParam
        editMenu.open_edition = res.open_edition || ''
              }
              this.setState({
                editMenu: editMenu,
                loading: false,
                tabview: editMenu.type
              })
            } else {
              this.setState({
                loading: false
              })
              notification.warning({
                top: 92,
                message: res.message,
                duration: 5
              })
            }
          })
          return
        }
        
        this.setState({
          editMenu: editMenu,
@@ -140,60 +174,8 @@
    }, () => {
      if (param) {
        this.setState(param)
      }
    })
  }
  copyMenu = (param, MenuId) => {
    Api.getSystemConfig({
      func: 'sPC_Get_LongParam',
      MenuID: MenuId
    }).then(result => {
      if (result.status) {
        let config = null
        try {
          config = result.LongParam ? JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) : null
        } catch (e) {
          console.warn('Parse Failure')
          config = null
        }
        if (config) {
          config.uuid = param.MenuID
          config.MenuID = param.MenuID
          config.parentId = param.ParentID
          config.MenuName = param.MenuName
          config.MenuNo = param.MenuNo
          config.easyCode = ''
          config.components = MenuUtils.resetConfig(config.components)
          config.enabled = false
          param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config)))
        }
        Api.getSystemConfig(param).then(response => {
          if (response.status) {
            this.setState({
              handleMVisible: false,
              sysMenu: null
            })
            MKEmitter.emit('mkUpdateMenuList')
          } else {
            notification.warning({
              top: 92,
              message: response.message,
              duration: 5
            })
          }
        })
      } else {
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
        window.close()
      }
    })
  }
@@ -203,6 +185,8 @@
    return (
      <div className="mk-base-design-wrap">
        <ConfigProvider locale={_locale}>
        <Header/>
        {this.state.tabview === 'TreePage' ?
          <TreePageConfig
@@ -259,21 +243,11 @@
            handleView={this.handleView}
          /> : null
        }
        {loading ? <Spin className="loading-view" /> : null}
          {loading ? <Spin className="loading-view" size="large"/> : null}
        </ConfigProvider>
      </div>
    )
  }
}
const mapStateToProps = (state) => {
  return {
    mainMenu: state.mainMenu,
    menuTree: state.menuTree
  }
}
const mapDispatchToProps = () => {
  return {}
}
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(BaseDesign))
export default BaseDesign
src/views/basedesign/index.scss
@@ -2,6 +2,6 @@
  .loading-view {
    position: absolute;
    left: calc(50vw - 22px);
    top: calc(50vh - 22px);
    top: calc(30vh + 48px);
  }
}
src/views/design/header/index.jsx
@@ -2,7 +2,7 @@
import { withRouter } from 'react-router-dom'
import {connect} from 'react-redux'
import { Dropdown, Menu, Modal, notification, Switch, Button, Popover } from 'antd'
import { MenuFoldOutlined, SettingOutlined, AppstoreOutlined, DownOutlined, HomeOutlined, ApiOutlined, PlusOutlined, SwapOutlined } from '@ant-design/icons'
import { MenuFoldOutlined, SettingOutlined, AppstoreOutlined, DownOutlined, HomeOutlined, ApiOutlined, PlusOutlined, SwapOutlined, MenuOutlined } from '@ant-design/icons'
import asyncComponent from '@/utils/asyncComponent'
import {
@@ -346,6 +346,25 @@
        } trigger="hover">
          <SettingOutlined className="edit-check"/>
        </Popover> : null}
        {/* window.btoa(window.encodeURIComponent(JSON.stringify({ MenuType: 'home', MenuId: 'home_page_id', MenuName: '首页' }))) */}
        {window.GLOB.systemType !== 'production' ?
          <div className="home-entrance entrance">
            <div className="icon"><HomeOutlined /></div>
            <div className="title">首页</div>
            <div className="detail">基于自定义页面的首页设计,可实现灵活的元素配置及样式调整,展现当前系统的风格。</div>
            <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=')}}>
              编辑
            </Button>
          </div> : null
        }
        <div className="api-entrance entrance">
          <div className="icon"><ApiOutlined /></div>
          <div className="title">接口调试</div>
          <div className="detail">可自动处理登录接口的参数加密,以及业务接口的签名计算,方便开发人员的接口测试工作。</div>
          <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/interface')}}>
            编辑
          </Button>
        </div>
        <div className="app-entrance entrance">
          <div className="icon"><AppstoreOutlined /></div>
          <div className="title">应用管理</div>
@@ -359,25 +378,14 @@
            </Button>
          }
        </div>
        <div className="api-entrance entrance">
          <div className="icon"><ApiOutlined /></div>
          <div className="title">接口调试</div>
          <div className="detail">可自动处理登录接口的参数加密,以及业务接口的签名计算,方便开发人员的接口测试工作。</div>
          <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/interface')}}>
            编辑
        {window.GLOB.systemType !== 'production' ? <div className="menu-entrance entrance">
          <div className="icon"><MenuOutlined /></div>
          <div className="title">菜单操作说明</div>
          <div className="detail">鼠标悬停 <SettingOutlined style={{color: '#1890ff'}}/> 可显示菜单的添加、排序(包括编辑、删除)与解冻功能,双击三级菜单可进入编辑窗口。</div>
          <Button type="primary" onClick={() => {window.open('#/main')}}>
            新窗口
          </Button>
        </div>
        {/* window.btoa(window.encodeURIComponent(JSON.stringify({ MenuType: 'home', MenuId: 'home_page_id', MenuName: '首页' }))) */}
        {window.GLOB.systemType !== 'production' ?
          <div className="home-entrance entrance">
            <div className="icon"><HomeOutlined /></div>
            <div className="title">首页</div>
            <div className="detail">基于自定义页面的首页设计,可实现灵活的元素配置及样式调整,展现当前系统的风格。</div>
            <Button type="primary" disabled={!(memberLevel >= 20)} title={memberLevel >= 20 ? '' : '会员等级不够,无开发权限。'} onClick={() => {window.open('#/menudesign/JTdCJTIyTWVudVR5cGUlMjIlM0ElMjJob21lJTIyJTJDJTIyTWVudUlkJTIyJTNBJTIyaG9tZV9wYWdlX2lkJTIyJTJDJTIyTWVudU5hbWUlMjIlM0ElMjIlRTklQTYlOTYlRTklQTElQjUlMjIlN0Q=')}}>
              编辑
            </Button>
          </div> : null
        }
        </div> : null}
        {/* 编辑菜单 */}
        {editLevel === 'level1' ? <EditMenu menulist={this.state.menulist} reload={this.reload} exitEdit={this.exitEdit}/> : null}
        {/* 头像、用户名 */}
src/views/design/header/index.scss
@@ -136,13 +136,16 @@
    cursor: pointer;
  }
  .home-entrance {
    left: 300px;
    left: 260px;
  }
  .api-entrance {
    left: 600px;
    left: 540px;
  }
  .app-entrance {
    left: 900px;
    left: 820px;
  }
  .menu-entrance {
    left: 1100px;
  }
  .entrance {
    position: absolute;
src/views/design/sidemenu/editthdmenu/index.jsx
@@ -3,7 +3,6 @@
import { is, fromJS } from 'immutable'
import { connect } from 'react-redux'
import { DndProvider } from 'react-dnd'
import { withRouter } from 'react-router-dom'
import HTML5Backend from 'react-dnd-html5-backend'
import { notification, Modal, Button } from 'antd'
import moment from 'moment'
@@ -12,7 +11,6 @@
import MKEmitter from '@/utils/events.js'
import MkIcon from '@/components/mk-icon'
import Utils from '@/utils/utils.js'
import MenuUtils from '@/utils/utils-custom.js'
import DragElement from '../menuelement'
import asyncLoadComponent from '@/utils/asyncLoadComponent'
import './index.scss'
@@ -246,68 +244,6 @@
    })
  }
  copyMenu = (param, MenuId) => {
    Api.getSystemConfig({
      func: 'sPC_Get_LongParam',
      MenuID: MenuId
    }).then(result => {
      if (result.status) {
        let config = null
        try {
          config = result.LongParam ? JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) : null
        } catch (e) {
          console.warn('Parse Failure')
          config = null
        }
        if (config) {
          config.uuid = param.MenuID
          config.MenuID = param.MenuID
          config.parentId = param.ParentID
          config.MenuName = param.MenuName
          config.MenuNo = param.MenuNo
          config.easyCode = ''
          config.components = MenuUtils.resetConfig(config.components)
          config.enabled = false
          param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config)))
        }
        Api.getSystemConfig(param).then(response => {
          if (response.status) {
            this.setState({
              confirmLoading: false,
              handleMVisible: false,
              sysMenu: null
            })
            MKEmitter.emit('mkUpdateMenuList')
            document.getElementById('root').style.overflowY = 'unset'
          } else {
            this.setState({
              confirmLoading: false
            })
            notification.warning({
              top: 92,
              message: response.message,
              duration: 5
            })
          }
        })
      } else {
        this.setState({
          confirmLoading: false
        })
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
      }
    })
  }
  UNSAFE_componentWillMount () {
    this.setState({
      menulist: this.props.menulist
@@ -375,4 +311,4 @@
  return {}
}
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(EditMenu))
export default connect(mapStateToProps, mapDispatchToProps)(EditMenu)
src/views/design/sidemenu/editthdmenu/menuform/index.jsx
File was deleted
src/views/design/sidemenu/editthdmenu/menuform/index.scss
src/views/design/sidemenu/index.jsx
@@ -131,6 +131,12 @@
        loading: false,
        sysMenu: _cell
      })
    } else {
      notification.warning({
        top: 92,
        message: '当前菜单不可编辑',
        duration: 5
      })
    }
  }
src/views/design/sidemenu/menuform/index.jsx
@@ -3,7 +3,7 @@
import { Form, Row, Col, Input, Select } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
// import './index.scss'
const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
src/views/design/sidemenu/thdmenuplus/index.jsx
@@ -9,6 +9,7 @@
import MKEmitter from '@/utils/events.js'
import Utils from '@/utils/utils.js'
import Preview from './preview'
import MenuUtils from '@/utils/utils-custom.js'
import asyncComponent from '@/utils/asyncComponent'
import mainsubtable from '@/assets/img/mainsubtable.jpg'
@@ -114,25 +115,6 @@
      preview: null
    })
  }
  // this.setState({
  //   tabview: 'template',
  //   editMenu: {
  //     MenuID: Utils.getuuid(),
  //     MenuName: '',
  //     MenuNo: '',
  //     type: '',
  //     PageParam: '',
  //     LongParam: '',
  //     isSubtable: '', // 是否为主子表
  //     ParentId: this.props.supMenu.MenuID,
  //     supMenuList: this.props.supMenuList,
  //     fstMenuId: this.props.mainMenu.MenuID,
  //     fstMenuList: this.props.menuTree,
  //     menuSort: (this.props.menulist.length + 1) * 10 // 新建菜单设置排序
  //   }
  // }, () => {
  //   document.getElementById('root').style.overflowY = 'hidden'
  // })
  useTemplate = (template) => {
    const { mainMenu, supMenu, menuTree } = this.props
@@ -174,7 +156,7 @@
        PageParam.url = values.url
      }
      if (sysMenu.copyId) {
      if (sysMenu.copyId && sysMenu.Template !== 'CustomPage') {
        PageParam.copyMenuId = sysMenu.copyId
      }
@@ -201,6 +183,9 @@
        loading: true
      })
      if (sysMenu.Template === 'CustomPage' && sysMenu.copyId) {
        this.copyMenu(param, sysMenu.copyId)
      } else {
      Api.getSystemConfig(param).then(response => {
        if (response.status) {
          this.setState({
@@ -221,6 +206,69 @@
          })
        }
      })
      }
    })
  }
  copyMenu = (param, MenuId) => {
    Api.getSystemConfig({
      func: 'sPC_Get_LongParam',
      MenuID: MenuId
    }).then(result => {
      if (result.status) {
        let config = null
        try {
          config = result.LongParam ? JSON.parse(window.decodeURIComponent(window.atob(result.LongParam))) : null
        } catch (e) {
          console.warn('Parse Failure')
          config = null
        }
        if (config) {
          config.uuid = param.MenuID
          config.MenuID = param.MenuID
          config.parentId = param.ParentID
          config.MenuName = param.MenuName
          config.MenuNo = param.MenuNo
          config.easyCode = ''
          config.components = MenuUtils.resetConfig(config.components)
          config.enabled = false
          param.LongParam = window.btoa(window.encodeURIComponent(JSON.stringify(config)))
        }
        Api.getSystemConfig(param).then(response => {
          if (response.status) {
            this.setState({
              loading: false,
              addVisible: false,
              sysMenu: null
            })
            MKEmitter.emit('mkUpdateMenuList')
            document.getElementById('root').style.overflowY = 'unset'
          } else {
            this.setState({
              loading: false
            })
            notification.warning({
              top: 92,
              message: response.message,
              duration: 5
            })
          }
        })
      } else {
        this.setState({
          confirmLoading: false
        })
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
      }
    })
  }