Compare commits

..

1 Commits

Author SHA1 Message Date
Caojr
7eefffed0f fix 35 2025-07-02 17:06:14 +08:00
11 changed files with 297 additions and 467 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

@@ -141,7 +141,6 @@
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="1">PC端可见</el-radio> <el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="1">PC端可见</el-radio>
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="2">移动端可见</el-radio> <el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="2">移动端可见</el-radio>
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="3">多端可见</el-radio> <el-radio style="margin-right: 10px;" v-model="courseInfo.device" :label="3">多端可见</el-radio>
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" v-if="isPermission" :label="4">仅内网访问</el-radio>
</el-form-item> </el-form-item>
<el-form-item v-if="!weike.onlyRequired" label="课程来源"> <el-form-item v-if="!weike.onlyRequired" label="课程来源">
<el-radio-group v-model="courseInfo.source"> <el-radio-group v-model="courseInfo.source">
@@ -306,7 +305,6 @@
<el-radio v-model="courseInfo.device" :label="1">PC端可见</el-radio> <el-radio v-model="courseInfo.device" :label="1">PC端可见</el-radio>
<el-radio v-model="courseInfo.device" :label="2">移动端可见</el-radio> <el-radio v-model="courseInfo.device" :label="2">移动端可见</el-radio>
<el-radio v-model="courseInfo.device" :label="3">多端可见</el-radio> <el-radio v-model="courseInfo.device" :label="3">多端可见</el-radio>
<el-radio style="margin-right: 10px;" v-model="courseInfo.device" v-if="isPermission" :label="4">仅内网访问</el-radio>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="课程来源"> <el-form-item label="课程来源">
@@ -490,8 +488,6 @@ export default {
refType:'' refType:''
}, },
visibleShow:false, visibleShow:false,
isPermission:false,
dicts:[],
extendRefId:'', extendRefId:'',
extendRefType:'', extendRefType:'',
courseTeachers: [], //课程的老师 courseTeachers: [], //课程的老师
@@ -531,11 +527,7 @@ export default {
dlgShow: false dlgShow: false
}, },
rightTypeId: {}, rightTypeId: {},
catalogSortDialogShow: false, catalogSortDialogShow: false
selectedOrg: {
orgId: null,
name: ''
}
}; };
}, },
created() { created() {
@@ -560,18 +552,14 @@ export default {
}, },
watch: { watch: {
courseInfo: { courseInfo: {
handler(newVal, oldVal) { handler(newVal) {
// 需要保存 //需要保存
this.requireSaveCourse = true; this.requireSaveCourse = true;
console.log("--- watch比较 = ", oldVal.orgId, 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;
@@ -593,19 +581,6 @@ export default {
this.loadUserGroup(); this.loadUserGroup();
}, },
methods: { methods: {
// 检查机构权限
checkOrgPermission(orgId) {
console.log("--- 监测组织id orgId = ",orgId)
console.log("--- this.isPermission = ",this.isPermission)
console.log("--- device = ",this.courseInfo.device)
if (!orgId) {
this.isPermission = false;
return;
}
console.log("--- this.dicts = ",this.dicts)
this.isPermission = this.dicts.includes(orgId);
console.log("--- 监听结束 this.isPermission = ",this.isPermission)
},
// 关键字的更改 // 关键字的更改
changeKeywords(option){ changeKeywords(option){
if(option.target.value){ if(option.target.value){
@@ -910,26 +885,10 @@ 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;
this.orgName=''; this.orgName='';
this.isPermission = false;
let $this = this; let $this = this;
try { try {
const { result, status } = await apiCourse.detail(id); const { result, status } = await apiCourse.detail(id);
@@ -947,10 +906,7 @@ export default {
this.contentInfo.list = result.contents; this.contentInfo.list = result.contents;
this.sectionInfo.list = result.sections; this.sectionInfo.list = result.sections;
this.courseTeachers = result.teachers; //课程的老师信息 this.courseTeachers = result.teachers; //课程的老师信息
this.isPermission = result.isPermission; //课程的老师信息
this.dicts = result.dicts; //课程的老师信息
console.log("--- 编辑查看 this.isPermission = ",this.isPermission)
console.log("--- 编辑查看 this.dicts = ",this.dicts)
if(!this.courseInfo.orgId){ if(!this.courseInfo.orgId){
//根据课程创建者获取机构id //根据课程创建者获取机构id
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{ apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{

View File

@@ -109,7 +109,7 @@ export default {
if(res.status==200){ if(res.status==200){
this.info=res.result; this.info=res.result;
//检查是否过期 //检查是否过期
if(res.result.deadTime!='' && res.result.deadTime != null){ if(res.result.deadTime!=''){
var d = new Date(res.result.deadTime); var d = new Date(res.result.deadTime);
var now=new Date(); var now=new Date();
if(now.getTime() > d.getTime()){ if(now.getTime() > d.getTime()){

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

View File

@@ -37,6 +37,7 @@ export default {
}, },
isDrag:{ isDrag:{
type: Boolean, type: Boolean,
default: true,
}, },
blobId:{ blobId:{
type: String, type: String,

View File

@@ -624,8 +624,12 @@ export default {
// if(item.minute){ // if(item.minute){
// item.duration=parseFloat(item.minute)*60; // item.duration=parseFloat(item.minute)*60;
// } // }
// 如果没有给一个默认值30分钟 // 视频文件才可以设置时长其他类型直接赋值0
item.duration = item.minute ? parseFloat(item.minute) * 60 : 1800; if (item.fileType === 'mp4' || item.fileType === 'mp3') {
item.duration = item.minute ? parseFloat(item.minute) * 60 : 0;
} else {
item.duration = 0;
}
}); });
this.loading = true; this.loading = true;
coueseFile.batchUpdate(this.fileList).then(rs => { coueseFile.batchUpdate(this.fileList).then(rs => {

View File

@@ -5,8 +5,8 @@
<!-- 当轮播图等于一张时 --> <!-- 当轮播图等于一张时 -->
<swiper :options="swiperOptiontwo"> <swiper :options="swiperOptiontwo">
<swiper-slide style="margin: 0 auto" v-for="(item, idx) in resonimg" :key="'a' + idx" <swiper-slide style="margin: 0 auto" v-for="(item, idx) in resonimg" :key="'a' + idx"
class="swiper-slide games pointer" > class="swiper-slide games pointer">
<div class="bannbox" @click="handleCarouselClick(item)" :style="{ <div class="bannbox" :style="{
background: `url(${fileBaseUrl + item.image background: `url(${fileBaseUrl + item.image
}) center center no-repeat`, }) center center no-repeat`,
}"></div> }"></div>
@@ -17,8 +17,8 @@
<div id="container" style="z-index: 99" v-else> <div id="container" style="z-index: 99" v-else>
<swiper :options="swiperOption" ref="mySwiper" v-if="resonimg.length > 1"> <swiper :options="swiperOption" ref="mySwiper" v-if="resonimg.length > 1">
<swiper-slide style="margin: 0 auto" v-for="(item, idx) in resonimg" :key="'b' + idx" <swiper-slide style="margin: 0 auto" v-for="(item, idx) in resonimg" :key="'b' + idx"
class="swiper-slide games pointer" > class="swiper-slide games pointer">
<div class="bannbox" @click="handleCarouselClick(item)" :style="{ <div class="bannbox" :style="{
background: `url(${fileBaseUrl + item.image background: `url(${fileBaseUrl + item.image
}) center center no-repeat`, }) center center no-repeat`,
}"></div> }"></div>
@@ -220,7 +220,7 @@ export default {
autoplay: false, autoplay: false,
// noSwiping: true, // noSwiping: true,
}, },
// resonimg: [], resonimg: [],
swiperOption: { swiperOption: {
autoplay: { autoplay: {
delay: 2000, delay: 2000,
@@ -249,13 +249,6 @@ export default {
this.getToolData() this.getToolData()
}, },
methods: { methods: {
// 添加点击轮播图跳转的方法
handleCarouselClick(item) {
if (item.url) {
window.open(item.url, '_blank');
}
},
downTool(toolInfo) { downTool(toolInfo) {
console.log(toolInfo); console.log(toolInfo);
window.open(`/activityApi/xboe/m/boe/tools/url/download?urlStr=${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}&fileName=${toolInfo.name}`) window.open(`/activityApi/xboe/m/boe/tools/url/download?urlStr=${process.env.VUE_APP_BOE_WEB_URL}/upload${toolInfo.filePath}&fileName=${toolInfo.name}`)

View File

@@ -8,7 +8,7 @@
<div class="navTop"> <div class="navTop">
<div> <div>
<router-link to="/grateful" class="nav">首页</router-link>&nbsp;>&nbsp; <router-link to="/grateful" class="nav">首页</router-link>&nbsp;>&nbsp;
<span style="cursor: pointer;" class="nav">认证讲师库</span> <span style="cursor: pointer;" class="nav">认证讲师库2023</span>
</div> </div>
<div style="position: relative;"> <div style="position: relative;">
<el-input class="portal-input" placeholder="请输入课程名称" style="border-radius: 20px !important; " <el-input class="portal-input" placeholder="请输入课程名称" style="border-radius: 20px !important; "

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,6 @@
<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="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,15 +109,6 @@
</assess> </assess>
</div> </div>
</div> </div>
<div v-if="!renderCourse && Internet ==2" style="margin:350px 250px" class="jianjie pdftext" id="pdfPreview">
<div style="margin-top:40px;font-weight:700;font-size: 22px;color: #ccc">
<span>十分抱歉您当前的网络环境不符合观看要求为了保障课程信息的安全您需要接入公司内网才能观看</span>
</div>
<div style="margin-top:20px;text-align:center" @click="refreshPage">
<el-button type="primary">重新检测</el-button>
</div>
</div>
</div>
<!--交互部分--> <!--交互部分-->
<div> <div>
<div class="course-interact"> <div class="course-interact">
@@ -177,7 +167,7 @@
</div> </div>
<!-- 课程单元 --> <!-- 课程单元 -->
<div class="course-units" v-if="tab == 1"> <div class="course-units" v-if="tab == 1">
<div style="min-height: 350px;max-height: 650px ;overflow-y: auto;"> <div :style="`height: ${controlHeight}px;overflow-y: auto;`">
<div class="catalog" v-if="courseInfo.type == 20"> <div class="catalog" v-if="courseInfo.type == 20">
<div v-for="(item, index) in catalogTree" :key="index" :name="index"> <div v-for="(item, index) in catalogTree" :key="index" :name="index">
<el-menu <el-menu
@@ -313,17 +303,6 @@
</div> </div>
</div> </div>
</div> </div>
<el-dialog class="protocol" :close-on-click-modal="false" :visible="protocolDialogVisible" width="30%"
:show-close="false">
<div class="protocol-title">{{warnTitle}}</div>
<div class="protocol-content">
&emsp;&emsp;{{warn}}
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="protocolDialogVisible = false">
</el-button>
</span>
</el-dialog>
<!-- <div><portal-footer></portal-footer></div> --> <!-- <div><portal-footer></portal-footer></div> -->
</div> </div>
</template> </template>
@@ -390,7 +369,6 @@
}, },
data() { data() {
return { return {
protocolDialogVisible: false,
tentative: false, tentative: false,
isContentTypeTwo: null, isContentTypeTwo: null,
isContentType: null, isContentType: null,
@@ -412,7 +390,6 @@
curCFile: { curCFile: {
converStatus: 4, converStatus: 4,
}, },
Internet: 3,//1是成功 2是是失败 3是检测中
radio: '', radio: '',
interactRuning: false, interactRuning: false,
playerBoxShow: false, playerBoxShow: false,
@@ -454,7 +431,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,
@@ -478,12 +454,9 @@
cumulativeDuration:0, //非音频累计时长 cumulativeDuration:0, //非音频累计时长
maxDuration:0, //非音频最大时长 maxDuration:0, //非音频最大时长
defaultMaxTime:1800, //非音频默认最大时间 defaultMaxTime:1800, //非音频默认最大时间
warn:"测试内容",
warnTitle:"测试标题",
} }
}, },
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 +504,10 @@
return treeList; return treeList;
} }
}, },
destroyed(){
this.cleanAppendTime();
this.stopStudyTime();
},
methods: { methods: {
handleOpen(key,path){ handleOpen(key,path){
if(this.isFalse){ if(this.isFalse){
@@ -816,8 +793,7 @@
}else if(h>500){ }else if(h>500){
h=h+60; h=h+60;
} }
// 移除高度控制 防止内容塌陷 $this.controlHeight=h-95;
// $this.controlHeight=h-95;
}) })
@@ -1323,17 +1299,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;
@@ -1392,8 +1357,7 @@
} }
} }
this.courseInfo = rs.result.course; this.courseInfo = rs.result.course;
this.warn = rs.result.warn;
this.warnTitle = rs.result.warnTitle;
if (rs.result.teachers && rs.result.teachers.length > 0) { if (rs.result.teachers && rs.result.teachers.length > 0) {
let userIds = []; let userIds = [];
let ctoUsers = []; let ctoUsers = [];
@@ -1422,53 +1386,12 @@
this.totalContent = rs.result.contents.length; this.totalContent = rs.result.contents.length;
//加载学习的数据 //加载学习的数据
this.loadStudyData(rs.result); this.loadStudyData(rs.result);
} else { } else {
this.$message.error(rs.message); this.$message.error(rs.message);
} }
}); });
}, },
refreshPage() {
location.reload();
// this.getInternet();
// this.loadData();
},
getXmlHttpRequest() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
}
else if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
},
// 检测是否为内网
getInternet() {
this.Internet = 3;
let $this = this;
let xmlhttp = this.getXmlHttpRequest();
let timedOut = false;
let timer = setTimeout(function () {
timedOut = true;
xmlhttp.abort();
}, 1000);
xmlhttp.open("HEAD", window.location.protocol + "//uapi.boe.com.cn/500.html", true);
xmlhttp.send();
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
clearTimeout(timer);
$this.Internet = 1;
} else {
clearTimeout(timer);
// $this.protocolDialogVisible=true
$this.Internet = 2;
}
} else {
if (timedOut) return;//忽略中止请求
clearTimeout(timer);//取消等待的超时
}
}
},
loadStudyData(result) { loadStudyData(result) {
let $this=this; let $this=this;
this.loadScorePraiseAndTrample(); this.loadScorePraiseAndTrample();
@@ -1761,10 +1684,6 @@
} }
}, },
}, },
destroyed(){
this.cleanAppendTime();
this.stopStudyTime();
},
} }
</script> </script>
@@ -1801,46 +1720,23 @@
margin: 20px auto; margin: 20px auto;
.course-playbox { .course-playbox {
background-color: #fff; background-color: #fff;
//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%高度 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;
@@ -1960,10 +1856,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;
@@ -2106,7 +2005,6 @@
} }
.course-interact { .course-interact {
flex: 1; // 20%高度
height: 54px; height: 54px;
// padding-top: 10px; // padding-top: 10px;
// padding-right: 10px; // padding-right: 10px;
@@ -2470,18 +2368,4 @@
height: 200px; height: 200px;
background: url('../../../public/images/couresdetail.png'); background: url('../../../public/images/couresdetail.png');
} }
.protocol {
.protocol-title {
font-size: 20px;
font-weight: 600;
text-align: center;
margin-bottom: 25px;
}
.protocol-content {
font-size: 14px;
line-height: 25px;
}
}
</style> </style>