考核成绩管理删除与批量删除功能

dev_2022-05-11
e 3 years ago
parent d3aba5705a
commit 7c532a4b68
  1. 19
      src/pages/achievement/ass/index.vue

@ -154,14 +154,14 @@ export default {
this.avg = res.avgScore
this.total = res.peopleNum
let list = res.page.records;
if (res.page.records.length){
if (list.length > 0){
this.assessmentId = res.page.records[0].assessmentId;
}
let score = 0;
list.map(n => {
n.class = this.className;
score += n.score;
});
}
this.listData = list;
this.getChart();
}
@ -221,7 +221,6 @@ export default {
})
.then(() => {
let ids = [row.reportId]
console.log(ids)
this.$post(`${this.api.deleteExperimentalReport}`,ids).then(res => {
util.successMsg("删除成功");
this.getData();
@ -233,18 +232,16 @@ export default {
},
delAllData() {
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
return `reportId=${item.reportId}`;
});
let delList1 = newArr.map(item => {
return `recordId=${item.reportId}`;
});
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
})
.then(() => {
this.$post(`${this.api.deleteReport}?${delList.join("&")}&${delList1.join("&")}`).then(res => {
let newArr = this.multipleSelection;
let ids = []
for (var i=0;i<newArr.length;i++){
ids.push(newArr[i].reportId)
}
this.$post(`${this.api.deleteExperimentalReport}`,ids).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {

Loading…
Cancel
Save