From 23a215d980821f868962a7b41b33e1090b041bb6 Mon Sep 17 00:00:00 2001 From: youngS Date: Mon, 12 Apr 2021 18:30:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BA=94=E7=94=A8=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_admin/src/api/app.js | 17 + fir_admin/src/api/user.js | 8 + fir_admin/src/router/index.js | 21 +- fir_admin/src/views/appinfos/AppDetail.vue | 305 ++++++++++++++++++ .../src/views/appinfos/Dropdown/Comment.vue | 41 +++ .../src/views/appinfos/Dropdown/Platform.vue | 46 +++ .../src/views/appinfos/Dropdown/SourceUrl.vue | 38 +++ .../src/views/appinfos/Dropdown/index.js | 3 + fir_admin/src/views/appinfos/edit.vue | 12 + fir_admin/src/views/appinfos/list.vue | 201 ++++++++++++ fir_admin/src/views/userinfos/UserDetail.vue | 275 +++++++++------- fir_admin/src/views/userinfos/list.vue | 14 +- .../components/apps/FirAppInfossecurity.vue | 6 +- fir_ser/admin/urls.py | 2 + fir_ser/admin/views/app.py | 117 +++++++ fir_ser/admin/views/user.py | 49 +-- .../api/migrations/0037_auto_20210412_1559.py | 38 +++ .../api/migrations/0038_auto_20210412_1601.py | 18 ++ .../api/migrations/0039_auto_20210412_1759.py | 18 ++ fir_ser/api/models.py | 12 +- fir_ser/api/utils/serializer.py | 79 ++++- fir_ser/api/utils/storage/storage.py | 2 +- fir_ser/api/utils/utils.py | 24 +- fir_ser/api/views/login.py | 2 +- fir_ser/api/views/storage.py | 4 +- 25 files changed, 1165 insertions(+), 187 deletions(-) create mode 100644 fir_admin/src/api/app.js create mode 100644 fir_admin/src/views/appinfos/AppDetail.vue create mode 100644 fir_admin/src/views/appinfos/Dropdown/Comment.vue create mode 100644 fir_admin/src/views/appinfos/Dropdown/Platform.vue create mode 100644 fir_admin/src/views/appinfos/Dropdown/SourceUrl.vue create mode 100644 fir_admin/src/views/appinfos/Dropdown/index.js create mode 100644 fir_admin/src/views/appinfos/edit.vue create mode 100644 fir_admin/src/views/appinfos/list.vue create mode 100644 fir_ser/admin/views/app.py create mode 100644 fir_ser/api/migrations/0037_auto_20210412_1559.py create mode 100644 fir_ser/api/migrations/0038_auto_20210412_1601.py create mode 100644 fir_ser/api/migrations/0039_auto_20210412_1759.py diff --git a/fir_admin/src/api/app.js b/fir_admin/src/api/app.js new file mode 100644 index 0000000..7606992 --- /dev/null +++ b/fir_admin/src/api/app.js @@ -0,0 +1,17 @@ +import request from '@/utils/request' + +export function getAppInfos(query) { + return request({ + url: '/appinfo', + method: 'get', + params: query + }) +} + +export function updateAppInfo(data) { + return request({ + url: '/appinfo', + method: 'put', + data + }) +} diff --git a/fir_admin/src/api/user.js b/fir_admin/src/api/user.js index 0849f28..900f5e2 100644 --- a/fir_admin/src/api/user.js +++ b/fir_admin/src/api/user.js @@ -30,3 +30,11 @@ export function getUserInfos(query) { params: query }) } + +export function updateUserInfo(data) { + return request({ + url: '/userinfo', + method: 'put', + data + }) +} diff --git a/fir_admin/src/router/index.js b/fir_admin/src/router/index.js index dda8608..6b019b7 100644 --- a/fir_admin/src/router/index.js +++ b/fir_admin/src/router/index.js @@ -83,12 +83,25 @@ export const constantRoutes = [ { path: '/apps', component: Layout, + redirect: '/apps/list', + name: 'apps', + meta: { + title: '应用管理', + icon: 'el-icon-s-help' + }, children: [ { - path: 'index', - name: 'index', - component: () => import('@/views/form/index'), - meta: { title: '应用管理', icon: 'form' } + path: 'list', + name: 'app_info_list', + component: () => import('@/views/appinfos/list'), + meta: { title: '应用列表', icon: 'form' } + }, + { + path: 'edit/:id(\\d+)', + component: () => import('@/views/appinfos/edit'), + name: 'app_info_edit', + meta: { title: '编辑信息', noCache: true, activeMenu: '/apps/list' }, + hidden: true } ] }, diff --git a/fir_admin/src/views/appinfos/AppDetail.vue b/fir_admin/src/views/appinfos/AppDetail.vue new file mode 100644 index 0000000..51de4c6 --- /dev/null +++ b/fir_admin/src/views/appinfos/AppDetail.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/fir_admin/src/views/appinfos/Dropdown/Comment.vue b/fir_admin/src/views/appinfos/Dropdown/Comment.vue new file mode 100644 index 0000000..d34b2b9 --- /dev/null +++ b/fir_admin/src/views/appinfos/Dropdown/Comment.vue @@ -0,0 +1,41 @@ + + + diff --git a/fir_admin/src/views/appinfos/Dropdown/Platform.vue b/fir_admin/src/views/appinfos/Dropdown/Platform.vue new file mode 100644 index 0000000..0a52726 --- /dev/null +++ b/fir_admin/src/views/appinfos/Dropdown/Platform.vue @@ -0,0 +1,46 @@ + + + diff --git a/fir_admin/src/views/appinfos/Dropdown/SourceUrl.vue b/fir_admin/src/views/appinfos/Dropdown/SourceUrl.vue new file mode 100644 index 0000000..f514e2a --- /dev/null +++ b/fir_admin/src/views/appinfos/Dropdown/SourceUrl.vue @@ -0,0 +1,38 @@ +v + + diff --git a/fir_admin/src/views/appinfos/Dropdown/index.js b/fir_admin/src/views/appinfos/Dropdown/index.js new file mode 100644 index 0000000..bc0c171 --- /dev/null +++ b/fir_admin/src/views/appinfos/Dropdown/index.js @@ -0,0 +1,3 @@ +export { default as CommentDropdown } from './Comment' +export { default as PlatformDropdown } from './Platform' +export { default as SourceUrlDropdown } from './SourceUrl' diff --git a/fir_admin/src/views/appinfos/edit.vue b/fir_admin/src/views/appinfos/edit.vue new file mode 100644 index 0000000..60ed9a5 --- /dev/null +++ b/fir_admin/src/views/appinfos/edit.vue @@ -0,0 +1,12 @@ + + + diff --git a/fir_admin/src/views/appinfos/list.vue b/fir_admin/src/views/appinfos/list.vue new file mode 100644 index 0000000..e775a38 --- /dev/null +++ b/fir_admin/src/views/appinfos/list.vue @@ -0,0 +1,201 @@ + + + diff --git a/fir_admin/src/views/userinfos/UserDetail.vue b/fir_admin/src/views/userinfos/UserDetail.vue index 7583e75..3099a6c 100644 --- a/fir_admin/src/views/userinfos/UserDetail.vue +++ b/fir_admin/src/views/userinfos/UserDetail.vue @@ -1,19 +1,22 @@