mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36: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);
|
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{
|
export default{
|
||||||
list,
|
list,
|
||||||
searchLoginName,
|
searchLoginName,
|
||||||
@@ -84,5 +91,6 @@ export default{
|
|||||||
findByName,
|
findByName,
|
||||||
detail,
|
detail,
|
||||||
updateSign,
|
updateSign,
|
||||||
updateDynamic
|
updateDynamic,
|
||||||
|
findSignDynamic
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<div style="border-bottom:1px solid #4444;padding-bottom:25px;" v-for="note in noteList"
|
<div style="border-bottom:1px solid #4444;padding-bottom:25px;" v-for="note in noteList"
|
||||||
:key="note.id">
|
:key="note.id">
|
||||||
<span class="mycote-time">{{note.sysCreateTime}}
|
<span class="mycote-time">{{note.sysCreateTime}}
|
||||||
<span class="sm">{{note.openType == 1?'公开':'私密'}}</span>
|
<span class="sm">{{note.openType == 9?'公开':'私密'}}</span>
|
||||||
<span class="more">
|
<span class="more">
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
@@ -227,6 +227,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
saveNote() {
|
saveNote() {
|
||||||
|
let that = this;
|
||||||
if (this.mynoteData.content == '') {
|
if (this.mynoteData.content == '') {
|
||||||
this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 });
|
this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 });
|
||||||
return;
|
return;
|
||||||
@@ -240,15 +241,15 @@ export default {
|
|||||||
this.inAnimation = true;
|
this.inAnimation = true;
|
||||||
this.isEdit = false;
|
this.isEdit = false;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getMyNote();
|
that.getMyNote();
|
||||||
this.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: '',// 课程名称
|
||||||
openType: 1,// 1表不公开 9表完全公开
|
openType: 9,// 1表不公开 9表完全公开
|
||||||
};
|
};
|
||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
@@ -262,19 +263,19 @@ export default {
|
|||||||
if(this.mynoteData.openType != 9){
|
if(this.mynoteData.openType != 9){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
localStorage.setItem("NOTE_TEXT", '');
|
localStorage.setItem("NOTE_TEXT", '');
|
||||||
// clearInterval(this.autoSave);
|
// clearInterval(this.autoSave);
|
||||||
this.getMyNote();
|
that.getMyNote();
|
||||||
this.notetabType(2);
|
that.notetabType(2);
|
||||||
this.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: '',// 课程名称
|
||||||
openType: 1,// 1表不公开 9表完全公开
|
openType: 9,// 1表不公开 9表完全公开
|
||||||
};
|
};
|
||||||
|
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
|||||||
@@ -71,15 +71,19 @@
|
|||||||
<h6>{{ item.sysUpdateTime }}</h6>
|
<h6>{{ item.sysUpdateTime }}</h6>
|
||||||
</div>
|
</div>
|
||||||
<div class="all-content">
|
<div class="all-content">
|
||||||
{{ item.content }}
|
<span v-if="item.contentType != 3">{{ item.content }}</span>
|
||||||
<img v-if="item.filePath" :src="fileBaseUrl + item.filePath" alt="">
|
<div v-else>
|
||||||
|
<template v-for="img in item.content">
|
||||||
|
<img :src="fileBaseUrl + img" alt=""/>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="all-footer">
|
<div class="all-footer">
|
||||||
<div>
|
<div>
|
||||||
<div class="textbut-box">
|
<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>
|
<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">
|
<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">
|
<el-button @click="edit(item)" class="textbut" type="text">
|
||||||
<svg-icon icon-class="noteedit" ></svg-icon> 编辑</el-button>
|
<svg-icon icon-class="noteedit" ></svg-icon> 编辑</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,7 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="import-info-enclosure">
|
<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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
@@ -192,9 +196,13 @@ export default {
|
|||||||
fileName:'',
|
fileName:'',
|
||||||
openType:1,
|
openType:1,
|
||||||
},
|
},
|
||||||
fileType:[],
|
upNoteFile:{
|
||||||
filType:null,
|
content:[],
|
||||||
limit:1,
|
fileType:[],//文件上传格式
|
||||||
|
contentType:null,
|
||||||
|
limit:1,
|
||||||
|
},
|
||||||
|
|
||||||
uploadFileUrl: process.env.VUE_APP_BASE_API + '/xboe/sys/xuploader/file/upload',
|
uploadFileUrl: process.env.VUE_APP_BASE_API + '/xboe/sys/xuploader/file/upload',
|
||||||
text:'',
|
text:'',
|
||||||
importDialogVisible:false,
|
importDialogVisible:false,
|
||||||
@@ -240,7 +248,6 @@ export default {
|
|||||||
return item.id;
|
return item.id;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(ids,'contentType');
|
|
||||||
let data = {
|
let data = {
|
||||||
// name:this.userInfo.name,
|
// name:this.userInfo.name,
|
||||||
// sign:'abcd',
|
// sign:'abcd',
|
||||||
@@ -263,14 +270,20 @@ export default {
|
|||||||
document.body.removeChild(link);
|
document.body.removeChild(link);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(e,'e');
|
|
||||||
},
|
},
|
||||||
noteSave() {
|
noteSave() {
|
||||||
if(this.noteFile.courseName == '') {
|
if(this.noteFile.courseName == '') {
|
||||||
this.$message.warning('请填写标题!');
|
this.$message.warning('请填写标题!');
|
||||||
return
|
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=>{
|
apiNote.save(this.noteFile).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
this.$message.success('导入笔记成功');
|
this.$message.success('导入笔记成功');
|
||||||
@@ -284,28 +297,35 @@ export default {
|
|||||||
},
|
},
|
||||||
importCommand(e){
|
importCommand(e){
|
||||||
this.importDialogVisible = true;
|
this.importDialogVisible = true;
|
||||||
this.filType = e;
|
this.upNoteFile.contentType = e;
|
||||||
if(e == '3') {
|
if(e == '3') {
|
||||||
this.limit = 9;
|
this.upNoteFile.limit = 9;
|
||||||
this.fileType = ["png","jpg"];
|
this.upNoteFile.fileType = ["png","jpg"];
|
||||||
} else if(e == '1'){
|
} else if(e == '1'){
|
||||||
this.fileType = ["txt"];
|
this.upNoteFile.fileType = ["txt"];
|
||||||
} else {
|
} else {
|
||||||
this.fileType = ["doc","docx"];
|
this.upNoteFile.fileType = ["doc","docx"];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleRemoveSuccess(file) {
|
handleRemoveSuccess(file) {
|
||||||
if(this.filType == 1) {
|
if(this.upNoteFile.contentType == 1) {
|
||||||
|
// this.upNoteFile.content.push()
|
||||||
// this.noteFile.filePath.replace(file.response.result.filePath+',','');
|
// 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 {
|
} else {
|
||||||
this.noteFile.filePath ='';
|
this.noteFile.filePath ='';
|
||||||
this.noteFile.fileName = '';
|
this.noteFile.fileName = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleUploadSuccess(file) {
|
handleUploadSuccess(file) {
|
||||||
if(this.filType == 3) {
|
if(this.upNoteFile.contentType == 3) {
|
||||||
this.noteFile.fileName = '图片';
|
this.noteFile.fileName = '图片';
|
||||||
this.noteFile.filePath += file.result.filePath;
|
this.upNoteFile.content.push(file.result.filePath);
|
||||||
|
// this.noteFile.filePath += file.result.filePath;
|
||||||
} else {
|
} else {
|
||||||
this.noteFile.filePath = file.result.filePath;
|
this.noteFile.filePath = file.result.filePath;
|
||||||
this.noteFile.fileName = file.result.displayName;
|
this.noteFile.fileName = file.result.displayName;
|
||||||
@@ -383,8 +403,16 @@ export default {
|
|||||||
endTime:this.endTime,
|
endTime:this.endTime,
|
||||||
}
|
}
|
||||||
apiNote.query(data).then(res=>{
|
apiNote.query(data).then(res=>{
|
||||||
this.datalist = res.result.list;
|
if(res.status == 200) {
|
||||||
this.count = res.result.count;
|
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>
|
<h3> {{ editdata.courseName }} </h3>
|
||||||
<div v-if="editdata.playTime != ''"><img src="../../../public/images/coteplay.png" alt="">8:40</div>
|
<div v-if="editdata.playTime != ''"><img src="../../../public/images/coteplay.png" alt="">8:40</div>
|
||||||
</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"> -->
|
<!-- <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"
|
<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>
|
show-word-limit></textarea>
|
||||||
</div>
|
</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>
|
||||||
<div class="edit-footer">
|
<div class="edit-footer">
|
||||||
<el-radio-group v-model="editdata.openType">
|
<el-radio-group v-model="editdata.openType">
|
||||||
@@ -40,9 +46,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<span class="pointer" @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>
|
||||||
<div class="hist-text">
|
<div class="hist-text" v-if="editdata.contentType != 3">
|
||||||
{{ item.beforeContent }}
|
{{ item.beforeContent }}
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,6 +65,8 @@ import apiNote from '@/api/phase2/note.js'
|
|||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
imgContent:[],
|
||||||
|
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||||
isShowList:false,
|
isShowList:false,
|
||||||
isShowTip:'',
|
isShowTip:'',
|
||||||
radio: '1',
|
radio: '1',
|
||||||
@@ -75,14 +88,21 @@ export default {
|
|||||||
},30000 *10);
|
},30000 *10);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
imgDel(index) {
|
||||||
|
this.imgContent.splice(index,1);
|
||||||
|
},
|
||||||
comeback(){
|
comeback(){
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
},
|
},
|
||||||
notedetail(){
|
notedetail(){
|
||||||
apiNote.detail(this.id).then(res=>{
|
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 = res.result;
|
||||||
this.editdata.openTypeBackups = res.result.openType;
|
this.editdata.openTypeBackups = res.result.openType;
|
||||||
this.histId = res.result.id;
|
this.histId = res.result.id;
|
||||||
|
|
||||||
this.hist();
|
this.hist();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -92,7 +112,7 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.editdata.content = item.beforeContent;
|
this.imgContent = item.beforeContent;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
@@ -111,6 +131,12 @@ export default {
|
|||||||
},
|
},
|
||||||
hist(){
|
hist(){
|
||||||
apiNote.history(this.histId).then(res=>{
|
apiNote.history(this.histId).then(res=>{
|
||||||
|
if(this.editdata.contentType == 3) {
|
||||||
|
res.result.forEach(item=>{
|
||||||
|
item.beforeContent = item.beforeContent.split(',');
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
this.histdata = res.result
|
this.histdata = res.result
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -124,6 +150,9 @@ export default {
|
|||||||
}
|
}
|
||||||
if(num == 1) {
|
if(num == 1) {
|
||||||
this.editdata.isAuto = true;
|
this.editdata.isAuto = true;
|
||||||
|
}
|
||||||
|
if(this.imgContent.length > 0) {
|
||||||
|
this.editdata.content = this.imgContent.join();
|
||||||
}
|
}
|
||||||
apiNote.update(this.editdata).then(res=>{
|
apiNote.update(this.editdata).then(res=>{
|
||||||
if(res.status == 200) {
|
if(res.status == 200) {
|
||||||
@@ -256,6 +285,23 @@ export default {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #333333;
|
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{
|
input{
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|||||||
Reference in New Issue
Block a user