修改我的笔记时间不清空

This commit is contained in:
lmj
2022-10-26 11:56:12 +08:00
parent 50ca4369e3
commit 70c93785c3

View File

@@ -7,9 +7,9 @@
</div>
<!-- 新增笔记 -->
<div class="newcote-content" v-if="notetab == 1">
<div class="newcote-time" v-if="mynoteData.playTime != 0">
<div class="newcote-time" v-if="play_Time != 0">
<img :src="`${webBaseUrl}/images/coteplay.png`" />
{{formatSeconds(mynoteData.playTime)}}
{{formatSeconds(play_Time)}}
<img :src="`${webBaseUrl}/images/cotedetel.png`" @click="timeDel()" />
</div>
<div class="newcote-text">
@@ -57,7 +57,7 @@
<div v-show="isEdit">
<p style="margin-top:37px">
<span style="font-size: 14px;color: #333333;margin-left:10px;">{{mynoteData.sysCreateTime}}</span>
<span class="sm">{{mynoteData.openType == 9?'公1开':'私密'}}</span>
<span class="sm">{{mynoteData.openType == 9?'公开':'私密'}}</span>
<svg-icon style="float:right;font-size:26px;margin-top:16px" icon-class="spot"></svg-icon>
</p>
<div class="newcote-content" style="margin-top:10px;min-height:236px;height: 100%;">
@@ -139,6 +139,7 @@ export default {
},
editNodeOpenType:9, // 1表不公开 9表完全公开
content_new: '',
play_Time:'',
editRadio: 9 , // 单选按钮(笔记公开状态)状态值 1- 私密 9-公开
noteList: [],
type: 1, // 1自动保存 2点击保存
@@ -221,6 +222,7 @@ export default {
setVideoTime(contentId,time){
this.mynoteData.contentId=contentId;//内容id
this.mynoteData.playTime=time;//秒
this.play_Time = time;
},
timeDel() {
this.mynoteData.playTime = 0;
@@ -235,10 +237,12 @@ export default {
// }, 10000);
},
noteEdit(note) {
console.log(note)
this.isEdit = true;
this.mynoteData = note;
this.editNodeOpenType = note.openType;
this.content_new = note.content;
this.play_Time = note.playTime;
this.editRadio = this.mynoteData.openType; // 设置默认的单选按钮选中状态
// this.notetabType(1);
},
@@ -289,14 +293,17 @@ export default {
this.notetab = num;
if(num == 1) {
this.content_new = ''; // 清空内容
this.play_Time='';//清空时间
this.btnPlayTime=true; // 显示添加视频时间
this.mynoteData.openType = 9; // 公开单选按钮
this.editRadio = 9; // 设置默认的单选按钮选中状态
}else {
if(this.editNodeOpenType == 1){
this.mynoteData.openType = 1; // 公开单选按钮
this.editRadio = 1;
this.content_new = this.mynoteData.content;
this.play_Time = this.mynoteData.playTime;
}
}
@@ -307,10 +314,12 @@ export default {
this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 });
return;
}
this.mynoteData.courseId = this.courseId;
this.mynoteData.courseName = this.data.name;
this.mynoteData.openType = this.editRadio;
if(this.isEdit) {
// this.mynoteData.playTime =
if (this.mynoteData.content == '') {
this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 });
return;
@@ -326,7 +335,7 @@ export default {
that.mynoteData = {
type: 1, //我发布的是1 我导入的是2
content: '',
playTime: '',
// playTime: '',
// courseId: '',// 课程id
// contentId: '',//课程内容id
// courseName: '',// 课程名称
@@ -336,6 +345,7 @@ export default {
}
})
} else {
this.mynoteData.playTime = this.play_Time;
this.mynoteData.content = this.content_new; //赋值笔记内容
let curOpenType=this.mynoteData.openType;
let $this=this;