网页和文本 切换
This commit is contained in:
parent
d6692f242b
commit
41146e7c6d
@ -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()));
|
||||
|
@ -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({
|
||||
|
@ -4,33 +4,73 @@
|
||||
|
||||
<div v-for="bm in bookmarkList" class="bookmark" :data-id="bm.id" @click="windowurl(bm.url,bm.bookmarkId)">
|
||||
<div class="bookmark-item">
|
||||
<span class="title-icon">
|
||||
|
||||
<span class="bookmark-title" >{{bm.title}}</span>
|
||||
<div class="bookmark-time" v-if="noteTime">{{bm.createTime|changeTime}}</div>
|
||||
</div>
|
||||
<div class="bookmark-description" v-if="isdescription">
|
||||
<span >{{bm.description}}</span>
|
||||
</div>
|
||||
<div class="info-wrap" v-if="isBookmarkIcon">
|
||||
<div class="info">
|
||||
<div class="bookmark-icon">
|
||||
<img :ng-src="'https://favicon.lucq.fun/?url=http://'+bm.urls"
|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7V8JFvW/8IQAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDItMDJUMTg6MTE6NTgrMDg6MDCoc6tpAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAyLTAyVDE4OjExOjU4KzA4OjAw2S4T1QAAAGd0RVh0c3ZnOmJhc2UtdXJpAGZpbGU6Ly8vaG9tZS9hZG1pbi9pY29uLWZvbnQvdG1wL2ljb25fNWhyOG55Nmo1bWMvamluZ2RpYW5hbmxpX2tvbmd3dWppYW94aW5nX3Nob3VjYW5nLnN2Z4/vilwAAAAASUVORK5CYII='"
|
||||
alt="" ng-show="bm.urls"/>
|
||||
</span>
|
||||
<span class="bookmark-title">
|
||||
{{bm.title}}
|
||||
</span>
|
||||
|
||||
<span class="bookmark-time">2020-10-10</span>
|
||||
|
||||
alt="" ng-show="bm.urls">
|
||||
</div>
|
||||
<div class="bookmark-official">{{bm.urls}} · </div>
|
||||
<div class="bookmark-time">{{bm.createTime|changeTime}}</div>
|
||||
<div class="bookmark-time" v-for="t in bm.sqTags" v-if="false">
|
||||
<el-tag class="bookmark-list-tag" data-bookmarkId="t.bookmarkId" data-tagId="t.tagId"
|
||||
size="mini">
|
||||
{{t.name}}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {format} from 'timeago.js';
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
components: {format},
|
||||
props: {
|
||||
bookmarkList: Array,
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
isdescription:false,
|
||||
noteTime:true,
|
||||
isBookmarkIcon:false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
var a=2;
|
||||
if(a==2){
|
||||
//便签模式 只能这么显示
|
||||
this.isdescription=false;
|
||||
this.noteTime=true;
|
||||
this.isBookmarkIcon=false;
|
||||
}else {
|
||||
this.isdescription=true;
|
||||
this.noteTime=false;
|
||||
this.isBookmarkIcon=true;
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
//timeago.js插件
|
||||
//计算时间,类似于几分钟前,几小时前,几天前等
|
||||
changeTime(val) {
|
||||
let time = new Date(val); //先将接收到的json格式的日期数据转换成可用的js对象日期
|
||||
return format(time, 'zh_CN'); //转换成类似于几天前的格式
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
windowurl(A, B) {
|
||||
@ -41,9 +81,6 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.bookmarklist {
|
||||
|
||||
}
|
||||
|
||||
.bookmark-item {
|
||||
display: flex;
|
||||
@ -70,14 +107,9 @@
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.title-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bookmark-title {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
color: #393939;
|
||||
flex: 1;
|
||||
-webkit-flex: 1;
|
||||
@ -92,9 +124,35 @@
|
||||
display: block;
|
||||
color: #c2c2c2;
|
||||
margin-right: 10px;
|
||||
|
||||
}
|
||||
.bookmark-description{
|
||||
font-size: 10px;
|
||||
overflow: hidden;
|
||||
color: #b1b1b1;
|
||||
text-overflow:ellipsis;
|
||||
display:-webkit-box;
|
||||
-webkit-box-orient:vertical;
|
||||
-webkit-line-clamp:2;
|
||||
}
|
||||
.bookmark-official {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bookmark-icon {
|
||||
display: flex;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.bookmark-icon img {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -290,6 +290,7 @@
|
||||
<i class="el-icon-position"></i>
|
||||
</div>
|
||||
</el-header>
|
||||
<div class="main-url-title">部分网站不允许内嵌套打开,请在设置中选择自己喜欢的打开方式!</div>
|
||||
<div class="mianUrl-botoom" v-loading="iframeLoading" >
|
||||
<!-- webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true"-->
|
||||
<iframe sandbox="allow-forms allow-scripts allow-popups" class="openurl" :src="gourl" target="_self" tabindex="-1" />
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
@ -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;*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user