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