完成搜索功能

This commit is contained in:
WangHao 2020-10-05 02:57:23 +08:00
parent 6a78fd3eb1
commit 0043251a37
9 changed files with 483 additions and 309 deletions

View File

@ -60,10 +60,10 @@ public class SqBookmarkController extends BaseController
*/ */
@GetMapping("/selectBymenuIdUserID") @GetMapping("/selectBymenuIdUserID")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:list')") @PreAuthorize("@ss.hasPermi('bookmark:bookmark:list')")
public TableDataInfo selectBymenuIdUserID(Long menuId) { public TableDataInfo selectBymenuIdUserID(Long menuId,Integer sort,String sousuo) {
SysUser sysUser=getAuthUser(); SysUser sysUser=getAuthUser();
startPage(); startPage();
List<SqBookmark> list = sqBookmarkService.selectBymenuIdUserID(menuId,sysUser.getUserId()); List<SqBookmark> list = sqBookmarkService.selectBymenuIdUserID(menuId,sysUser.getUserId(),sort,sousuo);
return getDataTable(list); return getDataTable(list);
} }
/** /**

View File

@ -17,16 +17,9 @@
/* display: none;*/ /* display: none;*/
/*}*/ /*}*/
.tabBar{
width: 250px!important;
}
.sousouright-icon{ .sousouright-icon{
margin-right: 18px; margin-right: 18px;
} }
} }
/* >>> md*/ /* >>> md*/

View File

