Commit ef1f2373 by zhaopanyu

zpy 8.9

parent 41f6fcc1
......@@ -39,6 +39,7 @@
<div>总人数:{{ taskStats.total }}</div>
<div>已选课:<span>{{ taskStats.selected }}</span></div>
</div>
<el-table :data="courseSelectionData" stripe>
<el-table-column label="序号" type="index" width="55" align="center" />
......@@ -115,7 +116,6 @@ export default {
this.getTaskNameList();
},
methods: {
//获取数据信息
getList() {
this.loading = true
let data = {
......@@ -130,12 +130,14 @@ export default {
// console.log('this.grades', this.grades);
if (res.code == 200) {
this.courseSelectionData = res.rows;
this.calculateStats();
console.log('res.rows', res.rows);
this.total = res.total
this.loading = false
}
})
}
)
},
//任务名称下拉框
getTaskNameList() {
......@@ -171,16 +173,13 @@ export default {
const selectedTask = this.taskNameList.find(item => item.curriculaId === selectedCurriculaId);
const selectedGrade = selectedTask.grade;
this.getClassList(selectedGrade);
this.calculateStats();
},
//任务名称和人数数据联动
calculateStats() {
const selectedTask = this.taskNameList.find(item => item.curriculaId === this.queryParams.curriculaName);
if (selectedTask && selectedTask.zrs) {
this.taskStats.total = selectedTask.zrs;
} else {
this.taskStats.total = 0;
}
this.taskStats.total = selectedTask.zrs;
this.taskStats.selected = selectedTask.yxrs;
},
//班级下拉框
getClassList(grades) {
......@@ -204,6 +203,7 @@ export default {
this.resetForm("queryForm");
this.getList();
},
//导出
exportRecord() {
console.log('this.queryParams.curriculaName', this.queryParams.curriculaName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment