Ver código fonte

Merge branch 'dev' of http://120.79.166.78:19005/zhongzheng-edu/saas_entrepot_admin into dev

# Conflicts:
#	src/views/education/classManageMent/classList/trainee/index.vue
#	src/views/resource/videoManagement/courseManagement/chapterContent/index.vue
xiexaing 1 ano atrás
pai
commit
c0222d5eb2
56 arquivos alterados com 1472 adições e 1087 exclusões
  1. 1 1
      .env.production
  2. 1 0
      public/index.html
  3. 2 0
      src/api/api.js
  4. BIN
      src/assets/images/ts.png
  5. BIN
      src/assets/images/zy.png
  6. 1 1
      src/components/tableList.vue
  7. 58 10
      src/components/videoPreview/index.vue
  8. 46 0
      src/newApi/classTab.js
  9. 9 0
      src/newApi/order.js
  10. 41 0
      src/newApi/tc.js
  11. 4 0
      src/permission.js
  12. 7 7
      src/store/modules/user.js
  13. 6 2
      src/utils/request.js
  14. 10 0
      src/views/Marketing/goods/commodityManageMent/add/courseContent/courseCheck.vue
  15. 12 2
      src/views/Marketing/goods/commodityManageMent/add/courseContent/index.vue
  16. 13 3
      src/views/Marketing/goods/commodityManageMent/add/courseContent/moreListCheck.vue
  17. 29 16
      src/views/Marketing/goods/commodityManageMent/add/index.vue
  18. 23 28
      src/views/Marketing/goods/commodityManageMent/add/makeUpExam/index.vue
  19. 32 33
      src/views/Marketing/goods/commodityManageMent/add/makeUpExam/makeCheck.vue
  20. 7 3
      src/views/Marketing/goods/commodityManageMent/add/productInformation.vue
  21. 10 0
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/courseCheck.vue
  22. 10 0
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/index.vue
  23. 11 0
      src/views/Marketing/goods/commodityManageMent/edit/courseContent/moreListCheck.vue
  24. 26 20
      src/views/Marketing/goods/commodityManageMent/edit/index.vue
  25. 22 30
      src/views/Marketing/goods/commodityManageMent/edit/makeUpExam/index.vue
  26. 32 31
      src/views/Marketing/goods/commodityManageMent/edit/makeUpExam/makeCheck.vue
  27. 7 3
      src/views/Marketing/goods/commodityManageMent/edit/productInformation.vue
  28. 48 2
      src/views/Marketing/goods/courseInquiryList/index.vue
  29. 24 6
      src/views/Marketing/order/offlineOrder/index.vue
  30. 7 4
      src/views/classHoursReview/component/LessonTable.vue
  31. 16 7
      src/views/classHoursReview/studyTimes.vue
  32. 48 5
      src/views/education/classManageMent/classList/classList/addClass.vue
  33. 0 554
      src/views/education/classManageMent/classList/index copy.vue
  34. 1 1
      src/views/education/classManageMent/classList/index.vue
  35. 48 7
      src/views/education/classManageMent/classList/manageClass/baseInfo.vue
  36. 34 8
      src/views/education/classManageMent/classList/trainee/index.vue
  37. 2 2
      src/views/education/classManageMent/classListOld/index.vue
  38. 7 48
      src/views/education/classManageMent/listOfhoursToBeReviewed/index.vue
  39. 2 0
      src/views/education/notificationManageMent/notificationList/add/index.vue
  40. 60 38
      src/views/resource/videoManagement/chapter/add/index.vue
  41. 47 11
      src/views/resource/videoManagement/chapter/addSection.vue
  42. 59 38
      src/views/resource/videoManagement/chapter/edit/index.vue
  43. 13 7
      src/views/resource/videoManagement/courseManagement/basicInfoAdd/index.vue
  44. 9 0
      src/views/resource/videoManagement/courseManagement/basicInfoEdit/index.vue
  45. 42 24
      src/views/resource/videoManagement/courseManagement/chapterContent/index.vue
  46. 124 37
      src/views/resource/videoManagement/festival/add/index.vue
  47. 136 58
      src/views/resource/videoManagement/festival/edit/index.vue
  48. 39 0
      src/views/resource/videoManagement/moduleManagement/add/index.vue
  49. 49 27
      src/views/resource/videoManagement/moduleManagement/addChapter.vue
  50. 38 0
      src/views/resource/videoManagement/moduleManagement/edit/index.vue
  51. 6 4
      src/views/secondBuild/completionList/index.vue
  52. 48 2
      src/views/secondBuild/courseList/index.vue
  53. 1 1
      src/views/secondBuild/learningList/index.vue
  54. 48 2
      src/views/secondJian/courseList/index.vue
  55. 48 2
      src/views/secondSeven/courseList/index.vue
  56. 48 2
      src/views/secondZao/courseList/index.vue

+ 1 - 1
.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 中正云教育管理后台
+VUE_APP_TITLE = 加载中...
 
 # 生产环境配置
 NODE_ENV = 'production'

+ 1 - 0
public/index.html

@@ -14,6 +14,7 @@
   <!-- <script src="https://manage.xyyxt.net/static/js/gsap.min.js"></script> -->
   <!-- 使用CDN的CSS文件 -->
   <link rel="stylesheet" href="https://file.xyyxt.net/web/static/js/index.min.css">
+  <link href="https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.min.css" rel="stylesheet" />
   <style>
     html,
     body,

+ 2 - 0
src/api/api.js

@@ -82,6 +82,7 @@ import examapply from '../newApi/examapply'//考试安排
 import qianpeiApi from '../newApi/qianpeiApi'//前培
 import applicationData from '../newApi/applicationData'//报考数据
 import polyv from '../newApi/polyv'//保利威
+import tc from '../newApi/tc'//腾讯
 import profiles from '../newApi/profiles'//填写资料审核管理
 import profileStamp from '../newApi/profileStamp'//盖章资料审核管理
 import recordList from '../newApi/recordList'//试卷做题记录
@@ -176,6 +177,7 @@ export default {
     ...qianpeiApi,
     ...applicationData,
     ...polyv,
+    ...tc,
     ...profiles,
     ...profileStamp,
     ...recordList,

BIN
src/assets/images/ts.png


BIN
src/assets/images/zy.png


+ 1 - 1
src/components/tableList.vue

@@ -2871,4 +2871,4 @@ export default {
   max-height: 500px;
   overflow-y: auto;
 }
-</style>
+</style>

+ 58 - 10
src/components/videoPreview/index.vue

@@ -11,7 +11,7 @@
       <div slot="title" class="hearders">
         <div class="leftTitle">视频预览</div>
         <div class="rightBoxs">
-          <img src="@/assets/images/Close@2x.png" alt="" @click="clears" />
+          <img src="@/assets/images/Close@2x.png" alt @click="clears" />
         </div>
       </div>
       <div>
@@ -34,16 +34,18 @@ export default {
       vidzb: "",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
+      vodPlayerJsForTCPlayer:
+        "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
       uidzb: "egsxlptzdq",
       fileSetting: {
         desc: "i am desc", // 描述
         cataid: "1639399775001", // 分类ID 可以后端传递 也可以不写 或写死
         tag: "i am tag", // 标签
         luping: 0, // 是否开启视频课件优化处理,对于上传录屏类视频清晰度有所优化:0为不开启,1为开启
-        keepsource: 1, // 是否源文件播放(不对视频进行编码):0为编码,1为不编码
+        keepsource: 1 // 是否源文件播放(不对视频进行编码):0为编码,1为不编码
       },
       diavos: false,
-      listData: {}, //数据
+      listData: {} //数据
     };
   },
   methods: {
@@ -59,7 +61,11 @@ export default {
     },
     isOkBf() {
       if (this.listData.sectionType === 1) {
-        this.loadPlayerScript(this.loadPlayer);
+        if(this.listData.viewSign == 2) {
+          this.loadPlayerScript_tencent(this.loadPlayer_tencent);
+        }else {
+          this.loadPlayerScript(this.loadPlayer);
+        }
       }
       if (this.listData.sectionType === 2) {
         this.loadPlayerScriptzb(this.loadPlayerzb);
@@ -79,6 +85,20 @@ export default {
         });
       }
     },
+    loadPlayerScript_tencent(callback) {
+      if (!window.TCPlayer) {
+        const myScript = document.createElement("script");
+        myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
+        myScript.onload = callback;
+        document.body.appendChild(myScript);
+      } else {
+        callback();
+        this.player_tencent.on("server", (...params) => {
+          this.$message.error(returnTitle(params[1]));
+          console.log(params);
+        });
+      }
+    },
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -88,11 +108,36 @@ export default {
         height: 533,
         vid: self.vid,
         teaser_show: 0,
-        playsafe: function (vid, next) {
-          self.$api.obtainpolyvvideosign(vid).then((res) => {
+        playsafe: function(vid, next) {
+          self.$api.obtainpolyvvideosign(vid).then(res => {
             next(res.data);
           });
-        },
+        }
+      });
+    },
+    loadPlayer_tencent() {
+      var self = this;
+      const TCPlayer = window.TCPlayer;
+      try {
+        let video = document.querySelector("video");
+        video.parentNode.removeChild(video);
+      } catch (error) {
+        console.log("清除video标签异常");
+      }
+      let player_tencent = document.createElement("video");
+      player_tencent.id = "player-tencent";
+      document
+        .getElementById("player")
+        .insertAdjacentElement("afterend", player_tencent);
+      self.$api.obtaintcvideosign(self.vid).then(res => {
+        self.player_tencent = TCPlayer("player-tencent", {
+          width: 800,
+          height: 533,
+          fileID: self.vid,
+          appID: res.data.appID,
+          psign: res.data.psign,
+          licenseUrl: res.data.licenseUrl
+        });
       });
     },
     /**
@@ -103,6 +148,9 @@ export default {
       if (this.listData.sectionType === 1 && this.player) {
         this.player.destroy();
       }
+      if (this.listData.sectionType === 1 && this.player_tencent) {
+        this.player_tencent.dispose();
+      }
       if (this.listData.sectionType === 2 && this.playerzb) {
         this.playerzb.destroy();
       }
@@ -127,10 +175,10 @@ export default {
         width: 800,
         height: 533,
         uid: self.uidzb,
-        vid: self.vidzb,
+        vid: self.vidzb
       });
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 46 - 0
src/newApi/classTab.js

@@ -125,6 +125,41 @@ export default {
             params: data
         })
     },
+    //查询学员学时列表-new
+    listUserPeriodManage(data) {
+        return request({
+            url: '/grade/grade/listUserPeriod/manage',
+            method: 'get',
+            params: data
+        })
+    },
+    //班级学员统计
+    gradegradecountperiodPlush(data) {
+        return request({
+            url: '/grade/grade/count/periodPlush',
+            method: 'get',
+            params: data
+        })
+    },
+    //查询学员学时列表审核状态
+    listUserPeriodTotal(data) {
+        return request({
+            url: '/grade/grade/listUserPeriod/total',
+            method: 'get',
+            params: data
+        })
+    },
+    //查询学员学时列表New
+    inquireGradegradelistUserPeriodsNew(data) {
+        return request({
+            url: '/grade/grade/listUserPeriod/new',
+            method: 'get',
+            headers: {
+                isToken: false
+            },
+            params: data
+        })
+    },
     //获取班级详细信息
     obtainGradegrade(data) {
         return request({
@@ -352,6 +387,17 @@ export default {
             params: data
         })
     },
+    //查询学员视频学习记录列表New
+    inquireGradegradelistUserVideoRecordNew(data) {
+        return request({
+            url: '/grade/grade/listUserVideoRecord/new',
+            method: 'get',
+            headers: {
+                isToken: false
+            },
+            params: data
+        })
+    },
     //按周查询学员学时学习记录列表
     inquireGradegradelistUserPeriodWeekRecord(data) {
         return request({

+ 9 - 0
src/newApi/order.js

@@ -130,6 +130,15 @@ export default {
             isProce:true
         })
     },
+    //后台订单导出
+    orderinputexportInputOrder(data) {
+        return request({
+            url: '/order/input/exportInputOrder',
+            method: 'post',
+            data,
+            isProce:true
+        })
+    },
 
     
     //寄件订单批量处理

+ 41 - 0
src/newApi/tc.js

@@ -0,0 +1,41 @@
+import request from '@/utils/request' //引入axios请求及拦截器
+export default {
+    //获取保利威视频上传签名
+    inquirepolyvvideogetPolyvUpload(data) {
+        return request({
+            url: '/polyv/video/getPolyvUpload',
+            method: 'get',
+            params: data
+        })
+    },
+    //同步保利威视频
+    uploadPolyvvideocata(data) {
+        return request({
+            url: '/polyv/video/importList',
+            method: 'post',
+            data
+        })
+    },
+    //查询保利威视频分类
+    obtainpolyvvideosignlistCata(data) {
+        return request({
+            url: '/polyv/video/listCata',
+            method: 'get',
+            params: data
+        })
+    },
+    //获取腾讯视频播放凭证
+    obtaintcvideosign(data) {
+        return request({
+            url: `/vod/video/sign/` + data,
+            method: 'get',
+        })
+    },
+    //获取腾讯视频信息详细信息
+    inquirevodvideodetail(data) {
+        return request({
+            url: `/vod/video/detail/` + data,
+            method: 'get',
+        })
+    },
+}

+ 4 - 0
src/permission.js

@@ -60,6 +60,10 @@ router.beforeEach(async (to, from, next) => {
             token: res.data.token,
             keyId: `${res.data.userId}-${res.data.goodsId}-${res.data.gradeId}-${res.data.orderGoodsId}`,
           };
+          if (res.data.tenantName) {
+            store.state.user.companyName = res.data.tenantName
+            document.title = res.data.tenantName
+          }
           sessionStorage.TenantId = res.data.tenantId
           setToken(data.token)
           store.commit('SET_TOKEN', data.token)

+ 7 - 7
src/store/modules/user.js

@@ -59,16 +59,16 @@ const user = {
           //   }
           // })
         }).catch(() => {
-          clearInterval(this.state.downLoadlistInterval)
+          // clearInterval(this.state.downLoadlistInterval)
         })
       }
-      if (queryData) {
-        clearInterval(this.state.downLoadlistInterval)
-      }
+      // if (queryData) {
+      //   clearInterval(this.state.downLoadlistInterval)
+      // }
       func()
-      this.state.downLoadlistInterval = setInterval(() => {
-        func()
-      }, 30000);
+      // this.state.downLoadlistInterval = setInterval(() => {
+      //   func()
+      // }, 30000);
     },
     oldLogin({ commit }, queryData) {
       return new Promise(resolve => {

+ 6 - 2
src/utils/request.js

@@ -9,7 +9,7 @@ import { paramMate } from "@/utils/common";
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
 export const baseURL = process.env.VUE_APP_BASE_API
-// export const baseURL = 'http://192.168.1.7:5030/'
+// export const baseURL = 'https://cloud.xyyxt.net/'
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 // export const BASE_IMG_URL = 'https://file.xyyxt.net'
 const service = axios.create({
@@ -25,7 +25,11 @@ service.interceptors.request.use(config => {
   if (getToken() && !isToken) {
     config.headers['AuthorizationToken'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
   }
-  config.headers.TenantId = sessionStorage.TenantId || methods.getQueryVariable('TenantId')
+  if(config.params && config.params.tenantIdReplace){
+    config.headers.TenantId = config.params.tenantIdReplace
+  }else{
+    config.headers.TenantId = sessionStorage.TenantId || methods.getQueryVariable('TenantId')
+  }
 
   // 转换时间戳
   if (config.isProce) {

+ 10 - 0
src/views/Marketing/goods/commodityManageMent/add/courseContent/courseCheck.vue

@@ -71,6 +71,15 @@
                     : "未知"
                 }}
               </span>
+              <span v-else-if="item.scope === 'viewSign'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "保利威"
+                    : scope.row[item.prop] === 2
+                    ? "腾讯"
+                    : ""
+                }}
+              </span>
               <span v-else>{{ scope.row[item.prop] }}</span></template
             >
           </el-table-column></template
@@ -108,6 +117,7 @@ export default {
       tableSet: [
         { label: "课程编码", prop: "code", width: "140px" },
         { label: "名称前缀", prop: "prefixName", width: "160px" },
+        { label: "视频类型", prop: "viewSign", scope: "viewSign" },
         { label: "课程标题", prop: "courseName" },
         {
           label: "发布状态",

+ 12 - 2
src/views/Marketing/goods/commodityManageMent/add/courseContent/index.vue

@@ -80,6 +80,15 @@
               : "未知"
           }}</span>
 
+          <span v-else-if="item.scope === 'viewSign'">
+            {{
+              scope.row[item.prop] === 1
+                ? "保利威"
+                : scope.row[item.prop] === 2
+                ? "腾讯"
+                : ""
+            }}
+          </span>
           <span v-else-if="item.scope === 'busin'">
             {{ scope.row[item.prop1] + " - " + scope.row[item.prop2] }}
           </span>
@@ -150,6 +159,7 @@ export default {
       tableSetVideo: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
         { label: "编码", prop: "code", width: "140" },
+        { label: "视频类型", prop: "viewSign", scope: "viewSign" },
         { label: "课程名称", prop: "courseName", width: "300", type: 1 },
         { label: "类型", prop: "type", width: "190", type: 2, scope: "type" },
         { label: "名称", prop: "menuName", width: "300", type: 2 },
@@ -363,13 +373,13 @@ export default {
     /**
      * 点击选择关联题库
      */
-     openBankSet(){
+    openBankSet() {
       if (!this.listData.businessId) {
         this.$message.warning("请选择业务层次");
         return;
       }
       this.$refs.bankView.openBox(this.listData.questionRelIds || []);
-     },
+    },
     /**
      * 题库回调数据
      */

+ 13 - 3
src/views/Marketing/goods/commodityManageMent/add/courseContent/moreListCheck.vue

@@ -83,6 +83,15 @@
                     : "未知"
                 }}
               </span>
