From 55f821ecb4b61bda2e4308b0a04b5ec0d767b31e Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期五, 16 八月 2024 09:58:58 +0800
Subject: [PATCH] 修改

---
 src/api/onlineEducation/plat.js                        |    9 
 src/views/onlineEducation/classBatch/index.vue         |  107 +++++---
 src/views/onlineEducation/platformManage/index.vue     |   84 ++++--
 src/views/onlineEducation/studentSupervision/index.vue |    2 
 src/api/onlineEducation/count.js                       |   17 +
 src/views/onlineEducation/count/index.vue              |  171 ++++++++------
 src/views/onlineEducation/realtimeStatus/index.vue     |  268 ++++++++++++++--------
 src/api/onlineEducation/course.js                      |    8 
 8 files changed, 423 insertions(+), 243 deletions(-)

diff --git a/src/api/onlineEducation/count.js b/src/api/onlineEducation/count.js
new file mode 100644
index 0000000..22bcb25
--- /dev/null
+++ b/src/api/onlineEducation/count.js
@@ -0,0 +1,17 @@
+import request from '@/utils/request'
+
+export function getCount(query) {
+  return request({
+    url: '/th/statistic/count',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getSubject(query) {
+  return request({
+    url: '/th/subject/type/tree',
+    method: 'get',
+    params: query
+  })
+}
diff --git a/src/api/onlineEducation/course.js b/src/api/onlineEducation/course.js
index 95c9a0c..b152026 100644
--- a/src/api/onlineEducation/course.js
+++ b/src/api/onlineEducation/course.js
@@ -7,3 +7,11 @@
     params: query
   })
 }
+
+export function realTimeQuery(query) {
+  return request({
+    url: '/th/study/record/idcard',
+    method: 'get',
+    params: query
+  })
+}
diff --git a/src/api/onlineEducation/plat.js b/src/api/onlineEducation/plat.js
index 994653d..0723ef0 100644
--- a/src/api/onlineEducation/plat.js
+++ b/src/api/onlineEducation/plat.js
@@ -41,3 +41,12 @@
     method: 'delete'
   })
 }
+
+//审核
+export function modPlatStatus(query) {
+  return request({
+    url: '/th/institutional/manager/mod/status',
+    method: 'post',
+    data: query
+  })
+}
diff --git a/src/views/onlineEducation/classBatch/index.vue b/src/views/onlineEducation/classBatch/index.vue
index d9dbf8b..1980705 100644
--- a/src/views/onlineEducation/classBatch/index.vue
+++ b/src/views/onlineEducation/classBatch/index.vue
@@ -16,26 +16,21 @@
         range-separator="至"
         start-placeholder="开始日期"
         end-placeholder="结束日期"
-        value-format="yyyy-MM-DD"
-        style="margin-left: 40px;"
+        format="yyyy-MM-dd"
+        style="margin-left: 30px;"
       >
       </el-date-picker>
-      <el-select v-model="queryParams.qualificationType"  size="small" style="margin-left: 40px;" clearable placeholder="请选择资格类型">
-        <el-option
-          v-for="item in qualificationList"
-          :key="item.id"
-          :label="item.name"
-          :value="item.id">
-        </el-option>
-      </el-select>
-      <el-select v-model="queryParams.trainOrgId"  size="small" style="margin-left: 40px;" clearable filterable placeholder="请选择所属机构">
-        <el-option
-          v-for="item in trainOrgList"
-          :key="item.id"
-          :label="item.name"
-          :value="item.id">
-        </el-option>
-      </el-select>
+      <el-cascader
+        v-model="queryParams.subjectCode"
+        ref="classifyRef"
+        @change="changeTree"
+        :options="subjectList"
+        :props="{ checkStrictly: true }"
+        clearable
+        size="small"
+        style="margin-left: 30px;"
+      ></el-cascader>
+      <el-input size="small" style="margin-left: 30px;width: 200px" v-model="queryParams.trainOrgName" placeholder="请输入机构"></el-input>
       <el-button
         size="small"
         type="primary"
