king
2020-11-23 f8c3c53f9e29541f8c0e3fcbf682c301fd17e06a
src/templates/menuconfig/editsecmenu/index.jsx
@@ -25,7 +25,7 @@
class EditMenu extends Component {
  static propTpyes = {
    menulist: PropTypes.any,      // 二级菜单列表
    supMenuList: PropTypes.array, // 一级菜单列表
    menuTree: PropTypes.array,    // 一级菜单列表
    supMenu: PropTypes.object,    // 二级菜单所对应的一级菜单
    reload: PropTypes.func,       // 刷新二级菜单数据
    exitEdit: PropTypes.func      // 退出编辑
@@ -63,7 +63,7 @@
      })
    } else if (menu.type === 'close') {
      confirm({
        title: dict['model.menu.close'].replace('@M', menu.card.text),
        title: dict['model.menu.close'].replace('@M', menu.card.MenuName),
        content: '',
        onOk() {
          let param = {
@@ -97,13 +97,13 @@
            label: dict['model.super'] + dict['model.menu'],
            initVal: this.props.supMenu.MenuID,
            required: true,
            options: this.props.supMenuList
            options: this.props.menuTree
          },
          { // 菜单名称
            type: 'text',
            key: 'menuName',
            label: dict['model.menu'] + dict['model.name'],
            initVal: menu.card.text,
            initVal: menu.card.MenuName,
            required: true,
            readonly: false
          },
@@ -142,7 +142,7 @@
            label: dict['model.super'] + dict['model.menu'],
            initVal: this.props.supMenu.MenuID,
            required: true,
            options: this.props.supMenuList
            options: this.props.menuTree
          },
          { // 菜单名称
            type: 'text',
@@ -231,7 +231,20 @@
        this.props.exitEdit()
      }
    } else if (type === 'close') { // 退出编辑
      this.props.exitEdit()
      if (!is(fromJS(this.props.menulist), fromJS(this.state.menulist))) {
        let _this = this
        confirm({
          title: '菜单顺序已调整,放弃保存吗?',
          content: '',
          onOk() {
            _this.props.exitEdit()
          },
          onCancel() {}
        })
      } else {
        this.props.exitEdit()
      }
    }
  }
@@ -428,12 +441,12 @@
          confirmLoading={this.state.confirmLoading}
          onCancel={this.memuHandleCancel}
        >
          {this.state.formlist &&
          <MenuForm
            dict={dict}
            formlist={this.state.formlist}
            wrappedComponentRef={(inst) => this.menuFormRef = inst}
          />}
          {this.state.formlist ?
            <MenuForm
              dict={dict}
              formlist={this.state.formlist}
              wrappedComponentRef={(inst) => this.menuFormRef = inst}
            /> : null}
        </Modal>
        <Modal
          title={dict['model.thaw'] + dict['model.menu']}