mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
Merge branch 'stat' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into stat
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="newcote-text">
|
||||
<el-input type="textarea" :autofocus="true" placeholder="好记性不如烂笔头,记录些什么吧~"
|
||||
v-model="mynoteData.content" maxlength="200" :autosize="{ minRows: 8, maxRows: 20}"
|
||||
v-model="content_new" maxlength="200" :autosize="{ minRows: 8, maxRows: 20}"
|
||||
show-word-limit>
|
||||
</el-input>
|
||||
</div>
|
||||
@@ -86,7 +86,7 @@
|
||||
alt=""> 视频位置</span>
|
||||
<el-radio v-if="mynoteData.openType == 9" v-model="editRadio" :label="9">公开</el-radio>
|
||||
<el-radio v-model="editRadio" :label="1">私密</el-radio>
|
||||
<el-button size="small" v-show="isEdit" @click="editCancel()">取消</el-button>
|
||||
<el-button size="small" v-if="notetab != 1" v-show="isEdit" @click="editCancel()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="saveNote()">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,6 +133,7 @@ export default {
|
||||
courseName: '',// 课程名称
|
||||
openType: 9,// 1表不公开 9表完全公开
|
||||
},
|
||||
content_new: '',
|
||||
editRadio: 9 , // 单选按钮(笔记公开状态)状态值 : 1- 私密 9-公开
|
||||
noteList: [],
|
||||
type: 1, // 1自动保存 2点击保存
|
||||
@@ -254,13 +255,14 @@ export default {
|
||||
},
|
||||
notetabType(num) {
|
||||
this.notetab = num;
|
||||
// if(num == 1) {
|
||||
// this.autoSaveNote();
|
||||
// }
|
||||
if(num == 1) {
|
||||
this.content_new = ''; // 清空内容
|
||||
this.btnPlayTime=true; // 显示添加视频时间
|
||||
}
|
||||
},
|
||||
saveNote() {
|
||||
let that = this;
|
||||
if (this.mynoteData.content == '') {
|
||||
if (this.content_new == '') {
|
||||
this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 });
|
||||
return;
|
||||
}
|
||||
@@ -268,6 +270,10 @@ export default {
|
||||
this.mynoteData.courseName = this.data.name;
|
||||
this.mynoteData.openType = this.editRadio;
|
||||
if(this.isEdit) {
|
||||
if (this.mynoteData.content == '') {
|
||||
this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 });
|
||||
return;
|
||||
}
|
||||
apiNote.update(this.mynoteData).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.inAnimationText = '笔记编辑成功';
|
||||
@@ -289,10 +295,11 @@ export default {
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.mynoteData.content = this.content_new; // 赋值笔记内容
|
||||
apiNote.save(this.mynoteData).then(res => {
|
||||
if (res.status == 200) {
|
||||
if (!this.mynoteData.id) {
|
||||
this.inAnimationText = '笔记保存成功,U币+2';
|
||||
this.inAnimationText = '笔记保存成功,U币+5';
|
||||
this.inAnimation = true;
|
||||
this.editRadio = 9; // 重置默认笔记公开状态
|
||||
this.mynoteData.openType = 9;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<!-- <div class="article-info-tools-btns"> -->
|
||||
<!-- <interactBar :data="item" :type="0" class="test" :answers="true" :comments="false" :shares="false" :views="false"></interactBar> -->
|
||||
|
||||
<div class="button-cla"><interactBar nodeWidth="60px" :readonly="true" :type="4" :data="item" :shares="true" :comments="false" :answers="true" :clickAnswer="true" :views="false"></interactBar></div>
|
||||
<div class="button-cla"><interactBar nodeWidth="60px" :readonly="true" :type="4" :data="item" :shares="false" :comments="false" :answers="true" :clickAnswer="true" :views="false"></interactBar></div>
|
||||
</div>
|
||||
<!-- <el-link icon="el-icon-chat-line-round" class="article-info-tools-btn" >回答57</el-link>
|
||||
<el-link icon="el-icon-s-promotion" class="article-info-tools-btn" >分享57</el-link>
|
||||
|
||||
Reference in New Issue
Block a user