From e6809d532510dd6ea60dba50e1e7f20ce7a8a122 Mon Sep 17 00:00:00 2001 From: smallchill Date: Thu, 21 Feb 2019 22:49:01 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/role.js | 6 ++++++ src/views/system/dept.vue | 3 ++- src/views/system/dict.vue | 6 ++++-- src/views/system/menu.vue | 3 ++- src/views/system/role.vue | 23 ++++++++++++++++++++--- 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/src/api/system/role.js b/src/api/system/role.js index aae465a..c03683a 100644 --- a/src/api/system/role.js +++ b/src/api/system/role.js @@ -71,3 +71,9 @@ export const getRole = (roleIds) => { }) } +export const getRoleTree = () => { + return request({ + url: 'api/blade-system/role/tree', + method: 'get' + }) +} diff --git a/src/views/system/dept.vue b/src/views/system/dept.vue index a44a7d7..dbf2554 100644 --- a/src/views/system/dept.vue +++ b/src/views/system/dept.vue @@ -85,7 +85,8 @@ { label: "排序", - prop: "sort" + prop: "sort", + type: "number" } ] }, diff --git a/src/views/system/dict.vue b/src/views/system/dict.vue index fe6ff4a..3f1beb5 100644 --- a/src/views/system/dict.vue +++ b/src/views/system/dict.vue @@ -84,11 +84,13 @@ }, { label: "字典键值", - prop: "dictKey" + prop: "dictKey", + type: "number" }, { label: "排序", - prop: "sort" + prop: "sort", + type: "number" } ] }, diff --git a/src/views/system/menu.vue b/src/views/system/menu.vue index a047dd9..e21bfcf 100644 --- a/src/views/system/menu.vue +++ b/src/views/system/menu.vue @@ -104,7 +104,8 @@ }, { label: "排序", - prop: "sort" + prop: "sort", + type: "number" }, { label: "按钮功能", diff --git a/src/views/system/role.vue b/src/views/system/role.vue index d46d2f1..ad7f456 100644 --- a/src/views/system/role.vue +++ b/src/views/system/role.vue @@ -63,7 +63,8 @@ add, grant, getTree, - getRole + getRole, + getRoleTree } from "@/api/system/role"; import {mapGetters} from "vuex"; @@ -102,8 +103,19 @@ search: true }, { - label: "排序", - prop: "sort" + label: "上级角色", + prop: "parentId", + dicData: [], + type: "tree", + hide: true, + props: { + label: "title" + } + }, + { + label: "角色排序", + prop: "sort", + type: "number" } ] }, @@ -228,6 +240,11 @@ getList(page.currentPage, page.pageSize, params).then(res => { const data = res.data.data; this.data = data; + getRoleTree().then(res => { + const data = res.data.data; + const index = this.$refs.crud.findColumnIndex("parentId"); + this.option.column[index].dicData = data; + }); }); } }