新增全部书签和回收站
This commit is contained in:
@ -8,6 +8,23 @@ export function selectBymenuIdUserID(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//回收站
|
||||
export function selectBydelete(query) {
|
||||
return request({
|
||||
url: '/bookmark/bookmark/selectBydelete',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
//用户全部书签
|
||||
export function selectByUseridList(query) {
|
||||
return request({
|
||||
url: '/bookmark/bookmark/selectByUseridList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@
|
||||
<script>
|
||||
|
||||
|
||||
import { selectBymenuIdUserID, getBookmark, delBookmark, addBookmark, updateBookmark, exportBookmark } from "@/api/bookmark/bookmark";
|
||||
import { selectBymenuIdUserID,selectBydelete,selectByUseridList, getBookmark, delBookmark, addBookmark, updateBookmark, exportBookmark } from "@/api/bookmark/bookmark";
|
||||
import { format } from 'timeago.js';
|
||||
|
||||
export default {
|
||||
@ -151,17 +151,61 @@
|
||||
},
|
||||
created() {
|
||||
var that=this;
|
||||
if (that.$route.query.menuId==undefined){
|
||||
var routedata=that.$route.query.menuId;
|
||||
if (routedata==undefined){
|
||||
that.queryParams.menuId=1;
|
||||
}else {
|
||||
that.queryParams.menuId=that.$route.query.menuId;
|
||||
that.queryParams.menuId=routedata;
|
||||
}
|
||||
this.getList();
|
||||
|
||||
if (routedata=='BOOKMARK'){
|
||||
//全部书签
|
||||
this.getBookmarkList();
|
||||
|
||||
}else if(routedata=='RECYCLE'){
|
||||
//回收站
|
||||
this.getrecycleList();
|
||||
|
||||
}else{
|
||||
//根据menuId查询
|
||||
this.getList();
|
||||
}
|
||||
|
||||
},
|
||||
mounted(){
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 回收站**/
|
||||
getrecycleList() {
|
||||
this.loading = true;
|
||||
selectBydelete(this.queryParams).then(response => {
|
||||
if (response.total!=0&&response.code==200){
|
||||
this.bookmarkList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}else {
|
||||
this.showbookmark = false;
|
||||
this.showimg = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 全部书签**/
|
||||
getBookmarkList() {
|
||||
this.loading = true;
|
||||
selectByUseridList(this.queryParams).then(response => {
|
||||
if (response.total!=0&&response.code==200){
|
||||
this.bookmarkList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}else {
|
||||
this.showbookmark = false;
|
||||
this.showimg = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 查询书签管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="aside-title"><i class="el-icon-s-tools"></i><span>全部书签</span></div>
|
||||
<div class="aside-title" @click="goBookmarkList"><i class="el-icon-s-tools"></i><span>全部书签</span></div>
|
||||
<div class="aside-title"><i class="el-icon-help"></i><span>发现</span></div>
|
||||
<div class="aside-title"><i class="el-icon-s-platform"></i><span>任意门</span></div>
|
||||
<div class="aside-title"><i class="el-icon-message-solid"></i><span>收件箱</span></div>
|
||||
@ -23,13 +23,12 @@
|
||||
</div>
|
||||
<div class="reminder">工具箱</div>
|
||||
<div class="aside-title"><i class="el-icon-s-tools"></i><span>收藏同步</span></div>
|
||||
<div class="aside-title"><i class="el-icon-help"></i><span>发现书签</span></div>
|
||||
<router-link :to="{ name: 'importHtml' }">
|
||||
<div class="aside-title">
|
||||
<div class="aside-title" @click="gorecycle"><i class="el-icon-help"></i><span>回收站</span></div>
|
||||
<div class="aside-title" @click="importHtml">
|
||||
<i class="el-icon-s-platform"></i><span>导入书签</span>
|
||||
</div>
|
||||
</router-link>
|
||||
<div class="aside-title"><i class="el-icon-message-solid"></i><span>收件箱</span></div>
|
||||
<div class="aside-title"><i class="el-icon-message-solid"></i><span>意见反馈</span></div>
|
||||
<div class="aside-title"><i class="el-icon-message-solid"></i><span>其他设置</span></div>
|
||||
|
||||
<!-- <el-footer class="aside-navigation">-->
|
||||
<!-- </el-footer>-->
|
||||
@ -423,6 +422,7 @@
|
||||
// }
|
||||
//return true;
|
||||
},
|
||||
/** 点击跳转**/
|
||||
//节点点击
|
||||
OnClickzTree:function(event,treeId, treeNode){
|
||||
var that=this;
|
||||
@ -449,6 +449,13 @@
|
||||
that.isShowZtree = !that.isShowZtree;
|
||||
|
||||
},
|
||||
/**跳转导入页面**/
|
||||
importHtml:function(){
|
||||
this.$router.push({
|
||||
path: "/importHtml",
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
@ -501,7 +508,30 @@
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
// 全部书签
|
||||
goBookmarkList(){
|
||||
var that=this;
|
||||
that.$router.push({
|
||||
path: "/content",
|
||||
query: {
|
||||
menuId: 'BOOKMARK'
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
// 回收站
|
||||
gorecycle(){
|
||||
var that=this;
|
||||
that.$router.push({
|
||||
path: "/content",
|
||||
query: {
|
||||
menuId: 'RECYCLE'
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
mounted(){
|
||||
window['editBookmark'] = (e) => {
|
||||
|
Reference in New Issue
Block a user