From b93217187202982ae529e40e1f45f34a99268cbf Mon Sep 17 00:00:00 2001 From: 86182 Date: Wed, 28 Sep 2022 10:28:25 +0800 Subject: [PATCH 1/4] user --- src/api/system/user.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/api/system/user.js b/src/api/system/user.js index ddcc76f7..ff3723f1 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -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 } From 4cf64e5ea8385e395ecf756f6a02852f4f088c0f Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Wed, 28 Sep 2022 11:04:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=88=91=E7=9A=84=E7=AC=94=E8=AE=B0?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/myNote.vue | 6 +-- src/views/user/Mynotes.vue | 68 ++++++++++++++++++++++---------- 2 files changed, 51 insertions(+), 23 deletions(-) diff --git a/src/components/Course/myNote.vue b/src/components/Course/myNote.vue index 11e05027..b4af83e9 100644 --- a/src/components/Course/myNote.vue +++ b/src/components/Course/myNote.vue @@ -26,7 +26,7 @@
{{note.sysCreateTime}} - {{note.openType == 1?'公开':'私密'}} + {{note.openType == 9?'公开':'私密'}} @@ -248,7 +248,7 @@ export default { // courseId: '',// 课程id // contentId: '',//课程内容id // courseName: '',// 课程名称 - openType: 1,// 1表不公开 9表完全公开 + openType: 9,// 1表不公开 9表完全公开 }; }, 2000) } @@ -274,7 +274,7 @@ export default { // courseId: '',// 课程id // contentId: '',//课程内容id // courseName: '',// 课程名称 - openType: 1,// 1表不公开 9表完全公开 + openType: 9,// 1表不公开 9表完全公开 }; }, 2000) diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue index c505bfba..91bb2ce9 100644 --- a/src/views/user/Mynotes.vue +++ b/src/views/user/Mynotes.vue @@ -71,15 +71,19 @@
{{ item.sysUpdateTime }}
- {{ item.content }} - + {{ item.content }} +
+ +
@@ -192,9 +196,13 @@ export default { fileName:'', openType:1, }, - fileType:[], - filType:null, - limit:1, + 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; + if(this.noteFile.filePath == '') { + this.$message.warning('您还没有上传文件!'); + return + } + this.noteFile.contentType = this.upNoteFile.contentType; + if(this.upNoteFile.content.length > 0) { + this.noteFile.filePath = this.upNoteFile.content.join(); + } 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=>{ - this.datalist = res.result.list; - this.count = res.result.count; + 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; + } + }) }, From 62890bd08a13c5d346c2836f1d13f25f711f5454 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Wed, 28 Sep 2022 11:09:48 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/myNote.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/Course/myNote.vue b/src/components/Course/myNote.vue index b4af83e9..b7cb362d 100644 --- a/src/components/Course/myNote.vue +++ b/src/components/Course/myNote.vue @@ -227,6 +227,7 @@ export default { // } }, saveNote() { + let that = this; if (this.mynoteData.content == '') { this.$message({ type: 'info', message: '您还没有书写笔记!', offset: 50 }); return; @@ -240,8 +241,8 @@ export default { this.inAnimation = true; this.isEdit = false; setTimeout(() => { - this.getMyNote(); - this.mynoteData = { + that.getMyNote(); + that.mynoteData = { type: 1, //我发布的是1 我导入的是2 content: '', playTime: '', @@ -262,12 +263,12 @@ export default { if(this.mynoteData.openType != 9){ return } - setTimeout(() => { + 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: '', From 2b1a20911531565bf42e6c6d5b4b176743e2c0ec Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Wed, 28 Sep 2022 11:42:02 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Mynotes.vue | 8 +++--- src/views/user/Noteedit.vue | 52 ++++++++++++++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue index 91bb2ce9..ed68aa81 100644 --- a/src/views/user/Mynotes.vue +++ b/src/views/user/Mynotes.vue @@ -276,14 +276,14 @@ export default { this.$message.warning('请填写标题!'); return } - if(this.noteFile.filePath == '') { - this.$message.warning('您还没有上传文件!'); - return - } 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('导入笔记成功'); diff --git a/src/views/user/Noteedit.vue b/src/views/user/Noteedit.vue index 67c61bf3..8d91f281 100644 --- a/src/views/user/Noteedit.vue +++ b/src/views/user/Noteedit.vue @@ -11,11 +11,17 @@

{{ editdata.courseName }}

8:40
-
+
+
+
+ + +
+
还原 -
+
{{ item.beforeContent }}
+
+ +
@@ -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;