From 20da1d10a02cb505bfc5683344e72408204e094f Mon Sep 17 00:00:00 2001 From: WangHao <43278047@qq.com> Date: Tue, 13 Oct 2020 21:51:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BE=BF=E7=AD=BE=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E4=B8=8B=E6=8B=89=E5=8A=A0=E8=BD=BD=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/note/note.js | 2 +- .../src/views/bookmark/bookmark/index.vue | 44 ++++++++++++++++--- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/ruoyi-ui/src/api/note/note.js b/ruoyi-ui/src/api/note/note.js index 69d05365b..4bd492075 100644 --- a/ruoyi-ui/src/api/note/note.js +++ b/ruoyi-ui/src/api/note/note.js @@ -12,7 +12,7 @@ export function selectBymenuNote(query) { // 查询便签管理详细 export function userGetNoteInfo(noteId) { return request({ - url: '/note/note/userGetNoteInfo' + noteId, + url: '/note/note/userGetNoteInfo/' + noteId, method: 'get' }) } diff --git a/ruoyi-ui/src/views/bookmark/bookmark/index.vue b/ruoyi-ui/src/views/bookmark/bookmark/index.vue index 16cd56f9f..5d94cea4e 100644 --- a/ruoyi-ui/src/views/bookmark/bookmark/index.vue +++ b/ruoyi-ui/src/views/bookmark/bookmark/index.vue @@ -506,12 +506,15 @@ var that = this; //判断是否加载了所有数据 var i = that.queryParams.pageNum + 1; + var m = that.noteParams.pageNum + 1; + that.$set(that.queryParams, 'pageNum', i) + that.$set(that.noteParams, 'pageNum', m) // console.log("this.queryParams.pageNum:" + that.queryParams.pageNum) var listcount = Math.ceil(that.total / 15); console.log("该目录共有页数:" + listcount) - if (i > listcount) { + if (i > listcount||m > listcount) { //加载完毕了 禁止滚动 that.noMore = true; that.listnoMore = true; @@ -524,10 +527,10 @@ setTimeout(() => { switch(this.property) { case 0: - this. getListConcat(); + this.getListConcat(); break; case 1: - this.getNoteList(); + this.getNoteListConcat(); break; default: } @@ -543,7 +546,9 @@ that.property=e; console.log("queryParams"+this.queryParams.pageNum); console.log("noteParams"+this.noteParams.pageNum); - + //初始化 + this.queryParams.pageNum=1; + this.noteParams.pageNum=1; switch(e) { case 0: this.getList(); @@ -692,7 +697,32 @@ }; this.resetForm("form"); + }, // 表单重置 + resetNote() { + this.form = { + noteId: undefined, + userId: undefined, + title: undefined, + description: undefined, + menuId: undefined, + background: undefined, + noteCount: undefined, + noteSort: undefined, + isState: undefined, + readProgress: undefined, + isStar: undefined, + isDelete: undefined, + topFlag: undefined, + isShare: undefined, + isEncryption: undefined, + createTime: undefined, + updateTime: undefined, + createUserName: undefined + }; + this.resetForm("form"); }, + + /** 回收站**/ getrecycleList() { this.loading = true; @@ -790,16 +820,16 @@ /** 查询便签管理列表 */ getNoteList() { this.loading = true; - selectBymenuNote(this.queryParams).then(response => { + selectBymenuNote(this.noteParams).then(response => { this.bookmarkList = response.rows; this.total = response.total; this.loading = false; }); }, - /**查询书签 滚动加载分页拼接*/ + /**查询便签 滚动加载分页拼接*/ getNoteListConcat(){ this.loading = true; - selectBymenuNote(this.queryParams).then(response => { + selectBymenuNote(this.noteParams).then(response => { if (response.total != 0 && response.code == 200) { this.bookmarkList = this.bookmarkList.concat(response.rows); this.total = response.total;