Commit ef1f2373 by zhaopanyu

zpy 8.9

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