dbsd_kczx/src/views/site/common/video/videojs/viewPage.vue

901 lines
34 KiB
Vue
Raw Normal View History

2023-04-24 22:40:50 +08:00
<template>
2023-05-05 23:52:51 +08:00
<div id="siteMain">
<div id="maxSite">
<a-layout>
<!-- 页头 -->
<headerPage/>
<!-- 主体部分 -->
<a-layout-content>
<div style="width:100%;height: 100%;margin-top: 1rem;" v-if="!isError">
2023-05-05 23:52:51 +08:00
<a-row :gutter="[16,16]">
2024-12-26 13:25:35 +08:00
<a-col span="24">
2023-05-05 23:52:51 +08:00
<div>
<a-card class="videoCardMain" style="width:100%">
<template #title>
2023-05-18 00:27:12 +08:00
<span class="" style="border-radius: 5px;">
{{ ktangInfo.kcmc || ' ' }}
2023-05-05 23:52:51 +08:00
</span>
2024-09-27 14:12:43 +08:00
<span style="float: right;margin-left: 10px;background: #1c84c6;color: #fff;padding: 9px;border-radius: 5px;font-size: 16px;" @click="funpingjia(ktangInfo)">填写评价表</span>
2024-02-26 19:09:19 +08:00
<div style="font-size: 12px;">
2024-05-24 01:27:08 +08:00
{{ ktangInfo.zc || ' ' }}&nbsp;&nbsp;{{ ktangInfo.skjs || ' ' }}&nbsp;&nbsp;学分{{ ktangInfo.xf || ' ' }}
&nbsp;&nbsp;课程性质{{ ktangInfo.kcxz || ' ' }}
&nbsp;&nbsp;开课单位{{ ktangInfo.kkdw || ' ' }}
&nbsp;&nbsp;节次{{ ktangInfo.hh || ' ' }}
</div>
2024-06-08 15:48:41 +08:00
<div style="font-size: 12px;text-wrap: wrap;width: 100%;word-wrap: break-word;" hidden>
2024-05-27 15:36:15 +08:00
课程介绍{{ ktangInfo?.zyJxdg?.kcjs }}
2023-05-18 00:27:12 +08:00
</div>
2023-05-05 23:52:51 +08:00
</template>
<div style="padding: 1rem;">
<a-row>
<a-col :span="24">
<div style="font-size: 16px;float: left;font-weight: 600;">{{ mainVideoCardBoxTitle || '' }}</div>
<div style="float: right;">
<span>本教室容量</span><span style="font-size: 14px; color:#1c84c6 ;">{{ktangInfo?.jiaoshirongliang?.jsrl || ' '}}座位</span>
<span style="margin-left:15px;">选课人数</span><span style="font-size: 14px; color:#1c84c6 ;">{{ ktangInfo.xkrs || ' ' }}</span>
<span style="margin-left:15px;">AI识别出勤人数: <a @click="handleZqrs(ktangInfo)">{{ ktangInfo?.kcDetectionDetailed?.num||'-' }}</a></span>
<span style="margin-left:15px;">
<a-tooltip placement="topRight">
<template #title>
<span>平台分别在三个时间节点上课后10分钟课中50分钟下课前10分钟抓取学生全景图片进行AI人流量识别当前显示的人数为最近一个时间的人数识别</span>
</template>
<!-- <Icon icon="ant-design:question-circle-outlined" /> -->
<span class="helpClass">?</span>
</a-tooltip>
</span>
</div>
</a-col>
<a-col :span="24">
<div style="width:100%;display: block;text-align: right;font-size:12px; color: #ccc;">
说明目前部分教室摄像头拍摄画面无法覆盖到全体学生AI识别出勤人数仅供参考
</div>
</a-col>
</a-row>
2024-12-26 13:25:35 +08:00
<a-row style="background: black;line-height: 70px;">
<!-- 单屏及双屏显示 -->
<a-col :span="fpxsShow=='1'?24:12" v-show="fpxsShow==1 || fpxsShow==2" style="padding: 4px;">
<div class="s-video-all" >
2024-12-26 13:25:35 +08:00
<div class="s-video" >
<bVideo ref="mainVideo" videoId="mainVideo" :videoOption="{ autoplay: true}" @load-end="mainVideoLoadEnd"/>
</div>
</div>
</a-col>
<!-- 双屏显示 -->
<a-col :span="12" v-show="fpxsShow==2">
<div class="s-video-all" >
<div class="s-video" >
<bVideo ref="mainVideo2" videoId="mainVideo2" :videoOption="{ autoplay: true}" @load-end="loadEnd"/>
</div>
</div>
</a-col>
<!-- 四屏显示 -->
<a-col :span="12" style="padding: 5px;" v-show="fpxsShow=='3' && item.sfxs=='1' && checkTitle != item.xm" v-for="(item,index) in fpData">
<div class="s-video-all" >
<div class="s-video" >
<bVideo :key="'other2-'+index" :ref="el=> bVideoRefs['other2-'+item.id] = el" :videoId="'other2-'+item.id" :src="item.pullUrl" :videoOption="{ autoplay: true, controls: false }" @load-end="loadEnd"/>
</div>
<div class="s-full">
{{item.xm}}
</div>
2024-12-26 13:25:35 +08:00
</div>
</a-col>
2024-12-26 13:25:35 +08:00
<!-- 讲座模式 -->
<!-- 1单屏 2双屏 3四屏 4讲座模式1 5讲座模式2 6讲座模式3 -->
<a-col :span="24" style="padding: 5px;" v-show="fpxsShow=='4'|| fpxsShow=='5' || fpxsShow=='6'" >
<a-row>
<a-col :span="18" style="padding: 4px;">
<div class="s-video-all" >
2024-12-26 13:25:35 +08:00
<div class="s-video" >
<bVideo ref="mainJzmsPPTVideo" videoId="mainJzmsPPTVideo" :videoOption="{ autoplay: true, controls: false}" @load-end="loadEnd"/>
</div>
<div class="s-full" v-if="fpxsShow != '1'">
PPT
</div>
</div>
2024-12-26 13:25:35 +08:00
</a-col>
<a-col :span="6" :style="`margin-top:${fpxsShow=='4'?'130px':fpxsShow=='5'?'80px':''}`">
<a-row :class="videoFpName">
<a-col :span="24" style="padding: 3px;" v-show="fpxsShow=='4' || fpxsShow=='5' || fpxsShow=='6'">
<div class="s-video-all" >
<div class="s-video" >
<bVideo ref="mainJzms1Video" videoId="mainJzms1Video" :videoOption="{ autoplay: true, controls: false}" @load-end="loadEnd"/>
</div>
<div class="s-full">
教师近景
</div>
</div>
2024-12-26 13:25:35 +08:00
</a-col>
<a-col :span="24" style="padding: 3px;" v-show="fpxsShow=='5' || fpxsShow=='6'" >
<div class="s-video-all" >
<div class="s-video" >
<bVideo ref="mainJzms2Video" videoId="mainJzms2Video" :videoOption="{ autoplay: true, controls: false}" @load-end="loadEnd"/>
</div>
<div class="s-full">
学生全景
</div>
</div>
</a-col>
<a-col :span="24" style="padding: 3px;" v-show="fpxsShow=='6'" >
<div class="s-video-all" >
<div class="s-video" >
<bVideo ref="mainJzms3Video" videoId="mainJzms3Video" :videoOption="{ autoplay: true, controls: false}" @load-end="loadEnd"/>
</div>
<div class="s-full">
教师全景
</div>
</div>
</a-col>
</a-row>
</a-col>
</a-row>
</a-col>
2024-12-19 15:01:39 +08:00
</a-row>
2024-12-26 13:25:35 +08:00
<a-col span="24" style="background: black;line-height: 70px;">
<a-row style="text-align: center;">
<a-col span="4">
<a-popover>
<template #content>
<a-radio-group v-model:value="spyCheck">
<template v-for="(item,i) in fpData" :key="i">
<a-radio :value="item.xm" @click="changeLive(item)">{{ item.xm }}</a-radio><br/>
</template>
</a-radio-group>
</template>
<a-button type="primary" @click="handlePmms('1')">单屏模式</a-button>
</a-popover>
</a-col>
<a-col span="4">
<a-popover>
<template #content>
<a-row>
<a-col :span="12">
<div>左屏幕</div>
<a-radio-group v-model:value="spyCheck">
<template v-for="(item,i) in fpData" :key="i">
<a-radio :value="item.xm" @click="changeLeftLive(item)" >{{ item.xm }}</a-radio><br/>
</template>
</a-radio-group>
</a-col>
<a-col :span="12">
<div>右屏幕</div>
<a-radio-group v-model:value="spy2Check">
<template v-for="(item,i) in fpData" :key="i">
<a-radio :value="item.xm" @click="changeRightLive(item)">{{ item.xm }}</a-radio><br/>
</template>
</a-radio-group>
</a-col>
</a-row>
</template>
<a-button type="primary" @click="handlePmms('2')">双屏模式</a-button>
</a-popover>
</a-col>
<a-col span="4"><a-button type="primary" @click="handlePmms('3')">四屏模式</a-button></a-col>
<a-col span="4"><a-button type="primary" @click="handlePmms('4')">讲座模式1</a-button></a-col>
<a-col span="4"><a-button type="primary" @click="handlePmms('5')">讲座模式2</a-button></a-col>
<a-col span="4"><a-button type="primary" @click="handlePmms('6')">讲座模式3</a-button></a-col>
</a-row>
</a-col>
2024-06-08 15:48:41 +08:00
2024-05-24 01:27:08 +08:00
<div class="jxDiv">
<a-space>
<div v-if="ktangInfo?.zyJxdg?.filePath">
教学大纲:
2024-05-25 02:20:35 +08:00
<a-button type="primary" size="small" style="margin-left:10px;" @click="openPdf(ktangInfo?.zyJxdg?.pdfPath)">预览</a-button>
2024-05-24 01:27:08 +08:00
<a-button type="primary" size="small" style="margin-left:10px;" @click="downloadFile(ktangInfo?.zyJxdg?.filePath)">下载</a-button>
</div>
<div v-if="ktangInfo?.zyJxdg?.filePath">
教学日历:
2024-05-25 02:20:35 +08:00
<a-button type="primary" size="small" style="margin-left:10px;" @click="openPdf(ktangInfo?.zyJxdg?.jxrlPdfPath)">预览</a-button>
2024-05-24 01:27:08 +08:00
<a-button type="primary" size="small" style="margin-left:10px;" @click="downloadFile(ktangInfo?.zyJxdg?.jxrlFilePath)">下载</a-button>
</div>
</a-space>
</div>
2023-06-28 22:41:50 +08:00
<div style="width: 100%;margin-top:10px;">
2023-05-19 23:36:52 +08:00
<a-textarea style="width: calc(100% - 7rem);height:120px;float: left;" v-model:value="model.notes" placeholder="您可以填写听课笔记"></a-textarea>
<div style="width: 7rem;height: 100%;float: right;">
<a-button type="primary" style="width: 7rem;height: 100%;" @click="openAllSuiBi">查看听课笔记</a-button>
2023-08-13 12:20:45 +08:00
<a-button type="primary" style="width: 7rem;height: 100%;margin-top: 10px;" @click="saveSuibi">保存听课笔记</a-button>
<a-button type="primary" style="width: 7rem;height: 100%;margin-top: 10px;" @click="handleBaocuo(ktangInfo)">报错</a-button>
2023-05-19 23:36:52 +08:00
</div>
2023-05-05 23:52:51 +08:00
</div>
</div>
</a-card>
</div>
</a-col>
2024-12-26 13:25:35 +08:00
<!-- <a-col :xs="{ span: 24 }" :sm="{ span: 5 }" :lg="{ span: 5 }">
2023-05-05 23:52:51 +08:00
<a-row>
2024-12-19 15:01:39 +08:00
<a-col :span="24" v-for="(item,index) of tableData" style="text-align: center;" :key="'col-'+index">
<a-card>
2023-05-05 23:52:51 +08:00
<div>
<div style="margin-bottom: .5rem;">
2024-12-19 15:01:39 +08:00
<span class="smallTxt miniButton" :class="item.id == curentPlayerVideo.id?'activte':''" @click="changeLive(item)">
2023-05-05 23:52:51 +08:00
<i class="fa-solid fa-right-left"></i>{{ item?.xm }}
</span>
2024-12-19 15:01:39 +08:00
<span class="smallTxt miniButton miniButtonRight" v-show="!item.isShow" @click="(item.isShow = true,initVideo('other-'+item.id))"><i class="fa-solid fa-film"></i>显示缩略窗口</span>
<span class="smallTxt miniButton miniButtonRight" v-show="item.isShow" @click="item.isShow = false"><i class="fa-solid fa-film"></i>隐藏缩略窗口</span>
2023-05-05 23:52:51 +08:00
</div>
<div style="height: 2rem;">&nbsp;</div>
2024-12-19 15:01:39 +08:00
<div v-show="item.isShow" :key="'other-div-'+index">
<bVideo :key="'other-'+index" :ref="el=> bVideoRefs['other-'+item.id] = el" :videoId="'other-'+item.id" :src="item.pullUrl" :videoOption="{ autoplay: true, controls: false }" @load-end="loadEnd2"/>
</div>
</div>
</a-card>
</a-col>
<a-col :span="24">
<a-card :class="`handClass`">
<div>
<div style="margin-bottom: .5rem;">
<span :class="`smallTxt miniButton ${fpxsShow=='2'?'activte':''}`" @click="changeJfpLive('2')"><i class="fa-solid fa-right-left"></i>分屏模式</span>
<span class="smallTxt miniButton miniButtonRight">
<a-popover>
<template #content>
<a-checkbox-group v-model:value="spyCheck" @change="handleSpy">
<template v-for="(item,i) in fpData" :key="i">
<a-checkbox :value="item.xm">{{ item.xm }}</a-checkbox><br/>
</template>
</a-checkbox-group>
</template>
<i class="fa-solid fa-film"></i>视频源
</a-popover>
</span>
2023-05-05 23:52:51 +08:00
</div>
</div>
</a-card>
</a-col>
</a-row>
2024-12-26 13:25:35 +08:00
</a-col> -->
2023-05-05 23:52:51 +08:00
</a-row>
2023-04-24 22:40:50 +08:00
</div>
2023-05-05 23:52:51 +08:00
<div v-else style="height: 100%;display: flex;justify-content: center;align-items: center;">
<a-empty>
<template #description>
<span v-if="!playStatus">
2023-05-05 23:52:51 +08:00
没有找到直播间
</span>
<span v-if="playStatus">
2023-10-22 01:57:24 +08:00
{{ getSysConfig()?.videoPlayErrTitle || '直播间暂无内容' }}
</span>
2023-05-05 23:52:51 +08:00
</template>
<!-- <a-button type="primary" @="">关闭</a-button> -->
</a-empty>
</div>
</a-layout-content>
</a-layout>
</div>
2023-04-24 22:40:50 +08:00
</div>
<KcErrorreportIndexModal ref="kcErrorreportIndexModal"></KcErrorreportIndexModal>
2023-05-04 23:50:32 +08:00
<addModalPage ref="tingKeZuJiAddModal"/>
2023-05-19 23:36:52 +08:00
<a-modal title="查看听课笔记" width="800px" :visible="tkbjVisible" :okButtonProps="{ class: { 'jee-hidden': true } }" @cancel="() => tkbjVisible = false" cancelText="关闭">
<div style="white-space:normal; word-break:break-all;overflow:hidden;">
<a-table tableLayout="fixed" :dataSource="suibiList" :scroll="{ x: true }" :pagination="false">
<a-table-column width="160px" title="填写时间" key="createTime" data-index="createTime" />
<a-table-column title="内容" key="notes" data-index="notes" />
</a-table>
</div>
</a-modal>
2024-06-08 15:48:41 +08:00
<KcDetectionMainModal @register="registerModal" ></KcDetectionMainModal>
2023-04-24 22:40:50 +08:00
</template>
<script lang="ts" setup name="zhihuijiaoshiIndexPage">
2023-05-04 23:50:32 +08:00
2023-04-24 22:40:50 +08:00
import { defHttp } from '/@/utils/http/axios';
2024-09-27 14:12:43 +08:00
import { ref, reactive, onMounted, createVNode, h } from 'vue';
2023-05-05 23:52:51 +08:00
import headerPage from '/@/views/site/common/header.vue';
2023-04-24 22:40:50 +08:00
import bVideo from '/@/views/site/common/video/videojs/video.vue';
2023-05-04 23:50:32 +08:00
import addModalPage from '/@/views/site/tingKeZuJi/components/addModal.vue';
2023-04-24 22:40:50 +08:00
import { nextTick } from 'vue';
import { useRoute } from 'vue-router'
2023-05-04 23:50:32 +08:00
import { getUserId } from '/@/views/site/utils/index';
2023-08-13 12:20:45 +08:00
import KcErrorreportIndexModal from '/@/views/kc/kcErrorreport/components/KcErrorreportIndexZbModal.vue'
import videojs from "video.js";
2023-10-22 01:57:24 +08:00
import { getSysConfig } from '/@/views/site/utils/index';
2023-10-27 00:49:17 +08:00
import { useMessage } from '/@/hooks/web/useMessage';
2024-05-24 01:27:08 +08:00
import { baseApiUrl, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
2024-06-08 15:48:41 +08:00
import KcDetectionMainModal from '/@/views/kc/detection/components/KcDetectionMainModal.vue'
import { useModal } from '/@/components/Modal';
2024-09-27 14:12:43 +08:00
import { Modal } from 'ant-design-vue';
import { CloseOutlined } from '@ant-design/icons-vue';
2023-10-27 00:49:17 +08:00
const { createMessage, createInfoModal, createErrorModal } = useMessage();
2023-04-24 22:40:50 +08:00
2023-05-07 11:37:41 +08:00
const mainVideo = ref<any>();
const bVideoRefs = ref<any>([]);
2023-08-13 12:20:45 +08:00
const kcErrorreportIndexModal = ref();
2023-04-24 22:40:50 +08:00
2023-05-07 11:37:41 +08:00
const tingKeZuJiAddModal = ref<any>({});
const curentPlayerVideo = ref<any>({});
const kcCardBoxTitle = ref<any>('');
const spyCheck = ref<any>([]);
2024-12-26 13:25:35 +08:00
const spy2Check = ref<any>([]);
2023-05-18 00:27:12 +08:00
const ktangInfo = ref<any>({});
2024-05-24 01:27:08 +08:00
// const jxdgInfo = ref<any>({});
2023-05-07 11:37:41 +08:00
const mainVideoCardBoxTitle = ref<any>('');
const checkTitle = ref<any>('');
2023-04-24 22:40:50 +08:00
const tableData = ref<Recordable>([])
const fpData = ref<Recordable>([])
2023-05-19 23:36:52 +08:00
const suibiList = ref<Recordable>([])
2023-04-24 22:40:50 +08:00
const isError = ref(false);
2023-05-19 23:36:52 +08:00
const tkbjVisible = ref(false);
const playStatus = ref(false);
const fpxsShow = ref<any>('1');
2024-12-23 13:48:01 +08:00
const videoFpName = ref<any>('');
2023-04-24 22:40:50 +08:00
2023-05-04 23:50:32 +08:00
const model = reactive<Record<string, any>>({ notes:'' });
2024-06-08 15:48:41 +08:00
//注册model
const [registerModal, { openModal }] = useModal();
2023-04-24 22:40:50 +08:00
const route = useRoute();
2023-05-04 23:50:32 +08:00
enum Api {
list = '/jiaoshi/kcZhihuijiaoshi/list',
querySuibi = '/kc/kcKetangSuibi/list',
2023-05-05 23:52:51 +08:00
addSuibi = '/kc/kcKetangSuibi/add',
2023-05-04 23:50:32 +08:00
// editSuibi = '/kc/kcKetangSuibi/edit'
2024-05-24 01:27:08 +08:00
getKtangInfo = '/ktgl/kcKetangbiao/queryAllDataById',
2023-10-27 00:49:17 +08:00
savePlayLog = '/jiaoshi/kcZhihuijiaoshiAccessLog/savePlayLog',
changeAvyLiveByJsbhsApi = '/httpinterface/runAvyApiByJsbhs',
2023-05-04 23:50:32 +08:00
}
/**
* 列表接口
* @param params
*/
const list = (params) => defHttp.get({ url: Api.list, params });
const querySuibi = (params) => defHttp.get({ url: Api.querySuibi, params });
const addSuibi = (params) => defHttp.post({ url: Api.addSuibi, params });
2023-05-05 23:52:51 +08:00
const getKtangInfo = (params) => defHttp.get({ url: Api.getKtangInfo, params });
2023-10-19 01:05:12 +08:00
const savePlayLog = (params) => defHttp.post({ url: Api.savePlayLog, params, }, { isTransformResponse: false });
2023-10-27 00:49:17 +08:00
const changeAvyLiveByJsbhsApi = (params) => defHttp.get({ url: Api.changeAvyLiveByJsbhsApi, params,timeout: 9000000 });
2023-05-04 23:50:32 +08:00
// const editSuibi = (params) => defHttp.post({ url: Api.editSuibi, params });
function handleSpy(record){
for(var i=0;i<fpData.value.length;i++){
fpData.value[i].sfxs = "0";
for(var j=0;j<record.length;j++){
2024-12-23 13:48:01 +08:00
if(fpData.value[i].xm == record[j]){
fpData.value[i].sfxs = "1";
break;
}
}
}
2024-12-23 13:48:01 +08:00
var ttb = spyCheck.value.join(",").replaceAll(checkTitle.value,"");
var ttc = ttb.split(",").filter(item => item.trim() !== '');
if(ttc.length == 2){
videoFpName.value = "className3"
}else if(ttc.length == 1){
videoFpName.value = "className2"
}else{
videoFpName.value = ""
}
}
2024-12-26 13:25:35 +08:00
/**
*
* @param pmtype 1单屏 2双屏 3四屏 4讲座模式1 5讲座模式2 6讲座模式3
*/
function handlePmms(pmtype){
fpxsShow.value = pmtype;
if(pmtype == '4'){
let item= tableData.value.find(x => x.xm == 'PPT') || {};
let url = item.pullUrl;
let mainJzmsPPTVideo = document.querySelector<any>('#mainJzmsPPTVideo');
mainJzmsPPTVideo?.player?.src([{ type:'application/x-mpegURL',src: url }]);
let item2= tableData.value.find(x => x.xm == '教师近景') || {};
let url2 = item2.pullUrl;
let mainJzms1Video = document.querySelector<any>('#mainJzms1Video');
mainJzms1Video?.player?.src([{ type:'application/x-mpegURL',src: url2 }]);
}else if(pmtype == '5'){
let item= tableData.value.find(x => x.xm == 'PPT') || {};
let url = item.pullUrl;
let mainJzmsPPTVideo = document.querySelector<any>('#mainJzmsPPTVideo');
mainJzmsPPTVideo?.player?.src([{ type:'application/x-mpegURL',src: url }]);
let item2= tableData.value.find(x => x.xm == '教师近景') || {};
let url2 = item2.pullUrl;
let mainJzms1Video = document.querySelector<any>('#mainJzms1Video');
mainJzms1Video?.player?.src([{ type:'application/x-mpegURL',src: url2 }]);
let item3= tableData.value.find(x => x.xm == '学生全景') || {};
let url3 = item3.pullUrl;
let mainJzms2Video = document.querySelector<any>('#mainJzms2Video');
mainJzms2Video?.player?.src([{ type:'application/x-mpegURL',src: url3 }]);
}else if(pmtype == '6'){
let item= tableData.value.find(x => x.xm == 'PPT') || {};
let url = item.pullUrl;
let mainJzmsPPTVideo = document.querySelector<any>('#mainJzmsPPTVideo');
mainJzmsPPTVideo?.player?.src([{ type:'application/x-mpegURL',src: url }]);
let item2= tableData.value.find(x => x.xm == '教师近景') || {};
let url2 = item2.pullUrl;
let mainJzms1Video = document.querySelector<any>('#mainJzms1Video');
mainJzms1Video?.player?.src([{ type:'application/x-mpegURL',src: url2 }]);
let item3= tableData.value.find(x => x.xm == '学生全景') || {};
let url3 = item3.pullUrl;
let mainJzms2Video = document.querySelector<any>('#mainJzms2Video');
mainJzms2Video?.player?.src([{ type:'application/x-mpegURL',src: url3 }]);
let item4= tableData.value.find(x => x.xm == '教师全景') || {};
let url4 = item4.pullUrl;
let mainJzms3Video = document.querySelector<any>('#mainJzms3Video');
mainJzms3Video?.player?.src([{ type:'application/x-mpegURL',src: url4 }]);
}
}
2023-04-24 22:40:50 +08:00
onMounted(() => {
if(route.query.id){
2023-05-04 23:50:32 +08:00
model.notes = '';
2023-05-07 11:37:41 +08:00
//按教师编号加载数据,屏蔽掉无效的,不分页
2023-04-24 22:40:50 +08:00
list({ pageSize: -1, sfyx: '0', jsbh: route.query.id }).then(res => {
let list = (res?.records) ?? [];
tableData.value = list;
fpData.value = list;
var tta = "";
for(var i=0;i<fpData.value.length;i++){
var infoa = fpData.value[i].xm;
fpData.value[i].sfxs = "1";
tta = tta + infoa+",";
}
spyCheck.value = tta.split(",");
console.log("---------------",spyCheck.value);
2023-05-05 23:52:51 +08:00
tableData.value.forEach(x => x.isShow = true);//默认展开
2023-10-27 00:49:17 +08:00
let zjData = tableData.value.find(x => x.xm == '教师近景') || {};
2023-04-24 22:40:50 +08:00
nextTick(() => {
2023-10-27 00:49:17 +08:00
if(zjData){
changeLive(zjData);
2023-10-19 01:05:12 +08:00
}
2023-10-27 00:49:17 +08:00
savePlayLogFn(zjData);
calcPlayStatus(zjData);
2023-05-05 23:52:51 +08:00
tableData.value.forEach(x => x.isShow = false);//关闭
2023-04-24 22:40:50 +08:00
})
});
2023-05-04 23:50:32 +08:00
getSuibi();
2023-05-05 23:52:51 +08:00
getKcxx();
2023-10-19 01:05:12 +08:00
//记录播放日志
2023-08-28 21:45:14 +08:00
isError.value = false;
}else{
isError.value = true;
2023-04-24 22:40:50 +08:00
}
});
2023-08-13 12:20:45 +08:00
function handleBaocuo(item) {
kcErrorreportIndexModal.value.disableSubmit = false;
kcErrorreportIndexModal.value.add(item);
}
2024-09-27 14:12:43 +08:00
const listTkjlApi = (params) => defHttp.get({ url: '/kcTingke/kcTingke/findTingKeZuJiBytingketimeAndUserId', params });
function funpingjia(record) {
2024-10-17 11:00:48 +08:00
console.log('11111--------->',record)
console.log('222--------->',record.szkc)
2024-09-27 14:12:43 +08:00
var item = { ketangbiaoid: record.id };
let userid = getUserId();
listTkjlApi({ userid: userid, ketangbiaoid: item.ketangbiaoid }).then((res) => {
var list = res;
console.log(`🚀 ~ file: list.vue:106 ~ listTkjlApi ~ list:`, list);
if (list.length > 0) {
var score = list[0].score;
if (score) {
Modal.error({
icon: createVNode({}),
content: h('div', { style: 'height:200px;text-align:center;' }, [
h('icon', { style: 'font-size:80px;font-weight:600;color:red;' }, createVNode(CloseOutlined)),
h('p', { style: 'font-size:22px;font-weight:600;color:black;' }, '已经对此课程进行评价,不可重复评价!'),
]),
okText: 'OK',
width: '500px',
});
} else {
// tingKeZuJiAddModal.value.view(item);
2024-10-17 11:00:48 +08:00
tingKeZuJiAddModal.value.view({ ketangbiaoid: route.query.ktId,szkc:record.szkc })
2024-09-27 14:12:43 +08:00
}
} else {
// tingKeZuJiAddModal.value.view(item);
2024-10-17 11:00:48 +08:00
tingKeZuJiAddModal.value.view({ ketangbiaoid: route.query.ktId,szkc:record.szkc })
2024-09-27 14:12:43 +08:00
}
});
}
2023-05-05 23:52:51 +08:00
/**
* 子页加载完成后回调
* @param player
*/
function loadEnd(player){
nextTick(() => {
// player.on('play',() => {
// setTimeout(() => {
// player.pause();
// },2000);
// })
})
}
/**
* 子页加载完成后回调
* @param player
*/
function loadEnd2(player){
2023-05-05 23:52:51 +08:00
nextTick(() => {
2024-12-19 15:01:39 +08:00
player.on('play',() => {
setTimeout(() => {
player.pause();
},2000);
})
2023-05-05 23:52:51 +08:00
})
}
function initVideo(key){
nextTick(() => {
let ref = bVideoRefs.value[key];
ref.init();
})
}
2023-05-04 23:50:32 +08:00
function changeLive(item:any){
fpxsShow.value = '1'
2023-05-15 16:06:07 +08:00
let url = item.pullUrl
2023-05-07 11:37:41 +08:00
let mainVideo = document.querySelector<any>('#mainVideo');
2023-05-15 16:06:07 +08:00
mainVideo?.player?.src([{ type:'application/x-mpegURL',src: url }])
2023-12-08 21:27:46 +08:00
mainVideoCardBoxTitle.value = item.jsmc+" "+item.xm;
2023-05-05 23:52:51 +08:00
curentPlayerVideo.value = item;
2024-12-26 13:25:35 +08:00
}
//选择左屏
function changeLeftLive(item:any){
fpxsShow.value = '2'
let url = item.pullUrl
let mainVideo = document.querySelector<any>('#mainVideo');
mainVideo?.player?.src([{ type:'application/x-mpegURL',src: url }])
}
//选择右屏
function changeRightLive(item:any){
fpxsShow.value = '2'
let url = item.pullUrl
let mainVideo = document.querySelector<any>('#mainVideo2');
mainVideo?.player?.src([{ type:'application/x-mpegURL',src: url }])
2023-06-28 23:05:19 +08:00
}
function changeLive2(item:any){
fpxsShow.value = '2'
let url = item.pullUrl
let mainVideo = document.querySelector<any>('#mainVideo');
mainVideo?.player?.src([{ type:'application/x-mpegURL',src: url }])
mainVideoCardBoxTitle.value = item.jsmc+" "+item.xm;
curentPlayerVideo.value = item;
checkTitle.value = item.xm;
}
function changeJfpLive(type){
fpxsShow.value = type;
let item= tableData.value.find(x => x.xm == '教师近景') || {};
let url = item.pullUrl
let mainVideo = document.querySelector<any>('#mainVideo');
mainVideo?.player?.src([{ type:'application/x-mpegURL',src: url }])
checkTitle.value = "教师近景";
curentPlayerVideo.value = item;
}
2023-06-28 23:05:19 +08:00
function mainVideoLoadEnd(player){
setTimeout(() => {
setTimeout(() => {
player.muted(false);
//player.play();
},50);
},50);
2023-05-05 23:52:51 +08:00
2023-04-24 22:40:50 +08:00
}
2023-10-27 00:49:17 +08:00
function openLive(item: any){
changeAvyLiveByJsbhsApi({ jsbhs:item.jsbh, type: 1 }).then(res => {
let content = '';
res.forEach(x => {
// content += x.jsmc + "-" + x.xm
content += x.jsmc
let text = '';
if(x.resText){
if(x.resText.includes('ok')){
text = '播放失败,开启直播间成功,请稍后再试'
}else{
text = '播放失败,开启直播间失败,请联系管理员。'
}
}
content += " " + text + "<br/>"
});
// if(content.includes('开启直播间成功')){
// //延迟12秒
// setTimeout(() => {
// createInfoModal({ width:'50%', title: '结果',content })
// }, 12*1000);
// }else{
createInfoModal({ width:'50%', title: '结果',content })
// }
}).catch(e => {
console.error(e);
//loading.value = false;
//createInfoModal({title: '错误结果',content:e})
})
}
2023-05-04 23:50:32 +08:00
function getSuibi(){
2023-05-05 23:52:51 +08:00
//查询随笔
2023-05-04 23:50:32 +08:00
let param = {
userId: getUserId(),
ketangbiaoId: route.query.ktId,
column: 'createTime',
order: 'desc',
};
querySuibi(param).then(res => {
Object.assign(model, (res.records??[{}])[0]);
// model = (res.records??[{}])[0];
2023-04-24 22:40:50 +08:00
});
}
2023-05-05 23:52:51 +08:00
function getKcxx(){
//查询课程信息
//route.query.ktId
let param = {
id: route.query.ktId
}
getKtangInfo(param).then(res => {
2023-05-18 00:27:12 +08:00
console.log(res);
ktangInfo.value = res;
2023-05-05 23:52:51 +08:00
kcCardBoxTitle.value = res.kcmc;
2024-05-24 01:27:08 +08:00
// defHttp.get({ url: '/zyJxdg/zyJxdg/getKcjsJxdg', params: { rwbh: res.rwbh,xqxn: res.xnxq } }).then((res) => {
// if(res){
// jxdgInfo.value = res;
// }
// });
2023-05-05 23:52:51 +08:00
});
}
2023-10-19 01:05:12 +08:00
function savePlayLogFn(item){
savePlayLog({ playUrl: item.pullUrl, jxlId: item.jxlId, jxlName: item.jxlName, jsbh: route.query.id, jsmc: item.jsmc, ketangbiaoId: route.query.ktId,ketangbiaoName: ktangInfo.value.kcmc })
}
2023-05-05 23:52:51 +08:00
//计算播放状态
function calcPlayStatus(item){
2023-10-27 00:49:17 +08:00
if(item.pullUrl){
videojs.xhr.get(item.pullUrl,(err, resp, body) => {
if(err){
playStatus.value = false;
isError.value = true;
2025-04-30 08:21:49 +08:00
// openLive(item);
2023-10-27 00:49:17 +08:00
}else{
playStatus.value = true;
isError.value = false;
}
})
}else {
console.log(1111111);
playStatus.value = true;
isError.value = true;
}
}
2023-05-04 23:50:32 +08:00
function saveSuibi(){
//addSuibi editSuibi
// if(model.value.id){
// editSuibi({...model.value, })
// }else{
addSuibi({ notes: model.notes, userId: getUserId(), ketangbiaoId: route.query.ktId })
// }
2023-04-24 22:40:50 +08:00
}
2023-05-19 23:36:52 +08:00
function openAllSuiBi(){
//打开弹窗
tkbjVisible.value = true;
//查询随笔
let param = {
userId: getUserId(),
ketangbiaoId: route.query.ktId,
column: 'createTime',
order: 'desc',
2023-06-07 00:02:49 +08:00
pageSize: '-1',
2023-05-19 23:36:52 +08:00
};
querySuibi(param).then(res => {
// model = (res.records??[{}])[0];
suibiList.value = res.records??[]
}).finally(() => {
//关闭等待
});
2024-05-24 01:27:08 +08:00
}
function calcPercentage(averageNum, zrs) {
if(averageNum === 0 || zrs === 0){
return '0%';
}else{
2024-05-27 14:45:05 +08:00
return (averageNum / zrs * 100).toFixed(2) + '%';
2024-05-24 01:27:08 +08:00
}
}
function openPdf(miniUrl) {
let url2 = getFileAccessHttpUrl(miniUrl)
let url = baseApiUrl+"/generic/web/viewer.html?file="+encodeURIComponent(url2);
window.open(url,"_blank");
}
2023-05-19 23:36:52 +08:00
2024-05-24 01:27:08 +08:00
function downloadFile(miniUrl) {
let url = getFileAccessHttpUrl(miniUrl);
window.open(url,"_blank");
2023-05-19 23:36:52 +08:00
}
2024-06-08 15:48:41 +08:00
function handleZqrs(record){
console.log(`🚀 ~ handleZqrs ~ record:`, record)
console.log(`🚀 ~ handleZqrs ~ zqrsList:`, record.zqrsList)
var a = record.detectionMain;
2024-06-12 11:27:09 +08:00
if(record.zqrsList){
a.detectionDetailedList = record.zqrsList
handleZqrsDetail(a);
}else{
createMessage.warning("暂无数据!")
}
2024-06-08 15:48:41 +08:00
}
function handleZqrsDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
2024-05-24 01:27:08 +08:00
2023-04-24 22:40:50 +08:00
</script>
<style lang="less" scoped>
2024-05-24 01:27:08 +08:00
.jxDiv {
padding-top: .5rem;
}
2023-05-05 23:52:51 +08:00
#siteMain {
// font-size: ;
height: 100%;
background: #f3f3f4;
#maxSite {
//最大宽度
max-width: 1170px;
//居中
margin: 0 auto;
.rowGutter{
margin-top: 1rem;
margin-bottom: 1rem;
}
.ant-layout-header {
color: #fff;
background: #1ab394;
}
.ant-layout-footer {
line-height: 1.5;
background: #FFF;
}
.ant-layout-sider {
color: #fff;
line-height: 120px;
background: #3ba0e9;
}
.ant-layout-content {
min-height: 120px;
color: #000;
/*line-height: 120px;*/
background: #f3f3f4;
}
}
}
/**暗黑模式特殊配色*/
[data-theme='dark'] #siteMain #maxSite {
.ant-layout-header, .ant-layout-footer {
background: #6aa0c7;
}
.ant-layout-content {
background: #107bcb;
}
.ant-layout-sider {
background: #3499ec;
}
}
2023-04-24 22:40:50 +08:00
.videoMax{
width: 25%;
}
.videoCardMain {
:deep(.ant-card-body) {
padding: 0;
}
}
/* 隐藏video 进度条 */
video::-webkit-media-controls-timeline {
display: none;
}
2023-05-05 23:52:51 +08:00
.smallTxt {
font-size: .8rem;
}
.activte {
background: #1ab394;
color: #FFF;
}
.miniButton {
float: left;
padding: 0.3rem;
border-radius: 5px;
}
.miniButtonRight {
float: right
2023-05-04 23:50:32 +08:00
}
2024-06-12 11:27:09 +08:00
.helpClass{
font-size: 16px;
font-weight: 700;
/* background: #1c84c6; */
color: #1c84c6;
border-radius: 5px;
padding: 1px 8px;
border: 1px #1c84c6 solid;
cursor: pointer;
}
.handClass{
cursor: pointer;
}
.fptitle{
background: black;
color: white;
font-weight: 700;
text-align: center;
}
.s-video-all {
width: 100%;
position: relative;
}
.s-full {
text-align: center;
position: absolute;
left: 10px;
top: 10px;
width: 70px;
color: white;
cursor: pointer;
background: #c0c0c0;
border-radius: 5px;
2024-12-26 13:25:35 +08:00
height: 30px;
line-height: 30px;
}
.className3 {
margin-top: 50px;
}
.className2 {
margin-top: 100px;
}
2023-04-24 22:40:50 +08:00
</style>