@ -3,16 +3,34 @@
<div class="filter-tbar"> <div class="filter-tbar">
<div class="filter-classification"> <div class="filter-classification">
<div class="classification " @click="showopen(0)"><span>全部</span></div> <div class="classification " @click="showopen(0)"><span>网页</span></div>
<div class="classification" @click="showopen(1)"><span>网页</span></div> <div class="classification" @click="showopen(1)"><span>文本</span></div>
<div class="classification" @click="showopen(2)"><span>文本</span></div> <div class="classification" @click="showopen(2)"><span>其他</span></div>
<div class="classification" @click="showopen(3)"><span>其他</span></div> <!-- <div class="classification" @click="showopen(3)"><span>其他</span></div>-->
</div> </div>
<div class="setUpThe"> <div class="setUpThe">
<div class="filter-content">
<el-dropdown trigger="hover" size="small" @command="handleCommand">
<div class="el-dropdown-link dropdownList">
<i class="el-icon-document-checked "></i> <span>排序</span>
</div>
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
<el-dropdown-item class="filter-item" command="0"><i class="el-icon-bottom"></i>按时间排序()
</el-dropdown-item>
<el-dropdown-item class="filter-item" command="1"><i class="el-icon-bottom"></i>按时间排序()
</el-dropdown-item>
<el-dropdown-item class="filter-item" command="2"><i class="el-icon-bottom"></i>按标题A-Z排序()
</el-dropdown-item>
<el-dropdown-item class="filter-item" command="3"><i class="el-icon-bottom"></i>按标题A-Z排序()
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="filter-content"> <div class="filter-content">
<el-dropdown trigger="hover" size="small"> <el-dropdown trigger="hover" size="small">
<div class="el-dropdown-link dropdownList"> <div class="el-dropdown-link dropdownList">
<i class="el-icon-document-checked "></i> <span>排序模式</span> <i class="el-icon-tickets "></i> <span>列表</span>
</div> </div>
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown"> <el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按时间排序()</el-dropdown-item> <el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按时间排序()</el-dropdown-item>
@ -24,37 +42,26 @@
</el-dropdown> </el-dropdown>
</div> </div>
<div class="filter-content"> <!-- <div class="filter-content">-->
<el-dropdown trigger="hover" size="small"> <!-- <el-dropdown trigger="hover" size="small">-->
<div class="el-dropdown-link dropdownList"> <!-- <div class="el-dropdown-link dropdownList">-->
<i class="el-icon-tickets "></i> <span>卡片模式</span> <!-- <i class="el-icon-setting "></i> <span>设置</span>-->
<!-- </div>-->
<!-- <el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">-->
<!-- <el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>编辑</el-dropdown-item>-->
<!-- <el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>批量处理</el-dropdown-item>-->
<!-- <el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>排序</el-dropdown-item>-->
<!-- <el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按网站A-Z排序</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- </div>-->
</div>
</div> </div>
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按时间排序()</el-dropdown-item>
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按时间排序()</el-dropdown-item>
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按字母A-Z排序</el-dropdown-item>
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按字母A-Z排序</el-dropdown-item>
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按网站A-Z排序</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div> <div v-if="queryParams.sousuo!=''" class="sousuoContent">
<div class="filter-content"> <i class="el-icon-success"></i>
<el-dropdown trigger="hover" size="small"> <!-- <span> 当前搜索的内容是:{{queryParams.sousuo}}</span>-->
<div class="el-dropdown-link dropdownList"> <span> 共为您找到约{{total}}个结果</span>
<i class="el-icon-setting "></i> <span>批量设置</span>
</div>
<el-dropdown-menu slot="dropdown" class="filter-sort-dropdown">
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>编辑</el-dropdown-item>
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>批量处理</el-dropdown-item>
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>排序</el-dropdown-item>
<el-dropdown-item class="filter-item"><i class="el-icon-bottom"></i>按网站A-Z排序</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</div> </div>
<div class="nullbookmark" v-if="showimg"> <div class="nullbookmark" v-if="showimg">
@ -66,10 +73,11 @@
</div> </div>
<div class="bookmarklist" :style="datalist" infinite-scroll-distance="10" v-loading="loading" v-if="showbookmark" v-infinite-scroll="load" <div class="bookmarklist" :style="datalist" infinite-scroll-distance="10" v-loading="loading" v-if="showbookmark"
v-infinite-scroll="load"
infinite-scroll-disabled="disabled" style="overflow:auto;" infinite-scroll-immediate="false"> infinite-scroll-disabled="disabled" style="overflow:auto;" infinite-scroll-immediate="false">
<el-row> <el-row>
<hr class="bookamrk-hr"/> <!-- <hr class="bookamrk-hr" v-if="!queryParams.sousuo!=''"/>-->
<el-col :span="24" v-for="bm in bookmarkList"> <el-col :span="24" v-for="bm in bookmarkList">
<div class="editBookamrk"> <div class="editBookamrk">
<div class="editlist"> <div class="editlist">
@ -90,9 +98,12 @@
<div class="bookmark" :data-id="bm.id" @click="windowurl(bm.url,bm.bookmarkId)"> <div class="bookmark" :data-id="bm.id" @click="windowurl(bm.url,bm.bookmarkId)">
<p class="bookmark-title">{{bm.title}}</p> <p class="bookmark-title" v-if="highlighted"><span v-html="highLight(bm.title,queryParams.sousuo)"/></p>
<p class="bookmark-title" v-if="!highlighted">{{bm.title}}</p>
<div class=""> <div class="">
<p class="description">{{bm.description}}</p> <p class="description" v-if="highlighted"><span v-html="highLight(bm.description,queryParams.sousuo)"/>
</p>
<p class="description" v-if="!highlighted">{{bm.description}}</p>
</div> </div>
<div class="info-wrap"> <div class="info-wrap">
<div class="info"> <div class="info">
@ -244,7 +255,9 @@
zcount: undefined, zcount: undefined,
idelete: undefined, idelete: undefined,
start: undefined, start: undefined,
sqTags: [] sqTags: [],
sort: 0,
sousuo: '',
}, },
inputVisible: false, // inputVisible: false, //
inputValue: '', // inputValue: '', //
@ -279,16 +292,20 @@
listnoMore: false, listnoMore: false,
total: 0,// total: 0,//
noMore: false,// noMore: false,//
highlighted: true,//
} }
}, },
filters: { filters: {
//timeago.js //timeago.js
// //
changeTime(val) { changeTime(val) {
let time = new Date(val); //jsonjs let time = new Date(val); //jsonjs
return format(time, 'zh_CN'); // return format(time, 'zh_CN'); //
} },
}, },
mounted() { mounted() {
@ -304,13 +321,20 @@
}, },
created() { created() {
var that = this; var that = this;
var routedata = that.$route.query.menuId; var routedata = that.$route.query.menuId;
var sousuo = that.$route.query.sousuo;
if (routedata == undefined) { if (routedata == undefined) {
that.queryParams.menuId = 1; // that.queryParams.menuId = 1;
} else { } else {
that.queryParams.menuId = routedata; that.queryParams.menuId = routedata;
} }
//
if (sousuo != null && sousuo != undefined && sousuo != '') {
this.queryParams.sousuo = sousuo;
}
if (routedata == 'BOOKMARK') { if (routedata == 'BOOKMARK') {
// //
this.getBookmarkList(); this.getBookmarkList();
@ -333,7 +357,7 @@
this.newBookmark(); this.newBookmark();
}, },
methods: { methods: {
/**初始化**/ /**初始化 分类全部的意思**/
newBookmark() { newBookmark() {
// //
document.getElementsByClassName("classification")[0].classList.add("classification-click"); document.getElementsByClassName("classification")[0].classList.add("classification-click");
@ -352,17 +376,20 @@
/**滚动监控**/ /**滚动监控**/
load() { load() {
console.log("滚动开始") console.log("滚动开始")
var that=this;
// //
this.queryParams.pageNum=this.queryParams.pageNum+1; var i=that.queryParams.pageNum+1;
// 2 15 26 that.$set(that.queryParams,'pageNum',i)
var listcount=Math.ceil(this.total/15); console.log("this.queryParams.pageNum:"+that.queryParams.pageNum)
if (this.queryParams.pageNum>listcount){ var listcount = Math.ceil(that.total / 15);
console.log("该目录共有页数:" +listcount)
if (i > listcount) {
// //
this.noMore=true; that.noMore = true;
this.listnoMore=true; that.listnoMore = true;
this.listloading = false that.listloading = false
console.log("禁止滚动了")
return; return;
} else { } else {
@ -372,9 +399,12 @@
if (response.rows.length != 0 && response.code == 200) { if (response.rows.length != 0 && response.code == 200) {
console.log("response.rows" + response.rows) console.log("response.rows" + response.rows)
this.bookmarkList = this.bookmarkList.concat(response.rows); this.bookmarkList = this.bookmarkList.concat(response.rows);
this.total = response.total; this.total = response.total;
this.listloading = false this.listloading = false
console.log("请求完毕"+that.queryParams.pageNum)
} else { } else {
//
// //
this.noMore = true; this.noMore = true;
this.listloading = false this.listloading = false
@ -383,6 +413,14 @@
}, 1000); }, 1000);
} }
// if (this.queryParams.pageNum = listcount) {
// //
// that.noMore = true;
// that.listnoMore = true;
// that.listloading = false
// console.log("2 ")
// }
}, },
/**切换显示 全部 网页 文本 其他**/ /**切换显示 全部 网页 文本 其他**/
@ -513,7 +551,9 @@
zcount: undefined, zcount: undefined,
idelete: undefined, idelete: undefined,
start: undefined, start: undefined,
createTime: undefined createTime: undefined,
sqTags: undefined,
sort: undefined,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -546,6 +586,11 @@
}); });
}, },
/**切换排序规则**/
handleCommand(command) {
this.queryParams.sort = command;
this.getList();
},
/** 查询书签管理列表 */ /** 查询书签管理列表 */
getList() { getList() {
@ -566,6 +611,57 @@
window.open(url); window.open(url);
}, },
/**搜索高亮 开始**/
highLight(item, highLight) {
return this.highLightTableMsg(item, highLight)
},
highLightTableMsg(msg, highLightStr) {
if (msg == null) {
msg = ''
}
if (highLightStr == null) {
highLightStr = ''
}
if (msg instanceof Object) {
msg = JSON.stringify(msg)
}
if (highLightStr instanceof Object) {
highLightStr = JSON.stringify(highLightStr)
}
if (!(msg instanceof String)) {
msg = msg.toString()
}
if (!(highLightStr instanceof String)) {
highLightStr = highLightStr.toString()
}
var htmlStr = ''
if (highLightStr.length > 0) {
if (msg.indexOf(highLightStr) !== -1) {
assemblyStr(msg, highLightStr)
} else {
htmlStr = '<span>' + msg + '</span>'
}
} else {
htmlStr = '<span>' + msg + '</span>'
}
function assemblyStr(msgAssembly, highLightAssembly) {
if (msgAssembly.indexOf(highLightAssembly) !== -1) {
var length = highLightAssembly.length
// alert(length)
var start = msgAssembly.indexOf(highLightAssembly)
htmlStr = htmlStr + '<span>' + msgAssembly.substring(0, start) + '</span>' + '<span style="color:red;">' + highLightAssembly + '</span>'
msgAssembly = msgAssembly.substring(start + length, msgAssembly.length)
assemblyStr(msgAssembly, highLightAssembly)
} else {
htmlStr = htmlStr + '<span>' + msgAssembly + '</span>'
}
}
return htmlStr;
},
/**搜索高亮 结束**/
}, },
@ -577,7 +673,6 @@
<style scoped> <style scoped>
.button-new-tag { .button-new-tag {
margin-left: 10px; margin-left: 10px;
height: 32px; height: 32px;
@ -664,14 +759,17 @@
align-items: center; align-items: center;
} }
.bookmark-time { .bookmark-time {
float: left; float: left;
} }
.bookmark-hr { .bookmark-hr {
background-color: #fff !important; background-color: #fff !important;
margin-top: 2px !important; margin-top: 2px !important;
margin-bottom: 7px !important; margin-bottom: 7px !important;
} }
.editlist div { .editlist div {
margin-left: 10px; margin-left: 10px;
width: 50px; width: 50px;
@ -683,9 +781,11 @@
.bookmarktag { .bookmarktag {
margin-right: 5px; margin-right: 5px;
} }
.bookmark-official { .bookmark-official {
float: left; float: left;
} }
.info { .info {
font-size: 12px; font-size: 12px;
} }
@ -701,6 +801,7 @@
height: 14px; height: 14px;
vertical-align: middle; vertical-align: middle;
} }
.filter-tbar { .filter-tbar {
display: flex; display: flex;
position: relative; position: relative;
@ -781,6 +882,7 @@
border-radius: 0px; border-radius: 0px;
border: 1px solid #EAEAEF; border: 1px solid #EAEAEF;
} }
.bookmark-list-tag:hover { .bookmark-list-tag:hover {
color: #569cd5; color: #569cd5;
} }
@ -791,15 +893,18 @@
background: #dcdfe682; background: #dcdfe682;
font-weight: 600; font-weight: 600;
} }
.bookmark-title:hover { .bookmark-title:hover {
color: #3C4DAC; color: #3C4DAC;
} }
.description { .description {
color: #9EABB3; color: #9EABB3;
margin-top: 5px; margin-top: 5px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.info-wrap { .info-wrap {
color: #9EABB3; color: #9EABB3;
} }
@ -831,6 +936,7 @@
color: #545454; color: #545454;
font-size: 13px; font-size: 13px;
} }
.bookmarklist { .bookmarklist {
width: 100%; width: 100%;
height: 600px; height: 600px;
@ -853,7 +959,7 @@
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
width: 6px; width: 6px;
background-color:#fff; background-color: transparent;
-webkit-border-radius: 2em; -webkit-border-radius: 2em;
-moz-border-radius: 2em; -moz-border-radius: 2em;
border-radius: 2em; border-radius: 2em;
@ -862,7 +968,9 @@
/*滚动条的设置*/ /*滚动条的设置*/
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background-color:#606d71; /*设置为透明 隐藏掉*/
/*background-color: #606d71;*/
background-color: transparent;
background-clip: padding-box; background-clip: padding-box;
min-height: 28px; min-height: 28px;
-webkit-border-radius: 2em; -webkit-border-radius: 2em;
@ -870,11 +978,30 @@
border-radius: 2em; border-radius: 2em;
} }
/*滚动条移上去的背景*/ /*滚动条移上去的背景*/
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background-color: #7c6fff; background-color: #7c6fff;
} }
/*滚动条美化结束*/ /*滚动条美化结束*/
.sousuoContent {
width: 100%;
height: 24px;
background-color: #F2F2F2;
color: #6a6a6a;
font-weight: 600;
line-height: 24px;
border-radius: 3px;
text-indent: 4px;
/*text-align:center;*/
margin-bottom: 4px;
}
</style> </style>

