|
@@ -12,6 +12,9 @@
|
|
>作业人数:<span>{{ tasktotal }}</span>
|
|
>作业人数:<span>{{ tasktotal }}</span>
|
|
</p>
|
|
</p>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="24" class="wdzuStu">
|
|
|
|
+ <span v-for="(item, index) in wdzuStu" :key="index">{{ item.name }}</span>
|
|
|
|
+ </el-col>
|
|
<van-col :span="24" class="taskList" v-for="(item, index) in taskList" :key="index">
|
|
<van-col :span="24" class="taskList" v-for="(item, index) in taskList" :key="index">
|
|
<van-cell is-link @click="toDetail(item)">
|
|
<van-cell is-link @click="toDetail(item)">
|
|
<!-- 使用 title 插槽来自定义标题 -->
|
|
<!-- 使用 title 插槽来自定义标题 -->
|
|
@@ -74,6 +77,8 @@ export default {
|
|
picurl: '',
|
|
picurl: '',
|
|
score: '',
|
|
score: '',
|
|
uploadtask: {},
|
|
uploadtask: {},
|
|
|
|
+ // 未答作业学生姓名
|
|
|
|
+ wdzuStu: [],
|
|
}),
|
|
}),
|
|
created() {
|
|
created() {
|
|
this.search();
|
|
this.search();
|
|
@@ -91,7 +96,9 @@ export default {
|
|
...student({ stuQuery: 'query' }),
|
|
...student({ stuQuery: 'query' }),
|
|
async search() {
|
|
async search() {
|
|
const stutasks = await this.query({ lessonid: this.id });
|
|
const stutasks = await this.query({ lessonid: this.id });
|
|
|
|
+ // 答作业学生
|
|
this.$set(this, `taskList`, stutasks.data);
|
|
this.$set(this, `taskList`, stutasks.data);
|
|
|
|
+ // 答作业学生数量
|
|
this.$set(this, `tasktotal`, stutasks.total);
|
|
this.$set(this, `tasktotal`, stutasks.total);
|
|
},
|
|
},
|
|
async toDetail(item) {
|
|
async toDetail(item) {
|
|
@@ -126,7 +133,13 @@ export default {
|
|
// 查班级学生
|
|
// 查班级学生
|
|
async searchstu() {
|
|
async searchstu() {
|
|
let res = await this.stuQuery({ classid: this.classid });
|
|
let res = await this.stuQuery({ classid: this.classid });
|
|
|
|
+ // 学生总数
|
|
if (res.errcode == 0) this.$set(this, `stuTotal`, res.total);
|
|
if (res.errcode == 0) this.$set(this, `stuTotal`, res.total);
|
|
|
|
+ // 未答作业学生姓名
|
|
|
|
+ let wdzuStu = res.data.filter(f => {
|
|
|
|
+ return !this.taskList.find(f2 => f2.studentid == f.id);
|
|
|
|
+ });
|
|
|
|
+ if (wdzuStu) this.$set(this, `wdzuStu`, wdzuStu);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -173,4 +186,13 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.wdzuStu {
|
|
|
|
+ padding: 10px;
|
|
|
|
+ span {
|
|
|
|
+ padding: 0 5px 5px 5px;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ text-align: left;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|