diff --git a/src/components/VideoPlayer/progress-bar.vue b/src/components/VideoPlayer/progress-bar.vue index 84bc066d..a7dc1d8f 100644 --- a/src/components/VideoPlayer/progress-bar.vue +++ b/src/components/VideoPlayer/progress-bar.vue @@ -73,59 +73,51 @@ export default { }, methods: { down(e) { - // 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) - // 禁止拖动 - if(!this.isDrag && time && arr[this.blobId] < current) return; - - this.$emit("updateProgress", current); - // } + 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; + this.$emit("updateProgress", current); }, move(e) { - 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); - } + 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); }, up() { - 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); - - } + 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); }, }, }; diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index a0c8bf36..c3b60712 100644 --- a/src/views/portal/case/Index.vue +++ b/src/views/portal/case/Index.vue @@ -196,7 +196,7 @@
阅读了案例 - {{ item.eventTime }} + {{ formatDateTime(item.eventTime) }}
@@ -664,6 +664,12 @@ export default { return !this.speciData.some(item => item.fielclass); } }, + formatDateTime(dateArray) { + if (!dateArray || dateArray.length !== 6) return ''; + const [year, month, day, hour, minute, second] = dateArray; + const pad = (num) => num.toString().padStart(2, '0'); + return `${year}-${pad(month)}-${pad(day)} ${pad(hour)}:${pad(minute)}:${pad(second)}`; + }, beforeRouteLeave (to, from, next) { const isScroll = 'caseDetail,caseCharts,caseExcellent' if(!isScroll.includes(to.name)){ diff --git a/src/views/portal/course/Micro.vue b/src/views/portal/course/Micro.vue index aa472593..02a88d75 100644 --- a/src/views/portal/course/Micro.vue +++ b/src/views/portal/course/Micro.vue @@ -95,7 +95,10 @@
diff --git a/src/views/portal/qa/Index.vue b/src/views/portal/qa/Index.vue index 630ce104..2fa09d9a 100644 --- a/src/views/portal/qa/Index.vue +++ b/src/views/portal/qa/Index.vue @@ -48,8 +48,8 @@
-
- +
+ 图片貌似被外星人劫走了
diff --git a/src/views/portal/user/Message.vue b/src/views/portal/user/Message.vue index f00f4bb7..aa799cbd 100644 --- a/src/views/portal/user/Message.vue +++ b/src/views/portal/user/Message.vue @@ -349,6 +349,7 @@ export default { this.$message.success('删除成功'); this.queryData.pageIndex = 1; this.queryMessage(true); + this.$store.dispatch('refrashMsg'); } else { this.$message.error('删除失败' + res.message); } @@ -366,6 +367,7 @@ export default { this.$message.success('删除成功'); this.queryData.pageIndex = 1; this.queryMessage(true); + this.$store.dispatch('refrashMsg'); } else { this.$message.error('删除失败' + res.message); } diff --git a/src/views/qa/ManageList.vue b/src/views/qa/ManageList.vue index 43d6ed53..9ee1861a 100644 --- a/src/views/qa/ManageList.vue +++ b/src/views/qa/ManageList.vue @@ -306,8 +306,8 @@ export default { }, viewTopic(data) { - // window.open(this.webBaseUrl+'/qa/answer?id='+data.id, '_blank'); - this.$router.push({path:'/qa/answer',query:{id:data.id}}) + window.open(this.webBaseUrl+'/qa/answer?id='+data.id, '_blank'); + // this.$router.push({path:'/qa/answer',query:{id:data.id}}) }, aduit(row) { this.form={...row}; diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 8aeb4301..eff4dcec 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -96,7 +96,10 @@