View File

@ -1,77 +1,25 @@
<template> <template>
<div class="app-container" style="overflow-y: scroll;height:750px"> <div class="app-container" >
<!-- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">--> <div class="mainlist">
<!-- <el-form-item label="标签名字" prop="name">-->
<!-- <el-input-->
<!-- v-model="queryParams.name"-->
<!-- placeholder="请输入标签名字"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="引用数量" prop="icount">-->
<!-- <el-input-->
<!-- v-model="queryParams.icount"-->
<!-- placeholder="请输入引用数量"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="谁增加的该标签" prop="userId">-->
<!-- <el-input-->
<!-- v-model="queryParams.userId"-->
<!-- placeholder="请输入谁增加的该标签"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="标签的字体颜色" prop="isFontColor">-->
<!-- <el-input-->
<!-- v-model="queryParams.isFontColor"-->
<!-- placeholder="请输入标签的字体颜色"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="标签的背景颜色" prop="isBgColor">-->
<!-- <el-input-->
<!-- v-model="queryParams.isBgColor"-->
<!-- placeholder="请输入标签的背景颜色"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="S系统标签,P用户标签" prop="tagType">-->
<!-- <el-select v-model="queryParams.tagType" placeholder="请选择S系统标签,P用户标签" clearable size="small">-->
<!-- <el-option label="请选择字典生成" value="" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="状态 0显示默认" prop="istatus">-->
<!-- <el-select v-model="queryParams.istatus" placeholder="请选择状态 0显示默认" clearable size="small">-->
<!-- <el-option label="请选择字典生成" value="" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="排序" prop="tagSort">-->
<!-- <el-input-->
<!-- v-model="queryParams.tagSort"-->
<!-- placeholder="请输入排序"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-row :gutter="10" class="mb8"> <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" style="float: left">
<el-form-item label="" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入标签名字"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8" style="float: left;margin-top: 6px">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
@ -101,27 +49,19 @@
v-hasPermi="['system:tag:remove']" v-hasPermi="['system:tag:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:tag:export']"
>导出</el-button>
</el-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="tagList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="tagList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column label="标签名字" width="155" > <el-table-column label="标签名字" width="155" >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="success" size="medium">{{ scope.row.name }}</el-tag> <el-tag type="success" size="medium">{{ scope.row.name }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="引用数量" align="center" prop="icount" /> <el-table-column label="引用数量" align="center" prop="icount" />
<el-table-column label="标签的字体颜色" align="center" prop="isFontColor" /> <el-table-column label="字体颜色" align="center" prop="isFontColor" />
<el-table-column label="标签的背景颜色" align="center" prop="isBgColor" /> <el-table-column label="背景颜色" align="center" prop="isBgColor" />
<el-table-column label="排序" align="center" prop="tagSort" /> <el-table-column label="排序" align="center" prop="tagSort" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
@ -151,6 +91,8 @@
@pagination="getList" @pagination="getList"
/> />
</div>
<!-- 添加或修改书签_标签对话框 --> <!-- 添加或修改书签_标签对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@ -338,25 +280,23 @@
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(function() {}); }).catch(function() {});
}, },
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有书签_标签数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return exportTag(queryParams);
}).then(response => {
this.download(response.msg);
}).catch(function() {});
}
} }
}; };
</script> </script>
<style scoped> <style scoped>
.app-container{ .app-container{
padding: 0px; padding: 0px;
}
.el-form-item{
margin-bottom: 5px;
} }
</style> </style>

