From 50e789bfd2b3ab3c88ba3d60f90d96fa3399e86f Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 30 Mar 2022 10:29:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=AD=89=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Sidebar.vue | 7 +- src/components/codemirror.vue | 5 +- src/utils/api.js | 1 + src/views/Login.vue | 17 +++-- src/views/serve/addModel.vue | 92 +++++++++++++++++------ src/views/serve/backstage/model.vue | 32 +++++--- src/views/serve/backstage/modelType.vue | 4 +- src/views/serve/backstage/sourceModel.vue | 2 +- src/views/serve/backstage/sourceType.vue | 4 +- src/views/serve/projectAdd.vue | 68 +++++++++-------- src/views/serve/projectList.vue | 14 ++-- 11 files changed, 161 insertions(+), 85 deletions(-) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 85aab31..a46ea62 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -136,8 +136,11 @@ export default { addRoutes(routes) this.initMenu() }).catch(err => { - // 被捕获了则显示默认菜单 - this.menus = this.menuList + if (err.status === 500) { + localStorage.removeItem('ms_username'); + sessionStorage.clear() + location.reload() + } }) }, } diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue index 1f057a0..3ad9798 100644 --- a/src/components/codemirror.vue +++ b/src/components/codemirror.vue @@ -193,8 +193,11 @@ export default { this.errLine = parseInt(result.substring(result.indexOf("line") + 4, result.length)) } }).catch(res => { - res.status == 500 && this.$message.error('检测到代码里有非法代码,请检查是否有调用系统命令。') + this.isError = false + this.runResult = '' + this.picSrcList = [] this.loadIns.close() + res.status == 500 && this.$message.error('检测到代码里有非法代码,请检查是否有调用系统命令。') }) } }, diff --git a/src/utils/api.js b/src/utils/api.js index 95225d6..9c771b0 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -95,6 +95,7 @@ export default { saveProjectDraft: `occupationlab/projectManage/saveProjectDraft`, // 新增项目管理 addProjectManage: `occupationlab/projectManage/addProjectManage`, // 新增项目管理 updateProjectManage: `occupationlab/projectManage/updateProjectManage`, // 修改项目管理 + editProjectDraft: `occupationlab/projectManage/editProjectDraft`, // 修改项目管理 copyProjectManage: `occupationlab/projectManage/copyProjectManage`, // 复制项目管理 // 判分点 getBcJudgmentPoint: `judgment/bcJudgmentPoint/getBcJudgmentPoint`, // 获取编程类判分点列表(分页) diff --git a/src/views/Login.vue b/src/views/Login.vue index 85cf5d8..b0b03be 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -98,6 +98,7 @@