king
2020-06-24 58a28e1faa15f638a136fefdcfcd0b3106c1fa16
src/templates/headerconfig/index.jsx
@@ -10,8 +10,8 @@
import DragElement from './dragelement'
import MenuForm from './menuform'
import Utils from '@/utils/utils.js'
import zhCN from '@/locales/zh-CN/header.js'
import enUS from '@/locales/en-US/header.js'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import Api from '@/api'
import './index.scss'
@@ -52,7 +52,7 @@
    if (previewList && !is(fromJS(previewList), fromJS(this.props.menulist))) {
      notification.warning({
        top: 92,
        message: this.state.dict['header.menu.presave'],
        message: this.state.dict['model.menu.presave'],
        duration: 5
      })
    } else {
@@ -141,10 +141,10 @@
  deleteMemu = () => {
    let _this = this
    confirm({
      title: this.state.dict['header.menu.close'].replace('@M', this.state.editMenu.MenuName),
      title: this.state.dict['model.menu.close'].replace('@M', this.state.editMenu.MenuName),
      content: '',
      okText: this.state.dict['header.confirm'],
      cancelText: this.state.dict['header.cancel'],
      okText: this.state.dict['model.confirm'],
      cancelText: this.state.dict['model.cancel'],
      onOk() {
        let param = {
          func: 'sPC_MainMenu_Del',
@@ -174,7 +174,7 @@
    if (this.refs.trawmenu.state.targetKeys.length === 0) {
      notification.warning({
        top: 92,
        message: this.state.dict['header.menu.thawmenu.select'],
        message: this.state.dict['form.required.select'] + this.state.dict['model.menu'],
        duration: 5
      })
    } else {
@@ -229,7 +229,7 @@
    if ((type === 'add' || type === 'thawmenu') && _menuchange) {
      notification.warning({
        top: 92,
        message: this.state.dict['header.menu.presave'],
        message: this.state.dict['model.menu.presave'],
        duration: 5
      })
    } else if (type === 'add') {
@@ -251,10 +251,10 @@
      param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5密钥
      confirm({
        title: this.state.dict['header.menu.resetorder'],
        title: this.state.dict['model.menu.resetorder'],
        content: '',
        okText: this.state.dict['header.confirm'],
        cancelText: this.state.dict['header.cancel'],
        okText: this.state.dict['model.confirm'],
        cancelText: this.state.dict['model.cancel'],
        onOk() {
          return Api.getSystemConfig(param).then(res => {
            if (res.status) {
@@ -312,6 +312,8 @@
  }
  render () {
    const { dict } = this.state
    return (
      <div className="header-edit-box">
        <div className="mask">
@@ -336,7 +338,7 @@
        </div>
        {this.props.menulist && <DndProvider backend={HTML5Backend}>
          <DragElement
            dict={this.state.dict}
            dict={dict}
            list={this.props.menulist}
            handlePreviewList={this.handlePreviewList}
            handleMenu={this.editMenuModal}
@@ -345,9 +347,9 @@
        </DndProvider>}
        {/* 新建菜单模态框 */}
        <Modal
          title={this.state.dict['header.menu.addtitle']}
          okText={this.state.dict['header.confirm']}
          cancelText={this.state.dict['header.cancel']}
          title={dict['model.add'] + dict['model.menu']}
          okText={dict['model.confirm']}
          cancelText={dict['model.cancel']}
          visible={this.state.addMvisible}
          onOk={this.addMemuSubmit}
          confirmLoading={this.state.confirmLoading}
@@ -355,7 +357,7 @@
          destroyOnClose
        >
          <MenuForm
            dict={this.state.dict}
            dict={dict}
            type="add"
            menu={null}
            wrappedComponentRef={(inst) => this.addMenuFormRef = inst}
@@ -363,9 +365,9 @@
        </Modal>
        {/* 解除冻结菜单模态框 */}
        <Modal
          title={this.state.dict['header.thawmenu']}
          okText={this.state.dict['header.confirm']}
          cancelText={this.state.dict['header.cancel']}
          title={dict['model.thaw'] + dict['model.menu']}
          okText={dict['model.confirm']}
          cancelText={dict['model.cancel']}
          visible={this.state.thawMvisible}
          onOk={this.thawMemuSubmit}
          confirmLoading={this.state.confirmLoading}
@@ -377,18 +379,18 @@
        </Modal>
        {/* 编辑菜单模态框 */}
        <Modal
          title={this.state.dict['header.menu.editTitle']}
          title={dict['model.edit'] + dict['model.menu']}
          visible={this.state.editMvisible}
          footer={[
            <Button key="cancel" onClick={this.editMemuCancel}>{this.state.dict['header.cancel']}</Button>,
            <Button key="confirm" type="primary" onClick={this.editMemuSubmit} loading={this.state.confirmLoading}>{this.state.dict['header.confirm']}</Button>,
            <Button key="delete" type="danger" onClick={this.deleteMemu}>{this.state.dict['header.delete']}</Button>
            <Button key="cancel" onClick={this.editMemuCancel}>{dict['model.cancel']}</Button>,
            <Button key="confirm" type="primary" onClick={this.editMemuSubmit} loading={this.state.confirmLoading}>{dict['model.confirm']}</Button>,
            <Button key="delete" type="danger" onClick={this.deleteMemu}>{dict['model.delete']}</Button>
          ]}
          onCancel={this.editMemuCancel}
          destroyOnClose
        >
          <MenuForm
            dict={this.state.dict}
            dict={dict}
            type="edit"
            menu={this.state.editMenu}
            wrappedComponentRef={(inst) => this.editMenuFormRef = inst}