From f9bca259bcfde1550c64f38116f73d5cc285e54f Mon Sep 17 00:00:00 2001 From: daihh Date: Thu, 13 Oct 2022 16:24:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A0=E9=99=A4=E7=AC=94?= =?UTF-8?q?=E8=AE=B0=E7=9A=84=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Mynotes.vue | 87 +++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/src/views/user/Mynotes.vue b/src/views/user/Mynotes.vue index 929562db..0b71484d 100644 --- a/src/views/user/Mynotes.vue +++ b/src/views/user/Mynotes.vue @@ -4,17 +4,14 @@

我的笔记

- - 导出 - + 导出 PDF Excel - - 导入 + 导入 图片 @@ -36,9 +33,7 @@ end-placeholder="结束"> - - 全部课程 - + 全部课程 全部 {{cou.courseName}} @@ -81,13 +76,11 @@
@@ -148,7 +141,7 @@

累计导出{{datalist.length}}条

导出时间:{{formatDate(new Date())}}

- +
@@ -287,7 +280,7 @@ export default { document.body.removeChild(link); this.dialogVisible = false; } - + }) } else { apiNote.exportExcel(ids).then(res=>{ @@ -304,7 +297,7 @@ export default { document.body.removeChild(link); this.dialogVisible = false; } - + }) } }, @@ -386,25 +379,43 @@ export default { } this.noteData(this.num); }, - open(item) { - this.$confirm('移除后将不在笔记列表中展示', '确定要删除您的笔记吗?', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - apiNote.del(item.id).then(res=>{ - this.noteData(this.num); - this.$message({ - type: 'success', - message: '删除成功!' - }); + deleteNote(item) { + let $this=this; + this.$confirm('移除后将不在笔记列表中展示', '确定要删除您的笔记吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + apiNote.del(item.id).then(res=>{ + if(res.status==200){ + this.noteData(this.num); + this.$message({type:'success', message: '删除成功!'}); + //删除事件 + let event = { + key: "DeleteNote",// + title: "删除笔记",// + parameters:"author",// + content: "删除了笔记",//事件的内容 + source:'page', + objId: item.id,//关联的id + objType: "6",//关联的类型 + objInfo: "", + aid: this.userInfo.aid, //当前登录人的id + aname: this.userInfo.name,//当前人的姓名 + status: 1 //状态,直接写1 + } + this.$store.dispatch("userTrigger", event); + }else{ + this.$message({type:'success', message: '删除失败!'+res.message}); + } + + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '已取消删除' + }); }); - }).catch(() => { - this.$message({ - type: 'info', - message: '已取消删除' - }); - }); }, couresitem(item){ this.courseId = item.courseId; @@ -487,7 +498,7 @@ export default { } ::v-deep .note-sift{ .el-dropdown-menu{ - + } } ::v-deep .export-dialog{ @@ -594,7 +605,7 @@ export default { } .Export-info:last-child{ border: none; - + } ::v-deep.dr-dialog{ max-width: 870px !important;