mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 20:36:43 +08:00
个人中心笔记
This commit is contained in:
@@ -122,9 +122,9 @@
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getLevel(){//获取经验值和等级
|
getLevel(){//获取经验值和等级
|
||||||
apiStart.getUserEValueAndLevel(this.pageId).then(res=>{
|
apiStart.getUserStatTotalInfo(this.pageId).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
this.userData.evalue = res.result.evalue;
|
this.userData.evalue = res.result.experienceValue;
|
||||||
this.userData.level = res.result.level;
|
this.userData.level = res.result.level;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,41 +3,46 @@
|
|||||||
<div class="note-hear">
|
<div class="note-hear">
|
||||||
<h3>我的笔记</h3>
|
<h3>我的笔记</h3>
|
||||||
<div>
|
<div>
|
||||||
<el-button>导入</el-button>
|
<el-dropdown style="margin-left:15px">
|
||||||
<!-- <el-button @click="dialogVisible = true">导出</el-button> -->
|
<el-button>
|
||||||
<el-select @click="dialogVisible = true" style="width:160px;height:40px;margin-left:20px;" v-model="courseId" placeholder="导出">
|
导出<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
<el-option
|
</el-button>
|
||||||
v-for="item in options"
|
<el-dropdown-menu slot="dropdown">
|
||||||
:key="item.value"
|
<el-dropdown-item>PDF</el-dropdown-item>
|
||||||
:label="item.label"
|
<el-dropdown-item>Excel</el-dropdown-item>
|
||||||
:value="item.value">
|
</el-dropdown-menu>
|
||||||
</el-option>
|
</el-dropdown>
|
||||||
</el-select>
|
<el-dropdown style="margin-left:15px">
|
||||||
|
<el-button>
|
||||||
|
导入<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
|
</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item>图片</el-dropdown-item>
|
||||||
|
<el-dropdown-item>Txt</el-dropdown-item>
|
||||||
|
<el-dropdown-item>Word</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="note-sift">
|
<div class="note-sift">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
style="width:250px"
|
||||||
@change="Time()"
|
@change="Time()"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
class="el-buttons"
|
|
||||||
v-model="Filtertime"
|
v-model="Filtertime"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
start-placeholder="开始"
|
start-placeholder="开始"
|
||||||
end-placeholder="结束"
|
end-placeholder="结束">
|
||||||
>
|
</el-date-picker>
|
||||||
</el-date-picker>
|
<el-dropdown @command="handleCommand">
|
||||||
|
<el-button>
|
||||||
<el-select @change="noteData(num)" style="width:160px;height:40px;margin-left:20px;" v-model="courseId" placeholder="全部课程">
|
全部课程<i class="el-icon-arrow-down el-icon--right"></i>
|
||||||
<el-option
|
</el-button>
|
||||||
v-for="(item,idx) in couresna"
|
<el-dropdown-menu slot="dropdown">
|
||||||
:key="idx"
|
<el-dropdown-item v-for="cou in couresna" :command="cou.courseId">{{cou.courseName}}</el-dropdown-item>
|
||||||
:label="item.courseName"
|
</el-dropdown-menu>
|
||||||
:value="item.courseId">
|
</el-dropdown>
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-button @click="publish" class="el-buttons">
|
<el-button @click="publish" class="el-buttons">
|
||||||
发布时间
|
发布时间
|
||||||
<i v-if="ordertime" class="el-icon-bottom"></i>
|
<i v-if="ordertime" class="el-icon-bottom"></i>
|
||||||
@@ -61,7 +66,7 @@
|
|||||||
<div class="all-title">
|
<div class="all-title">
|
||||||
<h3> {{ item.courseName }} </h3>
|
<h3> {{ item.courseName }} </h3>
|
||||||
<div v-if="item.playTime != ''"><img src="../../../public/images/coteplay.png" alt=""> {{ getHMS(item.playTime) }} </div>
|
<div v-if="item.playTime != ''"><img src="../../../public/images/coteplay.png" alt=""> {{ getHMS(item.playTime) }} </div>
|
||||||
<span>{{item.openType == 9?'公开':'私密'}}</span>
|
<span style="margin-left:34px">{{item.openType == 9?'公开':'私密'}}</span>
|
||||||
<h6>{{ item.sysUpdateTime }}</h6>
|
<h6>{{ item.sysUpdateTime }}</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="all-content">
|
<div class="all-content">
|
||||||
@@ -93,13 +98,12 @@
|
|||||||
</el-pagination>
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<file-upload dir="files" :showList="true" :value="imageShowUrl" :limit="5" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
width="860px"
|
width="860px"
|
||||||
title="王明"
|
title="王明"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
:before-close="handleClose">
|
:before-close="handleClose">
|
||||||
|
|
||||||
|
|
||||||
<div class="Exportbox">
|
<div class="Exportbox">
|
||||||
<div class="Export-info" style="border-bottom: 1px solid #ddd;padding-bottom:30px;margin-bottom:35px">
|
<div class="Export-info" style="border-bottom: 1px solid #ddd;padding-bottom:30px;margin-bottom:35px">
|
||||||
<div class="all-title">
|
<div class="all-title">
|
||||||
@@ -145,10 +149,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import apiNote from '@/api/phase2/note.js';
|
import apiNote from '@/api/phase2/note.js';
|
||||||
import interactBar from '@/components/Portal/interactBar.vue';
|
import interactBar from '@/components/Portal/interactBar.vue';
|
||||||
|
import FileUpload from '@/components/FileUpload/index.vue';
|
||||||
export default {
|
export default {
|
||||||
components:{interactBar},
|
components:{interactBar,FileUpload},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
imageShowUrl:'',
|
||||||
count:0,
|
count:0,
|
||||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||||
options: [{
|
options: [{
|
||||||
@@ -184,6 +190,16 @@ export default {
|
|||||||
this.allcoures();
|
this.allcoures();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleRemoveSuccess() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleUploadSuccess() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleCommand(e) {
|
||||||
|
this.courseId = e;
|
||||||
|
this.noteData(this.num);
|
||||||
|
},
|
||||||
Time(){
|
Time(){
|
||||||
this.startTime = this.Filtertime[0];
|
this.startTime = this.Filtertime[0];
|
||||||
this.endTime = this.Filtertime[1];
|
this.endTime = this.Filtertime[1];
|
||||||
@@ -287,19 +303,24 @@ export default {
|
|||||||
.el-input--medium .el-input__inner{
|
.el-input--medium .el-input__inner{
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
.el-dropdown-menu--medium .el-dropdown-menu__item{
|
.el-dropdown-menu--medium .el-dropdown-menu__item{
|
||||||
width: 140px !important;
|
width: 100% !important;
|
||||||
height: 30px !important;
|
// height: 30px !important;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow:ellipsis;
|
text-overflow:ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
display: block;
|
display: block;
|
||||||
word-break:break-all;
|
word-break:break-all;
|
||||||
}
|
}
|
||||||
.el-dropdown-menu--medium{
|
.el-dropdown-menu{
|
||||||
|
width: 140px !important;
|
||||||
padding: 12px 10px;
|
padding: 12px 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
li{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.el-popper{
|
.el-popper{
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
@@ -453,10 +474,17 @@ export default {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
::v-deep .el-input__inner{
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.note-hear{
|
.note-hear{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
div button{
|
||||||
|
width: 140px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
h3{
|
h3{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div class="edit-hear">
|
<div class="edit-hear">
|
||||||
<h3>笔记编辑</h3>
|
<h3>笔记编辑</h3>
|
||||||
<span>{{isShowTip}}</span>
|
<span>{{isShowTip}}</span>
|
||||||
<span class="his-info pointer">历史记录</span>
|
<span class="his-info pointer" @click="isShowList = true">历史记录</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="edit-content">
|
<div class="edit-content">
|
||||||
<div class="note-tit">
|
<div class="note-tit">
|
||||||
@@ -13,7 +13,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="note-text">
|
<div class="note-text">
|
||||||
<!-- <input style="vertical-align:top;outline:none;" type="textarea" :rows="4" v-model="editdata.content"> -->
|
<!-- <input style="vertical-align:top;outline:none;" type="textarea" :rows="4" v-model="editdata.content"> -->
|
||||||
<textarea v-model="editdata.content" name="" id="" cols="" rows="16" style="vertical-align:top;outline:none;width:100%;border:none; font-size: 14px;font-weight: 400;color: #333333;"></textarea>
|
<textarea v-model="editdata.content" name="" id="" cols="" rows="16" style="vertical-align:top;outline:none;width:100%;border:none; font-size: 14px;font-weight: 400;color: #333333;" maxlength="200"
|
||||||
|
show-word-limit></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="edit-footer">
|
<div class="edit-footer">
|
||||||
@@ -21,26 +22,23 @@
|
|||||||
<el-radio :label="9">公开</el-radio>
|
<el-radio :label="9">公开</el-radio>
|
||||||
<el-radio :label="1">私密</el-radio>
|
<el-radio :label="1">私密</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-button style="margin-right:40%" @click="comeback">取消</el-button>
|
<el-button style="margin-right:40%" type="primary" @click="savedata">保存</el-button>
|
||||||
<el-button type="primary" @click="savedata" >确定</el-button>
|
<el-button @click="comeback">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="edti-hist" v-show="isShowList">
|
||||||
|
<h3>历史记录 <i style="font-size: 22px;color: #999;float: right;" @click="isShowList = false" class="el-icon-circle-close"></i></h3>
|
||||||
<div class="edti-hist">
|
|
||||||
<h3>历史记录</h3>
|
|
||||||
<div class="histinfo" v-for="(item,idx) in histdata" :key="idx">
|
<div class="histinfo" v-for="(item,idx) in histdata" :key="idx">
|
||||||
<div class="hist-top">
|
<div class="hist-top">
|
||||||
编辑了笔记
|
编辑了笔记
|
||||||
<span>{{item.sysCreateTime}}</span>
|
<span style="font-size: 12px;">{{item.sysCreateTime}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="hist-cont">
|
<div class="hist-cont">
|
||||||
<div class="hist-tit">
|
<div class="hist-tit">
|
||||||
<div class=".two-line-ellipsis">
|
<div class="one-line-ellipsis">
|
||||||
{{ item.noteName }}
|
{{ item.noteName }}
|
||||||
</div>
|
</div>
|
||||||
|
<span class="pointer" @click="restore(item)"> <i class="el-icon-refresh-left"></i> 还原</span>
|
||||||
<span @click="restore(item)"> <i class="el-icon-refresh-left"></i> 还原</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="hist-text">
|
<div class="hist-text">
|
||||||
{{ item.beforeContent }}
|
{{ item.beforeContent }}
|
||||||
@@ -48,7 +46,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -57,10 +54,12 @@ import apiNote from '@/api/phase2/note.js'
|
|||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
isShowList:false,
|
||||||
isShowTip:'',
|
isShowTip:'',
|
||||||
radio: '1',
|
radio: '1',
|
||||||
editdata:{
|
editdata:{
|
||||||
|
content:'',
|
||||||
|
isAuto:false,
|
||||||
},
|
},
|
||||||
histId:'',
|
histId:'',
|
||||||
histdata:[],
|
histdata:[],
|
||||||
@@ -73,15 +72,14 @@ export default {
|
|||||||
this.notedetail();
|
this.notedetail();
|
||||||
this.timer = setInterval(()=>{
|
this.timer = setInterval(()=>{
|
||||||
this.savedata(1);
|
this.savedata(1);
|
||||||
},300000);
|
},30000 *10);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
comeback(){
|
comeback(){
|
||||||
this.$router.go (-1);
|
this.$router.go(-1);
|
||||||
},
|
},
|
||||||
notedetail(){
|
notedetail(){
|
||||||
apiNote.detail(this.id).then(res=>{
|
apiNote.detail(this.id).then(res=>{
|
||||||
// let that = this;
|
|
||||||
this.editdata = res.result;
|
this.editdata = res.result;
|
||||||
this.editdata.openTypeBackups = res.result.openType;
|
this.editdata.openTypeBackups = res.result.openType;
|
||||||
this.histId = res.result.id;
|
this.histId = res.result.id;
|
||||||
@@ -89,13 +87,27 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
restore(item){
|
restore(item){
|
||||||
apiNote.restore(item.id).then(res=>{
|
this.$confirm('确定还原此次笔记吗?', '提示', {
|
||||||
this.$message({
|
confirmButtonText: '确定',
|
||||||
message: '还原成功',
|
cancelButtonText: '取消',
|
||||||
type: 'success'
|
type: 'warning'
|
||||||
});
|
}).then(() => {
|
||||||
this.hist();
|
this.editdata.content = item.beforeContent;
|
||||||
})
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消还原'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// apiNote.restore(item.id).then(res=>{
|
||||||
|
// this.$message({
|
||||||
|
// message: '还原成功',
|
||||||
|
// type: 'success'
|
||||||
|
// });
|
||||||
|
// this.hist();
|
||||||
|
// })
|
||||||
|
|
||||||
},
|
},
|
||||||
hist(){
|
hist(){
|
||||||
apiNote.history(this.histId).then(res=>{
|
apiNote.history(this.histId).then(res=>{
|
||||||
@@ -109,6 +121,9 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
this.editdata.openType == 1;
|
this.editdata.openType == 1;
|
||||||
|
}
|
||||||
|
if(num == 1) {
|
||||||
|
this.editdata.isAuto = true;
|
||||||
}
|
}
|
||||||
apiNote.update(this.editdata).then(res=>{
|
apiNote.update(this.editdata).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
@@ -117,7 +132,7 @@ export default {
|
|||||||
this.isShowTip = '笔记自动保存成功';
|
this.isShowTip = '笔记自动保存成功';
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.isShowTip = '';
|
this.isShowTip = '';
|
||||||
},10000)
|
},10000*2)
|
||||||
} else {
|
} else {
|
||||||
this.notedetail()
|
this.notedetail()
|
||||||
this.$message({
|
this.$message({
|
||||||
@@ -127,9 +142,11 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.isShowTip = '当前网络异常,内容已离线保存,请尝试连接网络后重新自动上传!';
|
this.isShowTip = '当前网络异常,内容已离线保存,请尝试连接网络后重新自动上传!';
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.isShowTip = '';
|
||||||
|
},10000 * 2)
|
||||||
sessionStorage.setItem('isShowTip',this.editdata.content);
|
sessionStorage.setItem('isShowTip',this.editdata.content);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -152,10 +169,12 @@ export default {
|
|||||||
}
|
}
|
||||||
.edti-hist{
|
.edti-hist{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
// height: 650px;
|
||||||
|
overflow-y: auto;
|
||||||
right: -10px;
|
right: -10px;
|
||||||
top:-20px;
|
top:-20px;
|
||||||
width: 380px;
|
width: 380px;
|
||||||
padding-left: 30px;
|
padding: 0 30px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
@@ -163,23 +182,32 @@ export default {
|
|||||||
color: #333333;
|
color: #333333;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: -9px 2px 25px 0px rgba(119,119,119,0.16);
|
box-shadow: -9px 2px 25px 0px rgba(119,119,119,0.16);
|
||||||
min-height: 400px;
|
height: 700px;
|
||||||
overflow-y: auto;
|
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
h3{
|
||||||
|
margin: 0;
|
||||||
|
margin-top: 50px;
|
||||||
|
padding-bottom: 33px;
|
||||||
|
border-bottom: 1px solid rgba($color: #999999, $alpha: 0.2);
|
||||||
|
}
|
||||||
.histinfo{
|
.histinfo{
|
||||||
// background: #F2F5F7;
|
// background: #F2F5F7;
|
||||||
.hist-cont{
|
.hist-cont{
|
||||||
padding: 38px 32px;
|
// padding: 38px 32px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 163px;
|
// height: 163px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
padding-bottom: 30px;
|
||||||
|
border-bottom: 1px solid rgba($color: #999999, $alpha: 0.2);
|
||||||
.hist-text{
|
.hist-text{
|
||||||
|
word-break:break-all;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
.hist-tit{
|
.hist-tit{
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -202,7 +230,7 @@ export default {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-top: 35px;
|
margin-top: 30px;
|
||||||
span{
|
span{
|
||||||
float: right;
|
float: right;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -275,9 +303,9 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
// display: flex;
|
||||||
.edit-box{
|
.edit-box{
|
||||||
flex: 1;
|
// flex: 1;
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
.his-info{
|
.his-info{
|
||||||
float: right;
|
float: right;
|
||||||
|
|||||||
Reference in New Issue
Block a user