mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
修改
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="my-note">
|
<div class="my-note" @change="handleClick">
|
||||||
<div class="mynote">
|
<div class="mynote">
|
||||||
<div class="mynote-tab">
|
<div class="mynote-tab">
|
||||||
<div @click="notetabType(1)" :class="notetab == 1 ? 'noteactive' : ' ' "> <span>新增笔记</span> </div>
|
<div @click="notetabType(1)" :class="notetab == 1 ? 'noteactive' : ' ' "> <span>新增笔记</span> </div>
|
||||||
@@ -150,6 +150,12 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
selected:{
|
||||||
|
handler(val,old){
|
||||||
|
this.$emit('change',this.selected)
|
||||||
|
},
|
||||||
|
deep:true
|
||||||
|
},
|
||||||
data(val){
|
data(val){
|
||||||
if(val.id) {
|
if(val.id) {
|
||||||
console.log(val,'val');
|
console.log(val,'val');
|
||||||
@@ -163,6 +169,9 @@ export default {
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick(){
|
||||||
|
this.$emit('change',this.selected)
|
||||||
|
},
|
||||||
onPlayVideo(conId,time) {
|
onPlayVideo(conId,time) {
|
||||||
//这里应该加上内容的id
|
//这里应该加上内容的id
|
||||||
this.$emit('onPlayVideo',conId,time);
|
this.$emit('onPlayVideo',conId,time);
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 我的笔记 -->
|
<!-- 我的笔记 -->
|
||||||
<div class="mynote" v-show="tab == 2">
|
<div class="mynote" v-show="tab == 2">
|
||||||
<my-note ref="mynote" :data="courseInfo" @videoLocation="videoLocation" @onPlayVideo="onPlayVideo"
|
<my-note ref="mynote" @change="Fn1" :data="courseInfo" @videoLocation="videoLocation" @onPlayVideo="onPlayVideo"
|
||||||
:score="courseInfo.score"></my-note>
|
:score="courseInfo.score"></my-note>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -164,8 +164,8 @@
|
|||||||
<comments v-if="courseInfo.id && courseInfo.id != ''" :obj-type="1" :obj-id="courseInfo.id"
|
<comments v-if="courseInfo.id && courseInfo.id != ''" :obj-type="1" :obj-id="courseInfo.id"
|
||||||
:toUsers="toUsers"></comments>
|
:toUsers="toUsers"></comments>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="courestab==3" class="coures-note">
|
<div v-show="courestab==3" class="coures-note">
|
||||||
<note-comments v-if="courseInfo.id && courseInfo.id != ''" :obj-type="6" :obj-id="courseInfo.id" :name="courseInfo.name"></note-comments>
|
<note-comments :key="timer" v-if="courseInfo.id && courseInfo.id != ''" :obj-type="6" :obj-id="courseInfo.id" :name="courseInfo.name"></note-comments>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -208,6 +208,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
import portalHeader from "@/components/PortalHeader.vue";
|
import portalHeader from "@/components/PortalHeader.vue";
|
||||||
import portalFooter from "@/components/PortalFooter.vue";
|
import portalFooter from "@/components/PortalFooter.vue";
|
||||||
import comments from "@/components/Portal/comments.vue";
|
import comments from "@/components/Portal/comments.vue";
|
||||||
@@ -242,7 +243,9 @@
|
|||||||
import homework from '@/components/Course/homework';
|
import homework from '@/components/Course/homework';
|
||||||
import assess from '@/components/Course/assess';
|
import assess from '@/components/Course/assess';
|
||||||
import myNote from '../../components/Course/myNote.vue';
|
import myNote from '../../components/Course/myNote.vue';
|
||||||
import apiFollow from "@/api/phase2/userfollow.js"
|
import apiFollow from "@/api/phase2/userfollow.js";
|
||||||
|
// import Vue from 'vue';
|
||||||
|
// Vue.forceUpdate();
|
||||||
export default {
|
export default {
|
||||||
name: "atticle",
|
name: "atticle",
|
||||||
components: {
|
components: {
|
||||||
@@ -263,6 +266,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
timer: '',
|
||||||
notePlay: null,
|
notePlay: null,
|
||||||
intTimeNote: '',
|
intTimeNote: '',
|
||||||
courestab: 2,//默认是课程评论
|
courestab: 2,//默认是课程评论
|
||||||
@@ -332,10 +336,12 @@
|
|||||||
appendStudyOtherHandle:null,
|
appendStudyOtherHandle:null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
this.$watermark.set(this.userInfo.name + this.userInfo.loginName);
|
||||||
this.courseId = this.$route.query.id;
|
this.courseId = this.$route.query.id;
|
||||||
this.loadData();
|
this.loadData();
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
@@ -373,6 +379,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Fn1(){
|
||||||
|
console.log('子组件发生变化');
|
||||||
|
// this.componentKey += 1;
|
||||||
|
// this.$forceUpdate();
|
||||||
|
// window.location.reload()
|
||||||
|
// this.coutab(3);
|
||||||
|
this.timer = new Date().getTime()
|
||||||
|
|
||||||
|
},
|
||||||
//非音视频课学习时长的增加,每一分钟保存一次
|
//非音视频课学习时长的增加,每一分钟保存一次
|
||||||
appendStudyOtherTime() {
|
appendStudyOtherTime() {
|
||||||
//console.log('开始追加学习时长',this.isAppendTime);
|
//console.log('开始追加学习时长',this.isAppendTime);
|
||||||
|
|||||||
Reference in New Issue
Block a user