zcy %!s(int64=4) %!d(string=hai) anos
pai
achega
ca3b759acc

+ 5 - 21
src/views/sys/job/index.vue

@@ -62,20 +62,9 @@
             编辑
           </a-button>
           <a-divider type="vertical" />
-
-          <a-dropdown>
-            <a-button size="small" class="ant-dropdown-link" type="primary">
-              操作权限 <a-icon type="down" />
-            </a-button>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a href="javascript:;" @click="app(record)">APP-功能菜单</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a href="javascript:;" @click="pc(record)">PC端功能菜单</a>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+          <a-button size="small" type="primary" @click="prem(record)">
+            操作权限
+          </a-button>
           <a-divider type="vertical" />
           <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.roleId)">
             <a-button size="small" type="danger">
@@ -134,13 +123,8 @@ export default {
         }
       })
     },
-    app(data) {
-      // this.$refs.rightModal.title = 'app菜单权限'
-      // this.$refs.rightModal.treeList = '/treeList'
-      // this.$refs.rightModal.show()
-    },
-    pc(data) {
-      this.$refs.rightModal.title = 'pc菜单权限'
+    prem(data) {
+      this.$refs.rightModal.title = '菜单权限'
       this.treeList = '/system/menu/treeSelect'
       this.treeCheckList = `/system/menu/roleMenuTreeSelect/${data.roleId}`
       this.$refs.rightModal.show(data)

+ 24 - 1
src/views/sys/menu/CheckAndEditModel.vue

@@ -8,6 +8,18 @@
     @close="close"
   >
     <a-form-model ref="form" :label-col="labelCol" :wrapper-col="wrapperCol" :rules="validatorRules" :model="model">
+      <a-form-model-item label="上级菜单" prop="parentId">
+          <a-tree-select
+            v-model="model.parentId"
+            :show-search="true"
+            allow-clear
+            tree-default-expand-all
+            style="width: 100%"
+            :tree-data="treeData"
+            tree-node-filter-prop="menuName"
+            :replace-fields="{children:'children', title:'menuName', key:'menuId', value: 'menuId' }"
+          />
+      </a-form-model-item>
       <a-form-model-item label="菜单名称" prop="menuName">
         <a-input v-model="model.menuName" />
       </a-form-model-item>
@@ -55,16 +67,26 @@ export default {
       },
       url: {
         add: '/system/menu',
-        edit: '/system/menu'
+        edit: '/system/menu',
+        tree: '/system/menu/tree'
       }
     }
   },
   created() {
   },
   methods: {
+    loadTree() {
+      this.treeData = []
+      getAction(this.url.tree).then((res) => {
+        if (res.code === 200) {
+          this.treeData = res.data
+        }
+      })
+    },
     add() {
       this.model = {}
       this.visible = true
+      this.loadTree()
     },
     edit(record) {
       this.model = Object.assign({}, record)
@@ -72,6 +94,7 @@ export default {
         this.model.parentId = null
       }
       this.visible = true
+      this.loadTree()
     },
     close(isSubmit) {
       if (isSubmit) {

+ 1 - 1
src/views/sys/menu/index.vue

@@ -109,7 +109,7 @@ export default {
       // 表头
       columns: columns(this),
       url: {
-        list: '/system/menu/list',
+        list: '/system/menu/tree',
         delete: '/system/menu/'
       }
     }

+ 1 - 1
src/views/sys/worker/index.vue

@@ -115,7 +115,7 @@
                 </a-button>
                 <a-menu slot="overlay">
                   <a-menu-item>
-                    <a-popconfirm title="确认重置密码吗?" @confirm="() => rePwd(record)">
+                    <a-popconfirm title="确认重置密码吗?重置后的密码是 123456" @confirm="() => rePwd(record)">
                       <a href="javascript:;">重置密码</a>
                     </a-popconfirm>
                   </a-menu-item>

+ 6 - 0
src/views/sys/worker/indexColumns.js

@@ -15,6 +15,12 @@ function columns(vm) {
       dataIndex: 'realName',
       key: 'realName'
     },
+    {
+      title: '登录账号',
+      align: 'center',
+      dataIndex: 'userName',
+      key: 'userName'
+    },
     {
       title: '部门',
       align: 'center',