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:
@@ -76,6 +76,13 @@ const updateDynamic=function (dynamic){
|
||||
return ajax.get('/xboe/sys/user/update-dynamic?dynamic='+dynamic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 二次查询 签名和动态
|
||||
* */
|
||||
const findSignDynamic=function (id){
|
||||
return ajax.get('/xboe/sys/user/findSign-dynamic='+id);
|
||||
}
|
||||
|
||||
export default{
|
||||
list,
|
||||
searchLoginName,
|
||||
@@ -84,5 +91,6 @@ export default{
|
||||
findByName,
|
||||
detail,
|
||||
updateSign,
|
||||
updateDynamic
|
||||
updateDynamic,
|
||||
findSignDynamic
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div style="border-bottom:1px solid #4444;padding-bottom:25px;" v-for="note in noteList"
|
||||
:key="note.id">
|
||||
<span class="mycote-time">{{note.sysCreateTime}}
|
||||
<span class="sm">{{note.openType == 1?'公开':'私密'}}</span>
|
||||
<span class="sm">{{note.openType == 9?'公开':'私密'}}</span>
|
||||
<span class="more">
|
||||
<el-dropdown>
|
||||
<span class="el-dropdown-link">
|
||||
@@ -227,6 +227,7 @@ export default {
|
||||
// }
|
||||
},
|
||||
saveNote() {
|
||||
let that = this;
|
||||
if (this.mynoteData.content == '') {
|
||||
this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 });
|
||||
return;
|
||||
@@ -240,15 +241,15 @@ export default {
|
||||
this.inAnimation = true;
|
||||
this.isEdit = false;
|
||||
setTimeout(() => {
|
||||
this.getMyNote();
|
||||
this.mynoteData = {
|
||||
that.getMyNote();
|
||||
that.mynoteData = {
|
||||
type: 1, //我发布的是1 我导入的是2
|
||||
content: '',
|
||||
playTime: '',
|
||||
// courseId: '',// 课程id
|
||||
// contentId: '',//课程内容id
|
||||
// courseName: '',// 课程名称
|
||||
openType: 1,// 1表不公开 9表完全公开
|
||||
openType: 9,// 1表不公开 9表完全公开
|
||||
};
|
||||
}, 2000)
|
||||
}
|
||||
@@ -265,16 +266,16 @@ export default {
|
||||
setTimeout(() => {
|
||||
localStorage.setItem("NOTE_TEXT", '');
|
||||
// clearInterval(this.autoSave);
|
||||
this.getMyNote();
|
||||
this.notetabType(2);
|
||||
this.mynoteData = {
|
||||
that.getMyNote();
|
||||
that.notetabType(2);
|
||||
that.mynoteData = {
|
||||
type: 1, //我发布的是1 我导入的是2
|
||||
content: '',
|
||||
playTime: '',
|
||||
// courseId: '',// 课程id
|
||||
// contentId: '',//课程内容id
|
||||
// courseName: '',// 课程名称
|
||||
openType: 1,// 1表不公开 9表完全公开
|
||||
openType: 9,// 1表不公开 9表完全公开
|
||||
};
|
||||
|
||||
}, 2000)
|
||||
|
||||
@@ -71,15 +71,19 @@
|
||||
<h6>{{ item.sysUpdateTime }}</h6>
|
||||
</div>
|
||||
<div class="all-content">
|
||||
{{ item.content }}
|
||||
<img v-if="item.filePath" :src="fileBaseUrl + item.filePath" alt="">
|
||||
<span v-if="item.contentType != 3">{{ item.content }}</span>
|
||||
<div v-else>
|
||||
<template v-for="img in item.content">
|
||||
<img :src="fileBaseUrl + img" alt=""/>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="all-footer">
|
||||
<div>
|
||||
<div class="textbut-box">
|
||||
<interactBar v-if="item.type == 1" nodeWidth="60px" :readonly="true" :type="6" :data="item" :shares="false" :comments="false" :answers="true" :clickAnswer="true" :views="false"></interactBar>
|
||||
<el-button @click="open(item)" style=" margin-right: 10px;" class="textbut" type="text">
|
||||
<svg-icon icon-class="notedel" ></svg-icon> 删除</el-button>
|
||||
<svg-icon icon-class="notedel" ></svg-icon>删除</el-button>
|
||||
<el-button @click="edit(item)" class="textbut" type="text">
|
||||
<svg-icon icon-class="noteedit" ></svg-icon> 编辑</el-button>
|
||||
</div>
|
||||
@@ -117,7 +121,7 @@
|
||||
</div>
|
||||
<div class="import-info-enclosure">
|
||||
<label class="label" style="width:66px"><svg-icon style="font-size:16px;margin-right:5px" icon-class="enclisure"></svg-icon>附件</label>
|
||||
<file-upload dir="files" :fileType="fileType" :showList="true" :value="imageShowUrl" :limit="limit" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
||||
<file-upload dir="files" :fileType="upNoteFile.fileType" :showList="true" :value="imageShowUrl" :limit="upNoteFile.limit" @success="handleUploadSuccess" @remove="handleRemoveSuccess"></file-upload>
|
||||
</div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -192,9 +196,13 @@ export default {
|
||||
fileName:'',
|
||||
openType:1,
|
||||
},
|
||||
fileType:[],
|
||||
filType:null,
|
||||
upNoteFile:{
|
||||
content:[],
|
||||
fileType:[],//文件上传格式
|
||||
contentType:null,
|
||||
limit:1,
|
||||
},
|
||||
|
||||
uploadFileUrl: process.env.VUE_APP_BASE_API + '/xboe/sys/xuploader/file/upload',
|
||||
text:'',
|
||||
importDialogVisible:false,
|
||||
@@ -240,7 +248,6 @@ export default {
|
||||
return item.id;
|
||||
}
|
||||
})
|
||||
console.log(ids,'contentType');
|
||||
let data = {
|
||||
// name:this.userInfo.name,
|
||||
// sign:'abcd',
|
||||
@@ -263,14 +270,20 @@ export default {
|
||||
document.body.removeChild(link);
|
||||
})
|
||||
}
|
||||
console.log(e,'e');
|
||||
},
|
||||
noteSave() {
|
||||
if(this.noteFile.courseName == '') {
|
||||
this.$message.warning('请填写标题!');
|
||||
return
|
||||
}
|
||||
this.noteFile.contentType =this.filType;
|
||||
this.noteFile.contentType = this.upNoteFile.contentType;
|
||||
if(this.upNoteFile.content.length > 0) {
|
||||
this.noteFile.filePath = this.upNoteFile.content.join();
|
||||
}
|
||||
if(this.noteFile.filePath == '') {
|
||||
this.$message.warning('您还没有上传文件!');
|
||||
return
|
||||
}
|
||||
apiNote.save(this.noteFile).then(res=>{
|
||||
if(res.status == 200) {
|
||||
this.$message.success('导入笔记成功');
|
||||
@@ -284,28 +297,35 @@ export default {
|
||||
},
|
||||
importCommand(e){
|
||||
this.importDialogVisible = true;
|
||||
this.filType = e;
|
||||
this.upNoteFile.contentType = e;
|
||||
if(e == '3') {
|
||||
this.limit = 9;
|
||||
this.fileType = ["png","jpg"];
|
||||
this.upNoteFile.limit = 9;
|
||||
this.upNoteFile.fileType = ["png","jpg"];
|
||||
} else if(e == '1'){
|
||||
this.fileType = ["txt"];
|
||||
this.upNoteFile.fileType = ["txt"];
|
||||
} else {
|
||||
this.fileType = ["doc","docx"];
|
||||
this.upNoteFile.fileType = ["doc","docx"];
|
||||
}
|
||||
},
|
||||
handleRemoveSuccess(file) {
|
||||
if(this.filType == 1) {
|
||||
if(this.upNoteFile.contentType == 1) {
|
||||
// this.upNoteFile.content.push()
|
||||
// this.noteFile.filePath.replace(file.response.result.filePath+',','');
|
||||
this.upNoteFile.content.forEach((item,index) => {
|
||||
if(item == file.response.result.filePath) {
|
||||
this.upNoteFile.content.splice(index,1);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.noteFile.filePath ='';
|
||||
this.noteFile.fileName = '';
|
||||
}
|
||||
},
|
||||
handleUploadSuccess(file) {
|
||||
if(this.filType == 3) {
|
||||
if(this.upNoteFile.contentType == 3) {
|
||||
this.noteFile.fileName = '图片';
|
||||
this.noteFile.filePath += file.result.filePath;
|
||||
this.upNoteFile.content.push(file.result.filePath);
|
||||
// this.noteFile.filePath += file.result.filePath;
|
||||
} else {
|
||||
this.noteFile.filePath = file.result.filePath;
|
||||
this.noteFile.fileName = file.result.displayName;
|
||||
@@ -383,8 +403,16 @@ export default {
|
||||
endTime:this.endTime,
|
||||
}
|
||||
apiNote.query(data).then(res=>{
|
||||
if(res.status == 200) {
|
||||
res.result.list.forEach((item,index)=>{
|
||||
if(item.contentType == 3) {
|
||||
item.content = item.content.split(',');
|
||||
}
|
||||
});
|
||||
this.datalist = res.result.list;
|
||||
this.count = res.result.count;
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -11,11 +11,17 @@
|
||||
<h3> {{ editdata.courseName }} </h3>
|
||||
<div v-if="editdata.playTime != ''"><img src="../../../public/images/coteplay.png" alt="">8:40</div>
|
||||
</div>
|
||||
<div class="note-text">
|
||||
<div class="note-text" v-if="editdata.contentType != 3">
|
||||
<!-- <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;" maxlength="200"
|
||||
show-word-limit></textarea>
|
||||
</div>
|
||||
<div class="note-text" v-else>
|
||||
<div class="img-box" v-for="(img,index) in imgContent">
|
||||
<img :src="fileBaseUrl + img" alt=""/>
|
||||
<span class="del-icon"><i class="el-icon-delete" @click="imgDel(index)"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="edit-footer">
|
||||
<el-radio-group v-model="editdata.openType">
|
||||
@@ -40,9 +46,14 @@
|
||||
</div>
|
||||
<span class="pointer" @click="restore(item)"> <i class="el-icon-refresh-left"></i> 还原</span>
|
||||
</div>
|
||||
<div class="hist-text">
|
||||
<div class="hist-text" v-if="editdata.contentType != 3">
|
||||
{{ item.beforeContent }}
|
||||
</div>
|
||||
<div class="hist-text" v-else>
|
||||
<template class="img-box" v-for="(before,index) in item.beforeContent">
|
||||
<img style="width:40px;height:65px;margin-right:10px" :src="fileBaseUrl + before" alt=""/>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,6 +65,8 @@ import apiNote from '@/api/phase2/note.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
imgContent:[],
|
||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||
isShowList:false,
|
||||
isShowTip:'',
|
||||
radio: '1',
|
||||
@@ -75,14 +88,21 @@ export default {
|
||||
},30000 *10);
|
||||
},
|
||||
methods:{
|
||||
imgDel(index) {
|
||||
this.imgContent.splice(index,1);
|
||||
},
|
||||
comeback(){
|
||||
this.$router.go(-1);
|
||||
},
|
||||
notedetail(){
|
||||
apiNote.detail(this.id).then(res=>{
|
||||
if(res.result.contentType == 3 && res.result.content != '') {
|
||||
this.imgContent = res.result.content.split(',');
|
||||
}
|
||||
this.editdata = res.result;
|
||||
this.editdata.openTypeBackups = res.result.openType;
|
||||
this.histId = res.result.id;
|
||||
|
||||
this.hist();
|
||||
})
|
||||
},
|
||||
@@ -92,7 +112,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.editdata.content = item.beforeContent;
|
||||
this.imgContent = item.beforeContent;
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
@@ -111,6 +131,12 @@ export default {
|
||||
},
|
||||
hist(){
|
||||
apiNote.history(this.histId).then(res=>{
|
||||
if(this.editdata.contentType == 3) {
|
||||
res.result.forEach(item=>{
|
||||
item.beforeContent = item.beforeContent.split(',');
|
||||
})
|
||||
|
||||
}
|
||||
this.histdata = res.result
|
||||
})
|
||||
},
|
||||
@@ -124,6 +150,9 @@ export default {
|
||||
}
|
||||
if(num == 1) {
|
||||
this.editdata.isAuto = true;
|
||||
}
|
||||
if(this.imgContent.length > 0) {
|
||||
this.editdata.content = this.imgContent.join();
|
||||
}
|
||||
apiNote.update(this.editdata).then(res=>{
|
||||
if(res.status == 200) {
|
||||
@@ -256,6 +285,23 @@ export default {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.img-box{
|
||||
position: relative;
|
||||
// display: flex;
|
||||
.del-icon{
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
top:0;
|
||||
right:20px;
|
||||
}
|
||||
}
|
||||
img{
|
||||
width: 140px;
|
||||
height: 175px;
|
||||
margin-right: 23px;
|
||||
}
|
||||
input{
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
|
||||
Reference in New Issue
Block a user