+              <span v-else-if="item.scope === 'viewSign'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "保利威"
+                    : scope.row[item.prop] === 2
+                    ? "腾讯"
+                    : ""
+                }}
+              </span>
               <span v-else>{{ scope.row[item.prop] }}</span></template
             >
           </el-table-column></template
@@ -120,6 +129,7 @@ export default {
       tableSet: [
         { label: "编码", prop: "code", width: "140px" },
         { label: "名称前缀", prop: "prefixName", width: "160px" },
+        { label: "视频类型", prop: "viewSign", scope: "viewSign" },
         { label: "模块标题", prop: "moduleName", type: 1 },
         { label: "章标题", prop: "name", type: 2 },
         { label: "节标题", prop: "name", type: 3 },
@@ -292,8 +302,9 @@ export default {
             menuId: splitStr[1],
             menuName: item.name,
             code: item.code,
-            courseId:0,
+            courseId: 0,
             publishStatus: item.publishStatus,
+            viewSign:item.viewSign,
             durationTime: item.durationTime,
             sectionType: splitStr[0] === 3 ? item.sectionType : "",
             auditionMinute:
@@ -332,5 +343,4 @@ export default {
 };
 </script>
 
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

+ 29 - 16
src/views/Marketing/goods/commodityManageMent/add/index.vue

@@ -46,7 +46,7 @@
                 : ""
             }}
           </h5>
-          <make-up-exam ref="makeUpExam" :listData="listData" />
+          <make-up-exam ref="makeUpExam" :listData.sync="listData" />
         </div>
         <div v-if="listData.goodsType === 8 && listData.businessId">
           <h5 class="segmentationStyle">关联讲义资料</h5>
@@ -212,12 +212,12 @@ export default {
         coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
         goodsType: "",
         status: 1,
-        moreCertificateStatus:1,
+        moreCertificateStatus: 1,
         certificateTypeId: "",
         showStatus: 1,
         externalLinkStatus: 0,
-        mailSign:0,
-        firstChoiceStatus:0,
+        mailSign: 0,
+        firstChoiceStatus: 0,
         commitPeriodStatus: 0,
         sevenYear: "",
       },
@@ -252,6 +252,14 @@ export default {
             trigger: "change",
           },
         ],
+        viewSign: [
+          {
+            type: "number",
+            required: true,
+            message: "请选择视频类型",
+            trigger: "change",
+          },
+        ],
         gradeType: [
           {
             type: "number",
@@ -407,13 +415,6 @@ export default {
             trigger: "change",
           },
         ],
-        makeGoodsId: [
-          {
-            required: true,
-            message: "请选择关联商品",
-            trigger: "blur",
-          },
-        ],
         // handoutsId: [
         //   {
         //     required: true,
@@ -545,9 +546,6 @@ export default {
         this.$refs["listData"].clearValidate();
       });
     });
-    this.$bus.$on("validateMakeId", () => {
-      this.$refs["listData"].validateField("makeGoodsId");
-    });
     this.$bus.$on("validateHandoutsId", () => {
       this.$refs["listData"].validateField("handoutsId");
     });
