浏览代码

Merge remote-tracking branch 'origin/master'

gt 2 年之前
父节点
当前提交
ba40c9cec7
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. 4 1
      chuanyi-admin/src/views/system/dept/index.vue
  2. 1 1
      chuanyi-admin/src/views/system/menu/index.vue

+ 4 - 1
chuanyi-admin/src/views/system/dept/index.vue

@@ -290,9 +290,12 @@ export default {
         type: 'warning'
       }).then(() => {
         try {
+          const isParent = this.depts.find(v => {
+            return v.children.length
+          })
           this.depts.forEach(o => {
             // 选中父级
-            if (o.children.length) {
+            if (o.children.length || isParent.children.length) {
               this.$message({
                 type: 'warning',
                 message: '删除失败,请先删除下级部门'

+ 1 - 1
chuanyi-admin/src/views/system/menu/index.vue

@@ -214,7 +214,7 @@ export default {
       }).then(res => {
         if (res.code === 200) {
           const data = res.data
-          this.options = this.$utils.toArrayTree(data.menuList)
+          this.options = data.menuList
         }
       })
     },