@@ -54,9 +49,9 @@
       <el-table-column label="ID" align="center" prop="id" />
       <el-table-column label="批次名称" align="center" prop="batchName" />
       <el-table-column label="推送平台" align="center" prop="institutionName" />
-      <el-table-column label="开始时间" align="center" prop="startTime" />
-      <el-table-column label="计划结束时间" align="center" prop="endTime" />
-      <el-table-column label="类别" align="center" prop="category" />
+      <el-table-column label="开始时间" align="center" prop="actualStartTime" />
+      <el-table-column label="计划结束时间" align="center" prop="actualEndTime" />
+      <el-table-column label="类别" align="center" prop="subjectCode" />
       <el-table-column label="上报时间" align="center" prop="createTime" />
       <el-table-column label="所属培训机构" align="center" prop="trainOrgName" />
       <el-table-column label="课程" align="center" >
@@ -119,6 +114,7 @@
 import { listBatch, listQuestion } from '@/api/onlineEducation/student'
 import { listPlatSelect } from '@/api/onlineEducation/plat'
 import moment from 'moment/moment'
+import { getSubject } from '@/api/onlineEducation/count'
 export default {
   name: "nPeopleManage",
   dicts: [],
@@ -140,29 +136,16 @@
         institutionId: '',
         startTime: '',
         endTime: '',
-        qualificationType: null,
-        trainOrgId: null
+        subjectCode: null,
+        trainOrgName: ''
       },
-      qualificationList: [
-        {
-          id: 1,
-          name: '主要负责人'
-        },
-        {
-          id: 2,
-          name: '安全生产管理人员'
-        },
-        {
-          id: 3,
-          name: '特种作业人员'
-        }
-
-      ],
+      subjectList: [],
       trainOrgList: []
     };
   },
   created() {
     this.setDate();
+    this.getSubjectList()
     this.getList();
     this.getPlat();
   },
@@ -175,9 +158,49 @@
       const e = moment(end).format('YYYY-MM-DD')
       this.time = [s,e]
     },
