Compare commits

..

8 Commits

Author SHA1 Message Date
joshen
77a3c2759e 取消日志 2025-07-23 11:14:08 +08:00
joshen
0830c53840 Merge remote-tracking branch 'yx/master-0720-lyc' into master-110 2025-07-23 11:02:35 +08:00
王卓煜
f91e2f12dd 修改前端进度条 2025-07-23 10:58:47 +08:00
王卓煜
b8858348c0 Revert "修改前端进度条"
This reverts commit 6208caf4ca.
2025-07-23 10:42:54 +08:00
joshen
7bcff6bc85 Merge remote-tracking branch 'yx/master-0720-lyc' into master-110
# Conflicts:
#	src/components/VideoPlayer/index.vue
2025-07-23 10:23:24 +08:00
王卓煜
6208caf4ca 修改前端进度条 2025-07-23 10:14:14 +08:00
王卓煜
18324458f3 内网环境判断,修改前端 2025-07-21 18:31:13 +08:00
joshen
ce23930a04 test 2025-07-11 17:46:17 +08:00
7 changed files with 232 additions and 279 deletions

View File

@@ -170,9 +170,7 @@ const updateContentOrders = function(cid,items) {
const detail = function(id) { const detail = function(id) {
return ajax.get('/xboe/m/course/manage/detail?id=' + id); return ajax.get('/xboe/m/course/manage/detail?id=' + id);
} }
const getDictIds = function(pid,type) {
return ajax.get(`/xboe/m/course/manage/getDictIds?pid=${pid}&type=${type}`);
}
/** /**
* 更新内容的名称 * 更新内容的名称
* @param {Object} data * @param {Object} data
@@ -448,7 +446,6 @@ export default {
findUpdateLogs, findUpdateLogs,
getUpdateLog, getUpdateLog,
detail, detail,
getDictIds,
saveContent, saveContent,
pageList, pageList,
setEnabled, setEnabled,

View File

@@ -565,13 +565,15 @@ export default {
this.requireSaveCourse = true; this.requireSaveCourse = true;
console.log("--- watch比较 = ", oldVal.orgId, newVal.orgId); console.log("--- watch比较 = ", oldVal.orgId, newVal.orgId);
if (newVal.orgId !== oldVal.orgId) {
console.log("--- watch newVal.orgId = ", newVal.orgId);
this.checkOrgPermission(newVal.orgId); this.checkOrgPermission(newVal.orgId);
}
}, },
deep: true deep: true
} }
}, },
mounted() { mounted() {
this.getDictIds();
let extendFlag=this.$route.query.f; //是否是管理端过来的 let extendFlag=this.$route.query.f; //是否是管理端过来的
this.extendRefId=this.$route.query.refId; this.extendRefId=this.$route.query.refId;
this.extendRefType=this.$route.query.refType; this.extendRefType=this.$route.query.refType;
@@ -602,8 +604,11 @@ export default {
this.isPermission = false; this.isPermission = false;
return; return;
} }
console.log("--- this.dicts = ",this.dicts)
this.isPermission = this.dicts.includes(orgId); this.isPermission = this.dicts.includes(orgId);
this.courseInfo.device = 3;
if(this.isPermission){
this.courseInfo.device = 4;
}
console.log("--- 监听结束 this.isPermission = ",this.isPermission) console.log("--- 监听结束 this.isPermission = ",this.isPermission)
}, },
// 关键字的更改 // 关键字的更改
@@ -910,21 +915,6 @@ export default {
this.courseCoverurl = ''; this.courseCoverurl = '';
this.courseInfo.coverImg = ''; this.courseInfo.coverImg = '';
}, },
//获取字典信息
async getDictIds() {
console.log("--- 获取字典信息 1 = ", this.dicts);
try {
const response = await apiCourse.getDictIds(637, 1); // 确保返回 Promise
console.log("--- 获取字典信息 2 result= ", response);
if (response.status === 200) {
this.dicts = response.result.dicts; // 正确提取 dicts
console.log("--- 获取字典信息 3 = ", this.dicts);
}
} catch (error) {
console.error("获取字典信息失败:", error);
}
},
//获取课程信息 //获取课程信息
async getDetail(id) { async getDetail(id) {
this.curCourseId = id; this.curCourseId = id;

View File

@@ -317,7 +317,7 @@ export default {
} }
setInterval(() => { setInterval(() => {
console.log('当前状态:',this.currentProgress,this.isDrag,this.videoDom.currentTime , this.videoDom.duration) // console.log('this.currentProgress::',this.currentProgress,this.isDrag,this.videoDom.currentTime , this.videoDom.readyState)
// 视频播放时本地记录视频实时播放时长,视频设置了禁止拖动时执行 // 视频播放时本地记录视频实时播放时长,视频设置了禁止拖动时执行
if(!this.isDrag){ if(!this.isDrag){
var time = localStorage.getItem('videoProgressData') var time = localStorage.getItem('videoProgressData')
@@ -364,10 +364,10 @@ export default {
} }
// 根据视频的readyState判断下一帧是否已加载并控制loading的显示 // 根据视频的readyState判断下一帧是否已加载并控制loading的显示
this.isShowLoading = this.videoDom.readyState < 3; this.isShowLoading = this.videoDom.readyState < 3;
console.log("当前缓存:"+this.videoDom.readyState) // console.log("当前缓存:"+this.videoDom.readyState)
if (this.videoDom.readyState < 3){ if (this.videoDom.readyState < 1){
console.log("详细信息",this.videoDom) // console.log("详细信息",this.videoDom)
console.log("卡了",this.videoDom.readyState) // console.log("卡了",this.videoDom.readyState)
} }
//if() //if()
//console.log(this.videoDom.readyState,'this.videoDom.readyState'); //console.log(this.videoDom.readyState,'this.videoDom.readyState');

View File

@@ -37,6 +37,7 @@ export default {
}, },
isDrag:{ isDrag:{
type: Boolean, type: Boolean,
default: true,
}, },
blobId:{ blobId:{
type: String, type: String,
@@ -85,10 +86,9 @@ export default {
if(current<0) current = 0; if(current<0) current = 0;
var time = localStorage.getItem('videoProgressData'); var time = localStorage.getItem('videoProgressData');
var arr = time&&JSON.parse(time) || {} var arr = time&&JSON.parse(time) || {}
//console.log('down arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current) console.log('down arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current)
// 禁止拖动 // 禁止拖动 true:禁止拖动false:允许拖动
if(!this.isDrag && time && arr[this.blobId] < current) return; if(!this.isDrag && time && arr[this.blobId] < current) return;
this.$emit("updateProgress", current); this.$emit("updateProgress", current);
// } // }
@@ -102,7 +102,7 @@ export default {
if(current<0) current = 0; if(current<0) current = 0;
var time = localStorage.getItem('videoProgressData'); var time = localStorage.getItem('videoProgressData');
var arr = time&&JSON.parse(time) || {} var arr = time&&JSON.parse(time) || {}
//console.log('move arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current) console.log('move arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current)
// 禁止拖动 // 禁止拖动
if(!this.isDrag && time && arr[this.blobId] < current) return; if(!this.isDrag && time && arr[this.blobId] < current) return;
this.$emit("updateProgress", current); this.$emit("updateProgress", current);
@@ -118,12 +118,12 @@ export default {
if(current<0) current = 0; if(current<0) current = 0;
var time = localStorage.getItem('videoProgressData'); var time = localStorage.getItem('videoProgressData');
var arr = time&&JSON.parse(time) || {} var arr = time&&JSON.parse(time) || {}
//console.log('up arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current) console.log('up arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current)
this.$emit("getMouseDownStatus", false); this.$emit("getMouseDownStatus", false);
// 禁止拖动 // 禁止拖动
if(!this.isDrag && time && arr[this.blobId] < current) return; if(!this.isDrag && time && arr[this.blobId] < current) return;
this.$emit("updateProgress", current); this.$emit("updateProgress", current);
this.$emit("getMouseDownStatus", false);
} }
}, },
}, },

View File

@@ -20,7 +20,7 @@
</div> </div>
<div class="label"> <div class="label">
<author :aid="caseDetail.sysCreateAid" :onlyAvatar="true" :avatar="authorInfo.avatar" <author :aid="caseDetail.sysCreateAid" :onlyAvatar="true" :avatar="authorInfo.avatar"
:sex="authorInfo.sex" :name="authorInfo.name"></author> :sex="authorInfo.sex"></author>
<span>案主{{ authorInfo.name }} ({{ authorInfo.orgInfo }})</span> <span>案主{{ authorInfo.name }} ({{ authorInfo.orgInfo }})</span>
<!-- <span>案主{{ authorInfo.name }}</span> <!-- <span>案主{{ authorInfo.name }}</span>
<span>工号{{ authorInfo.code }}</span> <span>工号{{ authorInfo.code }}</span>

View File

@@ -1609,7 +1609,7 @@ export default {
}) })
console.log(res?.result?.list ,'有没有数据2'); console.log(res?.result?.list ,'有没有数据2');
this.caseList.list = res.result.list this.caseList.list = res.result.list
this.getCaseUserData(res.result.list); // this.getCaseUserData(res.result.list);
// 给所有的赋值 // 给所有的赋值
this.caseList.count = res.result.count; this.caseList.count = res.result.count;
this.caseList.showPagCount = res.result.count; this.caseList.showPagCount = res.result.count;

View File

@@ -22,7 +22,7 @@
<div class="course-playbox" ref="coursePlayerBox" id="id_course_player_box"> <div class="course-playbox" ref="coursePlayerBox" id="id_course_player_box">
<div class="course-player" ref="coursePlayer" id="id_course_player"> <div class="course-player" ref="coursePlayer" id="id_course_player">
<div> <div>
<div v-if="renderCourse"> <div v-if="false">
<div v-if="resType == null || resType == 0"> <div v-if="resType == null || resType == 0">
<!--先显示视频图片--> <!--先显示视频图片-->
<course-image v-if="courseInfo.id != ''" :course="courseInfo"></course-image> <course-image v-if="courseInfo.id != ''" :course="courseInfo"></course-image>
@@ -110,11 +110,11 @@
</assess> </assess>
</div> </div>
</div> </div>
<div v-if="!renderCourse && Internet ==2" style="margin:350px 250px" class="jianjie pdftext" id="pdfPreview"> <div v-if="true" style="margin:350px 250px" class="jianjie pdftext" id="pdfPreview">
<div style="margin-top:40px;font-weight:700;font-size: 22px;color: #ccc"> <div style="margin-top:40px;font-weight:700;font-size: 22px;color: #ccc">
<span>十分抱歉您当前的网络环境不符合观看要求为了保障课程信息的安全您需要接入公司内网才能观看</span> <span>十分抱歉您当前的网络环境不符合观看要求为了保障案例信息的安全您需要接入公司内网才能观看</span>
</div> </div>
<div style="margin-top:20px;text-align:center" @click="refreshPage"> <div style="margin-top:20px;text-align:center" @click="getInternet" >
<el-button type="primary">重新检测</el-button> <el-button type="primary">重新检测</el-button>
</div> </div>
</div> </div>
@@ -454,7 +454,6 @@
getType: getType, getType: getType,
ctabName: 'catalog', ctabName: 'catalog',
resType: null, resType: null,
renderCourse: true,
activeNames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], activeNames: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
scoreInfo: { scoreInfo: {
dlgShow: false, dlgShow: false,
@@ -483,7 +482,6 @@
} }
}, },
mounted() { mounted() {
this.getInternet();
// 增加的用户受众id // 增加的用户受众id
let localKey = "user_" + this.userInfo.sysId + "_gids"; let localKey = "user_" + this.userInfo.sysId + "_gids";
let hasIds = sessionStorage.getItem(localKey); let hasIds = sessionStorage.getItem(localKey);
@@ -531,6 +529,10 @@
return treeList; return treeList;
} }
}, },
destroyed(){
this.cleanAppendTime();
this.stopStudyTime();
},
methods: { methods: {
handleOpen(key,path){ handleOpen(key,path){
if(this.isFalse){ if(this.isFalse){
@@ -1322,17 +1324,6 @@
audiences:this.audiences audiences:this.audiences
}).then(rs => { }).then(rs => {
if (rs.status == 200) { if (rs.status == 200) {
if(rs.result.isPermission){
this.protocolDialogVisible=true
}
if (!rs.result.isPermission || (rs.result.isPermission && this.Internet==1)){
// this.getInternet()
this.renderCourse = true
}else{
// this.Internet=1;
this.renderCourse = false
this.protocolDialogVisible=true
}
if(rs.result.contents.length==0){ if(rs.result.contents.length==0){
$this.$message.error('课程内容已删除或课程已不再使用'); $this.$message.error('课程内容已删除或课程已不再使用');
return; return;
@@ -1421,17 +1412,16 @@
this.totalContent = rs.result.contents.length; this.totalContent = rs.result.contents.length;
//加载学习的数据 //加载学习的数据
this.loadStudyData(rs.result); this.loadStudyData(rs.result);
if (rs.result.isPermission){
// if (true){
this.getInternet()
console.log('需要内网环境')
}
} else { } else {
this.$message.error(rs.message); this.$message.error(rs.message);
} }
}); });
}, },
refreshPage() {
location.reload();
// this.getInternet();
// this.loadData();
},
getXmlHttpRequest() { getXmlHttpRequest() {
if (window.XMLHttpRequest) { if (window.XMLHttpRequest) {
return new XMLHttpRequest(); return new XMLHttpRequest();
@@ -1449,7 +1439,7 @@
let timer = setTimeout(function () { let timer = setTimeout(function () {
timedOut = true; timedOut = true;
xmlhttp.abort(); xmlhttp.abort();
}, 1000); }, 5000);
xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn/500.html", true); xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn/500.html", true);
xmlhttp.send(); xmlhttp.send();
xmlhttp.onreadystatechange = function () { xmlhttp.onreadystatechange = function () {
@@ -1457,9 +1447,9 @@
if (xmlhttp.status == 200) { if (xmlhttp.status == 200) {
clearTimeout(timer); clearTimeout(timer);
$this.Internet = 1; $this.Internet = 1;
$this.protocolDialogVisible=true
} else { } else {
clearTimeout(timer); clearTimeout(timer);
// $this.protocolDialogVisible=true
$this.Internet = 2; $this.Internet = 2;
} }
} else { } else {
@@ -1760,10 +1750,6 @@
} }
}, },
}, },
destroyed(){
this.cleanAppendTime();
this.stopStudyTime();
},
} }
</script> </script>
@@ -1803,43 +1789,21 @@
min-height: 400px; min-height: 400px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.course-player-container {
display: flex;
flex-direction: column;
height: 100%;
}
.course-player{ //内容播放区域 .course-player{ //内容播放区域
flex: 4; // 80%高度 background-color: rgb(238, 238, 238);
flex:1;
min-width: 700px; min-width: 700px;
// min-height: 400px; min-height: 400px;
// max-height: 800px; max-height: 800px;
height: 80%; //height: 100%;
border: 1px solid #ffffff; border: 1px solid #ffffff;
padding-right: 20px; padding-right: 20px;
background-color: rgb(238, 238, 238);
// overflow: auto; // overflow: auto;
} }
.course-control{ //内容控制区域 .course-control{ //内容控制区域
width: 420px; width: 420px;
} }
} }
@media screen and (max-width: 1200px) {
.course-playbox,
.course-infobox {
flex-direction: column;
}
.course-player,
.course-info {
min-width: 100%;
padding-right: 0;
}
.course-control,
.course-teacher {
width: 100%;
margin-top: 20px;
}
}
.course-infobox { .course-infobox {
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
@@ -1959,10 +1923,13 @@
} }
.player-box { .player-box {
position: relative; position: absolute;
width: 100%; // top: 62px;
max-width: 300px; // left: 184px;
margin: 20px auto; width: 300px;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
height: 187px; height: 187px;
background: rgba(74, 74, 74, .5); background: rgba(74, 74, 74, .5);
border-radius: 33px; border-radius: 33px;
@@ -2105,7 +2072,6 @@
} }
.course-interact { .course-interact {
flex: 1; // 20%高度
height: 54px; height: 54px;
// padding-top: 10px; // padding-top: 10px;
// padding-right: 10px; // padding-right: 10px;