From 41146e7c6d8a3b3505d74f1d551c667b857b373f Mon Sep 17 00:00:00 2001
From: WangHao <43278047@qq.com>
Date: Thu, 8 Oct 2020 18:27:08 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E9=A1=B5=E5=92=8C=E6=96=87=E6=9C=AC?=
=?UTF-8?q?=20=E5=88=87=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../web/controller/note/NmNoteController.java | 4 +-
ruoyi-ui/src/api/note/note.js | 27 ++++-
.../src/components/BookmarkList/index.vue | 104 ++++++++++++++----
.../src/views/bookmark/bookmark/index.vue | 55 +++++++--
ruoyi-ui/src/views/bookmark/index/index.vue | 4 +-
5 files changed, 159 insertions(+), 35 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/note/NmNoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/note/NmNoteController.java
index 8ee2b8c36..189f79359 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/note/NmNoteController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/note/NmNoteController.java
@@ -69,8 +69,8 @@ public class NmNoteController extends BaseController
*用户 获取便签详细信息 然后修改
*/
- @GetMapping(value = "/user/{noteId}")
- public AjaxResult userGetInfo(@PathVariable("noteId") Long noteId)
+ @GetMapping(value = "/userGetNoteInfo/{noteId}")
+ public AjaxResult userGetNoteInfo(@PathVariable("noteId") Long noteId)
{
SysUser sysUser=getAuthUser();
return AjaxResult.success(nmNoteService.selectNmNoteuserById(noteId,sysUser.getUserId()));
diff --git a/ruoyi-ui/src/api/note/note.js b/ruoyi-ui/src/api/note/note.js
index db5cd3b7d..7c4bd6110 100644
--- a/ruoyi-ui/src/api/note/note.js
+++ b/ruoyi-ui/src/api/note/note.js
@@ -1,5 +1,30 @@
import request from '@/utils/request'
+// 查询便签管理列表
+export function selectBymenuNote(query) {
+ return request({
+ url: '/note/note/selectBymenuNote',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询便签管理详细
+export function userGetNoteInfo(noteId) {
+ return request({
+ url: '/note/note/userGetNoteInfo' + noteId,
+ method: 'get'
+ })
+}
+
+
+
+
+
+
+
+
+
// 查询便签管理列表
export function listNote(query) {
return request({
@@ -50,4 +75,4 @@ export function exportNote(query) {
method: 'get',
params: query
})
-}
\ No newline at end of file
+}
diff --git a/ruoyi-ui/src/components/BookmarkList/index.vue b/ruoyi-ui/src/components/BookmarkList/index.vue
index ea1a40f71..843567521 100644
--- a/ruoyi-ui/src/components/BookmarkList/index.vue
+++ b/ruoyi-ui/src/components/BookmarkList/index.vue
@@ -2,35 +2,75 @@
-
-
-
-
-
-
- {{bm.title}}
-
-
-
2020-10-10
+
+
+
{{bm.title}}
+
{{bm.createTime|changeTime}}
+
+
+ {{bm.description}}
+
+
+
+
+
![]()
+
+
{{bm.urls}} ·
+
{{bm.createTime|changeTime}}
+
+
+ {{t.name}}
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/bookmark/bookmark/index.vue b/ruoyi-ui/src/views/bookmark/bookmark/index.vue
index 2651c3bc9..a183f9676 100644
--- a/ruoyi-ui/src/views/bookmark/bookmark/index.vue
+++ b/ruoyi-ui/src/views/bookmark/bookmark/index.vue
@@ -290,6 +290,7 @@
+
部分网站不允许内嵌套打开,请在设置中选择自己喜欢的打开方式!
@@ -318,6 +319,10 @@
updateBookmark,
exportBookmark
} from "@/api/bookmark/bookmark";
+ import {
+ selectBymenuNote,
+ userGetNoteInfo,
+ } from "@/api/note/note";
import {format} from 'timeago.js';
export default {
@@ -396,9 +401,26 @@
highlighted: true,//搜索是否高亮
//点击的网址
gourl:'https://element.eleme.cn/#/zh-CN/theme',
-
-
-
+ //便签系统开始
+ noteParams: {
+ pageNum: 1,
+ pageSize: 15,
+ 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,
+ createUserName: undefined
+ },
}
},
@@ -409,8 +431,6 @@
let time = new Date(val); //先将接收到的json格式的日期数据转换成可用的js对象日期
return format(time, 'zh_CN'); //转换成类似于几天前的格式
},
-
-
},
mounted() {
@@ -426,8 +446,6 @@
},
created() {
var that = this;
-
-
var routedata = that.$route.query.menuId;
var sousuo = that.$route.query.sousuo;
if (routedata == undefined) {
@@ -530,12 +548,20 @@
/**切换显示 全部 网页 文本 其他**/
showopen(e) {
+ //1 是文本
+ if (e==1){
+ this.getNoteList();
+ }else if(e==0){
+ this.getList();
+ }
document.getElementsByClassName("classification")[e].classList.add("classification-click");
for (var i = 0; i < 4; i++) {
if (i != e) {
document.getElementsByClassName("classification")[i].classList.remove('classification-click');
}
}
+
+
},
/** 转换书签菜单数据结构 */
normalizer(node) {
@@ -724,6 +750,16 @@
}
});
},
+
+ /** 查询便签管理列表 */
+ getNoteList() {
+ this.loading = true;
+ selectBymenuNote(this.queryParams).then(response => {
+ this.bookmarkList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
/**网站内打开*/
windowurl(url,bookmarkId) {
var that=this;
@@ -1370,6 +1406,11 @@
width: 100%;
height: 100%;
}
+ .main-url-title{
+ width: 100%;
+ color: #565656;
+ text-indent: 15px;
+ }
diff --git a/ruoyi-ui/src/views/bookmark/index/index.vue b/ruoyi-ui/src/views/bookmark/index/index.vue
index 5cdd9ed78..af2741a10 100644
--- a/ruoyi-ui/src/views/bookmark/index/index.vue
+++ b/ruoyi-ui/src/views/bookmark/index/index.vue
@@ -1436,12 +1436,12 @@
padding: 0;
margin-bottom: 0;
/*background:url('https://ftp.bmp.ovh/imgs/2020/08/4ac1d6b4f41049ef.jpg') no-repeat;*/
- /*background-color: #F6F6F6;*/
+ background-color: #F6F5F4;
/*background: url("https://s1.ax1x.com/2020/08/16/dEcqVU.jpg") no-repeat;*/
/*background: url("https://s1.ax1x.com/2020/10/03/03WM4K.md.jpg") no-repeat;*/
- background: url("https://s1.ax1x.com/2020/10/03/03fri6.png") no-repeat;
+ /*background: url("https://s1.ax1x.com/2020/10/03/03fri6.png") no-repeat;*/
/*background: url("https://s1.ax1x.com/2020/10/03/03RCSe.jpg") no-repeat;*/