king
2022-07-27 fbf25a99e0bc643be89b0f9dd0efed7867f1490e
src/views/design/header/editfirstmenu/index.jsx
@@ -10,7 +10,7 @@
import MenuForm from './menuform'
import Utils from '@/utils/utils.js'
import Api from '@/api'
import './index.scss'
// import './index.scss'
const { confirm } = Modal
@@ -37,19 +37,20 @@
  editMenuModal = (Menu) => {
    // 菜单编辑:修改
    const menu = fromJS(Menu).toJS()
    if (!is(fromJS(this.state.menulist), fromJS(this.props.menulist))) {
    if (this.state.change) {
      notification.warning({
        top: 92,
        message: '菜单顺序已调整,请保存!',
        duration: 5
      })
    } else {
      this.setState({
        visible: true,
        editMenu: menu.card,
        loading: false
      })
      return
    }
    this.setState({
      visible: true,
      editMenu: menu.card,
      loading: false
    })
  }
  editMemuSubmit = () => {
@@ -82,6 +83,15 @@
  }
  deleteMemu = (item) => {
    if (this.state.change) {
      notification.warning({
        top: 92,
        message: '菜单顺序已调整,请保存!',
        duration: 5
      })
      return
    }
    let _this = this
    confirm({
      title: `确定删除菜单《${item.MenuName}》吗?`,
@@ -173,7 +183,7 @@
    const { menulist, change } = this.state
    return (
      <div className="header-edit-box">
      <>
        <DndProvider backend={HTML5Backend}>
          <DragElement
            change={change}
@@ -199,7 +209,7 @@
            wrappedComponentRef={(inst) => this.editMenuFormRef = inst}
          />
        </Modal>
      </div>
      </>
    )
  }
}