From 75271baf2b4dba13087674f020afbc7b08a83482 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期三, 31 七月 2024 16:26:20 +0800
Subject: [PATCH] 修改

---
 src/views/onlineEducation/courseSupervision/index.vue |  145 +++++++++++++++++++++---------------------------
 1 files changed, 63 insertions(+), 82 deletions(-)

diff --git a/src/views/onlineEducation/courseSupervision/index.vue b/src/views/onlineEducation/courseSupervision/index.vue
index dcda9a4..36e2f2f 100644
--- a/src/views/onlineEducation/courseSupervision/index.vue
+++ b/src/views/onlineEducation/courseSupervision/index.vue
@@ -2,12 +2,12 @@
   <div class="app-container">
     <span style="font-size: 20px;font-weight: 550">课程汲取与课程监管</span>
     <div style="margin-left: -35px;margin-top: 15px">
-      <el-select v-model="queryParams.platform"  size="small" style="margin-left: 40px;" placeholder="请选择平台">
+      <el-select v-model="queryParams.institutionId"  size="small" style="margin-left: 40px;" placeholder="请选择平台">
         <el-option
           v-for="item in platformList"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
+          :key="item.id"
+          :label="item.institutionalName"
+          :value="item.id">
         </el-option>
       </el-select>
       <el-button
@@ -24,8 +24,8 @@
       >重置</el-button>
     </div>
     <el-table v-loading="loading" :data="expertList" style="margin-top: 10px">
-      <el-table-column label="课程标识UUID" align="center" prop="courseCode" />
-      <el-table-column label="来源企业" align="center" prop="unit" />
+      <el-table-column label="课程标识" align="center" prop="courseCode" />
+      <el-table-column label="上报平台" align="center" prop="institutionName" />
       <el-table-column label="课程名称" align="center" prop="courseName" />
       <el-table-column label="课程章节数" align="center" prop="courseNum" >
         <template #default="scope">
@@ -33,36 +33,41 @@
         </template>
       </el-table-column>
       <el-table-column label="总课时" align="center" prop="lessonNum" />
-      <el-table-column label="查看已学学员" align="center" prop="student" >
+      <el-table-column label="查看已学学员" align="center" prop="studentCount" >
         <template #default="scope">
-          <span style="color: #1890ff;cursor: pointer" @click="openStudent(scope.row)">{{scope.row.student}}</span>
+          <span style="color: #1890ff;cursor: pointer" @click="openStudent(scope.row)">{{scope.row.studentCount}}</span>
         </template>
       </el-table-column>
-      <el-table-column label="审核状态" align="center" prop="state" />
-      <el-table-column label="删除标识" align="center" prop="delFlag" />
-      <el-table-column label="创建时间" align="center" prop="createTime" />
-      <el-table-column label="最近修改时间" align="center" prop="updateTime" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+<!--      <el-table-column label="审核状态" align="center" prop="state" />-->
+      <el-table-column label="删除标识" align="center" prop="delFlag" >
         <template #default="scope">
-          <el-button
-            size="mini"
-            type="text"
-            style="color: #1890ff"
-          >预览课程</el-button>
-          <el-button
-            v-if="scope.row.state == '未审核'"
-            size="mini"
-            type="text"
-            style="color: #1890ff"
-            @click="check(scope.row)"
-          >审核</el-button>
+          <span>{{scope.row.delFlag == 0 ? '未删除' : '已删除'}}</span>
         </template>
       </el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="100"/>
