|
@@ -249,13 +249,15 @@ export default {
|
|
|
teaType: {
|
|
|
immediate: true,
|
|
|
deep: true,
|
|
|
- handler(newValue, oldValue) {
|
|
|
- this.getTestWorkTeacherCount()
|
|
|
+ async handler(newValue, oldValue) {
|
|
|
+ if(newValue){
|
|
|
+ await this.getTestWorkTeacherCount()
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- getTestWorkTeacherCount(){
|
|
|
+ async getTestWorkTeacherCount(){
|
|
|
let j3 = []
|
|
|
if(this.teaType.length){
|
|
|
this.teaType.forEach(e => {
|
|
@@ -266,15 +268,15 @@ export default {
|
|
|
juri: j3.length ? j3.join(',') : "",
|
|
|
userid: this.$route.query.userid
|
|
|
}]
|
|
|
- this.ajax
|
|
|
- .post(this.$store.state.api + "getTestWorkTeacherCount", params)
|
|
|
- .then((res) => {
|
|
|
- this.teacherArray = res.data[0]
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- this.$message.error("网络不佳");
|
|
|
- console.error(err);
|
|
|
- });
|
|
|
+
|
|
|
+ try {
|
|
|
+ let res = await this.ajax.post(this.$store.state.api + "getTestWorkTeacherCount", params)
|
|
|
+ this.teacherArray = res.data[0]
|
|
|
+ }catch (err) {
|
|
|
+ this.$message.error("网络不佳");
|
|
|
+ console.error(err);
|
|
|
+ }
|
|
|
+ console.log('11111111111')
|
|
|
},
|
|
|
Ochange() {
|
|
|
this.$forceUpdate()
|
|
@@ -472,7 +474,7 @@ export default {
|
|
|
this.dialogTeacher = true
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
+ async mounted() {
|
|
|
this.courseTypeId = this.depthCopy(this.testType)
|
|
|
this.courseName = this.depthCopy(this.title)
|
|
|
this.isTeacherSee = this.depthCopy(this.see)
|
|
@@ -487,6 +489,8 @@ export default {
|
|
|
// this.selectAllType();
|
|
|
this.selectType();
|
|
|
this.getClass2();
|
|
|
+ await this.getTestWorkTeacherCount()
|
|
|
+ console.log('getTestWorkTeacherCount')
|
|
|
}
|
|
|
}
|
|
|
</script>
|