dev_2022-05-11
e 3 years ago
parent 12bf291f9e
commit 29ba5f7232
  1. 8
      src/pages/achievement/vir/index.vue
  2. 42
      src/pages/match/manage/matchProgress.vue
  3. 1
      src/pages/project/add/index.vue

@ -101,9 +101,11 @@ export default {
}, },
getData() { getData() {
this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.projectId}&keyword=${this.keyword}`).then(res => { this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.projectId}&keyword=${this.keyword}`).then(res => {
this.multipleSelection = res.page.records;
this.listData = res.page.records; this.listData = res.page.records;
this.total = res.page.total; this.total = res.page.total;
this.avgScore = res.avgScore; let avgScore = +res.avgScore
this.avgScore = avgScore.toFixed(2)
this.peopleNum = res.peopleNum; this.peopleNum = res.peopleNum;
this.getChart(res.getFractionalSegmentNum); this.getChart(res.getFractionalSegmentNum);
}).catch(res => { }).catch(res => {
@ -120,7 +122,7 @@ export default {
exportData() { exportData() {
if (this.multipleSelection.length) { if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => { let ids = this.multipleSelection.map(item => {
return item.projectId; return item.reportId;
}); });
location.href = `${this.api.exportPracticeInfo}?ids=${ids.toString()}`; location.href = `${this.api.exportPracticeInfo}?ids=${ids.toString()}`;
} else { } else {
@ -165,7 +167,7 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val; this.page = val;
this.handlePage(); this.getData();
}, },
getChart(num) { getChart(num) {
let data = [num.num1, num.num2, num.num3, num.num4, num.num5, num.num6, num.num7, num.num8, num.num9, num.num10]; let data = [num.num1, num.num2, num.num3, num.num4, num.num5, num.num6, num.num7, num.num8, num.num9, num.num10];

@ -131,6 +131,7 @@ export default {
description: "", description: "",
status: 0 status: 0
}); });
console.log(this.listData)
} else { } else {
util.warningMsg("请先保存新数据"); util.warningMsg("请先保存新数据");
} }
@ -145,6 +146,47 @@ export default {
} }
}, },
}, },
beforeDestroy() {
this.$confirm('暂未保存,是否保存本次编辑?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let num = 0;
for(var i=0;i<this.listData.length;i++){
let data = this.listData[i];
if (data.title) {
if (this.listData[i].id) {
this.$put(this.api.editContestProgress, data).then(res => {
}).catch(res => {
});
}else{
num = num+1
}
}else{
num = num+1
}
}
if (num >0){
this.$message({
type: 'error',
message: '保存失败,有未填项目'
});
}else{
this.$message({
type: 'success',
message: '保存成功!'
});
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消保存'
});
});
},
}; };
</script> </script>

@ -510,6 +510,7 @@ export default {
this.$refs.judgementTable.clearSelection(); this.$refs.judgementTable.clearSelection();
}); });
let params = { let params = {
enable:0,
name: this.judgementpointsquery, name: this.judgementpointsquery,
pageNum: 1, pageNum: 1,
pageSize: 10000, pageSize: 10000,

Loading…
Cancel
Save