king
2024-02-04 0bbaa727cdfc65622e33e91c4bf694c83f184535
src/views/design/sidemenu/editsecmenu/index.jsx
@@ -58,7 +58,7 @@
            func: 'sPC_MainMenu_Del',
            MenuID: menu.card.MenuID
          }
          return Api.getSystemConfig(param).then(res => {
          return Api.getCloudConfig(param).then(res => {
            if (res.status) {
              MKEmitter.emit('mkUpdateMenuList')
            } else {
@@ -106,25 +106,28 @@
  }
  handleSubBtn = (type) => {
    const that = this
    if (type === 'confirm') { // 保存调整后的顺序
      let param  = {
        func: 'sPC_Menu_SortUpt',
        exec_type: 'x',
        LText: this.state.menulist.map((item, index) => {
          return 'select \'' + item.MenuID + '\' as Menuid,' + (index + 1) * 10 + ' as sort'
        })
      }
      param.LText = param.LText.join(' union ') // sql拼接
      param.LText = Utils.formatOptions(param.LText) // 关键字符替换,base64加密
      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') // 时间戳
      param.secretkey = Utils.encrypt(param.LText, param.timestamp) // md5密钥
      param.LText = param.LText.join(' union ')
      param.LText = Utils.formatOptions(param.LText, 'x')
      param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      param.secretkey = Utils.encrypt('', param.timestamp)
      confirm({
        title: '确认调整菜单顺序吗?',
        content: '',
        onOk() {
          return Api.getSystemConfig(param).then(res => {
          return Api.getCloudConfig(param).then(res => {
            if (res.status) {
              that.setState({ change: false })
              MKEmitter.emit('mkUpdateMenuList')
            } else {
              notification.warning({
@@ -139,13 +142,11 @@
      })
    } else if (type === 'close') { // 退出编辑
      if (this.state.change) {
        let _this = this
        confirm({
          title: '菜单顺序已调整,放弃保存吗?',
          content: '',
          onOk() {
            _this.props.exitEdit()
            that.props.exitEdit()
          },
          onCancel() {}
        })
@@ -169,7 +170,7 @@
      this.setState({
        loading: true
      })
      Api.getSystemConfig(param).then(res => {
      Api.getCloudConfig(param).then(res => {
        if (res.status) {
          this.setState({
            loading: false,