+      <el-table-column label="最近修改时间" align="center" prop="updateTime" width="100" />
+<!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
+<!--        <template #default="scope">-->
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            style="color: #1890ff"-->
+<!--            @click="openUrl(scope.row)"-->
+<!--          >预览课程</el-button>-->
+<!--&lt;!&ndash;          <el-button&ndash;&gt;-->
+<!--&lt;!&ndash;            v-if="scope.row.state == '未审核'"&ndash;&gt;-->
+<!--&lt;!&ndash;            size="mini"&ndash;&gt;-->
+<!--&lt;!&ndash;            type="text"&ndash;&gt;-->
+<!--&lt;!&ndash;            style="color: #1890ff"&ndash;&gt;-->
+<!--&lt;!&ndash;            @click="check(scope.row)"&ndash;&gt;-->
+<!--&lt;!&ndash;          >审核</el-button>&ndash;&gt;-->
+<!--        </template>-->
+<!--      </el-table-column>-->
     </el-table>
     <pagination
       v-show="total>0"
       :total="total"
-      :page.sync="queryParams.pageIndex"
+      :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
@@ -75,6 +80,8 @@
 import courseDialog from '@/views/onlineEducation/courseSupervision/components/courseDialog.vue'
 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'
 export default {
   name: "nPeopleManage",
   dicts: [],
@@ -87,70 +94,44 @@
       showSearch: true,
       addForm: false,
       total: 0,
-      platformList: [
-        {
-          value: '1',
-          label: '平台1'
-        },
-        {
-          value: '2',
-          label: '平台2'
-        },
-      ],
+      platformList: [],
       expertList: [],
       queryParams: {
-        pageIndex: 1,
+        pageNum: 1,
         pageSize: 10,
-        platform: ''
+        institutionId: ''
       },
     };
   },
   created() {
+    this.getPlat();
     this.getList();
   },
   methods: {
     getList(){
       this.loading = true;
-      this.expertList = [
-        {
-          courseCode: '2024060600001',
-          unit: '测试数据1',
-          courseName:'测试课程1',
-          courseNum: 12,
-          lessonNum: 300,
-          student: 600,
-          state:'未审核',
-          delFlag:'未删除',
-          createTime: '2024-6-11 10:32:00',
-          updateTime: '2024-6-11 10:32:00'
-        },
-        {
-          courseCode: '2024060600002',
-          unit: '测试数据2',
-          courseName:'测试课程1',
-          courseNum: 12,
-          lessonNum: 300,
-          student: 120,
-          state:'已审核',
-          delFlag:'未删除',
-          createTime: '2024-6-11 10:32:00',
-          updateTime: '2024-6-11 10:32:00'
-        },
-        {
-          courseCode: '2024060600003',
-          unit: '测试数据3',
-          courseName:'测试课程1',
-          courseNum: 12,
-          lessonNum: 100,
-          student: 600,
-          state:'审核不符合',
-          delFlag:'已删除',
-          createTime: '2024-6-11 10:32:00',
-          updateTime: '2024-6-11 10:32:00'
-        },
-      ]
-      this.total = 2
-      this.loading = false;
+      listCourse( this.queryParams).then((res) => {
+        if (res.code == 200) {
+          this.expertList = res.rows.map(item => {
+            return {
+              ...item,
+              courseNum: item.outline ? item.outline.length : ''
+            }
+          })
+          this.total = res.total
+          this.loading = false;
+        }
+      })
+    },
+    openUrl(url) {
+      window.open(url,'_blank')
+    },
+    getPlat() {
+      listPlatSelect().then((res) => {
+        if (res.code == 200) {
+          this.platformList = res.data
+        }
+      })
 
     },
     handleChange(){
@@ -162,17 +143,17 @@
     },
     resetQuery(){
       this.queryParams = {
-        pageIndex: 1,
+        pageNum: 1,
         pageSize: 10,
-        platform: ''
+        institutionId: ''
       }
       this.getList();
     },
     handleViewCourse(data){
-      this.$refs.courseDialogRef.openDialog(data);
+      this.$refs.courseDialogRef.openDialog(data,'course');
     },
     openStudent(data) {
-      this.$refs.studentDialog.openDialog(data);
+      this.$refs.studentDialog.openDialog(data,'course');
     },
     check(val){
       this.$confirm('此操作将审核该条数据, 是否继续?', '提示', {

--
Gitblit v1.9.2