View File

@ -38,18 +38,20 @@
</div> </div>
<div class="tabBar"> <!-- <div class="tabBar">-->
<div class="" <!-- <div class=""-->
style="width: 100%;height: 30px;background-color: #cacaca;float: left;text-align: center;line-height: 30px"> <!-- style="width: 100%;height: 30px;background-color: #cacaca;float: left;text-align: center;line-height: 30px">-->
<i class="el-icon-folder-checked"></i> <!-- <i class="el-icon-folder-checked"></i>-->
<span>新的收藏集</span> <!-- <span>新的收藏集</span>-->
</div> <!-- </div>-->
<div style="float: left;width: 100%;height: 50px;background-color: black"> <!-- <div class="tabBarList" >-->
<img src="https://s1.ax1x.com/2020/09/13/w0jfy9.png" style="width: 100%;height: 100%"> <!-- <div><i class="el-icon-folder-checked"></i></div>-->
</div> <!-- <div><i class="el-icon-folder-checked"></i></div>-->
<!-- <div><i class="el-icon-s-tools"></i></div>-->
<!-- </div>-->
</div> <!-- </div>-->
</el-aside> </el-aside>
@ -98,8 +100,10 @@
<!-- <div v-for="o in 4" :key="o">--> <!-- <div v-for="o in 4" :key="o">-->
<!-- {{'列表内容 ' + o }}--> <!-- {{'列表内容 ' + o }}-->
<!-- </div>--> <!-- </div>-->
<el-input slot="reference" placeholder="请输入书签名字" v-model="sousou" size="small"> <el-input slot="reference" @keyup.enter.native="gosousuo" placeholder="请输入要查找的关键词" v-model="sousuo"
<i slot="prefix" class="el-input__icon el-icon-search"></i> size="small">
<i slot="prefix" class="el-input__icon el-icon-search" style="font-size: 15px;margin-top: 7px"></i>
<!-- <el-button slot="append" icon="el-icon-search"></el-button>--> <!-- <el-button slot="append" icon="el-icon-search"></el-button>-->
</el-input> </el-input>
<!-- </el-popover>--> <!-- </el-popover>-->
@ -144,13 +148,29 @@
</el-header> </el-header>
<el-main class="bookmarkmain"> <el-main class="bookmarkmain">
<router-view :key="$route.query.menuId"></router-view> <router-view :key="$route.query.t"></router-view>
</el-main> </el-main>
</el-container> </el-container>
<!-- <el-aside class="mianUrl">-->
<!-- <el-header class="mianUrl-top" style="height: 50px">-->
<!-- <div class="mianUrl-top-left">-->
<!-- <i class="el-icon-folder-delete"></i>-->
<!-- <i class="el-icon-rank"></i>-->
<!-- </div>-->
<!-- <div class="mianUrl-top-right">-->
<!-- <i class="el-icon-edit-outline"></i>-->
<!-- <i class="el-icon-position"></i>-->
<!-- </div>-->
<!-- </el-header>-->
<!-- <div class="mianUrl-botoom">-->
<!-- <iframe class="openurl" :src="gourl"/>-->
<!-- </div>-->
<!-- </el-aside>-->
</el-container> </el-container>
@ -347,7 +367,7 @@
drawer: false, drawer: false,
direction: 'ltr', direction: 'ltr',
swictxuanran: true, swictxuanran: true,
sousou: '',// sousuo: '',//
enterable: false, enterable: false,
isShowZtree: true,//ztree isShowZtree: true,//ztree
expandAll: false,//ztree expandAll: false,//ztree
@ -406,7 +426,9 @@
asideHeight: { asideHeight: {
height: "", height: "",
width: "", width: "",
} },
//
gourl:'https://element.eleme.cn/#/zh-CN/theme',
} }
@ -575,11 +597,13 @@
c.height = h * pr; c.height = h * pr;
x.scale(pr, pr); x.scale(pr, pr);
x.globalAlpha = 0.6; x.globalAlpha = 0.6;
function evanyou() { function evanyou() {
x.clearRect(0, 0, w, h) x.clearRect(0, 0, w, h)
q = [{x: 0, y: h * .7 + f}, {x: 0, y: h * .7 - f}] q = [{x: 0, y: h * .7 + f}, {x: 0, y: h * .7 - f}]
while (q[1].x < w + f) d(q[0], q[1]) while (q[1].x < w + f) d(q[0], q[1])
} }
function d(i, j) { function d(i, j) {
x.beginPath() x.beginPath()
x.moveTo(i.x, i.y) x.moveTo(i.x, i.y)
@ -594,10 +618,12 @@
q[0] = q[1] q[0] = q[1]
q[1] = {x: k, y: n} q[1] = {x: k, y: n}
} }
function y(p) { function y(p) {
var t = p + (z() * 2 - 1.1) * f var t = p + (z() * 2 - 1.1) * f
return (t > h || t < 0) ? y(p) : t return (t > h || t < 0) ? y(p) : t
} }
document.onclick = evanyou document.onclick = evanyou
document.ontouchstart = evanyou document.ontouchstart = evanyou
evanyou(); evanyou();
@ -1138,6 +1164,7 @@
// //
reset() { reset() {
this.sqTags = [], this.sqTags = [],
this.sousuo = '',
this.form = { this.form = {
menuId: undefined, menuId: undefined,
userId: undefined, userId: undefined,
@ -1224,7 +1251,8 @@
that.$router.push({ that.$router.push({
path: "/content", path: "/content",
query: { query: {
menuId: treeNode.menuId menuId: treeNode.menuId,
t:Date.now(),
} }
}) })
@ -1338,7 +1366,17 @@
path: "/UserTagAll", path: "/UserTagAll",
}) })
}, },
/**搜索功能**/
gosousuo() {
var that = this;
that.$router.push({
path: "/content",
query: {
sousuo: this.sousuo,
t:Date.now(),
}
})
},
}, },
@ -1362,7 +1400,6 @@
} }
.ztree li ul { .ztree li ul {
margin: 0; margin: 0;
padding: 0 padding: 0
@ -1499,8 +1536,6 @@
/*filter:alpha(opacity=90);*/ /*filter:alpha(opacity=90);*/
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')"; filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";
-moz-background-size: 100% 100%; -moz-background-size: 100% 100%;
background-size: 100% 100%; background-size: 100% 100%;
@ -1517,8 +1552,6 @@
/*!*background: linear-gradient(to right, #000C40, #F0F2F0); !* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ *!*!*/ /*!*background: linear-gradient(to right, #000C40, #F0F2F0); !* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ *!*!*/
/*background-size: cover;*/ /*background-size: cover;*/
/*z-index: -1;!*-1 可以当背景*!*/ /*z-index: -1;!*-1 可以当背景*!*/
/*-webkit-filter: blur(3px);*/ /*-webkit-filter: blur(3px);*/
@ -1672,7 +1705,6 @@
} }
.sousou-input { .sousou-input {
display: flex; display: flex;
align-items: center; align-items: center;
@ -1720,23 +1752,11 @@
} }
.bookmark { .bookmark {
height: 65px; height: 65px;
} }
.sousouleft-switch { .sousouleft-switch {
margin-top: 4px !important; margin-top: 4px !important;
margin-right: 10px !important; margin-right: 10px !important;
@ -1768,6 +1788,7 @@
} }
.sousou-leftico img { .sousou-leftico img {
} }
@ -1779,8 +1800,6 @@
} }
.sousouright-icon { .sousouright-icon {
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -1895,16 +1914,11 @@
.main-right { .main-right {
/*overflow:scroll;*/
width: 300px; width: 300px;
height: 85%; height: 95%;
min-height: 40%; min-height: 40%;
overflow: auto; overflow: auto;
/*overflow: hidden;*/
z-index: 1; z-index: 1;
} }
.main-right::-webkit-scrollbar { .main-right::-webkit-scrollbar {
@ -1931,10 +1945,34 @@
} }
.tabBar { .tabBar {
width: 300px; /*width: inherit;*/
overflow: hidden; /*overflow: hidden;*/
position: fixed; /*position: fixed;*/
bottom: 0; /*bottom: 0;*/
}
.tabBarList{
display: flex;
float: left;
width: 100%;
height: 50px;
background-color: #e6e6e6;
text-align: center;
align-content: center;
align-items: center;
}
.tabBarList div{
display: flex;
width: 33.33%;
height: 50px;
align-content: center;
align-items: center;
text-align: center;
}
.tabBarList div i{
margin: 0 auto;
font-size: 25px;
} }
.popover-suosou { .popover-suosou {
@ -1942,6 +1980,7 @@
top: 40px; top: 40px;
/*left: 72px;*/ /*left: 72px;*/
} }
/* 拖拽相关样式 */ /* 拖拽相关样式 */
/*包围div样式*/ /*包围div样式*/
@ -1956,10 +1995,12 @@
background-color: transparent; background-color: transparent;
color: transparent; color: transparent;
} }
/*拖拽区鼠标悬停样式*/ /*拖拽区鼠标悬停样式*/
.isresize:hover { .isresize:hover {
color: #a4a4a4; color: #a4a4a4;
} }
.isresize i { .isresize i {
margin-left: 2px; margin-left: 2px;
transform: rotate(90deg); transform: rotate(90deg);
@ -1967,9 +2008,11 @@
/*color: transparent;*/ /*color: transparent;*/
/*background-color: black;*/ /*background-color: black;*/
} }
.main-right { .main-right {
min-width: 250px; min-width: 250px;
} }
.box { .box {
-moz-user-select: none; /* Firefox私有属性 */ -moz-user-select: none; /* Firefox私有属性 */
-webkit-user-select: none; /* WebKit内核私有属性 */ -webkit-user-select: none; /* WebKit内核私有属性 */
@ -1987,11 +2030,58 @@
left: 0; left: 0;
top: 0; top: 0;
z-index: -1; z-index: -1;
} }
.mianUrl{
padding: 0px;
color: #8F8F8F;
}
.mianUrl-top{
display: flex;
padding: 0px!important;
}
.mianUrl-top div{
width: 50%;
height: 50px;
background-color: #FFFFFF;
font-size: 22px;
color: #414141;
}
.mianUrl i{
display: block;
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
margin-top: 15px;
border-radius: 2px;
}
.mianUrl-top-left i{
float: left;
margin-left: 15px;
}
.mianUrl i:hover{
background-color: #F2F2F2;
}
.mianUrl-top-right i{
float: right;
margin-right: 15px;
}
.mianUrl-botoom{
height: 900px;
}
.openurl{
width: 100%;
height: 100%;
}
</style> </style>

