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 @@