考核管理查看成绩增加全部按钮

dev_2022-05-11
e 3 years ago
parent e50435c221
commit 1da531440c
  1. 30
      src/pages/achievement/ass/index.vue

@ -90,7 +90,15 @@ export default {
classId: this.$route.query.classId,
projectId: this.$route.query.projectId,
assessmentId:'',
classInfo: [],
classInfo: [
{
architectureId: "",
className: "全部",
createTime: "2021-12-30 12:02:33",
id: "",
isDel: 0,
}
],
experimentalName: this.$route.query.experimentalName,
className: this.$route.query.class,
keyword: "",
@ -106,29 +114,39 @@ export default {
},
created() {
this.getData();
this.classInfo = JSON.parse(this.$route.query.classInfo)
let classInfo = JSON.parse(this.$route.query.classInfo)
for (var i=0;i<classInfo.length;i++){
this.classInfo.push(classInfo[i])
}
console.log(this.classInfo)
for(var i=0;i<this.classInfo.length;i++){
let id = this.classInfo[i].id
this.classInfo[i].id = id.toString()
}
const activeName2 = sessionStorage.getItem('activeName2')
if(activeName2 && this.classInfo.some(item => item.id === activeName2)) {
this.classId = activeName2
this.activeName = activeName2
this.classId = ""
this.activeName = ""
}else {
this.classId = this.classInfo[0].id;
this.activeName = this.classInfo[0].id;
this.classId = "";
this.activeName = "";
}
this.id = this.$route.query.id
},
methods: {
handleClick(tab, event) {
sessionStorage.setItem('activeName2', tab.name)
if(this.activeName == 0){
this.activeName = ''
}
this.getData()
},
getData() {
this.$post(`${this.api.getAssessmentDetail}?assessmentId=${+this.id}&pageNum=${this.page}&pageSize=${this.pageSize}&classId=${this.activeName}`).then(res => {
if (res.status == 200){
if(this.activeName == ''){
this.activeName = '0'
}
this.avg = res.avgScore
this.total = res.peopleNum
let list = res.page.records;

Loading…
Cancel
Save