|
@@ -1,5 +1,26 @@
|
|
|
<template>
|
|
|
<div class="r_box" v-loading="isLoading">
|
|
|
+ <div class="r_cbox">
|
|
|
+ <span>班级筛选</span>
|
|
|
+ <el-select
|
|
|
+ multiple
|
|
|
+ collapse-tags
|
|
|
+ class="r_select"
|
|
|
+ v-model="chooseClass"
|
|
|
+ placeholder="全部"
|
|
|
+ filterable
|
|
|
+ @change="changeClass"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in classArray"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div class="r_cbox">
|
|
|
<span>学生姓名</span>
|
|
|
<el-select
|
|
@@ -536,17 +557,19 @@
|
|
|
import html2canvas from "html2canvas";
|
|
|
import jspdf from "jspdf";
|
|
|
export default {
|
|
|
- props: ["cid", "dataJson"],
|
|
|
+ props: ["cid", "dataJson", "classArray"],
|
|
|
data() {
|
|
|
return {
|
|
|
worksDialog: false,
|
|
|
pdfUser: [],
|
|
|
uname: [],
|
|
|
+ chooseClass: [],
|
|
|
chap: [],
|
|
|
task: [],
|
|
|
dyAarray: [],
|
|
|
dyList: [],
|
|
|
- userAarray: [],
|
|
|
+ userAarray: [], //作业提交学生
|
|
|
+ userAarrayCopy: [], //班级筛选的时候使用作业提交学生
|
|
|
isLoading: false,
|
|
|
workList: [],
|
|
|
workEvaList: []
|
|
@@ -658,7 +681,6 @@ export default {
|
|
|
});
|
|
|
|
|
|
if (this.dataJson.state == 5) {
|
|
|
-
|
|
|
if (!taskList.length) {
|
|
|
this.dyAarray[0].taskList.forEach(e => {
|
|
|
let ar = 0 + "-" + e.id;
|
|
@@ -667,8 +689,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
this.dyAarray[0].taskList.forEach(e => {
|
|
|
let ar = 0 + "-" + e.id;
|
|
|
console.log("ar", ar);
|
|
@@ -705,6 +725,7 @@ export default {
|
|
|
res.data[11]; //cocopi或源码编辑作业
|
|
|
res.data[12]; //文档作业
|
|
|
this.workEvaList = res.data[13];
|
|
|
+ this.userAarrayCopy = JSON.parse(JSON.stringify(res.data[14]));
|
|
|
this.userAarray = res.data[14];
|
|
|
|
|
|
var dyJSON = JSON.parse(res.data[0][0].chapters);
|
|
@@ -874,6 +895,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ changeClass() {
|
|
|
+ if (this.chooseClass.length) {
|
|
|
+ this.userAarray = this.userAarrayCopy.filter(e => {
|
|
|
+ let kk = this.chooseClass.filter(item => e.classid.includes(item));
|
|
|
+ return kk.length ? e :''
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.userAarray = JSON.parse(JSON.stringify(this.userAarrayCopy));
|
|
|
+ }
|
|
|
+ },
|
|
|
handleClose(done) {
|
|
|
done();
|
|
|
}
|
|
@@ -930,7 +961,7 @@ export default {
|
|
|
width: 810pt;
|
|
|
margin: auto;
|
|
|
min-height: 1200px;
|
|
|
- padding: 60px 8% 0;
|
|
|
+ padding: 60px 8%;
|
|
|
box-sizing: border-box;
|
|
|
background-color: rgb(255, 251, 220);
|
|
|
}
|