From 48900fec5e0abe1a3f1cb1409c1938948cafc71b Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 28 May 2020 20:24:41 +0800 Subject: [PATCH] xx --- client/src/api/file.js | 11 ++- client/src/router/index.js | 20 +++- client/src/views/system/file.vue | 132 ++++++++++++++++++++++++++ client/src/views/system/user.vue | 10 -- server/apps/system/models.py | 10 ++ server/apps/system/permission_data.py | 37 ++++---- server/apps/system/views.py | 1 + server/server/urls.py | 12 +-- server/utils/view.py | 34 +++---- 9 files changed, 210 insertions(+), 57 deletions(-) create mode 100644 client/src/views/system/file.vue diff --git a/client/src/api/file.js b/client/src/api/file.js index 207720e..259e70e 100644 --- a/client/src/api/file.js +++ b/client/src/api/file.js @@ -1,4 +1,5 @@ -import { getToken } from "@/utils/auth"; +import { getToken } from "@/utils/auth" +import request from '@/utils/request' export function uploadUrl() { return process.env.VUE_APP_BASE_API + '/file/' @@ -6,4 +7,12 @@ export function uploadUrl() { export function upHeaders() { return { Authorization: "Bearer " + getToken() } +} + +export function getFileList(query) { + return request({ + url: '/file/', + method: 'get', + params: query + }) } \ No newline at end of file diff --git a/client/src/router/index.js b/client/src/router/index.js index eb9e8bc..85bf8c7 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -97,6 +97,12 @@ export const asyncRoutes = [ name: 'Dict', component: () => import('@/views/system/dict'), meta: { title: '数据字典', icon: 'example', perms: ['dict_manage'] } + }, + { + path: 'file', + name: 'File', + component: () => import('@/views/system/file'), + meta: { title: '文件库', icon: 'documentation', perms: ['file_room'] } } ] }, @@ -114,7 +120,17 @@ export const asyncRoutes = [ meta: { title: '权限菜单', icon: 'example', perms: ['perm_manage'] } }, { - path: 'external-link', + path: 'form-gen-link', + component: Layout, + children: [ + { + path: 'https://jakhuang.github.io/form-generator/', + meta: { title: '表单设计器', icon: 'link', perms: ['dev_form_gen'] } + } + ] + }, + { + path: 'docs-link', component: Layout, children: [ { @@ -124,7 +140,7 @@ export const asyncRoutes = [ ] }, { - path: 'external-link2', + path: 'admin-link', component: Layout, children: [ { diff --git a/client/src/views/system/file.vue b/client/src/views/system/file.vue new file mode 100644 index 0000000..a32523e --- /dev/null +++ b/client/src/views/system/file.vue @@ -0,0 +1,132 @@ + + diff --git a/client/src/views/system/user.vue b/client/src/views/system/user.vue index 83a936e..85042ed 100644 --- a/client/src/views/system/user.vue +++ b/client/src/views/system/user.vue @@ -82,16 +82,6 @@ slot-scope="scope" >{{ scope.row.dept_name }} -