View File

@ -22,7 +22,7 @@ public interface SqBookmarkMapper extends MyMapper<SqBookmark>
* @param userID 用户ID * @param userID 用户ID
* @return 书签管理 * @return 书签管理
*/ */
public List<SqBookmark> selectBymenuIdUserID(@Param("menuID") Long menuID, @Param("userID") Long userID); public List<SqBookmark> selectBymenuIdUserID(@Param("menuID") Long menuID, @Param("userID") Long userID,@Param("sort")Integer sort,@Param("sousuo") String sousuo);
/** /**
* 查询书签管理 * 查询书签管理

View File

@ -21,9 +21,11 @@ public interface ISqBookmarkService
* *
* @param menuID 栏目ID * @param menuID 栏目ID
* @param userID 用户ID * @param userID 用户ID
* @param sort 排序方式
* @param sousou 搜索
* @return 书签管理 * @return 书签管理
*/ */
public List<SqBookmark> selectBymenuIdUserID(Long menuID,Long userID); public List<SqBookmark> selectBymenuIdUserID(Long menuID,Long userID,Integer sort,String sousou);
/** /**

View File

@ -59,11 +59,13 @@ public class SqBookmarkServiceImpl implements ISqBookmarkService
* *
* @param menuID 栏目ID * @param menuID 栏目ID
* @param userID 用户ID * @param userID 用户ID
* @param sort 排序方式
* @param sousou 搜索
* @return 书签管理 * @return 书签管理
*/ */
@Override @Override
public List<SqBookmark> selectBymenuIdUserID(Long menuID, Long userID) { public List<SqBookmark> selectBymenuIdUserID(Long menuID, Long userID,Integer sort,String sousou) {
return sqBookmarkMapper.selectBymenuIdUserID(menuID,userID); return sqBookmarkMapper.selectBymenuIdUserID(menuID,userID, sort,sousou);
} }
/** /**

View File

@ -123,6 +123,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBymenuIdUserID" parameterType="SqBookmark" resultMap="SqBookmarkResult"> <select id="selectBymenuIdUserID" parameterType="SqBookmark" resultMap="SqBookmarkResult">
<include refid="selectSqBookmarkVo"/> <include refid="selectSqBookmarkVo"/>
where menu_id = #{menuID} and userid=#{userID} order by create_time desc where userid=#{userID}
<if test="sousuo == null or sousuo == ''"> and menu_id = #{menuID}</if>
<if test="sousuo != null and sousuo != ''"> and title like concat('%', #{sousuo}, '%')</if>
order by
<choose>
<when test="sort == 0">
create_time desc
</when>
<when test="sort == 1">
create_time asc
</when>
<when test="sort == 2">
CONVERT(title USING GBK) asc
</when>
<when test="sort == 3">
CONVERT(title USING GBK) desc
</when>
<otherwise>
create_time desc
</otherwise>
</choose>
</select> </select>
</mapper> </mapper>