From eea2542e907aabdcb048e6f5ef1030b7ac37825e Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 10 Oct 2023 16:04:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 27 + package.json | 1 + src/api/login.ts | 16 - src/api/system.ts | 8 + src/components/Panel/index.vue | 1866 ++++++++++++-------------------- src/permission.ts | 14 - src/router/index.ts | 3 - src/store/useCurrentUser.ts | 30 - src/views/Home.vue | 2 + src/views/Login.vue | 62 -- 10 files changed, 714 insertions(+), 1315 deletions(-) delete mode 100644 src/api/login.ts create mode 100644 src/api/system.ts delete mode 100644 src/views/Login.vue diff --git a/package-lock.json b/package-lock.json index 8c04498..468d8f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1156,6 +1156,11 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", @@ -1247,6 +1252,11 @@ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, + "cssfilter": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", + "integrity": "sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==" + }, "csstype": { "version": "2.6.19", "resolved": "https://registry.npmmirror.com/csstype/-/csstype-2.6.19.tgz", @@ -3078,6 +3088,14 @@ "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", "dev": true }, + "mavon-editor": { + "version": "2.10.4", + "resolved": "https://registry.npmjs.org/mavon-editor/-/mavon-editor-2.10.4.tgz", + "integrity": "sha512-CFsBLkgt/KZBDg+SJYe2fyYv4zClY149PiwpH0rDAiiP4ae1XNs0GC8nBsoTeipsHcebDLN1QMkt3bUsnMDjQw==", + "requires": { + "xss": "^1.0.6" + } + }, "memoize-one": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz", @@ -5150,6 +5168,15 @@ "mkdirp": "^0.5.1" } }, + "xss": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.14.tgz", + "integrity": "sha512-og7TEJhXvn1a7kzZGQ7ETjdQVS2UfZyTlsEdDOqvQF7GoxNfY+0YLCzBy1kPdsDDx4QuNAonQPddpsn6Xl/7sw==", + "requires": { + "commander": "^2.20.3", + "cssfilter": "0.0.10" + } + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmmirror.com/xtend/-/xtend-4.0.2.tgz", diff --git a/package.json b/package.json index ee8cf25..68f707e 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "element-plus": "^2.0.2", "js-cookie": "^3.0.1", "lodash": "^4.17.21", + "mavon-editor": "^2.10.4", "nprogress": "^0.2.0", "path-to-regexp": "^6.2.0", "tinymce": "^5.9.2", diff --git a/src/api/login.ts b/src/api/login.ts deleted file mode 100644 index ec84c00..0000000 --- a/src/api/login.ts +++ /dev/null @@ -1,16 +0,0 @@ -import axios from '@/utils/request'; - -export interface LoginParam { - username: string; - password: string; - browser?: boolean; -} - -export interface RefreshTokenParam { - refreshToken: string; - browser?: boolean; -} - -export const accountLogin = async (data: LoginParam): Promise => (await axios.post('/auth/jwt/login', data)).data; -export const accountRefreshToken = async (data: RefreshTokenParam): Promise => (await axios.post('/auth/jwt/refresh-token', data)).data; -export const queryCurrentUser = async (): Promise => (await axios.get('/user/current')).data; diff --git a/src/api/system.ts b/src/api/system.ts new file mode 100644 index 0000000..403e075 --- /dev/null +++ b/src/api/system.ts @@ -0,0 +1,8 @@ +import axios from '@/utils/request'; + +export const pageStuAssessment = async (data: Record): Promise => (await axios.post('/occupationlab/occupationlab/assessment/pageStuAssessment', data)).data; +export const getProjectBySystemId = async (data: Record): Promise => + (await axios.get('/occupationlab/occupationlab/projectManage/getProjectBySystemId', data)).data; +export const getProjectDetail = async (data: Record): Promise => (await axios.get('/occupationlab/occupationlab/projectManage/getProjectDetail', data)).data; +export const getDetailById = async (id: number | string): Promise => (await axios.get(`/occupationlab/occupationlab/assessment/getDetailById?id=${id}`)).data; +export const getCompetition = async (id: number | string): Promise => (await axios.post(`/competition/competition/management/getCompetition?competitionId=${id}`)).data; diff --git a/src/components/Panel/index.vue b/src/components/Panel/index.vue index b2872b8..3294465 100644 --- a/src/components/Panel/index.vue +++ b/src/components/Panel/index.vue @@ -1,117 +1,127 @@