+    changeTree(val) {
+      console.log("label====",this.$refs.classifyRef.getCheckedNodes()[0].value)
+      this.queryParams.subjectCode = this.$refs.classifyRef.getCheckedNodes()[0].value
+      // 我这里只是打印了一下label的值哦,需要赋值的话自己去赋值哦
+      if (this.$refs.classifyRef) {
+        this.$refs.classifyRef.dropDownVisible = false
+      }
+    },
+    getSubjectList() {
+      getSubject().then(res => {
+        if (res.code == 200) {
+          console.log('res',res)
+          this.subjectList = this.recursion(res.data)
+        }
+      })
+    },
+    recursion(data){
+      let tmp = []
+      for (let i = 0; i < data.length; i++) {
+        let item = data[i]
+        // children为空
+        if (item.children&& item.children.length==0) {
+          tmp.push({
+            value: item.code,
+            label: item.name
+          })
+          // 有children
+        } else {
+          tmp.push({
+            value: item.code,
+            label: item.name,
+            children: this.recursion(item.children)
+          })
+        }
+      }
+      return tmp;
+    },
     getList(){
-      // this.queryParams.startTime = moment(this.time[0]).format('YYYY-MM-DD')
-      // this.queryParams.endTime = moment(this.time[1]).format('YYYY-MM-DD')
+      if(this.time && this.time.length >0){
+        this.queryParams.startTime = moment(this.time[0]).format('YYYY-MM-DD')
+        this.queryParams.endTime = moment(this.time[1]).format('YYYY-MM-DD')
+      }
+
       this.loading = true;
       listBatch( this.queryParams).then((res) => {
         if (res.code == 200) {
@@ -216,8 +239,8 @@
         institutionId: '',
         startTime: '',
         endTime: '',
-        qualificationType: null,
-        trainOrgId: null
+        subjectCode: null,
+        trainOrgName: ''
       }
       this.time = [];
       this.getList();
diff --git a/src/views/onlineEducation/count/index.vue b/src/views/onlineEducation/count/index.vue
index 03fb279..9a1d718 100644
--- a/src/views/onlineEducation/count/index.vue
+++ b/src/views/onlineEducation/count/index.vue
@@ -11,22 +11,33 @@
         format="yyyy-MM-dd"
       >
       </el-date-picker>
-      <el-select v-model="queryParams.qualificationType"  size="small" style="margin-left: 40px;" clearable placeholder="请选择资格类型">
-        <el-option
-          v-for="item in qualificationList"
-          :key="item.id"
-          :label="item.name"
-          :value="item.id">
-        </el-option>
-      </el-select>
-      <el-select v-model="queryParams.trainOrgId"  size="small" style="margin-left: 40px;" clearable filterable placeholder="请选择所属机构">
-        <el-option
-          v-for="item in trainOrgList"
-          :key="item.id"
-          :label="item.name"
-          :value="item.id">
-        </el-option>
-      </el-select>
+      <el-cascader
+        v-model="queryParams.subjectCode"
+        ref="classifyRef"
+        @change="changeTree"
+        :options="subjectList"
+        :props="{ checkStrictly: true }"
+        clearable
+        size="small"
+        style="margin-left: 30px;"
+      ></el-cascader>
+<!--      <el-select v-model="queryParams.subjectCode"  size="small" style="margin-left: 40px;" clearable placeholder="请选择资格类型">-->
+<!--        <el-option-->
+<!--          v-for="item in subjectList"-->
+<!--          :key="item.id"-->
+<!--          :label="item.name"-->
+<!--          :value="item.id">-->
+<!--        </el-option>-->
+<!--      </el-select>-->
+      <el-input size="small" style="margin-left: 30px;width: 200px" v-model="queryParams.trainOrgName" placeholder="请输入机构"></el-input>
+<!--      <el-select v-model="queryParams.trainOrgId"  size="small" style="margin-left: 40px;" clearable filterable placeholder="请选择所属机构">-->
+<!--        <el-option-->
+<!--          v-for="item in trainOrgList"-->
+<!--          :key="item.id"-->
+<!--          :label="item.name"-->
+<!--          :value="item.id">-->
+<!--        </el-option>-->
+<!--      </el-select>-->
       <el-button
         size="small"
         type="primary"
@@ -41,24 +52,29 @@
       >重置</el-button>
     </div>
     <el-table v-loading="loading" :data="expertList">
-      <el-table-column label="平台" align="center" prop="name" />
-      <el-table-column label="培训总人数" align="center" prop="tTotal" />
-      <el-table-column label="培训学时达标人数" align="center" prop="pTotal" />
-      <el-table-column label="考试合格人数" align="center" prop="examQualifyNum" />
-      <el-table-column label="考试合格率" align="center" prop="passRate" />
+      <el-table-column label="平台" align="center" prop="institutionName" />
+      <el-table-column label="培训总人数" align="center" prop="studentCount" />
+      <el-table-column label="培训学时达标人数" align="center" prop="finishCount" />
+      <el-table-column label="考试合格人数" align="center" prop="passCount" />
+      <el-table-column label="考试合格率" align="center" prop="passRate">
+        <template #default="scope">
+          <span>{{scope.row.passRate}}%</span>
+        </template>
+      </el-table-column>
     </el-table>
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+<!--    <pagination-->
+<!--      v-show="total>0"-->
+<!--      :total="total"-->
+<!--      :page.sync="queryParams.pageNum"-->
+<!--      :limit.sync="queryParams.pageSize"-->
+<!--      @pagination="getList"-->
+<!--    />-->
   </div>
 </template>
 
 <script>
 import moment from 'moment'
+import { getCount, getSubject } from '@/api/onlineEducation/count'
 
 export default {
   name: "count",
@@ -71,46 +87,23 @@
       showSearch: true,
       addForm: false,
       total: 0,
-      objectList: [
-        {
-          value: '1',
-          label: '测试数据1'
-        },
-        {
-          value: '2',
-          label: '测试数据2'
-        },
-      ],
       expertList: [],
+      subjectList: [],
       queryParams: {
         pageNum: 1,
         pageSize: 10,
         startTime: '',
         endTime: '',
-        qualificationType: null,
-        trainOrgId: null
+        subjectCode: null,
+        trainOrgName: ''
       },
       time: [],
-      qualificationList: [
-        {
-          id: 1,
-          name: '主要负责人'
-        },
-        {
-          id: 2,
-          name: '安全生产管理人员'
-        },
-        {
-          id: 3,
-          name: '特种作业人员'
-        }
-
-      ],
       trainOrgList: []
     };
   },
   created() {
     this.setDate()
+    this.getSubjectList()
     this.getList()
   },
   methods: {
@@ -123,29 +116,61 @@
       const e = moment(end).format('YYYY-MM-DD')
       this.time = [s,e]
     },
+    changeTree(val) {
+      console.log("label====",this.$refs.classifyRef.getCheckedNodes()[0].value)
+      this.queryParams.subjectCode = this.$refs.classifyRef.getCheckedNodes()[0].value
+      // 我这里只是打印了一下label的值哦,需要赋值的话自己去赋值哦
+      if (this.$refs.classifyRef) {
+        this.$refs.classifyRef.dropDownVisible = false
+      }
+    },
     getList(){
-
-      this.queryParams.startTime = moment(this.time[0]).format('YYYY-MM-DD')
-      this.queryParams.endTime = moment(this.time[1]).format('YYYY-MM-DD')
+      // debugger
+      if(this.time && this.time.length >0){
+        this.queryParams.startTime = moment(this.time[0]).format('YYYY-MM-DD')
+        this.queryParams.endTime = moment(this.time[1]).format('YYYY-MM-DD')
+      }
       console.log('1111',this.queryParams)
       this.loading = true;
-      this.expertList = [
-        {
-          id: 1,
-          name: '链工宝',
-          organization: '测试机构1',
-          pTotal: '--',
-          tTotal: '--',
-          examQualifyNum: '--',
-          passRate: '--'
-        },
-      ]
-      this.total = 2;
+      getCount(this.queryParams).then(res => {
+        if (res.code == 200) {
+          this.expertList = res.data
+          this.loading = false;
+        }
+      })
       this.loading = false;
-
     },
     handleChange(){
 
+    },
+    getSubjectList() {
+      getSubject().then(res => {
+        if (res.code == 200) {
+         console.log('res',res)
+          this.subjectList = this.recursion(res.data)
+        }
+      })
+    },
+   recursion(data){
+      let tmp = []
+      for (let i = 0; i < data.length; i++) {
+        let item = data[i]
+        // children为空
+        if (item.children&& item.children.length==0) {
+          tmp.push({
+            value: item.code,
+            label: item.name
+          })
+          // 有children
+        } else {
+          tmp.push({
+            value: item.code,
+            label: item.name,
+            children: this.recursion(item.children)
+          })
+        }
+      }
+      return tmp;
     },
     handleQuery(){
       this.getList()
@@ -157,8 +182,8 @@
         pageSize: 10,
         startTime: '',
         endTime: '',
-        qualificationType: null,
-        trainOrgId: null
+        subjectCode: null,
+        trainOrgName: ''
       }
       this.time = []
       this.getList()
diff --git a/src/views/onlineEducation/platformManage/index.vue b/src/views/onlineEducation/platformManage/index.vue
index b815984..6a4bf1a 100644
--- a/src/views/onlineEducation/platformManage/index.vue
+++ b/src/views/onlineEducation/platformManage/index.vue
@@ -21,18 +21,18 @@
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template #default="scope">
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            v-if="scope.row.status == 1"-->
-<!--            @click="handleEnable(scope.row)"-->
-<!--          >启用</el-button>-->
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            v-if="scope.row.status == 0"-->
-<!--            @click="handleDisable(scope.row)"-->
-<!--          >监管禁用</el-button>-->
+          <el-button
+            size="mini"
+            type="text"
+            v-if="scope.row.status == 1"
+            @click="handleEnable(scope.row)"
+          >启用</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            v-if="scope.row.status == 0"
+            @click="handleEnable(scope.row)"
+          >监管禁用</el-button>
           <el-button
             size="mini"
             type="text"
@@ -62,7 +62,7 @@
 <script>
 import addDialog from '@/views/onlineEducation/platformManage/components/addDialog.vue'
 import { delExam } from '@/api/coalMine/placeManage/exam'
-import { delPlat, listPlat } from '@/api/onlineEducation/plat'
+import { delPlat, listPlat, modPlatStatus } from '@/api/onlineEducation/plat'
 export default {
   name: "platformManage",
   components: {addDialog},
@@ -125,21 +125,49 @@
       this.$refs.addDialogRef.openDialog(type, data);
     },
     handleEnable(data){
-      this.$confirm('确认启用该平台?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        // delExam( val.siteId).then((res) => {
-        //   if (res.code == 200) {
-        //     this.$message({
-        //       type:'success',
-        //       message: '删除成功'
-        //     })
-        //     this.getList()
-        //   }
-        // })
-      })
+      if(data.status == 1){
+        this.$confirm('确认启用该平台?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          const param={
+            id:data.id,
+            status: 0
+          }
+          modPlatStatus( param).then((res) => {
+            if (res.code == 200) {
+              this.$message({
+                type:'success',
+                message: '操作成功'
+              })
+              this.getList()
+            }
+          })
+        })
+      }else {
+        this.$confirm('确认禁用该平台?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          const param={
+            id:data.id,
+            status: 1
+          }
+          modPlatStatus( param).then((res) => {
+            if (res.code == 200) {
+              this.$message({
+                type:'success',
+                message: '操作成功'
+              })
+              this.getList()
+            }
+          })
+        })
+      }
+
+
     },
     handleDisable(data){
       this.$confirm('确认禁用该平台?', '提示', {
diff --git a/src/views/onlineEducation/realtimeStatus/index.vue b/src/views/onlineEducation/realtimeStatus/index.vue
index b8f1c80..0bb4f9c 100644
--- a/src/views/onlineEducation/realtimeStatus/index.vue
+++ b/src/views/onlineEducation/realtimeStatus/index.vue
@@ -29,47 +29,86 @@
       </div>
     </div>
 <!--    查询数据-->
-    <div style="margin: 30px 20%"  >
-      <div v-if="data">
+    <div style="margin: 30px 10%"  >
+      <div v-if="show">
         <div  style="display: flex;align-items: center;margin-bottom: -15px" >
           <span style="font-size: 18px;font-weight: 550">姓名:</span>
           <span style="font-size: 17px;margin-right: 60px">{{data.name}}</span>
-          <span style="font-size: 18px;font-weight: 550">查询平台:</span>
-          <span style="font-size: 17px">{{data.institutionalName}}</span>
+<!--          <span style="font-size: 18px;font-weight: 550">查询平台:</span>-->
+<!--          <span style="font-size: 17px">{{data.institutionalName}}</span>-->
         </div>
         <el-divider></el-divider>
         <div>
           <div v-for="(batch,index) in data.batchList" :key="index" >
-            <div  style="display: flex;align-items: center;margin-bottom: -15px" >
-              <span style="font-size: 18px">班级(批次):</span>
-              <span style="font-size: 16px;margin-right: 60px">{{batch.batchName}}</span>
-              <span style="font-size: 18px">创建时间:</span>
-              <span style="font-size: 16px">{{batch.createTime}}</span>
-            </div>
-            <div v-for="(course,index) in batch.courseList" :key="index" style="margin-top: 40px;margin-bottom: 50px">
-              <div style="margin-bottom: -15px;display: flex;justify-content: space-between"  >
-                <div style="display: flex;align-items: center;">
-                  <span style="font-size: 18px">课程名称:</span>
-                  <span style="font-size: 16px;margin-right: 60px">{{course.courseName}}</span>
-                  <span style="font-size: 18px">总学时:</span>
-                  <span style="font-size: 16px;margin-right: 60px">{{course.lessonNum}}</span>
-                  <span style="font-size: 18px">当前学时:</span>
-                  <span style="font-size: 16px;margin-right: 60px">{{course.duration}}</span>
-                </div>
-                <el-progress :percentage="course.durationRate" style="width: 250px" ></el-progress>
+<!--            <div  style="display: flex;align-items: center;margin-bottom: -15px" >-->
+            <el-form :model="batch" size="default" ref="busRef" style="display: flex" label-width="95px">
+              <el-form-item label="班级(批次):">
+                <span>{{batch.batchName}}</span>
+              </el-form-item>
+              <el-form-item label="创建时间:">
+                <span>{{batch.createTime}}</span>
+              </el-form-item>
+            </el-form>
+<!--              <span style="font-size: 18px">班级(批次):</span>-->
+<!--              <span style="font-size: 16px;margin-right: 60px">{{batch.batchName}}</span>-->
+<!--              <span style="font-size: 18px">创建时间:</span>-->
+<!--              <span style="font-size: 16px">{{batch.createTime}}</span>-->
+<!--            </div>-->
+            <div v-for="(course,index) in batch.courseList" :key="index" >
+              <div style="display: flex;justify-content: space-between">
+                <el-form :model="course" size="default" ref="busRef" style="display: flex;align-items: center" label-width="95px">
+                  <el-form-item label="课程名称:">
+                    <span>{{course.courseName}}</span>
+                  </el-form-item>
+                  <el-form-item label="总学时:">
+                    <span>{{course.courseLessonNum}}</span>
+                  </el-form-item>
+                  <el-form-item label="当前学时:">
+                    <span>{{course.coCompleteLessonNum}}</span>
+                  </el-form-item>
+                </el-form>
+                <el-progress :percentage="course.durationRate" style="width: 250px;margin-top: 5px" :text-inside="true" :stroke-width="23"></el-progress>
               </div>
-              <div v-for="(chapter,index) in course.chapterList" :key="index" style="margin-top: 50px;margin-left: 40px;">
-                <div style="margin-bottom: -15px;display: flex;justify-content: space-between"  >
-                  <div  style="display: flex;align-items: center" >
-                    <span style="font-size: 16px;margin-right: 60px">{{chapter.chapterName}}</span>
-                    <span style="font-size: 16px">总时长:</span>
-                    <span style="font-size: 16px;margin-right: 60px">{{chapter.lessonTocal}}</span>
-                    <span style="font-size: 16px"> 已学时长:</span>
-                    <span style="font-size: 16px">{{chapter.lessonNum}}</span>
-                  </div>
-                  <span v-if="chapter.lessonTocal == chapter.lessonNum " style="color: #13ce66">[已完成]</span>
+
+<!--              <div style="margin-bottom: -15px;display: flex;justify-content: space-between"  >-->
+<!--                <div style="display: flex;align-items: center;">-->
+<!--                  <span style="font-size: 18px">课程名称:</span>-->
+<!--                  <span style="font-size: 16px;margin-right: 60px">{{course.courseName}}</span>-->
+<!--                  <span style="font-size: 18px">总学时:</span>-->
+<!--                  <span style="font-size: 16px;margin-right: 60px">{{course.courseLessonNum}}</span>-->
+<!--                  <span style="font-size: 18px">当前学时:</span>-->
+<!--                  <span style="font-size: 16px;margin-right: 60px">{{course.coCompleteLessonNum}}</span>-->
+<!--                </div>-->
+<!--                <el-progress :percentage="course.durationRate" style="width: 250px" ></el-progress>-->
+<!--              </div>-->
+              <div v-for="(chapter,index) in course.chapterList" :key="index">
+                <div style="display: flex;justify-content: space-between">
+                  <el-form :model="chapter" size="default" ref="busRef" style="display: flex;align-items: center" label-width="95px">
+                    <el-form-item>
+                      <span>{{chapter.chapterName}}</span>
+                    </el-form-item>
+                    <el-form-item label="总时长:">
+                      <span>{{dayjs.duration(chapter.chapterDuration,'seconds').format('HH:mm:ss')}}</span>
+                    </el-form-item>
+                    <el-form-item label="已学时长:">
+                      <span>{{dayjs.duration(chapter.chCompleteDuration,'seconds').format('HH:mm:ss')}}</span>
+                    </el-form-item>
+                  </el-form>
+                  <span v-if="chapter.chapterStatus == 1 " style="color: #13ce66">[已完成]</span>
                   <span v-else style="color: #1890ff">[学习中]</span>
                 </div>
+
+<!--                <div style="margin-bottom: -15px;display: flex;justify-content: space-between"  >-->
+<!--                  <div  style="display: flex;align-items: center" >-->
+<!--                    <span style="font-size: 16px;margin-right: 60px">{{chapter.chapterName}}</span>-->
+<!--                    <span style="font-size: 16px">总时长:</span>-->
+<!--                    <span style="font-size: 16px;margin-right: 60px">{{chapter.chapterLessonNum}}</span>-->
+<!--                    <span style="font-size: 16px"> 已学时长:</span>-->
+<!--                    <span style="font-size: 16px">{{chapter.lessonNum}}</span>-->
+<!--                  </div>-->
+<!--                  <span v-if="chapter.chapterStatus == 1 " style="color: #13ce66">[已完成]</span>-->
+<!--                  <span v-else style="color: #1890ff">[学习中]</span>-->
+<!--                </div>-->
               </div>
             </div>
             <el-divider></el-divider>
@@ -95,95 +134,121 @@
 import studentList from '@/views/onlineEducation/count/components/studentList.vue'
 import { delJobRegist } from '@/api/coalMine/jobRegist'
 import { listPlat, listPlatSelect } from '@/api/onlineEducation/plat'
-import { listCourse } from '@/api/onlineEducation/course'
+import { listCourse, realTimeQuery } from '@/api/onlineEducation/course'
+import dayjs from 'dayjs'
+import duration from 'dayjs/plugin/duration'
+dayjs.extend(duration);
 export default {
   name: "nPeopleManage",
   dicts: [],
   components: { courseDialog,studentList},
   data() {
     return {
-      total: 2,
+      dayjs:dayjs,
+      total: 0,
       platformList: [],
-      data: {},
+      data: {
+        idcard: '620202199001060217  ',
+        batchList: []
+      },
       queryParams: {
         pageNum: 1,
-        pageSize: 2,
+        pageSize: 10,
         institutionId: '',
         idcard: ''
       },
-      layout: 'total,prev, pager, next, jumper'
+      layout: 'total,prev, pager, next, jumper',
+      show:false
+
     };
   },
   created() {
     this.getPlat();
-    this.getList();
+    // this.getList();
   },
   methods: {
     getList(){
       console.log("111",this.queryParams)
-      this.data =
-        {
-          id: null,
-          idcard: '11111',
-          name: '李四',
-          institutionalName: '链工宝',
-          batchList: [
-            {
-              batchName: 'xxxx',
-              createTime: 'xxxx',
-              courseList: [
-                {
-                  courseName: 'xx',
-                  lessonNum: 100,
-                  duration: 90,
-                  durationRate: 90,
-                  chapterList: [
-                    {
-                      chapterName: '第5章:章节名称',
-                      lessonTocal: 20,
-                      lessonNum: 10
-                    },
-                    {
-                      chapterName: '第1章:章节名称',
-                      lessonTocal: 80,
-                      lessonNum: 80
-                    },
-                  ]
-                },
-                {
-                  courseName: 'xx',
-                  lessonNum: 100,
-                  duration: 90,
-                  durationRate: 90,
-                  chapterList: [
-                    {
-                      chapterName: '第5章:章节名称',
-                      lessonTocal: 20,
-                      lessonNum: 10
-                    },
-                    {
-                      chapterName: '第1章:章节名称',
-                      lessonTocal: 80,
-                      lessonNum: 80
-                    },
-                  ]
-                }
-              ]
-            },
-
-              ]
-            }
-      this.total = 1;
-      // listCourse( this.queryParams).then((res) => {
-      //   if (res.code == 200) {
-      //     this.expertList = res.rows.map(item => {
-      //       return {
-      //         ...item,
-      //         courseNum: item.outline ? item.outline.length : ''
+      // this.data =
+      //   {
+      //     id: null,
+      //     idcard: '11111',
+      //     name: '李四',
+      //     institutionalName: '链工宝',
+      //     batchList: [
+      //       {
+      //         batchName: 'xxxx',
+      //         createTime: 'xxxx',
+      //         courseList: [
+      //           {
+      //             courseName: 'xx',
+      //             lessonNum: 100,
+      //             duration: 90,
+      //             durationRate: 90,
+      //             chapterList: [
+      //               {
+      //                 chapterName: '第5章:章节名称',
+      //                 lessonTocal: 20,
+      //                 lessonNum: 10
+      //               },
+      //               {
+      //                 chapterName: '第1章:章节名称',
+      //                 lessonTocal: 80,
+      //                 lessonNum: 80
+      //               },
+      //             ]
+      //           },
+      //           {
+      //             courseName: 'xx',
+      //             lessonNum: 100,
+      //             duration: 90,
+      //             durationRate: 90,
+      //             chapterList: [
+      //               {
+      //                 chapterName: '第5章:章节名称',
+      //                 lessonTocal: 20,
+      //                 lessonNum: 10
+      //               },
+      //               {
+      //                 chapterName: '第1章:章节名称',
+      //                 lessonTocal: 80,
+      //                 lessonNum: 80
+      //               },
+      //             ]
+      //           }
+      //         ]
+      //       },
+      //
+      //         ]
       //       }
-      //     })
-      //   }
-      // })
+      // this.total = 1;
+      realTimeQuery( this.queryParams).then((res) => {
+        if (res.code == 200) {
+          this.data = res.data
+          if(res.data ){
+            const batchList = res.data.batchList?.map(item => {
+              return {
+                ...item,
+                courseList:item.courseList.map(c => {
+                  return {
+                    ...c,
+                    durationRate: Math.round( c.coCompleteLessonNum/c.courseLessonNum *10000 ) /100
+
+                  }
+                })
+              }
+            })
+            this.data.batchList = batchList
+            this.show = true
+          }else {
+            this.show = false
+          }
+
+
+          // this.total = res.total
+        }
+        console.log('res',this.data)
+      })
     },
     getPlat() {
       listPlatSelect().then((res) => {
@@ -211,3 +276,8 @@
   }
 };
 </script>
+<style lang="scss" scoped>
+::v-deep .el-form-item__content{
+  font-size: 16px;
+}
+</style>
diff --git a/src/views/onlineEducation/studentSupervision/index.vue b/src/views/onlineEducation/studentSupervision/index.vue
index 3787e21..a8b88a2 100644
--- a/src/views/onlineEducation/studentSupervision/index.vue
+++ b/src/views/onlineEducation/studentSupervision/index.vue
@@ -18,7 +18,7 @@
     </div>
     <el-table v-loading="loading" :data="expertList">
       <el-table-column label="姓名" align="center" prop="name" />
-      <el-table-column label="身份证号" align="center" prop="idcard" :show-overflow-tooltip="true" />
+      <el-table-column label="身份证号" align="center" prop="idcard" :show-overflow-tooltip="true" width="170" />
       <el-table-column label="性别" align="center" prop="sex" >
         <template #default="scope">
           <span>{{scope.row.sex == 1 ? '男' : scope.row.sex == 2?'女':'未知'}}</span>

--
Gitblit v1.9.2