From ae43feac8c6b2372f5a061ead68e71027e8877e1 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期四, 27 六月 2024 09:25:10 +0800
Subject: [PATCH] 修改

---
 src/views/onlineEducation/classBatch/components/classHour.vue |   78 +++++++++++++++++++++++++++-----------
 1 files changed, 55 insertions(+), 23 deletions(-)

diff --git a/src/views/onlineEducation/classBatch/components/classHour.vue b/src/views/onlineEducation/classBatch/components/classHour.vue
index c7d408d..6f3708f 100644
--- a/src/views/onlineEducation/classBatch/components/classHour.vue
+++ b/src/views/onlineEducation/classBatch/components/classHour.vue
@@ -8,9 +8,9 @@
     :before-close="handleClose"
   >
     <div v-for="(item,index) in classList" :key="index">
-      <span style="font-size: 16px;">{{item.courseName}}:总学时{{item.totalTime}}分钟</span>
+      <span style="font-size: 16px;">{{item.courseName}}:总学时   {{item.durationDesc}}</span>
       <el-table
-        :data="item.userList"
+        :data="item.studentList"
         style="width: 100%;margin-top: 10px">
         <el-table-column
           prop="name"
@@ -19,14 +19,14 @@
         </el-table-column>
         <el-table-column
           label="身份证号"
-          prop="idCard" :show-overflow-tooltip="true">
+          prop="idcard" :show-overflow-tooltip="true">
         </el-table-column>
         <el-table-column
-          prop="progress"
+          prop="durationRate"
           label="当前学时进度"
         >
           <template #default="scope">
-            <el-progress :text-inside="true" :stroke-width="26" :percentage="scope.row.progressRate" :status="scope.row.progressStatus"></el-progress>
+            <el-progress :text-inside="true" :stroke-width="26" :percentage="scope.row.durationRate" :status="scope.row.progressStatus"></el-progress>
           </template>
         </el-table-column>
         <el-table-column label="关联上报记录" align="center" class-name="small-padding fixed-width">
@@ -42,7 +42,7 @@
         <el-table-column label="学时报告" align="center" class-name="small-padding fixed-width">
           <template #default="scope">
             <el-button
-              v-if="scope.row.progress == item.totalTime"
+              v-if="scope.row.duration == item.duration"
               size="mini"
               type="text"
               style="color: #1890ff"
@@ -52,22 +52,26 @@
           </template>
         </el-table-column>
       </el-table>
-      <pagination
-        v-show="item.total>0"
-        :total="item.total"
-        :page.sync="queryParams.pageIndex"
-        :limit.sync="queryParams.pageSize"
-        @pagination="getList"
-      />
     </div>
-    <learningRecord ref="recordRef"></learningRecord>
+    <el-dialog
+      title="学习记录"
+      :visible.sync="learningDialog"
+      :modal-append-to-body="false"
+      :close-on-click-modal="false"
+      width="850px"
+      append-to-body
+      :before-close="handleCloseLearning">
+      <learning-record ref="learnRef" ></learning-record>
+    </el-dialog>
     <lessonReport ref="lessonRef"></lessonReport>
   </el-dialog>
 </template>
 
 <script >
-import learningRecord from '@/views/onlineEducation/studentSupervision/compontents/learningRecord.vue'
+import learningRecord from '@/views/onlineEducation/learnRecord/index.vue'
 import lessonReport from '@/views/onlineEducation/studentSupervision/compontents/lessonReport.vue'
+import { periodDetail } from '@/api/onlineEducation/student'
+import { listPlatSelect } from '@/api/onlineEducation/plat'
 export default {
   name: 'addUser',
   components: {
@@ -76,10 +80,10 @@
   },
   data() {
     return {
+      learningDialog: false,
       dialogVisible: false,
-      dialogStatus: '',
       dataForm: {},
-      queryParams: {},
+      uuid: '',
       classList: [
         {
           courseName:'课程一',
@@ -130,11 +134,36 @@
   },
   methods: {
     getList() {
-
+      periodDetail(this.uuid).then((res) => {
+        if (res.code == 200) {
+          this.classList = res.data.map(item => {
+            return {
+              ...item,
+              studentList: item.studentList.map(stu => {
+                return {
+                  ...stu,
+                  durationRate: Math.round(stu.duration/item.duration * 10000) / 100.00,
+                  progressStatus: Math.round(stu.duration/item.duration * 10000) / 100.00<=50 ? 'exception'
+                    : Math.round(stu.duration/item.duration * 10000) / 100.00 >50 && Math.round(stu.duration/item.duration * 10000) / 100.00<=90 ? 'warning'
+                      : 'success'
+                }
+              })
+            }
+          })
+          console.log("class",this.classList)
+          this.dialogVisible = true;
+        }
+      })
     },
-    openDialog (type, data) {
-      this.dialogVisible = true;
-      this.dialogStatus = type;
+    handleCloseLearning() {
+      this.learningDialog = false;
+    },
+    openDialog (data) {
+      this.uuid = data.uuid;
+      this.getList()
+
+
+
     },
 
     handleClose() {
@@ -142,10 +171,13 @@
       this.$emit("getList");
     },
     openClassHour(data){
-      this.$refs.recordRef.openDialog(data);
+      this.learningDialog = true
+      setTimeout(() => {
+        this.$refs.learnRef.getList(data)
+      },10)
     },
     viewLessonReport(data){
-      this.$refs.lessonRef.openDialog(data)
+      this.$refs.lessonRef.openDialog(data.url)
     }
 
   }

--
Gitblit v1.9.2