|
|
@ -234,13 +234,7 @@ export default { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
let url = ""; |
|
|
|
this.$post(`${this.api.deleteReportById}?ids=${row.assessmentId}&projectIds=${row.projectId}&projectPermissions=${this.projectPermissions}`).then(res => { |
|
|
|
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 => { |
|
|
|
|
|
|
|
util.successMsg("删除成功"); |
|
|
|
util.successMsg("删除成功"); |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
@ -253,20 +247,11 @@ export default { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
let url = ""; |
|
|
|
|
|
|
|
let ids = []; |
|
|
|
let ids = []; |
|
|
|
let projectIds = this.multipleSelection.map(item => { |
|
|
|
let projectIds = this.multipleSelection.map(item => { |
|
|
|
return item.projectId; |
|
|
|
return item.projectId; |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (this.projectPermissions === 0) { |
|
|
|
this.$post(`${this.api.deleteReportById}?ids=${ids.toString()}&projectIds=${projectIds.toString()}&projectPermissions=${this.projectPermissions}`).then(res => { |
|
|
|
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.multipleSelection = []; |
|
|
|
this.multipleSelection = []; |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
util.successMsg("删除成功"); |
|
|
|
util.successMsg("删除成功"); |
|
|
|