diff --git a/client/package.json b/client/package.json index c26bf00..f48ca35 100644 --- a/client/package.json +++ b/client/package.json @@ -15,6 +15,7 @@ "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml" }, "dependencies": { + "@riophae/vue-treeselect": "^0.4.0", "axios": "0.18.1", "element-ui": "2.13.0", "file-saver": "^2.0.2", diff --git a/client/src/api/dict.js b/client/src/api/dict.js index df66187..d46429f 100644 --- a/client/src/api/dict.js +++ b/client/src/api/dict.js @@ -4,7 +4,7 @@ export function getDictTypeList(query) { return request({ url: '/system/dicttype/', method: 'get', - params:query + params: query }) } export function createDictType(data) { @@ -32,7 +32,7 @@ export function getDictList(query) { return request({ url: '/system/dict/', method: 'get', - params:query + params: query }) } export function createDict(data) { @@ -54,4 +54,4 @@ export function deleteDict(id) { url: `/system/dict/${id}/`, method: 'delete' }) -} \ No newline at end of file +} diff --git a/client/src/api/perm.js b/client/src/api/perm.js new file mode 100644 index 0000000..29ebf53 --- /dev/null +++ b/client/src/api/perm.js @@ -0,0 +1,28 @@ +import request from '@/utils/request' + +export function getPermAll() { + return request({ + url: '/system/permission/', + method: 'get' + }) +} +export function createPerm(data) { + return request({ + url: '/system/permission/', + method: 'post', + data + }) +} +export function updatePerm(id, data) { + return request({ + url: `/system/permission/${id}/`, + method: 'put', + data + }) +} +export function deletePerm(id) { + return request({ + url: `/system/permission/${id}/`, + method: 'delete' + }) +} \ No newline at end of file diff --git a/client/src/layout/components/Sidebar/Logo.vue b/client/src/layout/components/Sidebar/Logo.vue index 040fab6..879ebe0 100644 --- a/client/src/layout/components/Sidebar/Logo.vue +++ b/client/src/layout/components/Sidebar/Logo.vue @@ -24,7 +24,7 @@ export default { }, data() { return { - title: 'Vue Admin Template', + title: '认证系统', logo: 'https://wpimg.wallstcn.com/69a1c46c-eb1c-4b46-8bd4-e9e686ef5251.png' } } diff --git a/client/src/router/index.js b/client/src/router/index.js index 0348c12..690af7b 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -78,7 +78,7 @@ export const asyncRoutes = [ path: 'organization', name: 'Organization', component: () => import('@/views/system/organization'), - meta: { title: '部门管理', icon: 'tree', perms: ['organization_manage'] } + meta: { title: '部门管理', icon: 'tree', perms: ['org_manage'] } }, { path: 'role', @@ -100,6 +100,41 @@ export const asyncRoutes = [ } ] }, + { + path: '/develop', + component: Layout, + redirect: '/develop/perm', + name: 'Develop', + meta: { title: '开发配置', icon: 'example', perms: ['dev_set'] }, + children: [ + { + path: 'perm', + name: 'Perm', + component: () => import('@/views/system/perm'), + meta: { title: '权限菜单', icon: 'example', perms: ['perm_manage'] } + }, + { + path: 'external-link', + component: Layout, + children: [ + { + path: process.env.VUE_APP_BASE_API + '/docs/', + meta: { title: '接口文档', icon: 'link', perms: ['dev_docs'] } + } + ] + }, + { + path: 'external-link', + component: Layout, + children: [ + { + path: process.env.VUE_APP_BASE_API + '/admin/', + meta: { title: 'Django后台', icon: 'link', perms: ['dev_admin'] } + } + ] + } + ] + }, // 404 page must be placed at the end !!! { path: '*', redirect: '/404', hidden: true } ] diff --git a/client/src/utils/get-page-title.js b/client/src/utils/get-page-title.js index a6de99d..cfe5800 100644 --- a/client/src/utils/get-page-title.js +++ b/client/src/utils/get-page-title.js @@ -1,6 +1,6 @@ import defaultSettings from '@/settings' -const title = defaultSettings.title || 'Vue Admin Template' +const title = defaultSettings.title || '认证系统' export default function getPageTitle(pageTitle) { if (pageTitle) { diff --git a/client/src/views/system/dict.vue b/client/src/views/system/dict.vue index 895934c..2c56ee5 100644 --- a/client/src/views/system/dict.vue +++ b/client/src/views/system/dict.vue @@ -2,9 +2,12 @@
-
- 新增 -
+ +
+ 字典类型 + 新增 +
+ + > + + {{ node.label }} + + + 编辑 + + + + + +
-
- 新增 -
+ +
+ 字典详情 +
+ 新增 - +

点击左侧类型查看字典

+
@@ -84,6 +111,9 @@ + + +
取消 @@ -106,11 +136,23 @@
+ diff --git a/client/src/views/system/user.vue b/client/src/views/system/user.vue index 79c483b..90c0d7b 100644 --- a/client/src/views/system/user.vue +++ b/client/src/views/system/user.vue @@ -1,8 +1,7 @@