@@ -730,10 +728,18 @@ export default {
       //商品是否上架
       data.goodsStatus = int;
       data.subjectIds = data.subjectIds.toString();
+      if (
+        (data.goodsType == 3 || data.goodsType == 4) &&
+        data.makeGoodsVoList?.length > 0
+      ) {
+        data.makeGoodsIds = data.makeGoodsVoList
+          .map((i) => i.makeGoodsId)
+          .toString() || "";
+      }
       if (data.goodsType == 9) {
         data.examLimitClient = data.examLimitClient.toString();
       }
-        data.questionRelIds = data.questionRelIds.toString() || "";
+      data.questionRelIds = data.questionRelIds.toString() || "";
       data.projectId = await this.getProjectId(data.businessId);
       //--------------------------通用处理END------------------------------
       if (this.listData.goodsType === 1 || this.listData.goodsType === 6) {
@@ -863,6 +869,14 @@ export default {
         }
         //课程排序问题检查
         for (let i = 0; i < this.$refs.courseContent.tableData.length; i++) {
+          if (
+            this.$refs.courseContent.tableData[i].viewSign !=
+            this.listData.viewSign
+          ) {
+            this.$message.warning(`课程列表数据请与商品视频类型保持一致`);
+            this.disabledBtn = false;
+            return;
+          }
           if (
             !this.$refs.courseContent.tableData[i].sort &&
             this.$refs.courseContent.tableData[i].sort !== 0
@@ -989,7 +1003,6 @@ export default {
    */
   beforeDestroy() {
     this.$bus.$off("clearValidateFuncAdd");
-    this.$bus.$off("validateMakeId");
     this.$bus.$off("validateHandoutsId");
     this.$bus.$off("validateCoverUrl");
     this.$bus.$off("initTimeVal");

+ 23 - 28
src/views/Marketing/goods/commodityManageMent/add/makeUpExam/index.vue

@@ -2,17 +2,18 @@
   <div id="makeUpExam">
     <el-form-item label="关联商品" prop="makeGoodsId">
       <div>
-        <el-button @click="goToActiveGoods">选择商品</el-button>
-        <span v-if="listData.makeGoodsId" style="margin-left: 12px"
-          >{{ listData.makeGoodsCode }} - {{ listData.makeGoodsName }}</span
-        >
-        <el-button
-          style="margin-left: 12px"
-          v-if="listData.makeGoodsId"
-          type="text"
-          @click="clearGoods"
-          >删除</el-button
-        >
+        <el-button @click="goToActiveGoods">选择商品</el-button><el-button type="danger" @click="clearAllGoods" v-if="listData.makeGoodsVoList && listData.makeGoodsVoList.length > 0">全部清空</el-button>
+        <ul>
+          <li v-for="(item, index) in listData.makeGoodsVoList" :key="index">
+            <span>{{ item.makeGoodsCode }} - {{ item.makeGoodsName }}</span>
+            <el-button
+              style="margin-left: 12px"
+              type="text"
+              @click="clearGoods(index)"
+              >删除</el-button
+            >
+          </li>
+        </ul>
       </div>
     </el-form-item>
     <make-check ref="makeCheck" @backData="backMakeData" />
@@ -43,27 +44,21 @@ export default {
             : "",
       };
       //打开选择补考/前培组件
-      this.$refs.makeCheck.openBox(data, {
-        makeGoodsId: this.listData.makeGoodsId,
-        makeGoodsName: this.listData.makeGoodsName,
-        makeGoodsCode: this.listData.makeGoodsCode,
-      });
+      let ary = this.listData.makeGoodsVoList.map((i) => i.makeGoodsId) || [];
+      this.$refs.makeCheck.openBox(data, ary);
     },
-    backMakeData(activeObj) {
-      this.$set(this.listData, "makeGoodsId", activeObj.makeGoodsId);
-      this.$set(this.listData, "makeGoodsName", activeObj.makeGoodsName);
-      this.$set(this.listData, "makeGoodsCode", activeObj.makeGoodsCode);
-      this.$bus.$emit("validateMakeId");
+    backMakeData(activeArray) {
+      let ary = this.listData.makeGoodsVoList.concat(activeArray)
+      this.$set(this.listData,'makeGoodsVoList',ary)
     },
-    clearGoods() {
-      this.$set(this.listData, "makeGoodsId", "");
-      this.$set(this.listData, "makeGoodsName", "");
-      this.$set(this.listData, "makeGoodsCode", "");
-      this.$bus.$emit("validateMakeId");
+    clearAllGoods() {
+      this.$set(this.listData,'makeGoodsVoList',[])
+    },
+    clearGoods(index) {
+      this.listData.makeGoodsVoList.splice(index,1)
     },
   },
 };
 </script>
 
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

+ 32 - 33
src/views/Marketing/goods/commodityManageMent/add/makeUpExam/makeCheck.vue

@@ -32,6 +32,7 @@
       <el-table
         ref="multipleTable"
         :data="tableData"
+        row-key="goodsId"
         border
         :header-cell-style="{
           'background-color': '#eee',
@@ -39,16 +40,12 @@
           color: '#333',
         }"
       >
-        <el-table-column label="" width="45" align="center">
-          <template scope="scope">
-            <el-radio
-              :disabled="scope.row.selectStatus === 0"
-              :label="scope.row.goodsId"
-              v-model="activeObj.makeGoodsId"
-              @change.native="getGoodsId(scope.row)"
-              >{{ "" }}</el-radio
-            >
-          </template>
+        <el-table-column
+          type="selection"
+          width="55"
+          :reserve-selection="true"
+          :selectable="selectableFunc"
+        >
         </el-table-column>
         <el-table-column
           v-for="(item, index) in tableSet"
@@ -83,10 +80,7 @@
       />
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
-        <el-button
-          type="primary"
-          :disabled="!activeObj.makeGoodsId"
-          @click="submitTab"
+        <el-button type="primary" @click="submitTab" :loading="loading"
           >确 定</el-button
         >
       </span>
@@ -100,6 +94,7 @@ export default {
   components: { pagination },
   data() {
     return {
+      loading: false,
       size: "small",
       dialogVisibleTableBoxs: false,
       tableData: [],
@@ -141,33 +136,27 @@ export default {
       ],
       formData: {},
       total: 0,
-      activeObj: {
-        makeGoodsId: "",
-        makeGoodsName: "",
-        makeGoodsCode: "",
-      },
+      activeArray: [],
     };
   },
   methods: {
-    /**
-     * 选中补考/前培商品
-     */
-    getGoodsId(row) {
-      this.activeObj = {
-        makeGoodsId: row.goodsId,
-        makeGoodsName: row.goodsName,
-        makeGoodsCode: row.code,
-      };
+    /**是否允许选中 */
+    selectableFunc(row) {
+      return !this.activeArray.includes(row.goodsId);
     },
     /**
      * 初始
      */
     openBox(obj, active) {
-      this.activeObj = JSON.parse(JSON.stringify(active));
+      this.activeArray = JSON.parse(JSON.stringify(active)) || [];
       this.formData = JSON.parse(JSON.stringify(obj));
       //获取业务层次-课程
       this.getInfos();
       this.dialogVisibleTableBoxs = true;
+      this.loading = false;
+      this.$nextTick(() => {
+        this.$refs.multipleTable.clearSelection();
+      });
     },
     /**
      * 搜索数据
@@ -191,9 +180,20 @@ export default {
      * 提交回调数据
      */
     submitTab() {
-      this.$message.success("添加成功");
+      this.loading = true;
+      let ary = [];
+      if (this.$refs.multipleTable.selection.length > 0) {
+        ary = this.$refs.multipleTable.selection.map((i) => {
+          return {
+            makeGoodsCode: i.code,
+            makeGoodsId: i.goodsId,
+            makeGoodsName: i.goodsName,
+          };
+        });
+        this.$message.success("添加成功");
+        this.$emit("backData", ary);
+      }
       this.dialogVisibleTableBoxs = false;
-      this.$emit("backData", this.activeObj);
     },
     handleSizeChange(v) {
       this.formData.pageSize = v;
@@ -208,5 +208,4 @@ export default {
 };
 </script>
 
-<style lang="less" scoped>
-</style>
+<style lang="less" scoped></style>

+ 7 - 3
src/views/Marketing/goods/commodityManageMent/add/productInformation.vue

@@ -40,6 +40,12 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="视频类型" prop="viewSign" v-if="listData.goodsType == 1 || listData.goodsType == 6">
+          <el-radio-group v-model="listData.viewSign">
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="教育类型" prop="educationTypeId">
           <el-select
             v-model="listData.educationTypeId"
@@ -428,9 +434,7 @@ export default {
       this.$set(this.listData, "serviceTimeType", ""); //学习服务期类型
       this.$set(this.listData, "serviceTimeNum", ""); //学习服务期年月日
       this.$set(this.listData, "studyTimeArrays", []); //学习服务期具体时间
-      this.$set(this.listData, "makeGoodsId", ""); //补考/前培参数
-      this.$set(this.listData, "makeGoodsName", ""); //补考/前培参数
-      this.$set(this.listData, "makeGoodsCode", ""); //补考/前培参数
+      this.$set(this.listData, "makeGoodsVoList", []); //补考/前培参数
       this.$set(this.listData, "certificateTypeId", ""); //证书类型
       this.$set(this.listData, "certificateId", ""); //证书名称
       this.$set(this.listData, "certificateTpId", ""); //证书模板

+ 10 - 0
src/views/Marketing/goods/commodityManageMent/edit/courseContent/courseCheck.vue

@@ -71,6 +71,15 @@
                     : "未知"
                 }}
               </span>
+              <span v-else-if="item.scope === 'viewSign'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "保利威"
+                    : scope.row[item.prop] === 2
+                    ? "腾讯"
+                    : ""
+                }}
+              </span>
               <span v-else>{{ scope.row[item.prop] }}</span></template
             >
           </el-table-column></template
@@ -108,6 +117,7 @@ export default {
       tableSet: [
         { label: "课程编码", prop: "code", width: "140px" },
         { label: "名称前缀", prop: "prefixName", width: "160px" },
+        { label: "视频类型", prop: "viewSign", scope: "viewSign" },
         { label: "课程标题", prop: "courseName" },
         {
           label: "发布状态",

+ 10 - 0
src/views/Marketing/goods/commodityManageMent/edit/courseContent/index.vue

@@ -85,6 +85,15 @@
               ? "课程"
               : "未知"
           }}</span>
+              <span v-else-if="item.scope === 'viewSign'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "保利威"
+                    : scope.row[item.prop] === 2
+                    ? "腾讯"
+                    : ""
+                }}
+              </span>
           <span v-else-if="item.scope === 'busin'">
             {{ scope.row[item.prop1] + " - " + scope.row[item.prop2] }}
           </span>
@@ -234,6 +243,7 @@ export default {
       tableSetVideo: [
         { label: "排序", prop: "sort", scope: "inputs", width: "100" },
         { label: "编码", prop: "code", width: "140" },
+        { label: "视频类型", prop: "viewSign", scope: "viewSign" },
         // { label: "课程名称", prop: "courseName", width: "300", type: 1 },
         {
           label: "名称",

+ 11 - 0
src/views/Marketing/goods/commodityManageMent/edit/courseContent/moreListCheck.vue

@@ -83,6 +83,15 @@
                     : "未知"
                 }}
               </span>
+              <span v-else-if="item.scope === 'viewSign'">
+                {{
+                  scope.row[item.prop] === 1
+                    ? "保利威"
+                    : scope.row[item.prop] === 2
+                    ? "腾讯"
+                    : ""
+                }}
+              </span>
               <span v-else>{{ scope.row[item.prop] }}</span></template
             >
           </el-table-column></template
@@ -121,6 +130,7 @@ export default {
       tableSet: [
         { label: "编码", prop: "code", width: "140px" },
         { label: "名称前缀", prop: "prefixName", width: "160px" },
+        { label: "视频类型", prop: "viewSign", scope: "viewSign" },
         { label: "模块标题", prop: "moduleName", type: 1 },
         { label: "章标题", prop: "name", type: 2 },
         { label: "节标题", prop: "name", type: 3 },
@@ -296,6 +306,7 @@ export default {
             code: item.code,
             courseId:this.bfCourseId,
             publishStatus: item.publishStatus,
+            viewSign:item.viewSign,
             durationTime: item.durationTime,
             sectionType: splitStr[0] === 3 ? item.sectionType : "",
             auditionMinute:

+ 26 - 20
src/views/Marketing/goods/commodityManageMent/edit/index.vue

@@ -279,6 +279,14 @@ export default {
             trigger: "change",
           },
         ],
+        viewSign: [
+          {
+            type: "number",
+            required: true,
+            message: "请选择视频类型",
+            trigger: "change",
+          },
+        ],
         gradeType: [
           {
             type: "number",
@@ -434,13 +442,6 @@ export default {
             trigger: "change",
           },
         ],
-        makeGoodsId: [
-          {
-            required: true,
-            message: "请选择关联商品",
-            trigger: "blur",
-          },
-        ],
         // handoutsId: [
         //   {
         //     required: true,
@@ -583,13 +584,6 @@ export default {
         this.$refs.listData.clearValidate();
       });
     });
-    this.$bus.$on("validateMakeId", () => {
-      this.$nextTick(() => {
-        if (this.$refs["listData"]) {
-          this.$refs["listData"].validateField("makeGoodsId");
-        }
-      });
-    });
     this.$bus.$on("validateHandoutsId", () => {
       this.$nextTick(() => {
         if (this.$refs["listData"]) {
@@ -839,10 +833,6 @@ export default {
             return ast;
           });
         }
-        //拷贝补考/前培ID 解决无法选中当前ID问题
-        if (res.data.goodsType == 3 || res.data.goodsType == 4) {
-          res.data.copyMakeGoodsId = res.data.makeGoodsId;
-        }
         //学习服务期转换
         if (
           (res.data.goodsType === 1 ||
@@ -956,6 +946,17 @@ export default {
         );
       }
 
+      if (
+        data.goodsType == 3 || data.goodsType == 4
+      ) {
+        if(data.makeGoodsVoList?.length > 0){
+        data.makeGoodsIds = data.makeGoodsVoList
+          .map((i) => i.makeGoodsId)
+          .toString() || "";
+        }else{
+          data.makeGoodsIds = null
+        }
+      }
       //商品标准价格明细表
       data.standPriceJson = JSON.stringify(data.standPriceJson);
       //商品是否上架
@@ -1094,6 +1095,13 @@ export default {
         }
         //课程排序问题检查
         for (let i = 0; i < this.$refs.courseContent.tableData.length; i++) {
+          if (
+            this.$refs.courseContent.tableData[i].viewSign != this.listData.viewSign
+          ) {
+            this.$message.warning(`课程列表数据请与商品视频类型保持一致`);
+            this.disabledBtn = false;
+            return;
+          }
           if (
             !this.$refs.courseContent.tableData[i].sort &&
             this.$refs.courseContent.tableData[i].sort !== 0
@@ -1230,9 +1238,7 @@ export default {
    * 销毁公交
    */
   beforeDestroy() {
-    console.log(2);
     this.$bus.$off("clearValidateFuncAdd");
-    this.$bus.$off("validateMakeId");
     this.$bus.$off("validateHandoutsId");
     this.$bus.$off("validateCoverUrl");
     this.$bus.$off("initTimeVal");

+ 22 - 30
src/views/Marketing/goods/commodityManageMent/edit/makeUpExam/index.vue

@@ -2,17 +2,18 @@
   <div id="makeUpExam">
     <el-form-item label="关联商品" prop="makeGoodsId">
       <div>
-        <el-button @click="goToActiveGoods">选择商品</el-button>
-        <span v-if="listData.makeGoodsId" style="margin-left: 12px"
-          >{{ listData.makeGoodsCode }} - {{ listData.makeGoodsName }}</span
-        >
-        <el-button
-          style="margin-left: 12px"
-          v-if="listData.makeGoodsId"
-          type="text"
-          @click="clearGoods"
-          >删除</el-button
-        >
+        <el-button @click="goToActiveGoods">选择商品</el-button><el-button type="danger" @click="clearAllGoods" v-if="listData.makeGoodsVoList && listData.makeGoodsVoList.length > 0">全部清空</el-button>
+        <ul>
+          <li v-for="(item, index) in listData.makeGoodsVoList" :key="index">
+            <span>{{ item.makeGoodsCode }} - {{ item.makeGoodsName }}</span>
+            <el-button
+              style="margin-left: 12px"
+              type="text"
+              @click="clearGoods(index)"
+              >删除</el-button
+            >
+          </li>
+        </ul>
       </div>
     </el-form-item>
     <make-check ref="makeCheck" @backData="backMakeData" />
@@ -43,27 +44,18 @@ export default {
             : "",
       };
       //打开选择补考/前培组件
-      this.$refs.makeCheck.openBox(
-        data,
-        {
-          makeGoodsId: this.listData.makeGoodsId,
-          makeGoodsName: this.listData.makeGoodsName,
-          makeGoodsCode: this.listData.makeGoodsCode,
-        },
-        this.listData.copyMakeGoodsId
-      );
+      let ary = this.listData.makeGoodsVoList.map((i) => i.makeGoodsId) || [];
+      this.$refs.makeCheck.openBox(data, ary);
     },
-    backMakeData(activeObj) {
-      this.$set(this.listData, "makeGoodsId", activeObj.makeGoodsId);
-      this.$set(this.listData, "makeGoodsName", activeObj.makeGoodsName);
-      this.$set(this.listData, "makeGoodsCode", activeObj.makeGoodsCode);
-      this.$bus.$emit("validateMakeId");
+    backMakeData(activeArray) {
+      let ary = this.listData.makeGoodsVoList.concat(activeArray)
+      this.$set(this.listData,'makeGoodsVoList',ary)
     },
-    clearGoods() {
-      this.$set(this.listData, "makeGoodsId", "");
-      this.$set(this.listData, "makeGoodsName", "");
-      this.$set(this.listData, "makeGoodsCode", "");
-      this.$bus.$emit("validateMakeId");
+    clearAllGoods() {
+      this.$set(this.listData,'makeGoodsVoList',[])
+    },
+    clearGoods(index) {
+      this.listData.makeGoodsVoList.splice(index,1)
     },
   },
 };

+ 32 - 31
src/views/Marketing/goods/commodityManageMent/edit/makeUpExam/makeCheck.vue

@@ -32,6 +32,7 @@
       <el-table
         ref="multipleTable"
         :data="tableData"
+        row-key="goodsId"
         border
         :header-cell-style="{
           'background-color': '#eee',
@@ -39,16 +40,12 @@
           color: '#333',
         }"
       >
-        <el-table-column label="" width="45" align="center">
-          <template scope="scope">
-            <el-radio
-              :disabled="scope.row.selectStatus === 0"
-              :label="scope.row.goodsId"
-              v-model="activeObj.makeGoodsId"
-              @change.native="getGoodsId(scope.row)"
-              >{{ "" }}</el-radio
-            >
-          </template>
+        <el-table-column
+          type="selection"
+          width="55"
+          :reserve-selection="true"
+          :selectable="selectableFunc"
+        >
         </el-table-column>
         <el-table-column
           v-for="(item, index) in tableSet"
@@ -85,8 +82,8 @@
         <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
         <el-button
           type="primary"
-          :disabled="!activeObj.makeGoodsId"
           @click="submitTab"
+          :loading="loading"
           >确 定</el-button
         >
       </span>
@@ -100,6 +97,7 @@ export default {
   components: { pagination },
   data() {
     return {
+      loading:false,
       size: "small",
       dialogVisibleTableBoxs: false,
       tableData: [],
@@ -141,35 +139,27 @@ export default {
       ],
       formData: {},
       total: 0,
-      activeObj: {
-        makeGoodsId: "",
-        makeGoodsName: "",
-        makeGoodsCode: "",
-      },
-      initId: "", //解决无法选中初始ID问题
+      activeArray: [],
     };
   },
   methods: {
-    /**
-     * 选中补考/前培商品
-     */
-    getGoodsId(row) {
-      this.activeObj = {
-        makeGoodsId: row.goodsId,
-        makeGoodsName: row.goodsName,
-        makeGoodsCode: row.code,
-      };
+    /**是否允许选中 */
+    selectableFunc(row) {
+      return !this.activeArray.includes(row.goodsId);
     },
     /**
      * 初始
      */
-    openBox(obj, active, initId) {
-      this.initId = initId;
-      this.activeObj = JSON.parse(JSON.stringify(active));
+    openBox(obj, active) {
+      this.activeArray = JSON.parse(JSON.stringify(active)) || [];
       this.formData = JSON.parse(JSON.stringify(obj));
       //获取业务层次-课程
       this.getInfos();
       this.dialogVisibleTableBoxs = true;
+      this.loading = false;
+      this.$nextTick(() => {
+        this.$refs.multipleTable.clearSelection();
+      });
     },
     /**
      * 搜索数据
@@ -200,9 +190,20 @@ export default {
      * 提交回调数据
      */
     submitTab() {
-      this.$message.success("添加成功");
+      this.loading = true;
+      let ary = [];
+      if (this.$refs.multipleTable.selection.length > 0) {
+        ary = this.$refs.multipleTable.selection.map((i) => {
+          return {
+            makeGoodsCode: i.code,
+            makeGoodsId: i.goodsId,
+            makeGoodsName: i.goodsName,
+          };
+        });
+        this.$message.success("添加成功");
+        this.$emit("backData", ary);
+      }
       this.dialogVisibleTableBoxs = false;
-      this.$emit("backData", this.activeObj);
     },
     handleSizeChange(v) {
       this.formData.pageSize = v;

+ 7 - 3
src/views/Marketing/goods/commodityManageMent/edit/productInformation.vue

@@ -41,6 +41,12 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="视频类型" prop="viewSign" v-if="listData.goodsType == 1 || listData.goodsType == 6">
+          <el-radio-group v-model="listData.viewSign">
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="教育类型" prop="educationTypeId">
           <el-select
             v-model="listData.educationTypeId"
@@ -375,9 +381,7 @@ export default {
       // this.$set(this.listData, "serviceTimeType", ""); //学习服务期类型
       // this.$set(this.listData, "serviceTimeNum", ""); //学习服务期年月日
       // this.$set(this.listData, "studyTimeArrays", []); //学习服务期具体时间
-      // this.$set(this.listData, "makeGoodsId", ""); //补考/前培参数
-      // this.$set(this.listData, "makeGoodsName", ""); //补考/前培参数
-      // this.$set(this.listData, "makeGoodsCode", ""); //补考/前培参数
+      // this.$set(this.listData, "makeGoodsVoList", []); //补考/前培参数
       // this.$set(this.listData, "timeArrays", [
       //   new Date().getTime(),
       //   new Date().getTime() + 365 * 1 * 24 * 3600 * 1000,

+ 48 - 2
src/views/Marketing/goods/courseInquiryList/index.vue

@@ -45,7 +45,7 @@
           <span v-if="!activeId" style="font-size: 30px"
             >请打开目录详情,点击播放您需要观看的视频内容。</span
           >
-          <div v-show="vid" id="player"></div>
+          <div v-show="vid && viewSign == 1" id="player"></div>
           <div v-show="vidzb" id="playerzb"></div>
         </div>
         <div class="rightBoxslist">
@@ -302,7 +302,10 @@ export default {
       dialogVisible: false,
       courseList: [], //详情列表
       activeId: "", //当前选中ID
+      viewSign: 1,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
+      vodPlayerJsForTCPlayer:
+        "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
       vid: "",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
@@ -390,6 +393,7 @@ export default {
      */
     msgInfo(option) {
       this.goodsBoxName = option.goodsName
+      this.viewSign = option.viewSign
       this.$api.obtainCourseSgoodsId(option.goodsId).then(async (res) => {
         // if (res.rows.length) {
         if (!res.rows.length) {
@@ -673,7 +677,11 @@ export default {
         this.loadPlayerScriptzb(this.loadPlayerzb);
       } else {
         this.vid = option.recordingUrl;
-        this.loadPlayerScript(this.loadPlayer);
+        if(this.viewSign == 2) {
+          this.loadPlayerScript_tencent(this.loadPlayer_tencent);
+        }else {
+          this.loadPlayerScript(this.loadPlayer);
+        }
       }
     },
     loadPlayerScript(callback) {
@@ -686,6 +694,16 @@ export default {
         callback();
       }
     },
+    loadPlayerScript_tencent(callback) {
+      if (!window.TCPlayer) {
+        const myScript = document.createElement("script");
+        myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
+        myScript.onload = callback;
+        document.body.appendChild(myScript);
+      } else {
+        callback();
+      }
+    },
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -702,6 +720,31 @@ export default {
         },
       });
     },
+    loadPlayer_tencent() {
+      var self = this;
+      const TCPlayer = window.TCPlayer;
+      try {
+        let video = document.querySelector("video");
+        video.parentNode.removeChild(video);
+      } catch (error) {
+        console.log("清除video标签异常");
+      }
+      let player_tencent = document.createElement("video");
+      player_tencent.id = "player-tencent";
+      document
+        .getElementById("player")
+        .insertAdjacentElement("afterend", player_tencent);
+      self.$api.obtaintcvideosign(self.vid).then(res => {
+        self.player_tencent = TCPlayer("player-tencent", {
+          width: 932,
+        height: 627,
+          fileID: self.vid,
+          appID: res.data.appID,
+          psign: res.data.psign,
+          licenseUrl: res.data.licenseUrl
+        });
+      });
+    },
     /**
      * @param {String} 关闭视频窗口-销毁实例
      */
@@ -713,6 +756,9 @@ export default {
         if (this.player) {
           this.player.destroy();
         }
+        if (this.player_tencent) {
+          this.player.dispose();
+        }
         if (this.playerzb) {
           this.playerzb.destroy();
         }

+ 24 - 6
src/views/Marketing/order/offlineOrder/index.vue

@@ -8,13 +8,17 @@
       @init="init"
     />
     <table-list
+      ref="tableList"
       :tableSets="tableSet"
       :tableData="tableData"
       :navText="navText"
       :loading="loading"
+      rowKey="inputOrderSn"
     >
       <template slot="customize">
-        <el-button size="medium" type="primary" @click="setGoodsOptions(1)"
+        <el-button size="medium" type="success" @click="setGoodsOptions(3)"
+          >批量导出</el-button
+        ><el-button size="medium" type="primary" @click="setGoodsOptions(1)"
           >设置商品默认匹配</el-button
         ><el-button size="medium" type="primary" @click="setGoodsOptions(2)"
           >批量录单</el-button
@@ -27,9 +31,7 @@
         <el-button
           type="text"
           @click="theOrderJump(props.scope.row, 2)"
-          :disabled="
-            props.scope.row.orderFrom == 6
-          "
+          :disabled="props.scope.row.orderFrom == 6"
           >计费单收费</el-button
         >
         <el-button type="text" @click="theOrderJump(props.scope.row, 3)"
@@ -64,6 +66,7 @@ export default {
         num: true,
         choice: true,
         addHide: true,
+        openCheckMore: true,
         changeWidth: "300px",
         backFatherBtn: {
           status: false,
@@ -188,7 +191,7 @@ export default {
         {
           label: "订单来源",
           prop: "orderFrom",
-          oldOrder:"oldOrderSn",
+          oldOrder: "oldOrderSn",
           hidden: true,
           scope: "isOptionsDY",
           width: "130px",
@@ -296,6 +299,21 @@ export default {
           jump();
         }
       }
+      if (int === 3) {
+        if (this.$refs.tableList.allCheckData.length > 0) {
+          this.$api
+            .orderinputexportInputOrder(
+              this.$refs.tableList.allCheckData.map((i) => i.inputOrderSn)
+            )
+            .then((res) => {
+              this.$methodsTools.exportData(res.data.msg)
+              this.$refs.tableList.clearMoreActive()
+            });
+        } else {
+          this.$message.error("请选择订单");
+          return;
+        }
+      }
     },
     search(int) {
       this.loading = true;
@@ -308,6 +326,7 @@ export default {
           pageSize: 10,
           pageNum: 1,
         };
+        this.$refs.tableList.clearMoreActive()
       }
       if (int === 3) {
         this.formData.pageNum = 1;
@@ -527,4 +546,3 @@ export default {
   }
 }
 </style>
-

+ 7 - 4
src/views/classHoursReview/component/LessonTable.vue

@@ -151,11 +151,11 @@
           </span>
           <span v-else-if="item.scope === 'durTime' && scope2.row.type !== 5">
             <span v-if="scope2.row['type'] == 3">
-            {{(scope2.row[item.prop] / 60).toFixed(0) + "分钟" || "0分钟0"}}
-            {{(scope2.row[item.prop] % 60) || 0}}秒
+              {{ (scope2.row[item.prop] / 60).toFixed(0) + "分钟" || "0分钟0" }}
+              {{ scope2.row[item.prop] % 60 || 0 }}秒
             </span>
             <span v-else>
-              {{"分数:" + scope2.row["performance"]}}
+              {{ "分数:" + scope2.row["performance"] }}
             </span>
           </span>
           <span
@@ -279,7 +279,9 @@
                     (scope2.row[item.prop2] - scope2.row[item.prop1]) /
                     60
                   ).toFixed(0) || 0
-                }}分钟{{(scope2.row[item.prop2] - scope2.row[item.prop1]) % 60}}秒
+                }}分钟{{
+                  (scope2.row[item.prop2] - scope2.row[item.prop1]) % 60
+                }}秒
               </div>
             </div>
           </div>
@@ -477,6 +479,7 @@ export default {
         goodsId,
         gradeId,
         orderGoodsId: this.setData.orderGoodsId,
+        tenantIdReplace: this.setData.tenantId,
       };
       if (item.type === 3) {
         data.sectionId = item.id;

+ 16 - 7
src/views/classHoursReview/studyTimes.vue

@@ -72,7 +72,7 @@ export default {
   },
   mounted() {
     this.getUserInfo(true);
-    console.log(this.setData,'setData')
+    console.log(this.setData, "setData");
   },
   methods: {
     /**
@@ -103,6 +103,7 @@ export default {
         userId: this.setData.userId,
         goodsId: this.setData.goodsId,
         gradeId: this.setData.id,
+        tenantIdReplace: this.setData.tenantId,
       };
       if (item.type === 3) {
         data.sectionId = item.id;
@@ -133,6 +134,7 @@ export default {
         goodsId: this.setData.goodsId,
         gradeId: this.setData.id,
         orderGoodsId: this.setData.orderGoodsId,
+        tenantIdReplace: this.setData.tenantId,
       };
       if (item.type === 3) {
         data.sectionId = item.id;
@@ -168,6 +170,7 @@ export default {
         goodsId: this.setData.goodsId,
         gradeId: this.setData.id,
         orderGoodsId: this.setData.orderGoodsId,
+        tenantIdReplace: this.setData.tenantId,
       };
       if (item.type === 3) {
         data.sectionId = item.id;
@@ -192,14 +195,19 @@ export default {
           userId: this.setData.userId,
           goodsId: this.setData.goodsId,
           orderGoodsId: this.setData.orderGoodsId,
+          tenantIdReplace: this.setData.tenantId,
         })
         .then(async (res) => {
-          let data = res.rows[0];
-          var result = await this.$api.obtainGoods(this.setData.goodsId);
-          data["fullName"] =
-            result.data.educationName +
-            result.data.projectName +
-            result.data.businessName;
+          let data = res.rows[0] || {};
+          if (this.setData.fullName) {
+            data["fullName"] = this.setData.fullName;
+          } else {
+            var result = await this.$api.obtainGoods(this.setData.goodsId);
+            data["fullName"] =
+              result.data.educationName +
+              result.data.projectName +
+              result.data.businessName;
+          }
 
           data["supervise"] = true;
           this.userData = data;
@@ -238,6 +246,7 @@ export default {
         userId: this.setData.userId,
         goodsId: this.setData.goodsId,
         orderGoodsId: this.setData.orderGoodsId,
+        tenantIdReplace: this.setData.tenantId,
       };
       this.loading = true;
       this.$api

+ 48 - 5
src/views/education/classManageMent/classList/classList/addClass.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="">
     <BaseDialog
-      width="1400px"
+      width="1200px"
       :isShow.sync="isShow"
       title="新增"
       @close="close"
@@ -11,12 +11,12 @@
       <el-row :gutter="20">
         <el-form
           label-position="right"
-          label-width="120px"
+          label-width="130px"
           :model="listData"
           :rules="rules"
           ref="listData"
         >
-          <el-col :span="12">
+          <el-col :span="12" class="col_12">
             <el-form-item label="所属商品" prop="payer">
               <span
                 style="margin-right: 20px"
@@ -29,7 +29,6 @@
             </el-form-item>
             <el-form-item label="班级名称" prop="className">
               <el-input
-                style="width: 400px"
                 v-model="listData.className"
                 placeholder="请填写班级名称"
               ></el-input>
@@ -108,7 +107,7 @@
             <el-form-item
               label="班级有效期"
               prop="timeList"
-              v-if="listData.classStatus"
+              v-if="listData.classStatus === 1"
             >
               <el-date-picker
                 style="width: 90%"
@@ -122,6 +121,18 @@
               >
               </el-date-picker>
             </el-form-item>
+            <el-form-item
+              label="报名提前截止(天)"
+              prop="pastDueDay"
+              v-if="listData.classStatus === 1"
+            >
+              <el-input-number
+                v-model="listData.pastDueDay"
+                :min="10"
+                :controls="false"
+                :precision="0"
+              ></el-input-number>
+            </el-form-item>
             <el-form-item label="考期" prop="examineId">
               <el-select
                 v-model="listData.examineId"
@@ -366,6 +377,19 @@ import { mapGetters } from "vuex";
 export default {
   components: { searchBoxNew, pagination },
   data() {
+    const validatorDay = (rule, value, callback) => {
+      if (
+        this.listData.timeList[0] &&
+        this.listData.timeList[1] &&
+        parseInt(this.listData.timeList[1]) -
+          parseInt(this.listData.timeList[0]) <
+          parseInt(Number(value) * 86400000)
+      ) {
+        callback(new Error("报名截止时间需小于班级有效天数"));
+      } else {
+        callback();
+      }
+    };
     return {
       isShow: false,
       total: 0,
@@ -438,6 +462,17 @@ export default {
             trigger: "change",
           },
         ],
+        pastDueDay: [
+          {
+            required: true,
+            message: "请输入报名截至提前时间",
+            trigger: "blur",
+          },
+          {
+            validator: validatorDay,
+            trigger: "blur",
+          },
+        ],
         learningTimeStart: [
           {
             type: "date",
@@ -672,6 +707,7 @@ export default {
     changeClassStatus() {
       this.listData.officialName = "";
       this.listData.timeList = [];
+      this.listData.pastDueDay = 0;
     },
     //返回
     backPage() {
@@ -709,6 +745,7 @@ export default {
       if (!data.timeList) {
         data.classStartTime = null;
         data.classEndTime = null;
+        data.pastDueDay = null
       }
       if (data.learningStatus === 3) {
         data.learningTimeStart = this.listData.learningTimeStart / 1000;
@@ -739,6 +776,12 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.col_12{
+  border-right:1px solid #e1e1e1;
+}
+/deep/ .el-input--medium .el-input__inner{
+  width:405px;
+}
 /deep/.el-button {
   border-radius: 8px;
 }

+ 0 - 554
src/views/education/classManageMent/classList/index copy.vue

@@ -1,554 +0,0 @@
-<template>
-  <div id="classList">
-    <search-box-new
-      ref="searchBox"
-      :formData="formData"
-      :formList="formList"
-      @search="search"
-      @init="init"
-    />
-    <table-list
-      :tableSets="tableSet"
-      :tableData="tableData"
-      :navText="navText"
-      @addClick="addClick"
-      :loading="loading"
-      @editInfo="editInfo"
-    >
-      <template slot="btn" slot-scope="props">
-        <el-button type="text" @click="addClick(props.scope.row, 2)"
-          >详情</el-button
-        >
-        <el-button type="text" @click="addClick(props.scope.row, 3)"
-          >学员管理</el-button
-        >
-        <el-button type="text" @click="del(props.scope.row)">删除</el-button>
-      </template>
-    </table-list>
-    <pagination
-      :total="total"
-      :pageSize="formData.pageSize"
-      :currentPage="formData.pageNum"
-      @handleSizeChange="handleSizeChange"
-      @handleCurrentChange="handleCurrentChange"
-    />
-  </div>
-</template>
-
-<script>
-import searchBoxNew from "@/components/searchBoxNew";
-import tableList from "@/components/tableList";
-import pagination from "@/components/pagination";
-export default {
-  components: { searchBoxNew, tableList, pagination },
-  name: "ClassList",
-  data() {
-    return {
-      loading: false, //当前表单加载是否加载动画
-      navText: {
-        border: true,
-        title: "班级管理",
-        index: 0,
-        ch: "条",
-        num: false,
-        choice: true,
-        addHide: false,
-        backFatherBtn: {
-          status: false,
-          title: "未定义",
-        },
-      },
-      //搜索
-      formList: [
-        {
-          prop: "educationTypeId",
-          placeholder: "教育类型",
-          scope: "educationType",
-        },
-        {
-          prop: "businessId",
-          placeholder: "业务层次",
-          scope: "businessLevel",
-          edu: "educationTypeId",
-        },
-        {
-          prop: "schoolId",
-          placeholder: "院校",
-          scope: "schoolList",
-          edu: "educationTypeId",
-        },
-        {
-          prop: "majorId",
-          placeholder: "专业",
-          scope: "Professional",
-          edu: "educationTypeId",
-        },
-        {
-          prop: "subjectId",
-          placeholder: "科目",
-          scope: "sujectType",
-          edu: "educationTypeId",
-        },
-        {
-          prop: "classStatus",
-          placeholder: "开班状态",
-          scope: "select",
-          options: [
-            { label: "已开班", value: 1 },
-            { label: "预报名(未开班)", value: 0 },
-          ],
-        },
-        {
-          prop: "status",
-          placeholder: "班级状态",
-          scope: "select",
-          noClear: false,
-          options: [
-            { label: "全部状态", value: "0,1" },
-            { label: "无效", value: 0 },
-            { label: "有效", value: 1 },
-          ],
-        },
-        {
-          prop1: "classStartTime",
-          prop2: "classEndTime",
-          placeholder1: "班级有效期开始时间",
-          placeholder2: "班级有效期结束时间",
-          scope: "moreDataPicker",
-        },
-        {
-          prop: "searchKey",
-          placeholder: "请输入班级名称/商品名称",
-        },
-        {
-          prop: "userName",
-          placeholder: "请输入学员姓名",
-        },
-      ],
-      formData: {
-        status: "0,1",
-        pageSize: 10,
-        pageNum: 1,
-        classStatus: "",
-      },
-      // 表单
-      tableSet: [
-        {
-          label: "商品编码",
-          prop: "code",
-          objProp: "goodsList",
-          hidden: false,
-          scope: "objType",
-        },
-        {
-          label: "年份",
-          prop: "year",
-          objProp: "goodsList",
-          hidden: false,
-          scope: "objType",
-        },
-        {
-          label: "商品业务层级",
-          prop1: "educationName",
-          prop2: "projectName",
-          prop3: "businessName",
-          objProp: "goodsList",
-          hidden: false,
-          scope: "objTypeYW",
-        },
-        {
-          label: "商品名称",
-          prop: "goodsName",
-          objProp: "goodsList",
-          hidden: true,
-          scope: "objType",
-        },
-        {
-          label: "科目",
-          prop: "subjectNames",
-          hidden: true,
-        },
-        {
-          label: "班级编码",
-          prop: "gradeCode",
-          hidden: false,
-        },
-        {
-          label: "班级号",
-          prop: "classStatus",
-          prop1: "officialName",
-          hidden: true,
-          scope: "classTypes",
-        },
-        {
-          label: "班级名称",
-          prop: "className",
-          hidden: true,
-          scope: "editInfo",
-        },
-        {
-          label: "学时",
-          prop: "classHours",
-          objProp: "goodsList",
-          hidden: false,
-          scope: "objType",
-        },
-        {
-          label: "班主任",
-          prop: "nickName",
-          hidden: false,
-        },
-        {
-          label: "班级人数",
-          prop1: "studentNum",
-          prop2: "studentUpper",
-          hidden: true,
-          scope: "peopleNums",
-        },
-        {
-          label: "班级总人数",
-          prop1: "studentNumAll",
-          prop2: "studentUpper",
-          hidden: true,
-          scope: "peopleNums",
-        },
-        {
-          label: "开放学习时间",
-          prop: "learningStatus",
-          prop1: "learningTimeStart",
-          hidden: true,
-          scope: "classTimeTypes",
-        },
-        {
-          label: "班级状态",
-          prop: "status",
-          hidden: false,
-          scope: "isOptions",
-          options: [
-            {
-              label: "有效",
-              value: 1,
-            },
-            {
-              label: "无效",
-              value: 0,
-            },
-          ],
-        },
-        {
-          label: "班级有效期",
-          prop1: "classStartTime",
-          prop2: "classEndTime",
-          hidden: true,
-          Diszing: false,
-          scope: "TimeLists",
-        },
-      ],
-      tableData: [], //表单数据
-      total: 0, //一共多少条
-    };
-  },
-  async mounted() {
-    if (Object.keys(this.$route.params).length) {
-      if (this.$route.params.educationId) {
-        this.$set(
-          this.formData,
-          "educationTypeId",
-          this.$route.params.educationId
-        );
-        this.$refs.searchBox.changeEducationType(
-          this.$route.params.educationId,
-          true
-        );
-      }
-      if (this.$route.params.businessId) {
-        this.$set(this.formData, "businessId", this.$route.params.businessId);
-        this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
-      }
-      if (this.$route.params.userId) {
-        this.$set(this.formData, "userId", this.$route.params.userId);
-      }
-      if (this.$route.params.classStatus >= 0) {
-        this.$set(this.formData, "classStatus", this.$route.params.classStatus);
-      }
-      if (this.$route.params.hasInterface >= 0) {
-        this.formData.hasInterface = this.$route.params.hasInterface;
-      }
-    } else {
-      // await this.moRenBus();
-    }
-    if (this.$route.params.timeType >= 0) {
-      this.$set(
-        this.formData,
-        "classStartTime",
-        this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
-      );
-      this.$set(
-        this.formData,
-        "classEndTime",
-        this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
-      );
-    }
-    this.search();
-  },
-  activated() {
-    this.search();
-  },
-  methods: {
-    /**
-     * 默认选择继教二建业务层次
-     */
-    moRenBus() {
-      return new Promise((resolve, reject) => {
-        this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
-          console.log(res);
-          for (let i = 0; i < res.rows.length; i++) {
-            if (res.rows[i].educationName === "继续教育") {
-              this.$api
-                .inquirebusinessList({ status: 1, educationId: res.rows[i].id })
-                .then((result) => {
-                  for (let j = 0; j < result.rows.length; j++) {
-                    if (
-                      result.rows[j].projectName === "建造师" &&
-                      result.rows[j].businessName === "二级"
-                    ) {
-                      this.$set(
-                        this.formData,
-                        "educationTypeId",
-                        res.rows[i].id
-                      );
-                      this.$refs.searchBox.changeEducationType(
-                        res.rows[i].id,
-                        true
-                      );
-                      this.$set(this.formData, "businessId", result.rows[j].id);
-                      this.$refs.searchBox.changeBusinessLevel(
-                        result.rows[j].id
-                      );
-                      resolve();
-                      break;
-                    }
-                  }
-                });
-              break;
-            }
-          }
-        });
-      });
-    },
-    editInfo(v) {
-      this.addClick(v, 2);
-    },
-    search(int) {
-      this.loading = true;
-      if (int === 1) {
-        this.formData.pageNum = 1;
-      }
-      if (int === 2) {
-        this.formData = {
-          status: "0,1",
-          pageSize: 10,
-          pageNum: 1,
-          classStatus: "",
-        };
-      }
-      if (int === 4) {
-        this.formData.pageNum = 1;
-      }
-      var data = JSON.parse(JSON.stringify(this.formData));
-      if (this.formData.classStartTime) {
-        data.classStartTime = parseInt(data.classStartTime / 1000);
-      }
-      if (this.formData.classEndTime) {
-        data.classEndTime = parseInt(data.classEndTime / 1000);
-      }
-      this.$api
-        .inquireGradegradesearchList(data)
-        .then((res) => {
-          this.tableData = res.rows;
-          this.total = res.total;
-          this.navText.index = res.total;
-        })
-        .finally(() => {
-          this.loading = false;
-        });
-    },
-    init() {
-      this.search(2);
-    },
-    del(v) {
-      this.$alert(
-        "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
-        "提示",
-        {
-          dangerouslyUseHTMLString: true,
-        }
-      )
-        .then(() => {
-          var data = {
-            gradeId: v.gradeId,
-            status: -1,
-          };
-          this.$api.editGradegrade(data).then((res) => {
-            this.$message.success("删除成功");
-            this.search();
-          });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
-        });
-    },
-    addClick(v, int) {
-      // int = 2详情 3学员管理
-      if (v === undefined) {
-        // 添加班级
-        this.$router.push({
-          path: "addClass",
-        });
-      } else {
-        if (int === 2) {
-          const jump = () => {
-            //班级详情
-            this.$router.push({
-              path: "manageClass",
-              query: {
-                id: v.gradeId,
-              },
-            });
-          };
-          const statusPage = this.$store.state.tagsView.visitedViews.some(
-            (item) => {
-              return item.name == "ManageClass";
-            }
-          );
-          if (statusPage) {
-            this.$store
-              .dispatch("tagsView/delCachedView", {
-                name: "ManageClass",
-              })
-              .then((res) => {
-                jump();
-              });
-          } else {
-            jump();
-          }
-        }
-        if (int === 3) {
-          // 学员管理
-          this.$router.push({
-            path: "studentMenu",
-            query: {
-              id: v.gradeId,
-              goodsId: v.goodsList[0].goodsId,
-            },
-          });
-        }
-      }
-    },
-    handleSizeChange(v) {
-      this.formData.pageSize = v;
-      this.formData.pageNum = 1;
-      this.search();
-    },
-    handleCurrentChange(v) {
-      this.formData.pageNum = v;
-      this.search();
-    },
-  },
-};
-</script>
-
-<style lang="less" scoped>
-/deep/.el-button {
-  border-radius: 8px;
-}
-/deep/.el-dialog {
-  border-radius: 8px;
-  .el-dialog__header {
-    padding: 0;
-    .hearders {
-      height: 40px;
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      padding: 0px 18px 0px 20px;
-      border-bottom: 1px solid #e2e2e2;
-      .leftTitle {
-        font-size: 14px;
-        font-weight: bold;
-        color: #2f4378;
-      }
-      .rightBoxs {
-        display: flex;
-        align-items: center;
-        img {
-          width: 14px;
-          height: 14px;
-          margin-left: 13px;
-          cursor: pointer;
-        }
-      }
-    }
-  }
-  .el-dialog__footer {
-    padding: 0;
-    .dialog-footer {
-      padding: 0px 40px;
-      height: 70px;
-      border-top: 1px solid #e2e2e2;
-      display: flex;
-      align-items: center;
-      justify-content: flex-end;
-    }
-  }
-}
-.imgBox {
-  width: 100%;
-  // height: 210px;
-  border: 1px solid #e2e2e2;
-  border-radius: 8px;
-  padding: 8px 8px 3px;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  .imgLabel {
-    flex: 1;
-    width: 100%;
-    border: 1px dotted #e2e2e2;
-    color: #999;
-    font-size: 14px;
-    cursor: pointer;
-    border-radius: 8px;
-    .msPhoto {
-      display: flex;
-      justify-content: center;
-      align-items: center;
-      max-width: 100%;
-      max-height: 270px;
-      img {
-        max-width: 100%;
-        max-height: 270px;
-      }
-    }
-    .imgbbx {
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      justify-content: center;
-      width: 100%;
-      height: 100%;
-      i {
-        font-weight: bold;
-        margin: 14px 0;
-        font-size: 24px;
-      }
-    }
-  }
-  p {
-    margin: 5px 0px;
-  }
-}
-</style>

+ 1 - 1
src/views/education/classManageMent/classList/index.vue

@@ -6,7 +6,7 @@
       </el-tab-pane>
       <el-tab-pane label="报班学员" name="second">
         <trainee v-if="activeName == 'second'"></trainee>
-      </el-tab-pane>
+      </el-tab-pane> 
     </el-tabs>
   </div>
 </template>

+ 48 - 7
src/views/education/classManageMent/classList/manageClass/baseInfo.vue

@@ -13,30 +13,33 @@
           {{ listData.goodsList[0].educationName }}
         </el-descriptions-item>
         <el-descriptions-item label="业务层次">
-          {{listData.goodsList[0].projectName + ' - ' + listData.goodsList[0].businessName }}
-          
+          {{
+            listData.goodsList[0].projectName +
+            " - " +
+            listData.goodsList[0].businessName
+          }}
         </el-descriptions-item>
         <el-descriptions-item label="专业">
           {{ listData.goodsList[0].categoryName }}
-          
         </el-descriptions-item>
         <el-descriptions-item label="商品名称">
           {{ listData.goodsList[0].goodsName }}
-          
         </el-descriptions-item>
         <el-descriptions-item label="学时">
           {{ listData.goodsList[0].classHours }}
-          
         </el-descriptions-item>
         <el-descriptions-item label="年份">
           {{ listData.sevenYear || listData.goodsList[0].year }}
-          
         </el-descriptions-item>
       </el-descriptions>
       <div class="top_style">班级信息</div>
       <el-row
         :gutter="20"
-        style="background: rgb(242, 242, 242); border-radius: 8px;padding: 20px;"
+        style="
+          background: rgb(242, 242, 242);
+          border-radius: 8px;
+          padding: 20px;
+        "
       >
         <el-form
           label-position="right"
@@ -170,6 +173,18 @@
               </el-form-item>
             </div>
 
+            <el-form-item
+              label="报名提前截止(天)"
+              prop="pastDueDay"
+              v-if="listData.classStatus === 1"
+            >
+              <el-input-number
+                v-model="listData.pastDueDay"
+                :min="10"
+                :controls="false"
+                :precision="0"
+              ></el-input-number>
+            </el-form-item>
             <!-- <el-tooltip class="item" effect="dark" placement="right">
                 <div slot="content">
                   商品学习有效期:{{
@@ -367,6 +382,19 @@
 import { mapGetters } from "vuex";
 export default {
   data() {
+    const validatorDay = (rule, value, callback) => {
+      if (
+        this.listData.classStartTime &&
+        this.listData.classEndTime &&
+        parseInt(this.listData.classEndTime) -
+          parseInt(this.listData.classStartTime) <
+          parseInt(Number(value) * 86400000)
+      ) {
+        callback(new Error("报名截止时间需小于班级有效天数"));
+      } else {
+        callback();
+      }
+    };
     return {
       copyData: {},
       classStartStatus: false,
@@ -408,6 +436,17 @@ export default {
         classEndTime: [
           { required: true, message: "请选择结束时间", trigger: "change" },
         ],
+        pastDueDay: [
+          {
+            required: true,
+            message: "请输入报名截至提前时间",
+            trigger: "blur",
+          },
+          {
+            validator: validatorDay,
+            trigger: "blur",
+          },
+        ],
         status: [{ required: true, message: "请选择状态", trigger: "change" }],
         learningTimeStart: [
           {
@@ -591,6 +630,7 @@ export default {
       this.listData.officialName = "";
       this.listData.classStartTime = "";
       this.listData.classEndTime = "";
+      this.listData.pastDueDay = 0;
       this.$nextTick(() => {
         this.$refs.listData.clearValidate();
       });
@@ -620,6 +660,7 @@ export default {
       if (!data.classStartTime && !data.classEndTime) {
         data.classStartTime = null;
         data.classEndTime = null;
+        data.pastDueDay = null
       } else {
         if (data.classStartTime && data.classEndTime) {
           data.classStartTime = data.classStartTime / 1000;

+ 34 - 8
src/views/education/classManageMent/classList/trainee/index.vue

@@ -159,11 +159,13 @@ import ClassHour from "@/views/education/archives/archivesDetails/courseRecords/
 import searchBoxNew from "@/components/searchBoxNew";
 import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
+import pictureList from "@/components/Comon/pictureList.vue";
 import tabClassDialog from "./tabClassDialog.vue";
 import changeClassDialog from "./changeClassDialog.vue";
 import pictureList from "@/components/Comon/pictureList.vue";
 export default {
   components: {
+    pictureList,
     ClassHour,
     searchBoxNew,
     tableList,
@@ -196,6 +198,22 @@ export default {
           title: "未定义",
         },
       },
+      info: {},
+      showTabList: [
+        {
+          label: "信息已推送",
+          img: "ts",
+          prop: "plush",
+          num: true,
+        },
+        {
+          label: "信息待推送",
+          img: "zy",
+          prop: "notPlush",
+          num: true,
+          color: "#ff7a38",
+        },
+      ],
       formData: {
         // status: "0,1",
         pageSize: 10,
@@ -230,6 +248,7 @@ export default {
         },
         {
           label: "所属商品",
+          hidden: true,
           scope: "slot",
           slotName: "goodsInfo",
         },
@@ -357,7 +376,7 @@ export default {
           scope: "businessLevel",
           edu: "educationTypeId",
         },
-        { 
+        {
           prop: "majorId",
           placeholder: "专业",
           scope: "Professional",
@@ -406,7 +425,9 @@ export default {
         },
         {
           prop: "searchKey",
-          placeholder: this.showStatus ? '请输入班级名称/所属公司/学员姓名': '请输入所属公司/学员姓名',
+          placeholder: this.showStatus
+            ? "请输入班级名称/所属公司/学员姓名"
+            : "请输入所属公司/学员姓名",
         },
         {
           prop: "telphone",
@@ -428,6 +449,14 @@ export default {
     this.search();
   },
   methods: {
+    pictureFunc(item) {
+      if (item.prop == "notPlush") {
+        this.formData.pageSize = 10;
+        this.formData.pageNum = 1;
+        this.$set(this.formData,'officialStatus',0)
+        this.search();
+      }
+    },
     exportStudent() {
       let data = JSON.parse(JSON.stringify(this.formData));
       data.gradeId = this.$route.query.id || "";
@@ -594,12 +623,9 @@ export default {
         .finally(() => {
           this.loading = false;
         });
-      this.$api.periodPlush(data).then((res) => {
-        const { plush, notPlush } = res.data
-        this.info = {
-          plush: plush,
-          notPlush: notPlush
-        }
+
+      this.$api.gradegradecountperiodPlush(data).then((res) => {
+        this.info = res.data;
       });
     },
     init() {

+ 2 - 2
src/views/education/classManageMent/classList/index copy 2.vue → src/views/education/classManageMent/classListOld/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="classList">
+  <div id="classListOld">
     <search-box-new
       ref="searchBox"
       :formData="formData"
@@ -41,7 +41,7 @@ import tableList from "@/components/tableList";
 import pagination from "@/components/pagination";
 export default {
   components: { searchBoxNew, tableList, pagination },
-  name: "ClassList",
+  name: "ClassListOld",
   data() {
     return {
       loading: false, //当前表单加载是否加载动画

+ 7 - 48
src/views/education/classManageMent/listOfhoursToBeReviewed/index.vue

@@ -6,7 +6,7 @@
         :type="formData.periodStatus === 2 ? 'primary' : ''"
         :size="size"
         @click="changeBTN(2)"
-        >初审({{ reviewListNums }})
+        >初审({{ reviewListNumObj.firstPeriodNum }})
         <!-- <i
           class="el-icon-warning-outline"
           :style="
@@ -24,7 +24,7 @@
         :type="formData.periodStatus === 3 ? 'primary' : ''"
         :size="size"
         @click="changeBTN(3)"
-        >复审({{ underReiviewNums }})
+        >复审({{ reviewListNumObj.recheckNum }})
         <!-- <i
           class="el-icon-warning-outline"
           :style="
@@ -42,7 +42,7 @@
         :type="formData.periodStatus === 0 ? 'primary' : ''"
         :size="size"
         @click="changeBTN(0)"
-        >不通过({{ failNums }})</el-button
+        >不通过({{ reviewListNumObj.noPassNum }})</el-button
       ><el-button
         :type="formData.periodStatus === 1 ? 'primary' : ''"
         :size="size"
@@ -94,9 +94,7 @@ export default {
   data() {
     return {
       size: "small",
-      reviewListNums: 0,
-      underReiviewNums: 0,
-      failNums: 0,
+      reviewListNumObj: {},
       loading: false, //当前表单加载是否加载动画
       navText: {
         title: "学时审核管理",
@@ -337,12 +335,6 @@ export default {
       );
       this.$refs.searchBox.changeBusinessLevel(this.$route.params.businessId);
     }
-    console.log(
-      this.$methodsTools.timestampConvert(this.$route.params.timeType)[0]
-    );
-    console.log(
-      this.$methodsTools.timestampConvert(this.$route.params.timeType)[1]
-    );
     if (this.$route.params.timeType >= 0) {
       this.$set(
         this.formData,
@@ -357,14 +349,10 @@ export default {
     }
     this.search();
     this.getInitList();
-    this.getInitUnderList();
-    this.getFailList();
   },
   activated() {
     this.search();
     this.getInitList();
-    this.getInitUnderList();
-    this.getFailList();
   },
   methods: {
     changeBTN(int) {
@@ -376,38 +364,9 @@ export default {
      */
     getInitList() {
       this.$api
-        .inquireGradegradelistUserPeriod({
-          periodStatus: 2,
-          status: 1,
-        })
-        .then((res) => {
-          this.reviewListNums = res.rows.length;
-        });
-    },
-    /**
-     * 审核中数量
-     */
-    getInitUnderList() {
-      this.$api
-        .inquireGradegradelistUserPeriod({
-          periodStatus: 3,
-          status: 1,
-        })
-        .then((res) => {
-          this.underReiviewNums = res.rows.length;
-        });
-    },
-    /**
-     * 不通过数量
-     */
-    getFailList() {
-      this.$api
-        .inquireGradegradelistUserPeriod({
-          periodStatus: 0,
-          status: 1,
-        })
+        .listUserPeriodTotal()
         .then((res) => {
-          this.failNums = res.rows.length;
+          this.reviewListNumObj = res.data || {};
         });
     },
     jumpPage(v) {
@@ -477,7 +436,7 @@ export default {
         data.periodEndTime = parseInt(data.periodEndTime / 1000);
       }
       this.$api
-        .inquireGradegradelistUserPeriods(data)
+        .listUserPeriodManage(data)
         .then((res) => {
           this.tableData = res.rows;
           this.total = res.total;

+ 2 - 0
src/views/education/notificationManageMent/notificationList/add/index.vue

@@ -515,6 +515,8 @@ export default {
       if (this.informCourseAdd.goodsId) {
         delete this.informCourseAdd.goodsId;
       }
+      this.newGoodsList = []
+      if(!v) return
       this.$api
         .inquireGoods({
           businessId: v,

+ 60 - 38
src/views/resource/videoManagement/chapter/add/index.vue

@@ -201,6 +201,12 @@
             <el-radio :label="0">非公共章</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item label="视频类型" prop="viewSign">
+          <el-radio-group v-model="listData.viewSign">
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="是否发布" prop="publishStatus">
           <el-radio-group v-model="listData.publishStatus">
             <el-radio :label="1">是</el-radio>
@@ -247,15 +253,13 @@
             :prop="item.prop"
           >
             <template slot-scope="scope">
-              <span v-if="item.scope === 'types'">{{
-                scope.row[item.prop] === 1
-                  ? "录播"
-                  : scope.row[item.prop] === 2
-                  ? "直播"
-                  : scope.row[item.prop] === 3
-                  ? "回放"
-                  : "未知"
-              }}</span>
+              <span v-if="item.scope === 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs">
+                  <span v-if="scope.row[item.prop] == items.value">{{
+                    items.label
+                  }}</span>
+                </span>
+              </span>
               <span v-else-if="item.scope === 'convert'">{{
                 $methodsTools.secondToDate(scope.row[item.prop], false)
               }}</span>
@@ -264,15 +268,6 @@
                   ? scope.row[item.prop2]
                   : scope.row[item.prop1]
               }}</span>
-              <span v-else-if="item.scope === 'Status'">
-                {{
-                  scope.row[item.prop] === 1
-                    ? "发布"
-                    : scope.row[item.prop] === 0
-                    ? "未发布"
-                    : "未知"
-                }}
-              </span>
               <div v-else-if="item.scope === 'inputs'">
                 <el-input-number
                   style="width: 50px"
@@ -373,15 +368,13 @@
             header-align="center"
           >
             <template slot-scope="scope">
-              <span v-if="item.scope === 'types'">{{
-                scope.row[item.prop] === 1
-                  ? "录播"
-                  : scope.row[item.prop] === 2
-                  ? "直播"
-                  : scope.row[item.prop] === 3
-                  ? "回放"
-                  : ""
-              }}</span>
+              <span v-if="item.scope === 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs">
+                  <span v-if="scope.row[item.prop] == items.value">{{
+                    items.label
+                  }}</span>
+                </span>
+              </span>
               <span v-else-if="item.scope === 'convert'">{{
                 $methodsTools.secondToDate(scope.row[item.prop], false)
               }}</span>
@@ -390,15 +383,6 @@
                   ? scope.row[item.prop2]
                   : scope.row[item.prop1]
               }}</span>
-              <span v-else-if="item.scope === 'Status'">
-                {{
-                  scope.row[item.prop] === 1
-                    ? "发布"
-                    : scope.row[item.prop] === 0
-                    ? "未发布"
-                    : "未知"
-                }}
-              </span>
               <span v-else>{{ scope.row[item.prop] }}</span></template
             >
           </el-table-column></template
@@ -464,6 +448,7 @@ export default {
         publishStatus: 1,
         recordingUrl: "",
         liveUrl: "",
+        viewSign:1,
         coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
       },
       eduTypeOptions: [], //教育类型数据
@@ -490,6 +475,9 @@ export default {
         commonSign: [
           { required: true, message: "请选择公共标识", trigger: "change" },
         ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         publishStatus: [
           { required: true, message: "请选择是否发布", trigger: "change" },
         ],
@@ -501,7 +489,29 @@ export default {
         { label: "节编码", prop: "code", width: "120" },
         { label: "标题前缀", prop: "prefixName", width: "180" },
         { label: "节标题", prop: "name", width: "310" },
-        { label: "节类型", prop: "sectionType", scope: "types" },
+        {
+          label: "节类型",
+          prop: "sectionType",
+          scope: "isOptions",
+          options: [
+            {
+              label: "录播",
+              value: 1,
+            },
+            { label: "直播", value: 2 },
+            { label: "回放", value: 3 },
+          ],
+        },
+        {
+          label: "视频类型",
+          prop: "viewSign",
+          scope: "isOptions",
+          options: [
+            { label: "保利威", value: 1 },
+            { label: "腾讯", value: 2 },
+          ],
+          width: "120",
+        },
         {
           label: "URL地址/直播地址",
           prop: "sectionType",
@@ -520,7 +530,14 @@ export default {
         {
           label: "发布状态",
           prop: "publishStatus",
-          scope: "Status",
+          scope: "isOptions",
+          options: [
+            {
+              label: "发布",
+              value: 1,
+            },
+            { label: "未发布", value: 0 },
+          ],
           width: "120",
         },
       ],
@@ -943,6 +960,10 @@ export default {
               this.$message.warning(`管理节第${i + 1}条请输入排序`);
               return;
             }
+            if(this.tableData[i].viewSign != this.listData.viewSign){
+              this.$message.warning("请保持节视频类型与章关联视频类型保持一致")
+              return
+            }
           }
           let arr = this.tableData.map((items) => {
             return items.sort;
@@ -968,6 +989,7 @@ export default {
       });
       var dataInfos = {
         status: 1,
+        viewSign:this.listData.viewSign,
         businessList: this.newSujectApis,
         sectionIdList: sectionIdList,
         coverUrl: this.listData.coverUrl,

+ 47 - 11
src/views/resource/videoManagement/chapter/addSection.vue

@@ -58,18 +58,38 @@
                     </el-option>
                   </el-select>
                 </el-form-item>
+                <el-form-item
+                  label="视频类型"
+                  prop="viewSign"
+                  v-if="item.sectionType === 1"
+                >
+                  <el-radio-group v-model="item.viewSign">
+                    <el-radio :label="1">保利威</el-radio>
+                    <el-radio :label="2">腾讯</el-radio>
+                  </el-radio-group>
+                </el-form-item>
                 <el-form-item
                   v-if="item.sectionType"
                   :label="item.sectionType === 1 ? 'URL地址' : '频道号'"
                   prop="url"
                 >
                   <el-input
+                    :disabled="
+                      item.sectionType == 1 && !item.viewSign ? true : false
+                    "
                     v-model="item.url"
                     @blur="
-                      item.sectionType === 1 ? getUrlTime(index, $event) : ''
+                      item.sectionType === 1
+                        ? getUrlTime(item.viewSign, index, $event)
+                        : ''
                     "
-                  ><el-button :disabled="item.url.length <= 0" slot="append" @click="seeTheVideoFunc(item)">预览</el-button></el-input>
-                   
+                    ><el-button
+                      :disabled="item.url.length <= 0"
+                      slot="append"
+                      @click="seeTheVideoFunc(item)"
+                      >预览</el-button
+                    ></el-input
+                  >
                 </el-form-item>
                 <div v-if="item.sectionType === 1">
                   <el-form-item label="节时长" prop="durationTime">
@@ -171,6 +191,9 @@ export default {
         sectionType: [
           { required: true, message: "请选择节类型", trigger: "change" },
         ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         url: [
           { required: true, message: "请输入URL地址/频道号", trigger: "blur" },
         ],
@@ -223,15 +246,22 @@ export default {
     /**
      * 查找节时长
      */
-    getUrlTime(index, value) {
+    getUrlTime(viewSign, index, value) {
       var self = this;
       let val = value.target.value;
       const valueUrl = val.replace(/\s/g, "");
-      if (valueUrl && valueUrl.length > 30) {
-        this.$api
-          .inquirepolyvvideo(valueUrl)
+      if (valueUrl && valueUrl.length > 10) {
+        this.$api[
+          viewSign == 1 ? "inquirepolyvvideo" : "inquirevodvideodetail"
+        ](valueUrl)
           .then((res) => {
             if (res.data.duration) {
+              if (viewSign == 2) {
+                res.data.duration = this.$methodsTools.secondToDate(
+                  res.data.duration,
+                  false
+                );
+              }
               this.$set(this.list[index], "durationTime", res.data.duration);
               this.$set(this.list[index], "disabled", true);
               this.$message.success("已自动录入节时长");
@@ -272,7 +302,13 @@ export default {
      * 修改节类型需要处理的逻辑
      */
     changesType(index, val) {
-      let ary = ["url", "durationTime", "liveStartTime", "liveEndTime"];
+      let ary = [
+        "url",
+        "durationTime",
+        "liveStartTime",
+        "liveEndTime",
+        "viewSign",
+      ];
       for (let i = 0; i < ary.length; i++) {
         this.$set(this.list[index], ary[i], "");
       }
@@ -366,11 +402,11 @@ export default {
      */
     seeTheVideoFunc(item) {
       let jsonstr = JSON.parse(JSON.stringify(item));
-      if(jsonstr.sectionType === 1){
+      if (jsonstr.sectionType === 1) {
         jsonstr.recordingUrl = item.url;
       }
-      if(jsonstr.sectionType === 2){
-        jsonstr.liveUrl = item.url
+      if (jsonstr.sectionType === 2) {
+        jsonstr.liveUrl = item.url;
       }
       this.$parent.$refs.preview.diavosFun(jsonstr);
     },

+ 59 - 38
src/views/resource/videoManagement/chapter/edit/index.vue

@@ -173,6 +173,12 @@
             <el-radio :label="0">非公共章</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item label="视频类型" prop="viewSign">
+          <el-radio-group v-model="listData.viewSign" disabled>
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="是否发布" prop="publishStatus">
           <el-radio-group v-model="listData.publishStatus">
             <el-radio :label="1">是</el-radio>
@@ -219,15 +225,13 @@
             :prop="item.prop"
           >
             <template slot-scope="scope">
-              <span v-if="item.scope === 'types'">{{
-                scope.row[item.prop] === 1
-                  ? "录播"
-                  : scope.row[item.prop] === 2
-                  ? "直播"
-                  : scope.row[item.prop] === 3
-                  ? "回放"
-                  : "未知"
-              }}</span>
+              <span v-if="item.scope === 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs">
+                  <span v-if="scope.row[item.prop] == items.value">{{
+                    items.label
+                  }}</span>
+                </span>
+              </span>
               <span v-else-if="item.scope === 'convert'">{{
                 $methodsTools.secondToDate(scope.row[item.prop], false)
               }}</span>
@@ -236,15 +240,6 @@
                   ? scope.row[item.prop2]
                   : scope.row[item.prop1]
               }}</span>
-              <span v-else-if="item.scope === 'Status'">
-                {{
-                  scope.row[item.prop] === 1
-                    ? "发布"
-                    : scope.row[item.prop] === 0
-                    ? "未发布"
-                    : "未知"
-                }}
-              </span>
               <div v-else-if="item.scope === 'inputs'">
                 <el-input-number
                   style="width: 50px"
@@ -346,15 +341,13 @@
             header-align="center"
           >
             <template slot-scope="scope">
-              <span v-if="item.scope === 'types'">{{
-                scope.row[item.prop] === 1
-                  ? "录播"
-                  : scope.row[item.prop] === 2
-                  ? "直播"
-                  : scope.row[item.prop] === 3
-                  ? "回放"
-                  : ""
-              }}</span>
+              <span v-if="item.scope === 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs">
+                  <span v-if="scope.row[item.prop] == items.value">{{
+                    items.label
+                  }}</span>
+                </span>
+              </span>
               <span v-else-if="item.scope === 'convert'">{{
                 $methodsTools.secondToDate(scope.row[item.prop], false)
               }}</span>
@@ -363,15 +356,6 @@
                   ? scope.row[item.prop2]
                   : scope.row[item.prop1]
               }}</span>
-              <span v-else-if="item.scope === 'Status'">
-                {{
-                  scope.row[item.prop] === 1
-                    ? "发布"
-                    : scope.row[item.prop] === 0
-                    ? "未发布"
-                    : "未知"
-                }}
-              </span>
               <span v-else>{{ scope.row[item.prop] }}</span></template
             >
           </el-table-column></template
@@ -461,6 +445,9 @@ export default {
         commonSign: [
           { required: true, message: "请选择公共标识", trigger: "change" },
         ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         publishStatus: [
           { required: true, message: "请选择是否发布", trigger: "change" },
         ],
@@ -472,7 +459,29 @@ export default {
         { label: "节编码", prop: "code", width: "120" },
         { label: "标题前缀", prop: "prefixName", width: "180" },
         { label: "节标题", prop: "name", width: "310" },
-        { label: "节类型", prop: "sectionType", scope: "types" },
+        {
+          label: "节类型",
+          prop: "sectionType",
+          scope: "isOptions",
+          options: [
+            {
+              label: "录播",
+              value: 1,
+            },
+            { label: "直播", value: 2 },
+            { label: "回放", value: 3 },
+          ],
+        },
+        {
+          label: "视频类型",
+          prop: "viewSign",
+          scope: "isOptions",
+          options: [
+            { label: "保利威", value: 1 },
+            { label: "腾讯", value: 2 },
+          ],
+          width: "120",
+        },
         {
           label: "URL地址/直播地址",
           prop: "sectionType",
@@ -491,7 +500,14 @@ export default {
         {
           label: "发布状态",
           prop: "publishStatus",
-          scope: "Status",
+          scope: "isOptions",
+          options: [
+            {
+              label: "发布",
+              value: 1,
+            },
+            { label: "未发布", value: 0 },
+          ],
           width: "120",
         },
       ],
@@ -983,6 +999,10 @@ export default {
               this.$message.warning(`管理节第${i + 1}条请输入排序`);
               return;
             }
+            if(this.tableData[i].viewSign != this.listData.viewSign){
+              this.$message.warning("请保持节视频类型与章关联视频类型保持一致")
+              return
+            }
           }
           let arr = this.tableData.map((items) => {
             return items.sort;
@@ -1011,6 +1031,7 @@ export default {
       });
       var dataInfos = {
         status: 1,
+        viewSign:this.listData.viewSign,
         chapterId: this.pageId,
         businessList: this.newSujectApis,
         sectionIdList: sectionIdList,

+ 13 - 7
src/views/resource/videoManagement/courseManagement/basicInfoAdd/index.vue

@@ -72,11 +72,7 @@
             </el-option>
           </el-select>
         </el-form-item> -->
-        <el-form-item
-          label="科目"
-          prop="subjectId"
-          v-if="listData.businessId"
-        >
+        <el-form-item label="科目" prop="subjectId" v-if="listData.businessId">
           <el-select v-model="listData.subjectId" placeholder="请选择科目">
             <el-option
               v-for="(item, index) in newSujectOption"
@@ -147,6 +143,12 @@
             >删除</el-button
           >
         </el-form-item>
+        <el-form-item label="视频类型" prop="viewSign">
+          <el-radio-group v-model="listData.viewSign">
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="是否发布" prop="publishStatus">
           <el-radio-group v-model="listData.publishStatus">
             <el-radio :label="1">是</el-radio>
@@ -230,6 +232,7 @@ export default {
         schoolId: "",
         majorId: "",
         subjectId: "",
+        viewSign:1,
       },
 
       eduTypeOptions: [], //教育类型数据
@@ -285,6 +288,9 @@ export default {
         courseName: [
           { required: true, message: "请输入课程名称", trigger: "blur" },
         ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         publishStatus: [
           { required: true, message: "请选择是否发布", trigger: "change" },
         ],
@@ -404,7 +410,7 @@ export default {
           // if (!newMajorOption.length) {
           //   this.newMajorOption = this.majorOption;
           // } else {
-            this.newMajorOption = newMajorOption;
+          this.newMajorOption = newMajorOption;
           // }
           for (let i = 0; i < this.sujectOption.length; i++) {
             if (
@@ -593,4 +599,4 @@ export default {
   text-align: center;
   border: none;
 }
-</style>
+</style>

+ 9 - 0
src/views/resource/videoManagement/courseManagement/basicInfoEdit/index.vue

@@ -150,6 +150,12 @@
             >删除</el-button
           >
         </el-form-item>
+        <el-form-item label="视频类型" prop="viewSign" >
+          <el-radio-group v-model="listData.viewSign" disabled>
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="是否发布" prop="publishStatus">
           <el-radio-group v-model="listData.publishStatus">
             <el-radio :label="1">是</el-radio>
@@ -287,6 +293,9 @@ export default {
         courseName: [
           { required: true, message: "请输入课程名称", trigger: "blur" },
         ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         publishStatus: [
           { required: true, message: "请选择是否发布", trigger: "change" },
         ],

+ 42 - 24
src/views/resource/videoManagement/courseManagement/chapterContent/index.vue

@@ -345,30 +345,46 @@
             >
             <!-- :show-overflow-tooltip="true" -->
               <template slot-scope="scope">
-                <el-popover
-                  v-if="item.scope === 'moreList'"
-                  placement="right-end"
-                  trigger="hover"
-                >
-                  <ul>
-                    <li
-                      v-for="(items, indexs) in scope.row['businessList']"
-                      :key="indexs"
-                    >
-                      {{ getBusinessName(items, item) }}
-                    </li>
-                  </ul>
-                  <ul slot="reference" style="cursor: pointer;">
-                    <li
-                      v-for="(items, indexs) in scope.row['businessList'].slice(0, 3)"
-                      :key="indexs"
-                    >
-                      {{ getBusinessName(items, item) }}
-                    </li>
-                    等{{ scope.row['businessList'].length }}份试卷
-                  </ul>
-                </el-popover>
-                
+                <div v-if="item.scope === 'moreList'">
+                  <el-popover placement="right-end" width="250" trigger="hover">
+                    <ul>
+                      <li
+                        v-for="(items, indexs) in scope.row['businessList']"
+                        :key="indexs"
+                      >
+                        {{
+                          items[item.prop1] +
+                          "-" +
+                          items[item.prop2] +
+                          "-" +
+                          items[item.prop3] +
+                          "-" +
+                          items[item.prop4]
+                        }}
+                      </li>
+                    </ul>
+                    <ul slot="reference" style="margin: 0px;">
+                      <template
+                        v-for="(items, indexs) in scope.row['businessList']"
+                      >
+                        <li v-if="indexs < 3" :key="indexs">
+                          {{
+                            items[item.prop1] +
+                            "-" +
+                            items[item.prop2] +
+                            "-" +
+                            items[item.prop3] +
+                            "-" +
+                            items[item.prop4]
+                          }}
+                        </li>
+                      </template>
+                    </ul>
+                  </el-popover>
+                  <div v-if="scope.row['businessList'].length > 3">
+                    等{{ scope.row["businessList"].length }}份试卷
+                  </div>
+                </div>
                 <span v-else-if="item.scope === 'status'">{{
                   scope.row[item.prop] === 1
                     ? "发布"
@@ -518,6 +534,7 @@ export default {
         publishStatus: 1,
         name: "",
         key: "",
+        viewSign: "",
       },
       formList5: [],
       total6: 0,
@@ -751,6 +768,7 @@ export default {
     search() {
       this.$api.obtainCourseS(this.$route.query.id).then((res) => {
         this.pageInfo = res.data;
+        this.formData5.viewSign = res.data.viewSign || "";
       });
       this.$api
         .inquireCoursemenuListS({ courseId: this.$route.query.id })

+ 124 - 37
src/views/resource/videoManagement/festival/add/index.vue

@@ -19,8 +19,7 @@
               :key="index"
               :label="item.educationName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <el-select
             v-model="courType"
@@ -32,8 +31,7 @@
               :key="index"
               :label="item.projectName + '-' + item.businessName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <el-popover
             ref="popovers"
@@ -75,7 +73,7 @@
           </el-popover>
           <span style="margin-left: 10px">注:可多选</span>
         </el-form-item>
-        <el-form-item label="">
+        <el-form-item label>
           <div :class="changeHeight ? 'ach' : 'clh'">
             <div
               v-for="(item, index) in newSujectApis"
@@ -126,7 +124,8 @@
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
-          ><el-button
+          >
+          <el-button
             size="mini"
             v-if="newSujectApis.length > 0"
             @click="sujectApis = []"
@@ -156,10 +155,17 @@
               :key="index"
               :label="item.label"
               :value="item.value"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
         </el-form-item>
+
+        <el-form-item label="视频类型" prop="viewSign">
+          <el-radio-group v-model="listData.viewSign" @change="changeViewSign">
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
         <el-form-item
           label="频道号"
           v-if="listData.sectionType === 2"
@@ -180,8 +186,7 @@
               :key="index"
               :label="item.streamingName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <div v-if="listData.liveUrl" style="margin-top: 10px">
             <el-button
@@ -202,8 +207,7 @@
             type="datetime"
             placeholder="请选择直播开始时间"
             value-format="timestamp"
-          >
-          </el-date-picker>
+          ></el-date-picker>
         </el-form-item>
         <el-form-item
           label="直播结束时间"
@@ -215,8 +219,7 @@
             type="datetime"
             placeholder="请选择直播结束时间"
             value-format="timestamp"
-          >
-          </el-date-picker>
+          ></el-date-picker>
         </el-form-item>
         <el-form-item
           label="直播时长"
@@ -225,9 +228,10 @@
             listData.liveStartTime &&
             listData.liveEndTime
           "
+          >{{
+            compTimeOUT(listData.liveStartTime, listData.liveEndTime)
+          }}</el-form-item
         >
-          {{ compTimeOUT(listData.liveStartTime, listData.liveEndTime) }}
-        </el-form-item>
         <el-form-item
           label="URL地址"
           v-if="listData.sectionType === 1 || listData.sectionType === 3"
@@ -240,18 +244,20 @@
             @change="getApiTime(listData.recordingUrl)"
           ></el-input>
           <label
+            v-if="listData.viewSign == 1"
             for="mobles"
             class="el-button el-button--primary"
             style="margin: 0px 6px; padding: 10px 20px"
             >上传</label
-          ><input
+          >
+          <input
             style="display: none"
             type="file"
             id="mobles"
             @change="importMoble"
           />
           <el-select
-            v-if="listData.sectionType === 1"
+            v-if="listData.sectionType === 1 && listData.viewSign == 1"
             v-model="newActiveRecordingUrl1"
             filterable
             placeholder="快捷选中录播URL地址"
@@ -262,8 +268,7 @@
               :key="index"
               :label="item.streamingName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <el-select
             v-if="listData.sectionType === 3"
@@ -277,8 +282,7 @@
               :key="index"
               :label="item.streamingName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <div v-if="listData.recordingUrl" style="margin-top: 10px">
             <el-button
@@ -300,8 +304,7 @@
             range-separator=":"
             v-model="listData.durationTime"
             placeholder="请填入节时长"
-          >
-          </el-time-picker>
+          ></el-time-picker>
         </el-form-item>
         <el-form-item
           label="讲师"
@@ -317,8 +320,7 @@
               :key="index"
               :label="item.teacherName"
               :value="item.teacherId"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="节封面" prop="coverUrl">
@@ -336,8 +338,8 @@
                 v-if="!listData.coverUrl"
               >
                 <label for="uplose">
-                  <i class="el-icon-circle-plus-outline iconStsz"></i
-                ></label>
+                  <i class="el-icon-circle-plus-outline iconStsz"></i>
+                </label>
                 <input
                   ref="file"
                   type="file"
@@ -353,8 +355,7 @@
                 :preview-src-list="[
                   $methodsTools.splitImgHost(listData.coverUrl),
                 ]"
-              >
-              </el-image>
+              ></el-image>
             </el-col>
             <el-col :span="11">
               <span style="color: #999; font-size: 14px"
@@ -399,11 +400,11 @@
       <div slot="title" class="hearders">
         <div class="leftTitle">视频预览</div>
         <div class="rightBoxs">
-          <img src="@/assets/images/Close@2x.png" alt="" @click="clears" />
+          <img src="@/assets/images/Close@2x.png" alt @click="clears" />
         </div>
       </div>
       <div>
-        <div id="player"></div>
+        <div id="player" v-show="listData.viewSign == 1"></div>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="clears">取 消</el-button>
@@ -419,7 +420,7 @@
       <div slot="title" class="hearders">
         <div class="leftTitle">直播预览</div>
         <div class="rightBoxs">
-          <img src="@/assets/images/Close@2x.png" alt="" @click="clearszb" />
+          <img src="@/assets/images/Close@2x.png" alt @click="clearszb" />
         </div>
       </div>
       <div>
@@ -442,6 +443,8 @@ export default {
       isIndeterminate: false,
       checkAll: false,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
+      vodPlayerJsForTCPlayer:
+        "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
       vid: "",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
@@ -474,6 +477,7 @@ export default {
       changeHeight: true,
       bfImg: "oss/images/avatar/20211013/1634097664410_1397766697",
       listData: {
+        viewSign: 1,
         durationTime: "",
         sectionType: 1,
         publishStatus: 1,
@@ -511,6 +515,9 @@ export default {
         //   { required: true, message: "节时长不能为空" },
         //   { type: "number", message: "节时长必须为数字值" },
         // ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         recordingUrl: [
           {
             required: true,
@@ -559,10 +566,15 @@ export default {
     this.getDict();
   },
   methods: {
+    changeViewSign(){
+      this.listData.recordingUrl = ''
+      this.listData.durationTime = ''
+    },
     changeTypeSection() {
       this.$nextTick(() => {
         this.$refs.listData.clearValidate();
       });
+      this.changeViewSign()
     },
     unTime(val) {
       let a = `${val.businessId}-${val.subjectId}`;
@@ -633,15 +645,21 @@ export default {
       }
     },
     getApiTime(val) {
+      console.log("获取时长", this.listData.viewSign == 2);
       var self = this;
       const valueUrl = val.replace(/\s/g, "");
-      if (valueUrl && valueUrl.length > 30) {
+      if (this.listData.viewSign == 2) {
         this.disabledBtn = true;
         this.$api
-          .inquirepolyvvideo(valueUrl)
+          .inquirevodvideodetail(valueUrl)
           .then((res) => {
+            console.log("请求腾讯时长", res.data.duration);
             if (res.data.duration) {
-              self.listData.durationTime = res.data.duration;
+              self.listData.durationTime = this.$methodsTools.secondToDate(
+                res.data.duration,
+                false
+              );
+              console.log("转换后的腾讯时间", self.listData.durationTime);
               self.disabloutime = true;
             } else {
               self.disabloutime = false;
@@ -653,6 +671,26 @@ export default {
           .finally(() => {
             this.disabledBtn = false;
           });
+      } else {
+        if (valueUrl && valueUrl.length > 30) {
+          this.disabledBtn = true;
+          this.$api
+            .inquirepolyvvideo(valueUrl)
+            .then((res) => {
+              if (res.data.duration) {
+                self.listData.durationTime = res.data.duration;
+                self.disabloutime = true;
+              } else {
+                self.disabloutime = false;
+              }
+            })
+            .catch((err) => {
+              self.disabloutime = false;
+            })
+            .finally(() => {
+              this.disabledBtn = false;
+            });
+        }
       }
     },
     loadPlayerScript(callback) {
@@ -668,6 +706,19 @@ export default {
         });
       }
     },
+    loadPlayerScript_tencent(callback) {
+      if (!window.TCPlayer) {
+        const myScript = document.createElement("script");
+        myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
+        myScript.onload = callback;
+        document.body.appendChild(myScript);
+      } else {
+        callback();
+        this.player_tencent.on("error", (...params) => {
+          this.$message.error(returnTitle(params[1]));
+        });
+      }
+    },
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -684,6 +735,31 @@ export default {
         },
       });
     },
+    loadPlayer_tencent() {
+      var self = this;
+      const TCPlayer = window.TCPlayer;
+      try {
+        let video = document.querySelector("video");
+        video.parentNode.removeChild(video);
+      } catch (error) {
+        console.log("清除video标签异常");
+      }
+      let player_tencent = document.createElement("video");
+      player_tencent.id = "player-tencent";
+      document
+        .getElementById("player")
+        .insertAdjacentElement("afterend", player_tencent);
+      self.$api.obtaintcvideosign(self.vid).then((res) => {
+        self.player_tencent = TCPlayer("player-tencent", {
+          width: 800,
+          height: 533,
+          fileID: self.vid,
+          appID: res.data.appID,
+          psign: res.data.psign,
+          licenseUrl: res.data.licenseUrl,
+        });
+      });
+    },
     /**
      * @param {String} 关闭视频窗口-销毁实例
      */
@@ -692,6 +768,9 @@ export default {
       if (this.player) {
         this.player.destroy();
       }
+      if (this.player_tencent) {
+        this.player_tencent.dispose();
+      }
     },
     /**
      * @param {String} 视频查看
@@ -705,12 +784,19 @@ export default {
       this.diavos = true;
     },
     isOkBf() {
-      this.loadPlayerScript(this.loadPlayer);
+      if (this.listData.viewSign == 2) {
+        this.loadPlayerScript_tencent(this.loadPlayer_tencent);
+      } else {
+        this.loadPlayerScript(this.loadPlayer);
+      }
     },
     closePlayer() {
       if (this.player) {
         this.player.destroy();
       }
+      if (this.player_tencent) {
+        this.player_tencent.dispose();
+      }
     },
     /**
      * @param {String} 直播预览
@@ -1011,6 +1097,7 @@ export default {
       var dataInfos = {
         status: 1,
         businessList: this.newSujectApis,
+        viewSign: this.listData.viewSign,
         coverUrl: this.listData.coverUrl,
         name: this.listData.name,
         prefixName: this.listData.prefixName,

+ 136 - 58
src/views/resource/videoManagement/festival/edit/index.vue

@@ -19,8 +19,7 @@
               :key="index"
               :label="item.educationName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <el-select
             v-model="courType"
@@ -32,8 +31,7 @@
               :key="index"
               :label="item.projectName + '-' + item.businessName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <el-popover
             ref="popovers"
@@ -75,7 +73,7 @@
           </el-popover>
           <span style="margin-left: 10px">注:可多选</span>
         </el-form-item>
-        <el-form-item label="">
+        <el-form-item label>
           <div :class="changeHeight ? 'ach' : 'clh'">
             <div
               v-for="(item, index) in newSujectApis"
@@ -99,7 +97,8 @@
             v-if="newSujectApis.length > 1"
             @click="changeType"
             >{{ changeHeight ? "展开" : "关闭" }}</el-button
-          ><el-button
+          >
+          <el-button
             size="mini"
             v-if="newSujectApis.length > 0"
             @click="sujectApis = []"
@@ -131,10 +130,17 @@
               :disabled="item.value == 1"
               :label="item.label"
               :value="item.value"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
         </el-form-item>
+
+        <el-form-item label="视频类型" prop="viewSign">
+          <el-radio-group v-model="listData.viewSign" disabled>
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
         <el-form-item
           label="频道号"
           v-if="listData.sectionType === 2"
@@ -155,8 +161,7 @@
               :key="index"
               :label="item.streamingName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <div v-if="listData.liveUrl" style="margin-top: 10px">
             <el-button
@@ -177,8 +182,7 @@
             type="datetime"
             placeholder="请选择直播开始时间"
             value-format="timestamp"
-          >
-          </el-date-picker>
+          ></el-date-picker>
         </el-form-item>
         <el-form-item
           label="直播结束时间"
@@ -190,8 +194,7 @@
             type="datetime"
             placeholder="请选择直播结束时间"
             value-format="timestamp"
-          >
-          </el-date-picker>
+          ></el-date-picker>
         </el-form-item>
         <el-form-item
           label="直播时长"
@@ -200,9 +203,10 @@
             listData.liveStartTime &&
             listData.liveEndTime
           "
+          >{{
+            compTimeOUT(listData.liveStartTime, listData.liveEndTime)
+          }}</el-form-item
         >
-          {{ compTimeOUT(listData.liveStartTime, listData.liveEndTime) }}
-        </el-form-item>
         <el-form-item
           label="URL地址"
           v-if="listData.sectionType === 1 || listData.sectionType === 3"
@@ -215,18 +219,20 @@
             @change="getApiTime(listData.recordingUrl)"
           ></el-input>
           <label
+          v-if="listData.viewSign == 1"
             for="mobles"
             class="el-button el-button--primary"
             style="margin: 0px 6px; padding: 10px 20px"
             >上传</label
-          ><input
+          >
+          <input
             style="display: none"
             type="file"
             id="mobles"
             @change="importMoble"
           />
           <el-select
-            v-if="listData.sectionType === 1"
+            v-if="listData.sectionType === 1 && listData.viewSign == 1"
             v-model="newActiveRecordingUrl1"
             placeholder="快捷选中录播URL地址"
             filterable
@@ -237,8 +243,7 @@
               :key="index"
               :label="item.streamingName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <el-select
             v-if="listData.sectionType === 3"
@@ -252,8 +257,7 @@
               :key="index"
               :label="item.streamingName"
               :value="item.id"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
           <div v-if="listData.recordingUrl" style="margin-top: 10px">
             <el-button
@@ -275,8 +279,7 @@
             range-separator=":"
             v-model="listData.durationTime"
             placeholder="请填入节时长"
-          >
-          </el-time-picker>
+          ></el-time-picker>
         </el-form-item>
         <el-form-item
           label="讲师"
@@ -292,8 +295,7 @@
               :key="index"
               :label="item.teacherName"
               :value="item.teacherId"
-            >
-            </el-option>
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="节封面" prop="coverUrl">
@@ -311,8 +313,8 @@
                 v-if="!listData.coverUrl"
               >
                 <label for="uplose">
-                  <i class="el-icon-circle-plus-outline iconStsz"></i
-                ></label>
+                  <i class="el-icon-circle-plus-outline iconStsz"></i>
+                </label>
                 <input
                   ref="file"
                   type="file"
@@ -328,8 +330,7 @@
                 :preview-src-list="[
                   $methodsTools.splitImgHost(listData.coverUrl),
                 ]"
-              >
-              </el-image>
+              ></el-image>
             </el-col>
             <el-col :span="11">
               <span style="color: #999; font-size: 14px"
@@ -375,11 +376,11 @@
       <div slot="title" class="hearders">
         <div class="leftTitle">视频预览</div>
         <div class="rightBoxs">
-          <img src="@/assets/images/Close@2x.png" alt="" @click="clears" />
+          <img src="@/assets/images/Close@2x.png" alt @click="clears" />
         </div>
       </div>
       <div>
-        <div id="player"></div>
+        <div id="player" v-show="listData.viewSign == 1"></div>
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="clears">取 消</el-button>
@@ -395,7 +396,7 @@
       <div slot="title" class="hearders">
         <div class="leftTitle">直播预览</div>
         <div class="rightBoxs">
-          <img src="@/assets/images/Close@2x.png" alt="" @click="clearszb" />
+          <img src="@/assets/images/Close@2x.png" alt @click="clearszb" />
         </div>
       </div>
       <div>
@@ -419,6 +420,8 @@ export default {
       isIndeterminate: false,
       checkAll: false,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
+      vodPlayerJsForTCPlayer:
+        "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
       vid: "",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
@@ -486,6 +489,9 @@ export default {
         //   { required: true, message: "节时长不能为空" },
         //   { type: "number", message: "节时长必须为数字值" },
         // ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         recordingUrl: [
           {
             required: true,
@@ -618,16 +624,22 @@ export default {
       }
     },
     getApiTime(val) {
+      console.log("获取时长");
       var self = this;
       this.clearTimes(val);
       const valueUrl = val.replace(/\s/g, "");
-      if (valueUrl && valueUrl.length > 30) {
+      if (this.listData.viewSign == 2) {
         this.disabledBtn = true;
         this.$api
-          .inquirepolyvvideo(valueUrl)
+          .inquirevodvideodetail(valueUrl)
           .then((res) => {
+            console.log("请求腾讯时长", res.data.duration);
             if (res.data.duration) {
-              self.listData.durationTime = res.data.duration;
+              self.listData.durationTime = this.$methodsTools.secondToDate(
+                res.data.duration,
+                false
+              );
+              console.log("转换后的腾讯时间", self.listData.durationTime);
               self.disabloutime = true;
             } else {
               self.disabloutime = false;
@@ -639,6 +651,26 @@ export default {
           .finally(() => {
             this.disabledBtn = false;
           });
+      } else {
+        if (valueUrl && valueUrl.length > 30) {
+          this.disabledBtn = true;
+          this.$api
+            .inquirepolyvvideo(valueUrl)
+            .then((res) => {
+              if (res.data.duration) {
+                self.listData.durationTime = res.data.duration;
+                self.disabloutime = true;
+              } else {
+                self.disabloutime = false;
+              }
+            })
+            .catch((err) => {
+              self.disabloutime = false;
+            })
+            .finally(() => {
+              this.disabledBtn = false;
+            });
+        }
       }
     },
     loadPlayerScript(callback) {
@@ -654,6 +686,19 @@ export default {
         });
       }
     },
+    loadPlayerScript_tencent(callback) {
+      if (!window.TCPlayer) {
+        const myScript = document.createElement("script");
+        myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
+        myScript.onload = callback;
+        document.body.appendChild(myScript);
+      } else {
+        callback();
+        this.player_tencent.on("error", (...params) => {
+          this.$message.error(returnTitle(params[1]));
+        });
+      }
+    },
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -670,6 +715,31 @@ export default {
         },
       });
     },
+    loadPlayer_tencent() {
+      var self = this;
+      const TCPlayer = window.TCPlayer;
+      try {
+        let video = document.querySelector("video");
+        video.parentNode.removeChild(video);
+      } catch (error) {
+        console.log("清除video标签异常");
+      }
+      let player_tencent = document.createElement("video");
+      player_tencent.id = "player-tencent";
+      document
+        .getElementById("player")
+        .insertAdjacentElement("afterend", player_tencent);
+      self.$api.obtaintcvideosign(self.vid).then((res) => {
+        self.player_tencent = TCPlayer("player-tencent", {
+          width: 800,
+          height: 533,
+          fileID: self.vid,
+          appID: res.data.appID,
+          psign: res.data.psign,
+          licenseUrl: res.data.licenseUrl,
+        });
+      });
+    },
     /**
      * @param {String} 关闭视频窗口-销毁实例
      */
@@ -678,6 +748,9 @@ export default {
       if (this.player) {
         this.player.destroy();
       }
+      if (this.player_tencent) {
+        this.player_tencent.dispose();
+      }
     },
     /**
      * @param {String} 视频查看
@@ -691,12 +764,19 @@ export default {
       this.diavos = true;
     },
     isOkBf() {
-      this.loadPlayerScript(this.loadPlayer);
+      if (this.listData.viewSign == 2) {
+        this.loadPlayerScript_tencent(this.loadPlayer_tencent);
+      } else {
+        this.loadPlayerScript(this.loadPlayer);
+      }
     },
     closePlayer() {
       if (this.player) {
         this.player.destroy();
       }
+      if (this.player_tencent) {
+        this.player_tencent.dispose();
+      }
     },
     /**
      * @param {String} 直播预览
@@ -934,7 +1014,7 @@ export default {
       await this.courseTys();
       await this.businTys();
       await this.courseSubject();
-      await this.Streaming();
+      this.Streaming();
       this.search();
     },
     tearchApi() {
@@ -986,27 +1066,24 @@ export default {
       });
     },
     Streaming() {
-      return new Promise((resolve, reject) => {
-        this.$api.inquireCourseStreaming({ status: 1 }).then((res) => {
-          var arrays = [];
-          var newarrays1 = [];
-          var newarrays2 = [];
-          res.rows.map((item) => {
-            if (item.streamingType === 1) {
-              arrays.push(item);
-            }
-            if (item.streamingType === 2) {
-              newarrays1.push(item);
-            }
-            if (item.streamingType === 3) {
-              newarrays2.push(item);
-            }
-          });
-          this.newLiveUrl = arrays;
-          this.newSteamUrl1 = newarrays1;
-          this.newSteamUrl2 = newarrays2;
-          resolve();
+      this.$api.inquireCourseStreaming({ status: 1 }).then((res) => {
+        var arrays = [];
+        var newarrays1 = [];
+        var newarrays2 = [];
+        res.rows.map((item) => {
+          if (item.streamingType === 1) {
+            arrays.push(item);
+          }
+          if (item.streamingType === 2) {
+            newarrays1.push(item);
+          }
+          if (item.streamingType === 3) {
+            newarrays2.push(item);
+          }
         });
+        this.newLiveUrl = arrays;
+        this.newSteamUrl1 = newarrays1;
+        this.newSteamUrl2 = newarrays2;
       });
     },
     changeEduType() {
@@ -1070,6 +1147,7 @@ export default {
         status: 1,
         sectionId: this.pageId,
         businessList: this.newSujectApis,
+        viewSign: this.listData.viewSign,
         coverUrl: this.listData.coverUrl,
         name: this.listData.name,
         prefixName: this.listData.prefixName,

+ 39 - 0
src/views/resource/videoManagement/moduleManagement/add/index.vue

@@ -269,6 +269,12 @@
             <el-radio :label="0">非公共模块</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item label="视频类型" prop="viewSign">
+          <el-radio-group v-model="listData.viewSign">
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="是否发布" prop="publishStatus">
           <el-radio-group v-model="listData.publishStatus">
             <el-radio :label="1">是</el-radio>
@@ -324,6 +330,13 @@
                   ? "回放"
                   : "未知"
               }}</span>
+              <span v-else-if="item.scope === 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs">
+                  <span v-if="scope.row[item.prop] == items.value">{{
+                    items.label
+                  }}</span>
+                </span>
+              </span>
               <span v-else-if="item.scope === 'Status'">
                 {{
                   scope.row[item.prop] === 1
@@ -439,6 +452,13 @@
                   ? "回放"
                   : "未知"
               }}</span>
+              <span v-else-if="item.scope === 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs">
+                  <span v-if="scope.row[item.prop] == items.value">{{
+                    items.label
+                  }}</span>
+                </span>
+              </span>
               <span v-else-if="item.scope === 'Status'">
                 {{
                   scope.row[item.prop] === 1
@@ -507,6 +527,7 @@ export default {
         publishStatus: 1,
         recordingUrl: "",
         liveUrl: "",
+        viewSign:1,
         coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
       },
       eduTypeOptions: [], //教育类型数据
@@ -535,6 +556,9 @@ export default {
         commonSign: [
           { required: true, message: "请选择公共标识", trigger: "change" },
         ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         publishStatus: [
           { required: true, message: "请选择是否发布", trigger: "change" },
         ],
@@ -546,6 +570,16 @@ export default {
         { label: "章编码", prop: "code", width: "120" },
         { label: "标题前缀", prop: "prefixName", width: "180" },
         { label: "章标题", prop: "name" },
+        {
+          label: "视频类型",
+          prop: "viewSign",
+          scope: "isOptions",
+          options: [
+            { label: "保利威", value: 1 },
+            { label: "腾讯", value: 2 },
+          ],
+          width: "120",
+        },
         { label: "节数量", prop: "sectionNum", width: "120" },
         {
           label: "发布状态",
@@ -996,6 +1030,10 @@ export default {
               this.$message.warning(`管理章第${i + 1}条请输入排序`);
               return;
             }
+            if(this.tableData[i].viewSign != this.listData.viewSign){
+              this.$message.warning("请保持模块视频类型与章视频类型保持一致")
+              return
+            }
           }
           let arr = this.tableData.map((items) => {
             return items.sort;
@@ -1021,6 +1059,7 @@ export default {
       });
       var dataInfos = {
         status: 1,
+        viewSign:this.listData.viewSign,
         businessList: this.newSujectApis,
         chapterIdList: chapterIdList,
         coverUrl: this.listData.coverUrl,

+ 49 - 27
src/views/resource/videoManagement/moduleManagement/addChapter.vue

@@ -22,19 +22,39 @@
             >添加</el-button
           >
         </p>
-        <el-form label-width="100px" class="elform_style">
+        <el-form
+          label-width="100px"
+          class="elform_style"
+          :rules="rules"
+          ref="ruleForm"
+          :model="{ list: list }"
+        >
           <div v-for="(item, index) in list" :key="index" class="dis_box">
             <div class="left_box">
               <el-form-item label="标题前缀">
                 <el-input v-model="item.prefixName"></el-input>
                 <p class="p_style">注:便于检索、归类,以及区分一样的标题</p>
               </el-form-item>
-              <el-form-item label="章标题" required>
+              <el-form-item
+                label="章标题"
+                :prop="'list.' + index + '.name'"
+                :rules="rules['name']"
+              >
                 <el-input v-model="item.name"></el-input>
                 <p class="p_style">
                   注:请尽量规范易懂,方便在课程目录表呈现给学员
                 </p>
               </el-form-item>
+              <el-form-item
+                label="视频类型"
+                :prop="'list.' + index + '.viewSign'"
+                :rules="rules['viewSign']"
+              >
+                <el-radio-group v-model="item.viewSign">
+                  <el-radio :label="1">保利威</el-radio>
+                  <el-radio :label="2">腾讯</el-radio>
+                </el-radio-group>
+              </el-form-item>
             </div>
             <div class="clear_style">
               <el-button :size="size" @click="list.splice(index, 1)"
@@ -61,6 +81,12 @@ export default {
       size: "small",
       dialogVisible: false,
       list: [],
+      rules: {
+        name: [{ required: true, message: "请输入章标题", trigger: "blur" }],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
+      },
     };
   },
   methods: {
@@ -69,33 +95,29 @@ export default {
     },
     openBoxs(arr) {
       this.businList = JSON.parse(JSON.stringify(arr));
-      this.list = [{}]
+      this.list = [{}];
       this.dialogVisible = true;
     },
     submitForm() {
-      const arr = [];
-      this.list.forEach((item, index) => {
-        if (!item.name && item.name !== 0) {
-          arr.push(index + 1);
+      this.$refs["ruleForm"].validate((valid) => {
+        if (valid) {
+          let data = this.list.map((item) => {
+            item.businessList = this.businList;
+            item.status = 1;
+            item.publishStatus = 1;
+            item.coverUrl =
+              "oss/images/avatar/20211013/1634097664410_1397766697";
+            return item;
+          });
+          this.$api.addMoreCoursechapter(data.reverse()).then((res) => {
+            this.dialogVisible = false;
+            this.$emit("backData", res.data);
+          });
+        } else {
+          console.log("error submit!!");
+          return false;
         }
       });
-      if (arr.length) {
-        this.$message.error(
-          `第${arr.join(",")}条数据没有填写章标题,请填写完整后提交`
-        );
-        return;
-      }
-      let data = this.list.map((item) => {
-        item.businessList = this.businList;
-        item.status = 1;
-        item.publishStatus = 1;
-        item.coverUrl = "oss/images/avatar/20211013/1634097664410_1397766697";
-        return item;
-      });
-      this.$api.addMoreCoursechapter(data.reverse()).then((res) => {
-        this.dialogVisible = false;
-        this.$emit("backData", res.data);
-      });
     },
   },
 };
@@ -117,9 +139,9 @@ export default {
     text-align: center;
   }
 }
-.elform_style{
-    max-height: 620px;
-    overflow: auto;
+.elform_style {
+  max-height: 620px;
+  overflow: auto;
 }
 .p_style {
   font-size: 12px;

+ 38 - 0
src/views/resource/videoManagement/moduleManagement/edit/index.vue

@@ -243,6 +243,12 @@
             <el-radio :label="0">非公共模块</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item label="视频类型" prop="viewSign">
+          <el-radio-group v-model="listData.viewSign" disabled>
+            <el-radio :label="1">保利威</el-radio>
+            <el-radio :label="2">腾讯</el-radio>
+          </el-radio-group>
+        </el-form-item>
         <el-form-item label="是否发布" prop="publishStatus">
           <el-radio-group v-model="listData.publishStatus">
             <el-radio :label="1">是</el-radio>
@@ -298,6 +304,13 @@
                   ? "回放"
                   : "未知"
               }}</span>
+              <span v-else-if="item.scope === 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs">
+                  <span v-if="scope.row[item.prop] == items.value">{{
+                    items.label
+                  }}</span>
+                </span>
+              </span>
               <span v-else-if="item.scope === 'Status'">
                 {{
                   scope.row[item.prop] === 1
@@ -414,6 +427,13 @@
                   ? "回放"
                   : "未知"
               }}</span>
+              <span v-else-if="item.scope === 'isOptions'">
+                <span v-for="(items, indexs) in item.options" :key="indexs">
+                  <span v-if="scope.row[item.prop] == items.value">{{
+                    items.label
+                  }}</span>
+                </span>
+              </span>
               <span v-else-if="item.scope === 'Status'">
                 {{
                   scope.row[item.prop] === 1
@@ -509,6 +529,9 @@ export default {
         commonSign: [
           { required: true, message: "请选择公共标识", trigger: "change" },
         ],
+        viewSign: [
+          { required: true, message: "请选择视频类型", trigger: "change" },
+        ],
         publishStatus: [
           { required: true, message: "请选择是否发布", trigger: "change" },
         ],
@@ -520,6 +543,16 @@ export default {
         { label: "章编码", prop: "code", width: "120" },
         { label: "标题前缀", prop: "prefixName", width: "180" },
         { label: "章标题", prop: "name" },
+        {
+          label: "视频类型",
+          prop: "viewSign",
+          scope: "isOptions",
+          options: [
+            { label: "保利威", value: 1 },
+            { label: "腾讯", value: 2 },
+          ],
+          width: "120",
+        },
         { label: "节数量", prop: "sectionNum", width: "120" },
         {
           label: "发布状态",
@@ -974,6 +1007,10 @@ export default {
               this.$message.warning(`管理章第${i + 1}条请输入排序`);
               return;
             }
+            if(this.tableData[i].viewSign != this.listData.viewSign){
+              this.$message.warning("请保持模块视频类型与章视频类型保持一致")
+              return
+            }
           }
           let arr = this.tableData.map((items) => {
             return items.sort;
@@ -999,6 +1036,7 @@ export default {
       });
       var dataInfos = {
         status: 1,
+        viewSign:this.listData.viewSign,
         moduleId: this.pageId,
         businessList: this.newSujectApis,
         chapterIdList: chapterIdList,

+ 6 - 4
src/views/secondBuild/completionList/index.vue

@@ -158,7 +158,7 @@ export default {
         {
           label: "填写资料审核状态",
           prop: "profileStatus",
-          hidden: true,
+          hidden: false,
           scope: "isOptions",
           options: [
             {
@@ -178,13 +178,13 @@ export default {
         {
           label: "学时审批状态",
           prop: "periodStatus",
-          hidden: true,
+          hidden: false,
           scope: "statusPeriod",
         },
         {
           label: "审核通过时间",
           prop: "periodTime",
-          hidden: true,
+          hidden: false,
           scope: "aTimeList",
         },
         {
@@ -251,6 +251,8 @@ export default {
         goodsId: v.goodsId,
         goodsName: v.goodsName,
         orderGoodsId: v.orderGoodsId,
+        tenantId: v.tenantId,
+        fullName: v.fullName,
         keyId: `${v.userId}-${v.goodsId}-${v.gradeId}-${v.orderGoodsId}`,
       };
       this.checkSession(data)
@@ -287,7 +289,7 @@ export default {
       }
       var data = JSON.parse(JSON.stringify(this.formData));
       this.$api
-        .inquireGradegradelistUserPeriods(data)
+        .inquireGradegradelistUserPeriodsNew(data)
         .then((res) => {
           this.tableData = res.rows;
           this.total = res.total;

+ 48 - 2
src/views/secondBuild/courseList/index.vue

@@ -41,7 +41,7 @@
           <span v-if="!activeId" style="font-size: 30px"
             >请打开目录详情,点击播放您需要观看的视频内容。</span
           >
-          <div v-show="vid" id="player"></div>
+          <div v-show="vid && viewSign == 1" id="player"></div>
           <div v-show="vidzb" id="playerzb"></div>
         </div>
         <div class="rightBoxslist">
@@ -246,7 +246,10 @@ export default {
       dialogVisible: false,
       courseList: [], //详情列表
       activeId: "", //当前选中ID
+      viewSign: 1,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
+      vodPlayerJsForTCPlayer:
+        "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
       vid: "",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
@@ -345,6 +348,7 @@ export default {
      */
     msgInfo(option) {
       this.goodsBoxName = option.goodsName;
+      this.viewSign = option.viewSign
       this.$api.obtainCourseSgoodsId(option.goodsId).then(async (res) => {
         // if (res.rows.length) {
         if (!res.rows.length) {
@@ -628,7 +632,11 @@ export default {
         this.loadPlayerScriptzb(this.loadPlayerzb);
       } else {
         this.vid = option.recordingUrl;
-        this.loadPlayerScript(this.loadPlayer);
+        if(this.viewSign == 2) {
+          this.loadPlayerScript_tencent(this.loadPlayer_tencent);
+        }else {
+          this.loadPlayerScript(this.loadPlayer);
+        }
       }
     },
     loadPlayerScript(callback) {
@@ -641,6 +649,16 @@ export default {
         callback();
       }
     },
+    loadPlayerScript_tencent(callback) {
+      if (!window.TCPlayer) {
+        const myScript = document.createElement("script");
+        myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
+        myScript.onload = callback;
+        document.body.appendChild(myScript);
+      } else {
+        callback();
+      }
+    },
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -657,6 +675,31 @@ export default {
         },
       });
     },
+    loadPlayer_tencent() {
+      var self = this;
+      const TCPlayer = window.TCPlayer;
+      try {
+        let video = document.querySelector("video");
+        video.parentNode.removeChild(video);
+      } catch (error) {
+        console.log("清除video标签异常");
+      }
+      let player_tencent = document.createElement("video");
+      player_tencent.id = "player-tencent";
+      document
+        .getElementById("player")
+        .insertAdjacentElement("afterend", player_tencent);
+      self.$api.obtaintcvideosign(self.vid).then(res => {
+        self.player_tencent = TCPlayer("player-tencent", {
+          width: 932,
+        height: 627,
+          fileID: self.vid,
+          appID: res.data.appID,
+          psign: res.data.psign,
+          licenseUrl: res.data.licenseUrl
+        });
+      });
+    },
     /**
      * @param {String} 关闭视频窗口-销毁实例
      */
@@ -668,6 +711,9 @@ export default {
         if (this.player) {
           this.player.destroy();
         }
+        if (this.player_tencent) {
+          this.player.dispose();
+        }
         if (this.playerzb) {
           this.playerzb.destroy();
         }

+ 1 - 1
src/views/secondBuild/learningList/index.vue

@@ -228,7 +228,7 @@ export default {
       }
       var data = JSON.parse(JSON.stringify(this.formData));
       this.$api
-        .inquireGradegradelistUserVideoRecord(data)
+        .inquireGradegradelistUserVideoRecordNew(data)
         .then((res) => {
           this.tableData = res.rows;
           this.total = res.total;

+ 48 - 2
src/views/secondJian/courseList/index.vue

@@ -41,7 +41,7 @@
           <span v-if="!activeId" style="font-size: 30px"
             >请打开目录详情,点击播放您需要观看的视频内容。</span
           >
-          <div v-show="vid" id="player"></div>
+          <div v-show="vid && viewSign == 1" id="player"></div>
           <div v-show="vidzb" id="playerzb"></div>
         </div>
         <div class="rightBoxslist">
@@ -248,7 +248,10 @@ export default {
       dialogVisible: false,
       courseList: [], //详情列表
       activeId: "", //当前选中ID
+      viewSign: 1,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
+      vodPlayerJsForTCPlayer:
+        "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
       vid: "",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
@@ -330,6 +333,7 @@ export default {
      */
     msgInfo(option) {
       this.goodsBoxName = option.goodsName;
+      this.viewSign = option.viewSign;
       this.$api.obtainCourseSgoodsId(option.goodsId).then(async (res) => {
         // if (res.rows.length) {
         if (!res.rows.length) {
@@ -613,7 +617,11 @@ export default {
         this.loadPlayerScriptzb(this.loadPlayerzb);
       } else {
         this.vid = option.recordingUrl;
-        this.loadPlayerScript(this.loadPlayer);
+        if(this.viewSign == 2) {
+          this.loadPlayerScript_tencent(this.loadPlayer_tencent);
+        }else {
+          this.loadPlayerScript(this.loadPlayer);
+        }
       }
     },
     loadPlayerScript(callback) {
@@ -626,6 +634,16 @@ export default {
         callback();
       }
     },
+    loadPlayerScript_tencent(callback) {
+      if (!window.TCPlayer) {
+        const myScript = document.createElement("script");
+        myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
+        myScript.onload = callback;
+        document.body.appendChild(myScript);
+      } else {
+        callback();
+      }
+    },
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -642,6 +660,31 @@ export default {
         },
       });
     },
+    loadPlayer_tencent() {
+      var self = this;
+      const TCPlayer = window.TCPlayer;
+      try {
+        let video = document.querySelector("video");
+        video.parentNode.removeChild(video);
+      } catch (error) {
+        console.log("清除video标签异常");
+      }
+      let player_tencent = document.createElement("video");
+      player_tencent.id = "player-tencent";
+      document
+        .getElementById("player")
+        .insertAdjacentElement("afterend", player_tencent);
+      self.$api.obtaintcvideosign(self.vid).then(res => {
+        self.player_tencent = TCPlayer("player-tencent", {
+          width: 932,
+        height: 627,
+          fileID: self.vid,
+          appID: res.data.appID,
+          psign: res.data.psign,
+          licenseUrl: res.data.licenseUrl
+        });
+      });
+    },
     /**
      * @param {String} 关闭视频窗口-销毁实例
      */
@@ -653,6 +696,9 @@ export default {
         if (this.player) {
           this.player.destroy();
         }
+        if (this.player_tencent) {
+          this.player.dispose();
+        }
         if (this.playerzb) {
           this.playerzb.destroy();
         }

+ 48 - 2
src/views/secondSeven/courseList/index.vue

@@ -41,7 +41,7 @@
           <span v-if="!activeId" style="font-size: 30px"
             >请打开目录详情,点击播放您需要观看的视频内容。</span
           >
-          <div v-show="vid" id="player"></div>
+          <div v-show="vid && viewSign == 1" id="player"></div>
           <div v-show="vidzb" id="playerzb"></div>
         </div>
         <div class="rightBoxslist">
@@ -248,7 +248,10 @@ export default {
       dialogVisible: false,
       courseList: [], //详情列表
       activeId: "", //当前选中ID
+      viewSign: 1,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
+      vodPlayerJsForTCPlayer:
+        "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
       vid: "",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
@@ -330,6 +333,7 @@ export default {
      */
     msgInfo(option) {
       this.goodsBoxName = option.goodsName;
+      this.viewSign = option.viewSign;
       this.$api.obtainCourseSgoodsId(option.goodsId).then(async (res) => {
         // if (res.rows.length) {
         if (!res.rows.length) {
@@ -613,7 +617,11 @@ export default {
         this.loadPlayerScriptzb(this.loadPlayerzb);
       } else {
         this.vid = option.recordingUrl;
-        this.loadPlayerScript(this.loadPlayer);
+        if(this.viewSign == 2) {
+          this.loadPlayerScript_tencent(this.loadPlayer_tencent);
+        }else {
+          this.loadPlayerScript(this.loadPlayer);
+        }
       }
     },
     loadPlayerScript(callback) {
@@ -626,6 +634,16 @@ export default {
         callback();
       }
     },
+    loadPlayerScript_tencent(callback) {
+      if (!window.TCPlayer) {
+        const myScript = document.createElement("script");
+        myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
+        myScript.onload = callback;
+        document.body.appendChild(myScript);
+      } else {
+        callback();
+      }
+    },
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -642,6 +660,31 @@ export default {
         },
       });
     },
+    loadPlayer_tencent() {
+      var self = this;
+      const TCPlayer = window.TCPlayer;
+      try {
+        let video = document.querySelector("video");
+        video.parentNode.removeChild(video);
+      } catch (error) {
+        console.log("清除video标签异常");
+      }
+      let player_tencent = document.createElement("video");
+      player_tencent.id = "player-tencent";
+      document
+        .getElementById("player")
+        .insertAdjacentElement("afterend", player_tencent);
+      self.$api.obtaintcvideosign(self.vid).then(res => {
+        self.player_tencent = TCPlayer("player-tencent", {
+          width: 932,
+        height: 627,
+          fileID: self.vid,
+          appID: res.data.appID,
+          psign: res.data.psign,
+          licenseUrl: res.data.licenseUrl
+        });
+      });
+    },
     /**
      * @param {String} 关闭视频窗口-销毁实例
      */
@@ -653,6 +696,9 @@ export default {
         if (this.player) {
           this.player.destroy();
         }
+        if (this.player_tencent) {
+          this.player.dispose();
+        }
         if (this.playerzb) {
           this.playerzb.destroy();
         }

+ 48 - 2
src/views/secondZao/courseList/index.vue

@@ -41,7 +41,7 @@
           <span v-if="!activeId" style="font-size: 30px"
             >请打开目录详情,点击播放您需要观看的视频内容。</span
           >
-          <div v-show="vid" id="player"></div>
+          <div v-show="vid && viewSign == 1" id="player"></div>
           <div v-show="vidzb" id="playerzb"></div>
         </div>
         <div class="rightBoxslist">
@@ -248,7 +248,10 @@ export default {
       dialogVisible: false,
       courseList: [], //详情列表
       activeId: "", //当前选中ID
+      viewSign: 1,
       vodPlayerJs: "https://player.polyv.net/script/player.js",
+      vodPlayerJsForTCPlayer:
+        "https://web.sdk.qcloud.com/player/tcplayer/release/v5.1.0/tcplayer.v5.1.0.min.js",
       vid: "",
       playerJs:
         "https://player.polyv.net/resp/live-h5-player/latest/liveplayer.min.js",
@@ -330,6 +333,7 @@ export default {
      */
     msgInfo(option) {
       this.goodsBoxName = option.goodsName;
+      this.viewSign = option.viewSign;
       this.$api.obtainCourseSgoodsId(option.goodsId).then(async (res) => {
         // if (res.rows.length) {
         if (!res.rows.length) {
@@ -613,7 +617,11 @@ export default {
         this.loadPlayerScriptzb(this.loadPlayerzb);
       } else {
         this.vid = option.recordingUrl;
-        this.loadPlayerScript(this.loadPlayer);
+        if(this.viewSign == 2) {
+          this.loadPlayerScript_tencent(this.loadPlayer_tencent);
+        }else {
+          this.loadPlayerScript(this.loadPlayer);
+        }
       }
     },
     loadPlayerScript(callback) {
@@ -626,6 +634,16 @@ export default {
         callback();
       }
     },
+    loadPlayerScript_tencent(callback) {
+      if (!window.TCPlayer) {
+        const myScript = document.createElement("script");
+        myScript.setAttribute("src", this.vodPlayerJsForTCPlayer);
+        myScript.onload = callback;
+        document.body.appendChild(myScript);
+      } else {
+        callback();
+      }
+    },
     loadPlayer() {
       var self = this;
       const polyvPlayer = window.polyvPlayer;
@@ -642,6 +660,31 @@ export default {
         },
       });
     },
+    loadPlayer_tencent() {
+      var self = this;
+      const TCPlayer = window.TCPlayer;
+      try {
+        let video = document.querySelector("video");
+        video.parentNode.removeChild(video);
+      } catch (error) {
+        console.log("清除video标签异常");
+      }
+      let player_tencent = document.createElement("video");
+      player_tencent.id = "player-tencent";
+      document
+        .getElementById("player")
+        .insertAdjacentElement("afterend", player_tencent);
+      self.$api.obtaintcvideosign(self.vid).then(res => {
+        self.player_tencent = TCPlayer("player-tencent", {
+          width: 932,
+        height: 627,
+          fileID: self.vid,
+          appID: res.data.appID,
+          psign: res.data.psign,
+          licenseUrl: res.data.licenseUrl
+        });
+      });
+    },
     /**
      * @param {String} 关闭视频窗口-销毁实例
      */
@@ -653,6 +696,9 @@ export default {
         if (this.player) {
           this.player.destroy();
         }
+        if (this.player_tencent) {
+          this.player.dispose();
+        }
         if (this.playerzb) {
           this.playerzb.destroy();
         }