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