diff --git a/src/api/modules/course.js b/src/api/modules/course.js index 3f4e503b..c122be4f 100644 --- a/src/api/modules/course.js +++ b/src/api/modules/course.js @@ -1,9 +1,10 @@ /** * 课程的操作,课程的添加,修改,列表查询,课程的审核发布等操作。 * 针对于管理员,教师的功能 - * + * **/ import ajax from '@/utils/xajax.js' +import request from "../unionAjax"; /** * 保存课程基本信息,新增和更新都是此方式 @@ -170,6 +171,9 @@ const updateContentOrders = function(cid,items) { const detail = function(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}`); +} /** * 更新内容的名称 @@ -274,7 +278,7 @@ const countWaitAudit = function() { } /** - * [已用courseAudit中的hrbpAuditList替换] + * [已用courseAudit中的hrbpAuditList替换] * 当前用户需要审核的课程列表 * @param {Object} query 同pageList */ @@ -283,9 +287,9 @@ const auditList = function(query) { } -/** - * 【已移到courseAudit中】 - * 教师需要审核的课程列表 +/** + * 【已移到courseAudit中】 + * 教师需要审核的课程列表 */ const teacherAuditList = function(query) { return ajax.post('/xboe/m/course/audit/teacher-course', query); @@ -446,6 +450,7 @@ export default { findUpdateLogs, getUpdateLog, detail, + getDictIds, saveContent, pageList, setEnabled, diff --git a/src/api/modules/courseTag.js b/src/api/modules/courseTag.js new file mode 100644 index 00000000..0368c0d9 --- /dev/null +++ b/src/api/modules/courseTag.js @@ -0,0 +1,64 @@ +/**课程标签模块的相关处理*/ +import ajax from '@/utils/xajax.js' + +/** + * 分页查询:标签列表 + * @param {Object} query + */ +const portalPageList = function(query) { + return ajax.post('/xboe/m/coursetag/page', query); +} + +//改变标签的公共属性 +const changeTagPublic = function (row){ + // 返回 Promise 的 API 调用 + return ajax.post('/xboe/m/coursetag/changePublicStatus', { + id: row.id, + isPublic: row.isPublic + }); +} + +//改变标签的热点属性 +const changeTagHot = function (row){ + // 返回 Promise 的 API 调用 + return ajax.post('/xboe/m/coursetag/changeHotStatus', { + id: row.id, + isHot: row.isHot + }); +} + +//查询指定id的标签关联的所有课程 +const showCourseByTag = function (query){ + return ajax.post('/xboe/m/coursetag/showCourseByTag', query); +} + +//解除指定id的课程和某个标签之间的关联关系 +const unbindCourseTagRelation = function (params){ + return ajax.post('/xboe/m/coursetag/unbind', params); +} + +//编辑课程:标签模糊查询 +const searchTags = function (params){ + return ajax.post('/xboe/m/coursetag/searchTags', params); +} + +//编辑课程:创建标签(与当前课程关联) +const createTag = function (params){ + return ajax.post('/xboe/m/coursetag/createTag', params); +} + +//获取最新前10个热点标签 +const getHotTagList = function (params){ + return ajax.post('/xboe/m/coursetag/getHotTagList', params); +} + +export default { + portalPageList, + changeTagPublic, + changeTagHot, + showCourseByTag, + unbindCourseTagRelation, + searchTags, + createTag, + getHotTagList +} diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index 121e32c0..a51d8b45 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -254,6 +254,9 @@ --> + + + @@ -404,6 +407,7 @@ + + diff --git a/src/components/VideoPlayer/index.vue b/src/components/VideoPlayer/index.vue index 13889a46..7742cc68 100644 --- a/src/components/VideoPlayer/index.vue +++ b/src/components/VideoPlayer/index.vue @@ -317,7 +317,7 @@ export default { } setInterval(() => { - console.log('当前状态:',this.currentProgress,this.isDrag,this.videoDom.currentTime , this.videoDom.duration) + // console.log('当前状态:',this.currentProgress,this.isDrag,this.videoDom.currentTime , this.videoDom.duration) // 视频播放时本地记录视频实时播放时长,视频设置了禁止拖动时执行 if(!this.isDrag){ var time = localStorage.getItem('videoProgressData') @@ -364,10 +364,10 @@ export default { } // 根据视频的readyState判断下一帧是否已加载,并控制loading的显示 this.isShowLoading = this.videoDom.readyState < 3; - console.log("当前缓存:"+this.videoDom.readyState) + // console.log("当前缓存:"+this.videoDom.readyState) if (this.videoDom.readyState < 3){ - console.log("详细信息",this.videoDom) - console.log("卡了",this.videoDom.readyState) + // console.log("详细信息",this.videoDom) + // console.log("卡了",this.videoDom.readyState) } //if() //console.log(this.videoDom.readyState,'this.videoDom.readyState'); diff --git a/src/components/VideoPlayer/progress-bar.vue b/src/components/VideoPlayer/progress-bar.vue index a7dc1d8f..b0e131b8 100644 --- a/src/components/VideoPlayer/progress-bar.vue +++ b/src/components/VideoPlayer/progress-bar.vue @@ -37,7 +37,6 @@ export default { }, isDrag:{ type: Boolean, - default: true, }, blobId:{ type: String, @@ -73,51 +72,58 @@ export default { }, methods: { down(e) { - if (!this.isDrag) return; - this.$emit("getMouseDownStatus", true); - this.is_mousedown_progress = true; - // 获取完整进度条的clientX(dom左上角) - let init_clientX = this.dom_full.getBoundingClientRect().left; - // 计算调整后的当前进度条的长度 - this.current_width_px = e.clientX - init_clientX; - // 设置当前的播放进度(同时作用于当前进度条的样式) - let current = (e.clientX - init_clientX) / this.dom_full.clientWidth; - if(current>1) current = 1; - if(current<0) current = 0; - var time = localStorage.getItem('videoProgressData'); - var arr = time&&JSON.parse(time) || {} - // 禁止拖动 - if(time && arr[this.blobId] < current) return; + // if(this.isDrag) { + this.$emit("getMouseDownStatus", true); + this.is_mousedown_progress = true; + // 获取完整进度条的clientX(dom左上角) + let init_clientX = this.dom_full.getBoundingClientRect().left; + // 计算调整后的当前进度条的长度 + this.current_width_px = e.clientX - init_clientX; + // 设置当前的播放进度(同时作用于当前进度条的样式) + let current = (e.clientX - init_clientX) / this.dom_full.clientWidth; + if(current>1) current = 1; + if(current<0) current = 0; + var time = localStorage.getItem('videoProgressData'); + var arr = time&&JSON.parse(time) || {} + console.log('down arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current) + // 禁止拖动 true:禁止拖动,false:允许拖动 + if(!this.isDrag && time && arr[this.blobId] < current) return; + this.$emit("updateProgress", current); + // } - this.$emit("updateProgress", current); }, move(e) { - if (!this.isDrag || !this.is_mousedown_progress) return; - let init_clientX = this.dom_full.getBoundingClientRect().left; - this.current_width_px = e.clientX - init_clientX; - let current = (e.clientX - init_clientX) / this.dom_full.clientWidth; - if(current>1) current = 1; - if(current<0) current = 0; - var time = localStorage.getItem('videoProgressData'); - var arr = time&&JSON.parse(time) || {} - // 禁止拖动 - if(time && arr[this.blobId] < current) return; - this.$emit("updateProgress", current); + if (this.is_mousedown_progress) { + let init_clientX = this.dom_full.getBoundingClientRect().left; + this.current_width_px = e.clientX - init_clientX; + let current = (e.clientX - init_clientX) / this.dom_full.clientWidth; + if(current>1) current = 1; + if(current<0) current = 0; + var time = localStorage.getItem('videoProgressData'); + var arr = time&&JSON.parse(time) || {} + console.log('move arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current) + // 禁止拖动 + if(!this.isDrag && time && arr[this.blobId] < current) return; + this.$emit("updateProgress", current); + } }, up() { - if (!this.isDrag || !this.is_mousedown_progress) return; - // 标记鼠标不处于按下的状态了 - this.is_mousedown_progress = false; - // 松开鼠标后,即调整进度条后,此时的进度(0-1) - let current = this.current_width_px / this.dom_full.clientWidth; - if(current>1) current = 1; - if(current<0) current = 0; - var time = localStorage.getItem('videoProgressData'); - var arr = time&&JSON.parse(time) || {} - this.$emit("getMouseDownStatus", false); - // 禁止拖动 - if(time && arr[this.blobId] < current) return; - this.$emit("updateProgress", current); + if (this.is_mousedown_progress) { + // 标记鼠标不处于按下的状态了 + this.is_mousedown_progress = false; + // 松开鼠标后,即调整进度条后,此时的进度(0-1) + let current = this.current_width_px / this.dom_full.clientWidth; + if(current>1) current = 1; + if(current<0) current = 0; + var time = localStorage.getItem('videoProgressData'); + var arr = time&&JSON.parse(time) || {} + console.log('up arr:',this.isDrag,this.blobId,arr,arr[this.blobId],current) + this.$emit("getMouseDownStatus", false); + // 禁止拖动 + if(!this.isDrag && time && arr[this.blobId] < current) return; + this.$emit("updateProgress", current); + this.$emit("getMouseDownStatus", false); + } }, }, }; diff --git a/src/data/pages.js b/src/data/pages.js index fa49ae36..5ec52049 100644 --- a/src/data/pages.js +++ b/src/data/pages.js @@ -128,7 +128,8 @@ export const iframes=[ {title:'查看受众', path:'/iframe/ugroup/view',hidden:false,component:'manage/AudienceView'}, {title:'问答管理', path:'/iframe/qa/manages',hidden:false,component:'qa/ManageList'}, {title:'待审核课程', path:'/iframe/course/noapproved',hidden:false,component:'examine/NotApproved'}, - {title:'已审核课程', path:'/iframe/course/reviewed',hidden:false,component:'examine/Reviewed'} + {title:'已审核课程', path:'/iframe/course/reviewed',hidden:false,component:'examine/Reviewed'}, + {title:'标签管理', path:'/iframe/tag/manages',hidden:false,component:'tag/TagManageList'}, ] diff --git a/src/views/article/ManageList.vue b/src/views/article/ManageList.vue index 386b4ac5..c4f12737 100644 --- a/src/views/article/ManageList.vue +++ b/src/views/article/ManageList.vue @@ -289,8 +289,8 @@ export default { }) }, viewTopic(data) { - // window.open(this.webBaseUrl+'/article/detail?id='+data.id , '_blank') - this.$router.push({path:'/article/detail',query:{id:data.id}}) + window.open(this.webBaseUrl+'/article/detail?id='+data.id , '_blank') + // this.$router.push({path:'/article/detail',query:{id:data.id}}) }, }, } diff --git a/src/views/case/ManageList.vue b/src/views/case/ManageList.vue index 5e70ac72..cba20191 100644 --- a/src/views/case/ManageList.vue +++ b/src/views/case/ManageList.vue @@ -697,7 +697,8 @@ export default { }, viewTopic(data) { if (data.confidentialityLevel == '内部') { - this.$router.push({ path: '/case/detail', query: { id: data.id } }) + // this.$router.push({ path: '/case/detail', query: { id: data.id } }) + window.open(this.webBaseUrl+'/case/detail?id='+data.id , '_blank') } else { this.$message.warning("非内部密级案例不能查看"); } diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue index fef6ab57..2084430d 100644 --- a/src/views/portal/course/Index.vue +++ b/src/views/portal/course/Index.vue @@ -284,32 +284,40 @@