Kaynağa Gözat

改正退出登录再次登录不进入页面问题,补充用户进入考试界面,退回上一界面强制交卷功能

lidie 1 yıl önce
ebeveyn
işleme
6b2a366f6e

+ 12 - 4
src/views/platform/bpmn/my-test/examPop.vue

@@ -5,12 +5,12 @@
   <!-- 标题 -->
   <div style="padding: 8% 1% 5% 1%;">
     <van-row>
-      <van-col span="2" @click="handInAnExaminationPaperBtn()"> <van-icon name="arrow-left" size="18px"
+      <van-col span="2" @click="handInAnExaminationPaperBtn()"> <van-icon name="arrow-left" size="20px"
           color="	#1E90FF" /></van-col>
       <van-col span="20"><span style="font-weight: 600;">剩余时间:&nbsp;&nbsp;&nbsp;&nbsp;</span><span
           v-if="listData.duration=='不限'">不限</span><van-count-down v-if="listData.duration!=='不限'"
           :time="listData.duration" style="display: inline-block;" @finish="countDown" /></van-col>
-      <van-col span="2" @click="answerSheet=true"><van-icon name="notes-o" size="18px" color="	#1E90FF" /></van-col>
+      <van-col span="2" @click="answerSheet=true"><van-icon name="notes-o" size="20px" color="	#1E90FF" /></van-col>
     </van-row>
     <!-- 进度条 -->
     <div style="padding: 5% 4%;">
@@ -63,7 +63,7 @@
         </van-radio-group>
         <!-- 输入框 -->
         <van-field v-model="popListAnswer[questionsIndex]" placeholder="请输入内容" :border="true" clearable maxlength="1000"
-          style="font-size: 20px; background-color: #f7f7f7;"
+          style="font-size: 16px; background-color: #f7f7f7;"
           v-if="popList[questionsIndex]&&popList[questionsIndex].questionType=='填空题'" />
         <!-- 简答题 -->
         <van-field v-model="popListAnswer[questionsIndex]" placeholder="请输入内容" type="textarea" :border="true" clearable
@@ -258,6 +258,7 @@
     created() {
       this.getInit()
     },
+
     mounted() {
 
     },
@@ -440,6 +441,11 @@
         // this.showPop=false
         this.showConfirmationBox = true
         // this.handInAnExaminationPaperEvent()
+        this.$emit('submit');
+      },
+      // 由父组件调用
+      parentSubmit() {
+        this.handInAnExaminationPaperBtn()
       },
       handInAnExaminationPaperEvent() {
         this.submitForm(this.dealFormData())
@@ -527,9 +533,11 @@
       confirmEvent() {
         this.showPop = false
         this.handInAnExaminationPaperEvent()
-      }
+      },
+
     }
   }
+
 </script>
 <style scoped lang="scss">
   .radioAlign {

+ 4 - 1
src/views/platform/bpmn/my-test/index.vue

@@ -265,7 +265,10 @@
 
     beforeRouteLeave(to, from, next) {
       if (this.showPop == true) {
-        this.showConfirmationBoxList = true
+        // this.showConfirmationBoxList = true
+        this.$refs.childPop.parentSubmit();
+        this.showPop = false
+        next(false)
       } else {
         next()
       }

+ 2 - 1
src/views/platform/my/index.vue

@@ -128,7 +128,8 @@
           message: this.$t('platform.my.logoutMessage')
         }).then(() => {
           this.$store.dispatch('ibps/account/logout', { vm: this }).then(() => {
-            this.$router.push({ path: '/refresh' })
+            // this.$router.push({ path: '/refresh' })
+            this.$router.push({ path: '/' })
           })
         }).catch(() => {