dedsudiyu 1 year ago
parent
commit
86efddd35f

+ 10 - 3
src/views/safetyEducationExam/safeLearning/safeLearning/index.vue

@@ -62,7 +62,7 @@
                   <div class="table-button-box">
                   <div class="table-button-box">
                     <p class="table-button-null"></p>
                     <p class="table-button-null"></p>
                     <p class="table-button-p"
                     <p class="table-button-p"
-                       @click="goPage(3,scope.row.id)"
+                       @click="goPage(3,scope.row.id,scope.row.hour,scope.row.minute,scope.row.second)"
                     >点击查看</p>
                     >点击查看</p>
                     <p class="table-button-null"></p>
                     <p class="table-button-null"></p>
                   </div>
                   </div>
@@ -84,7 +84,7 @@
       </div>
       </div>
     </div>
     </div>
     <!--<record-list-page v-if="pageType == 2"></record-list-page>-->
     <!--<record-list-page v-if="pageType == 2"></record-list-page>-->
-    <start-learning :infoId="infoId" v-if="pageType == 3"></start-learning>
+    <start-learning :infoId="infoId" :hour="hour" :minute="minute" :second="second" v-if="pageType == 3"></start-learning>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -129,6 +129,10 @@
         },
         },
         //详情id
         //详情id
         infoId:"",
         infoId:"",
+        //详情时-分-秒
+        hour:0,
+        minute:0,
+        second:0,
         //页面返回参数判断
         //页面返回参数判断
         pageId:"",
         pageId:"",
       }
       }
@@ -144,7 +148,7 @@
     },
     },
     methods: {
     methods: {
       //页面切换
       //页面切换
-      goPage(type,id){
+      goPage(type,id,hour,minute,second){
         if(type == 1){
         if(type == 1){
           this.pageType = 1;
           this.pageType = 1;
           this.getList();
           this.getList();
@@ -152,6 +156,9 @@
           this.pageType = 2;
           this.pageType = 2;
         }else if(type == 3){
         }else if(type == 3){
           this.infoId = id;
           this.infoId = id;
+          this.hour = hour;
+          this.minute = minute;
+          this.second = second;
           this.pageId = 1;
           this.pageId = 1;
           this.pageType = 3;
           this.pageType = 3;
         }else if(type == 4){
         }else if(type == 4){

+ 5 - 1
src/views/safetyEducationExam/safeLearning/safeLearning/startLearning.vue

@@ -14,7 +14,8 @@
           <div class="time-box">
           <div class="time-box">
             <div>
             <div>
               <img src="@/assets/ZDimages/safetyEducationExam/icon_ksxt_xxsc.png">
               <img src="@/assets/ZDimages/safetyEducationExam/icon_ksxt_xxsc.png">
-              <p>课程时长:{{infoData.durationStr?infoData.durationStr:0}}</p>
+              <p v-if="hour>0||minute>0||second>0">课程时长:{{hour>0?hour+'小时':''}}{{minute>0?minute+'分钟':''}}{{second>0?second+'秒':''}}</p>
+              <p v-else>课程时长:--</p>
             </div>
             </div>
             <div>
             <div>
               <img src="@/assets/ZDimages/safetyEducationExam/icon_ksxt_yxq.png">
               <img src="@/assets/ZDimages/safetyEducationExam/icon_ksxt_yxq.png">
@@ -55,6 +56,9 @@
     name: "startLearning",
     name: "startLearning",
     props:{
     props:{
       infoId:{},
       infoId:{},
+      hour:{},
+      minute:{},
+      second:{},
     },
     },
     components: {
     components: {
       afterSchoolExams
       afterSchoolExams