整理权限

This commit is contained in:
WangHao 2021-04-04 19:50:45 +08:00
parent 6e9a510d3c
commit bb01b94a52
13 changed files with 587 additions and 457 deletions

View File

@ -52,7 +52,7 @@ public class BrowserController extends BaseController {
@RequestMapping("/import")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:list')")
@PreAuthorize("@ss.hasPermi('bookmark:browser:export')")
public AjaxResult importCollect(@RequestParam("htmlFile") MultipartFile htmlFile){
logger.debug("开始上传状态是:");
SysUser sysUser=getAuthUser();
@ -88,33 +88,33 @@ public class BrowserController extends BaseController {
/**
* 导入收藏文章
*/
public void importHtml(Map<String, String> map,Long menuID,Long userId){
for(Entry<String, String> entry : map.entrySet()){
try {
//获取URL后查询最新的URL信息
Map<String, String> result = ImportHtml.getCollectFromUrl(entry.getKey());
SqBookmark sqBookmark =new SqBookmark();
sqBookmark.setUserid(userId);
sqBookmark.setTitle(entry.getValue());
sqBookmark.setUrl(entry.getKey());
sqBookmark.setUrls(ImportHtml.Urlutils(new URL(entry.getKey())));
if(StringUtils.isBlank(result.get("description"))){
sqBookmark.setDescription(entry.getValue());
}else{
sqBookmark.setDescription(result.get("description"));
}
sqBookmark.setMenuId(menuID);
sqBookmark.setCreateTime(new Date());
iSqBookmarkService.insertSqBookmark(sqBookmark);
} catch (Exception e) {
logger.error("导入存储异常:",e);
}
}
}
// /**
// * 导入收藏文章
// */
// public void importHtml(Map<String, String> map,Long menuID,Long userId){
// for(Entry<String, String> entry : map.entrySet()){
// try {
// //获取URL后查询最新的URL信息
// Map<String, String> result = ImportHtml.getCollectFromUrl(entry.getKey());
// SqBookmark sqBookmark =new SqBookmark();
// sqBookmark.setUserid(userId);
// sqBookmark.setTitle(entry.getValue());
// sqBookmark.setUrl(entry.getKey());
// sqBookmark.setUrls(ImportHtml.Urlutils(new URL(entry.getKey())));
// if(StringUtils.isBlank(result.get("description"))){
// sqBookmark.setDescription(entry.getValue());
// }else{
// sqBookmark.setDescription(result.get("description"));
// }
// sqBookmark.setMenuId(menuID);
// sqBookmark.setCreateTime(new Date());
// iSqBookmarkService.insertSqBookmark(sqBookmark);
// } catch (Exception e) {
// logger.error("导入存储异常:",e);
// }
// }
//
// }

View File

@ -44,14 +44,14 @@ public class SqBookmarkController extends BaseController
private ISqBookmarkService sqBookmarkService;
/**
* 测试通用mapper
*/
@GetMapping("/selectByID")
public TableDataInfo selectByID( Long userID) {
List<SqBookmark> list = sqBookmarkService.selectByID(userID);
return getDataTable(list);
}
// /**
// * 测试通用mapper
// */
// @GetMapping("/selectByID")
// public TableDataInfo selectByID( Long userID) {
// List<SqBookmark> list = sqBookmarkService.selectByID(userID);
// return getDataTable(list);
// }
/**
* 通过url 查询用户 是否已经添加了此书签
@ -60,6 +60,7 @@ public class SqBookmarkController extends BaseController
* @return
*/
@GetMapping("/selectByUrlUserID")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:common:url')")
public AjaxResult selectByUrlUserID(String url) {
SysUser sysUser=getAuthUser();
startPage();
@ -76,7 +77,7 @@ public class SqBookmarkController extends BaseController
* @return
*/
@GetMapping("/selectBymenuIdUserID")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:list')")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:common:listsousou')")
public TableDataInfo selectBymenuIdUserID(Long menuId,Integer sort,String sousuo) {
SysUser sysUser=getAuthUser();
startPage();
@ -88,7 +89,7 @@ public class SqBookmarkController extends BaseController
* @return
*/
@GetMapping("/selectBydelete")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:list')")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:common:recycle')")
public TableDataInfo selectBydelete() {
SysUser sysUser=getAuthUser();
startPage();
@ -101,7 +102,7 @@ public class SqBookmarkController extends BaseController
* @return
*/
@GetMapping("/selectByUseridList")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:list')")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:common:list')")
public TableDataInfo selectByUseridList() {
SysUser sysUser=getAuthUser();
startPage();
@ -148,32 +149,33 @@ public class SqBookmarkController extends BaseController
/**
* 新增书签管理
*/
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:add')")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:common:add')")
@Log(title = "书签管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SqBookmark sqBookmark)
{
SysUser sysUser=getAuthUser();
sqBookmark.setUserid(sysUser.getUserId());
return toAjax(sqBookmarkService.insertSqBookmark(sqBookmark));
}
/**
* 修改书签管理
*/
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:edit')")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:common:edit')")
@Log(title = "书签管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SqBookmark sqBookmark)
{
SysUser sysUser=getAuthUser();
sqBookmark.setUserid(sysUser.getUserId());
return toAjax(sqBookmarkService.updateSqBookmark(sqBookmark));
}
/**
* 删除书签管理
*/
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:remove')")
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:common:remove')")
@Log(title = "书签管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{bookmarkIds}")
public AjaxResult remove(@PathVariable Long[] bookmarkIds)

View File

@ -43,6 +43,7 @@ public class SqMenuController extends BaseController
*/
@GetMapping("/selectMenuByUserID")
@PreAuthorize("@ss.hasPermi('bookmark:menu:common:list')")
public AjaxResult selecByUserID()
{
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
@ -54,6 +55,7 @@ public class SqMenuController extends BaseController
* 功能描述:根据MenuId 查询子目录
*/
@GetMapping("/listByMenuId/{menuId}")
@PreAuthorize("@ss.hasPermi('bookmark:menu:common:menuidlist')")
public AjaxResult listByMenuId(@PathVariable("menuId") Long menuId)
{
List<SqMenu> list = sqMenuService.listByMenuId(getAuthUser().getUserId(),menuId);
@ -63,14 +65,9 @@ public class SqMenuController extends BaseController
* 功能描述:根据MenuId 查询子目录
*/
@PostMapping("/listByMenuIdP")
@PreAuthorize("@ss.hasPermi('bookmark:menu:common:menuidlist')")
public AjaxResult listByMenuIdP(@RequestParam("menuId") Long menuId)
{
// try {
// Thread.sleep(50000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
List<SqMenu> list = sqMenuService.listByMenuId(getAuthUser().getUserId(),menuId);
return AjaxResult.success(list);
}
@ -79,6 +76,7 @@ public class SqMenuController extends BaseController
* 查询MenuID单个书签信息
*/
@GetMapping("/selectByMenuId")
@PreAuthorize("@ss.hasPermi('bookmark:menu:common:menuid')")
public AjaxResult list(@RequestParam("menuId") Long menuId)
{
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
@ -92,6 +90,8 @@ public class SqMenuController extends BaseController
return AjaxResult.success(list);
}
/**
* 查询书签菜单列表
*/
@ -129,7 +129,7 @@ public class SqMenuController extends BaseController
/**
* 新增书签菜单
*/
@PreAuthorize("@ss.hasPermi('bookmark:menu:add')")
@PreAuthorize("@ss.hasPermi('bookmark:menu:common:add')")
@Log(title = "书签菜单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SqMenu sqMenu)
@ -142,7 +142,7 @@ public class SqMenuController extends BaseController
/**
* 修改书签菜单
*/
@PreAuthorize("@ss.hasPermi('bookmark:menu:edit')")
@PreAuthorize("@ss.hasPermi('bookmark:menu:common:edit')")
@Log(title = "书签菜单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SqMenu sqMenu)
@ -184,7 +184,7 @@ public class SqMenuController extends BaseController
/**
* 删除书签菜单
*/
@PreAuthorize("@ss.hasPermi('bookmark:menu:common:remove')")
@Log(title = "书签菜单", businessType = BusinessType.DELETE)
@DeleteMapping("/delete/{menuId}")
public AjaxResult remove(@PathVariable Long menuId)

View File

@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="120px" height="120.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 241.003303v709.973013h443.733406c0 37.702481 30.565206 68.267687 68.267687 68.267687 37.702481 0 68.267687-30.565206 68.267687-68.267687h443.733407V241.003303H0z" fill="#64798A" /><path d="M62.776971 206.08226h898.443872v681.668819H62.776971z" fill="#EBF0F3" /><path d="M199.773731 80.012266l354.887013 242.000423v565.734017l-341.237849-135.004709z" fill="#E1E6E9" /><path d="M554.660744 214.168548L398.19173 4.755997v654.333317l156.469014 228.657392z" fill="#D5D6DB" /><path d="M789.318346 206.077887v171.008151l51.439111-27.307075 44.133464 27.307075V206.077887z" fill="#E56353" /></svg>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="420px" height="420px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 241.003303v709.973013h443.733406c0 37.702481 30.565206 68.267687 68.267687 68.267687 37.702481 0 68.267687-30.565206 68.267687-68.267687h443.733407V241.003303H0z" fill="#64798A" /><path d="M62.776971 206.08226h898.443872v681.668819H62.776971z" fill="#EBF0F3" /><path d="M199.773731 80.012266l354.887013 242.000423v565.734017l-341.237849-135.004709z" fill="#E1E6E9" /><path d="M554.660744 214.168548L398.19173 4.755997v654.333317l156.469014 228.657392z" fill="#D5D6DB" /><path d="M789.318346 206.077887v171.008151l51.439111-27.307075 44.133464 27.307075V206.077887z" fill="#E56353" /></svg>

Before

Width:  |  Height:  |  Size: 859 B

After

Width:  |  Height:  |  Size: 857 B

View File

@ -1 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1553828490559" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1684" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M898.831744 900.517641 103.816972 900.517641c-36.002982 0-65.363683-29.286-65.363683-65.313541l0-554.949184c0-36.041868 29.361725-65.326844 65.363683-65.326844l795.015795 0c36.002982 0 65.198931 29.284977 65.198931 65.326844l0 554.949184C964.030675 871.231641 934.834726 900.517641 898.831744 900.517641L898.831744 900.517641zM103.816972 255.593236c-13.576203 0-24.711821 11.085476-24.711821 24.662703l0 554.949184c0 13.576203 11.136641 24.662703 24.711821 24.662703l795.015795 0c13.577227 0 24.547069-11.086499 24.547069-24.662703l0-554.949184c0-13.577227-10.970866-24.662703-24.547069-24.662703L103.816972 255.593236 103.816972 255.593236zM664.346245 251.774257c-11.161201 0-20.332071-9.080819-20.332071-20.332071l0-101.278661c0-13.576203-11.047614-24.623817-24.699542-24.623817L383.181611 105.539708c-13.576203 0-24.712845 11.04659-24.712845 24.623817l0 101.278661c0 11.252275-9.041934 20.332071-20.332071 20.332071-11.20111 0-20.319791-9.080819-20.319791-20.332071l0-101.278661c0-35.989679 29.323862-65.275679 65.364707-65.275679l236.133022 0c36.06745 0 65.402569 29.284977 65.402569 65.275679l0 101.278661C684.717202 242.694461 675.636383 251.774257 664.346245 251.774257L664.346245 251.774257zM413.233044 521.725502 75.694471 521.725502c-11.163247 0-20.333094-9.117658-20.333094-20.35663 0-11.252275 9.169847-20.332071 20.333094-20.332071l337.538573 0c11.277858 0 20.319791 9.080819 20.319791 20.332071C433.552835 512.607844 424.510902 521.725502 413.233044 521.725502L413.233044 521.725502zM912.894018 521.725502 575.367725 521.725502c-11.213389 0-20.332071-9.117658-20.332071-20.35663 0-11.252275 9.118682-20.332071 20.332071-20.332071l337.526293 0c11.290137 0 20.332071 9.080819 20.332071 20.332071C933.226089 512.607844 924.184155 521.725502 912.894018 521.725502L912.894018 521.725502zM557.56322 634.217552 445.085496 634.217552c-11.213389 0-20.332071-9.079796-20.332071-20.331048l0-168.763658c0-11.251252 9.118682-20.332071 20.332071-20.332071l112.478747 0c11.290137 0 20.370956 9.080819 20.370956 20.332071l0 168.763658C577.934177 625.137757 568.853357 634.217552 557.56322 634.217552L557.56322 634.217552zM465.417567 593.514525l71.827909 0L537.245476 465.454918l-71.827909 0L465.417567 593.514525 465.417567 593.514525z" p-id="1685" fill="#bfbfbf"></path></svg>
<svg t="1615812754211" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21147" width="128" height="128"><path d="M906.666667 214.848H725.333333v-57.6c-2.133333-40.533333-36.266667-70.4-76.8-70.4h-298.666666c-40.533333 2.133333-72.533333 34.133333-72.533334 74.666667v53.333333H117.333333c-40.533333 0-74.666667 34.133333-74.666666 74.666667v554.666666c0 40.533333 34.133333 74.666667 74.666666 74.666667h789.333334c40.533333 0 74.666667-34.133333 74.666666-74.666667v-554.666666c0-40.533333-34.133333-74.666667-74.666666-74.666667zM341.333333 161.514667c2.133333-6.4 6.4-10.666667 12.8-10.666667h296.533334c6.4 0 10.666667 6.4 10.666666 10.666667v53.333333H341.333333v-53.333333z m-224 117.333333h789.333334c6.4 0 10.666667 4.266667 10.666666 10.666667v149.333333H106.666667v-149.333333c0-6.4 4.266667-10.666667 10.666666-10.666667z m490.666667 224v53.333333c0 6.4-4.266667 10.666667-10.666667 10.666667h-170.666666c-6.4 0-10.666667-4.266667-10.666667-10.666667v-53.333333h192z m298.666667 352h-789.333334c-6.4 0-10.666667-4.266667-10.666666-10.666667v-341.333333h245.333333v53.333333c0 40.533333 34.133333 74.666667 74.666667 74.666667h170.666666c40.533333 0 74.666667-34.133333 74.666667-74.666667v-53.333333H917.333333v341.333333c0 6.4-4.266667 10.666667-10.666666 10.666667z" p-id="21148" fill="#1D6EFE"></path></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -94,7 +94,7 @@ export default {
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/index';
location.href = '/content';
})
})
}

View File

@ -149,6 +149,7 @@ export const constantRoutes = [
title: '书签管理',icon:'user',
requireAuth: false,
},
hidden: true,
children: [
{
path: '/content',

View File

@ -13,7 +13,7 @@
<br/>
<svg-icon icon-class="notebook_1" />
<br/>
<svg-icon icon-class="notebook_2" />
<svg-icon icon-class="tool" style="width: 50px;height: 50px" />
</div>

View File

@ -1,6 +1,89 @@
<template>
<div class="main">
<div >
{{msg}}
<div class="toolAll">
<!-- 微信丶在线文档等 -->
<div class="tool">
<svg-icon icon-class="tool" class="toolIcon" />
<div class="toolName">
<span >书签去重</span>
</div>
<div class="toolDescription">
<span style="">微信丶在线文档等</span>
</div>
</div>
<!-- 微信丶在线文档等 -->
<div class="tool">
<svg-icon icon-class="100" class="toolIcon" />
<div class="toolName">
<span >文件</span>
</div>
<div class="toolDescription">
<span style="">微信丶在线文档等</span>
</div>
</div>
<!-- 微信丶在线文档等 -->
<div class="tool">
<svg-icon icon-class="102" class="toolIcon" />
<div class="toolName">
<span >文件</span>
</div>
<div class="toolDescription">
<span style="">微信丶在线文档等</span>
</div>
</div>
<!-- 微信丶在线文档等 -->
<div class="tool">
<svg-icon icon-class="103" class="toolIcon" />
<div class="toolName">
<span >文件</span>
</div>
<div class="toolDescription">
<span style="">微信丶在线文档等</span>
</div>
</div>
<!-- 微信丶在线文档等 -->
<div class="tool">
<svg-icon icon-class="104" class="toolIcon" />
<div class="toolName">
<span >文件</span>
</div>
<div class="toolDescription">
<span style="">微信丶在线文档等</span>
</div>
</div>
<!-- 微信丶在线文档等 -->
<div class="tool">
<svg-icon icon-class="105" class="toolIcon" />
<div class="toolName">
<span >文件</span>
</div>
<div class="toolDescription">
<span style="">微信丶在线文档等</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
@ -14,6 +97,49 @@
methods: {}
}
</script>
<style>
<style scoped>
.main{
background-color: #F4F5F9;
}
.toolAll{
width: 100%;
display: flex;
align-items: center;
justify-items:center;
flex-wrap:wrap;
padding-bottom: 30px;
}
.tool{
background-color: #FFFFFF;
width: 180px;
height: 120px;
border-radius: 10px;
margin-left: 48px;
margin-top: 30px;
}
.toolIcon{
width: 40px;
height: 40px;
margin-top: 10px;
margin-left: 10px;
}
.toolName{
margin-top: 10px
}
.toolName span{
margin-left: 10px;
color: #2B2B2B;
font-weight: 800;
font-size: 17px
}
.toolDescription{
margin-top: 10px;
}
.toolDescription span{
margin-left: 10px;
margin-top: 18px;
color: #ADB1B9;
}
</style>

View File

@ -32,7 +32,7 @@
<div class="aside-title" @click="gorecycle"><i class="el-icon-delete-solid" style="color: red"></i><span>垃圾桶</span></div>
<div class="aside-title" @click="importHtml"><i class="el-icon-s-platform"></i><span>导入书签</span></div>
<div class="aside-title"><i class="el-icon-s-comment"></i><span>意见反馈</span></div>
<div class="aside-title" @click="ceshi"><i class="el-icon-s-comment"></i><span>测试页面</span></div>
<!-- <div class="aside-title" @click="ceshi"><i class="el-icon-s-comment"></i><span>测试页面</span></div>-->
<!-- <div class="aside-title" @click="NqEdit"><i class="el-icon-s-comment"></i><span>NqQuillEdit编辑器</span></div>-->
<div class="aside-title " style="margin-bottom: 100px" @click="gotool"><i class="el-icon-s-grid"></i><span>工具箱</span></div>

View File

@ -1,7 +1,7 @@
<template>
<div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">藏趣云</h3>
<el-form-item prop="username">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
@ -48,7 +48,7 @@
</el-form>
<!-- 底部 -->
<div class="el-login-footer">
<span>Copyright © 2018-2019 ruoyi.vip All Rights Reserved.</span>
<span>Copyright © 2020-2021 CQY All Rights Reserved.</span>
</div>
</div>
</template>
@ -65,8 +65,8 @@ export default {
codeUrl: "",
cookiePassword: "",
loginForm: {
username: "admin",
password: "admin123",
username: "",
password: "",
rememberMe: false,
code: "",
uuid: ""
@ -129,7 +129,7 @@ export default {
this.$store
.dispatch("Login", this.loginForm)
.then(() => {
this.$router.push({ path: this.redirect || "/" });
this.$router.push({ path: this.redirect || "/content" });
})
.catch(() => {
this.loading = false;
@ -148,7 +148,7 @@ export default {
justify-content: center;
align-items: center;
height: 100%;
background-image: url("../assets/image/login-background.jpg");
background-image: url("../assets/image/2043428.jpg");
background-size: cover;
}
.title {
@ -173,6 +173,7 @@ export default {
width: 14px;
margin-left: 2px;
}
opacity: 0.8;
}
.login-tip {
font-size: 13px;