|
|
|
@ -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("删除成功"); |
|
|
|
|