From c68ea761322733185e31b2f49a31010c822c8a9b Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 21 Oct 2021 20:06:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/achievement/list/index.vue | 19 ++----------------- src/pages/project/add/index.vue | 6 +++++- src/setting.js | 4 ++-- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/pages/achievement/list/index.vue b/src/pages/achievement/list/index.vue index 9badad5..d3eb515 100644 --- a/src/pages/achievement/list/index.vue +++ b/src/pages/achievement/list/index.vue @@ -234,13 +234,7 @@ export default { this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { type: "warning" }).then(() => { - let url = ""; - if (this.projectPermissions === 0) { - url = `${this.api.deleteExperimentalReport}?projectIds=${row.projectId}&projectPermissions=${this.projectPermissions}`; - } else { - url = `${this.api.deleteExperimentalReport}?ids=${row.assessmentId}&projectIds=${row.projectId}&projectPermissions=${this.projectPermissions}`; - } - this.$post(url).then(res => { + this.$post(`${this.api.deleteReportById}?ids=${row.assessmentId}&projectIds=${row.projectId}&projectPermissions=${this.projectPermissions}`).then(res => { util.successMsg("删除成功"); this.getData(); }).catch(res => { @@ -253,20 +247,11 @@ export default { this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { type: "warning" }).then(() => { - let url = ""; let ids = []; let projectIds = this.multipleSelection.map(item => { return item.projectId; }); - if (this.projectPermissions === 0) { - url = `${this.api.deleteExperimentalReport}?projectIds=${projectIds.toString()}&projectPermissions=${this.projectPermissions}`; - } else { - ids = this.multipleSelection.map(item => { - return item.assessmentId; - }); - url = `${this.api.deleteExperimentalReport}?ids=${ids.toString()}&projectIds=${projectIds.toString()}&projectPermissions=${this.projectPermissions}`; - } - this.$post(url).then(res => { + this.$post(`${this.api.deleteReportById}?ids=${ids.toString()}&projectIds=${projectIds.toString()}&projectPermissions=${this.projectPermissions}`).then(res => { this.multipleSelection = []; this.$refs.table.clearSelection(); util.successMsg("删除成功"); diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue index c7496a4..80371f4 100644 --- a/src/pages/project/add/index.vue +++ b/src/pages/project/add/index.vue @@ -1,5 +1,5 @@