|
@@ -85,9 +85,20 @@
|
|
},
|
|
},
|
|
props: ['tpl', 'info', 'extraXs'],
|
|
props: ['tpl', 'info', 'extraXs'],
|
|
mounted(){
|
|
mounted(){
|
|
- this.finishCount = (this.extraXs.index1) + (+this.extraXs.index2) + (+this.extraXs.index3) + (+this.extraXs.index4)||0
|
|
|
|
|
|
+ this.recalcXs()
|
|
|
|
+ },
|
|
|
|
+ watch:{
|
|
|
|
+ extraXs:{
|
|
|
|
+ handler(){
|
|
|
|
+ this.recalcXs()
|
|
|
|
+ },
|
|
|
|
+ deep:true
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ recalcXs(){
|
|
|
|
+ this.finishCount = (this.extraXs.index1) + (+this.extraXs.index2) + (+this.extraXs.index3) + (+this.extraXs.index4)||0
|
|
|
|
+ },
|
|
startExam() {
|
|
startExam() {
|
|
if (this.tpl.isClosed == 1) {
|
|
if (this.tpl.isClosed == 1) {
|
|
this.$message.errorMsg("课程已经关闭", 2)
|
|
this.$message.errorMsg("课程已经关闭", 2)
|
|
@@ -96,9 +107,11 @@
|
|
this.$emit("startExam", 0)
|
|
this.$emit("startExam", 0)
|
|
},
|
|
},
|
|
startExamTest() {
|
|
startExamTest() {
|
|
|
|
+ this.recalcXs()
|
|
this.$emit("startExamTest")
|
|
this.$emit("startExamTest")
|
|
},
|
|
},
|
|
printCert() {
|
|
printCert() {
|
|
|
|
+ this.recalcXs()
|
|
this.$emit("printCert")
|
|
this.$emit("printCert")
|
|
},
|
|
},
|
|
formatFinish() {
|
|
formatFinish() {
|