From 373906b1eae0af7004e714193960be95ec43fc58 Mon Sep 17 00:00:00 2001 From: "759675757@qq.com" Date: Fri, 18 Oct 2019 10:38:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/SysMenuController.java | 43 +++- .../controller/admin/SysRoleController.java | 49 +++- .../admin/SysRoleMenuController.java | 22 -- .../controller/admin/SysUserController.java | 4 +- .../admin/SysUserRoleController.java | 21 -- .../system/entity/SysRoleMenu.java | 34 --- .../system/entity/SysUserRole.java | 34 --- .../system/mapper/SysRoleMenuMapper.java | 16 -- .../system/mapper/SysUserMapper.java | 4 +- .../system/mapper/SysUserRoleMapper.java | 16 -- .../system/service/ISysRoleMenuService.java | 16 -- .../system/service/ISysUserRoleService.java | 16 -- .../service/impl/SysRoleMenuServiceImpl.java | 20 -- .../service/impl/SysUserRoleServiceImpl.java | 20 -- .../service/impl/SysUserServiceImpl.java | 3 +- .../mapper/system/SysRoleMenuMapper.xml | 5 - .../resources/mapper/system/SysUserMapper.xml | 37 +-- .../mapper/system/SysUserRoleMapper.xml | 5 - .../src/main/resources/static/js/admin.js | 14 +- .../src/main/resources/static/json/menu.json | 2 +- .../resources/templates/system/dict/list.ftl | 10 - .../templates/system/role/addOrUpd.ftl | 121 ++++++++++ .../resources/templates/system/role/list.ftl | 217 ++++++++++++++++++ .../templates/system/user/addOrUpd.ftl | 46 ++-- .../resources/templates/system/user/list.ftl | 10 - 25 files changed, 465 insertions(+), 320 deletions(-) delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysRoleMenuController.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysUserRoleController.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/entity/SysRoleMenu.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/entity/SysUserRole.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysRoleMenuMapper.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysUserRoleMapper.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/service/ISysRoleMenuService.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/service/ISysUserRoleService.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysRoleMenuServiceImpl.java delete mode 100644 sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysUserRoleServiceImpl.java delete mode 100644 sparchetype/src/main/resources/mapper/system/SysRoleMenuMapper.xml delete mode 100644 sparchetype/src/main/resources/mapper/system/SysUserRoleMapper.xml create mode 100644 sparchetype/src/main/resources/templates/system/role/addOrUpd.ftl create mode 100644 sparchetype/src/main/resources/templates/system/role/list.ftl diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysMenuController.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysMenuController.java index 8bdf2bc..7a49ba7 100644 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysMenuController.java +++ b/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysMenuController.java @@ -1,10 +1,19 @@ package com.songpeng.sparchetype.system.controller.admin; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.songpeng.sparchetype.common.BaseController; +import com.songpeng.sparchetype.common.Result; +import com.songpeng.sparchetype.system.entity.SysMenu; +import com.songpeng.sparchetype.system.entity.SysRole; +import com.songpeng.sparchetype.system.service.ISysMenuService; +import com.songpeng.sparchetype.system.service.ISysRoleService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; /** *

@@ -18,4 +27,34 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("/admin/sys/menu") public class SysMenuController extends BaseController { + @Autowired + private ISysMenuService sysMenuService; + + @GetMapping("/list-ui") + public String listUI(Model model) { + return "system/menu/list"; + } + + @PostMapping("/page") + @ResponseBody + public Result page(Page page) { + IPage result = sysMenuService.page(page); + return Result.success(result); + } + + @GetMapping("/add-or-upd-ui") + public String addOrUpdUI(Model model, SysMenu record) { + if (StringUtils.isNotEmpty(record.getId())) { + SysMenu result = sysMenuService.getById(record.getId()); + model.addAttribute("result", result); + } + return "system/menu/addOrUpd"; + } + + @PostMapping("/add-or-upd") + @ResponseBody + public Result add(SysMenu record) { + sysMenuService.saveOrUpdate(record); + return Result.success(record.getId()); + } } diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysRoleController.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysRoleController.java index 1e6daf1..0f026f5 100644 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysRoleController.java +++ b/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysRoleController.java @@ -1,15 +1,24 @@ package com.songpeng.sparchetype.system.controller.admin; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.songpeng.sparchetype.common.BaseController; +import com.songpeng.sparchetype.common.Result; +import com.songpeng.sparchetype.system.entity.SysRole; +import com.songpeng.sparchetype.system.service.ISysRoleService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; /** *

- * 前端控制器 + * 前端控制器 *

* * @author SongPeng @@ -19,4 +28,34 @@ import com.songpeng.sparchetype.common.BaseController; @RequestMapping("/admin/sys/role") public class SysRoleController extends BaseController { + @Autowired + private ISysRoleService sysRoleService; + + @GetMapping("/list-ui") + public String listUI(Model model) { + return "system/role/list"; + } + + @PostMapping("/page") + @ResponseBody + public Result page(Page page) { + IPage result = sysRoleService.page(page); + return Result.success(result); + } + + @GetMapping("/add-or-upd-ui") + public String addOrUpdUI(Model model, SysRole record) { + if (StringUtils.isNotEmpty(record.getId())) { + SysRole result = sysRoleService.getById(record.getId()); + model.addAttribute("result", result); + } + return "system/role/addOrUpd"; + } + + @PostMapping("/add-or-upd") + @ResponseBody + public Result add(SysRole record) { + sysRoleService.saveOrUpdate(record); + return Result.success(record.getId()); + } } diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysRoleMenuController.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysRoleMenuController.java deleted file mode 100644 index 88d08d7..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysRoleMenuController.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.songpeng.sparchetype.system.controller.admin; - - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; -import com.songpeng.sparchetype.common.BaseController; - -/** - *

- * 前端控制器 - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -@Controller("adminSysRoleMenuController") -@RequestMapping("/admin/sys/role-menu") -public class SysRoleMenuController extends BaseController { - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysUserController.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysUserController.java index c792fef..b0619a7 100644 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysUserController.java +++ b/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysUserController.java @@ -48,8 +48,8 @@ public class SysUserController extends BaseController { @GetMapping("/add-or-upd-ui") public String addOrUpdUI(Model model, SysUser record) { if (StringUtils.isNotEmpty(record.getId())) { - SysUser user = sysUserService.getById(record.getId()); - model.addAttribute("user", user); + SysUser result = sysUserService.getById(record.getId()); + model.addAttribute("result", result); } return "system/user/addOrUpd"; } diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysUserRoleController.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysUserRoleController.java deleted file mode 100644 index 2cfb327..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/controller/admin/SysUserRoleController.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.songpeng.sparchetype.system.controller.admin; - - -import com.songpeng.sparchetype.common.BaseController; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - *

- * 前端控制器 - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -@Controller("adminSysUserRoleController") -@RequestMapping("/admin/sys/user-role") -public class SysUserRoleController extends BaseController { - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/entity/SysRoleMenu.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/entity/SysRoleMenu.java deleted file mode 100644 index 3606e5e..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/entity/SysRoleMenu.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.songpeng.sparchetype.system.entity; - -import com.songpeng.sparchetype.common.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - *

- * - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@Accessors(chain = true) -public class SysRoleMenu extends BaseEntity { - - private static final long serialVersionUID = 1L; - - /** - * 角色id - */ - private String roleId; - - /** - * 菜单id - */ - private String menuId; - - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/entity/SysUserRole.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/entity/SysUserRole.java deleted file mode 100644 index c83997b..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/entity/SysUserRole.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.songpeng.sparchetype.system.entity; - -import com.songpeng.sparchetype.common.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.experimental.Accessors; - -/** - *

- * - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@Accessors(chain = true) -public class SysUserRole extends BaseEntity { - - private static final long serialVersionUID = 1L; - - /** - * 用户id - */ - private String userId; - - /** - * 角色id - */ - private String roleId; - - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysRoleMenuMapper.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysRoleMenuMapper.java deleted file mode 100644 index 12947d8..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysRoleMenuMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.songpeng.sparchetype.system.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.songpeng.sparchetype.system.entity.SysRoleMenu; - -/** - *

- * Mapper 接口 - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -public interface SysRoleMenuMapper extends BaseMapper { - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysUserMapper.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysUserMapper.java index 9f0dd04..72ed067 100644 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysUserMapper.java +++ b/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysUserMapper.java @@ -15,12 +15,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; public interface SysUserMapper extends BaseMapper { /** - * 获取用户角色菜单 + * 获取用户角色 * * @param username * @return * @throws Exception */ - SysUserDto getUserAndRoleAndMenuByUsername(String username) throws Exception; + SysUserDto getUserAndRoleByUsername(String username) throws Exception; } diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysUserRoleMapper.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysUserRoleMapper.java deleted file mode 100644 index 3bee211..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/mapper/SysUserRoleMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.songpeng.sparchetype.system.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.songpeng.sparchetype.system.entity.SysUserRole; - -/** - *

- * Mapper 接口 - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -public interface SysUserRoleMapper extends BaseMapper { - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/ISysRoleMenuService.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/ISysRoleMenuService.java deleted file mode 100644 index 6d4eaf3..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/ISysRoleMenuService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.songpeng.sparchetype.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.songpeng.sparchetype.system.entity.SysRoleMenu; - -/** - *

- * 服务类 - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -public interface ISysRoleMenuService extends IService { - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/ISysUserRoleService.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/ISysUserRoleService.java deleted file mode 100644 index d50d15d..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/ISysUserRoleService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.songpeng.sparchetype.system.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.songpeng.sparchetype.system.entity.SysUserRole; - -/** - *

- * 服务类 - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -public interface ISysUserRoleService extends IService { - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysRoleMenuServiceImpl.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysRoleMenuServiceImpl.java deleted file mode 100644 index a087305..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysRoleMenuServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.songpeng.sparchetype.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.songpeng.sparchetype.system.entity.SysRoleMenu; -import com.songpeng.sparchetype.system.mapper.SysRoleMenuMapper; -import com.songpeng.sparchetype.system.service.ISysRoleMenuService; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -@Service -public class SysRoleMenuServiceImpl extends ServiceImpl implements ISysRoleMenuService { - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysUserRoleServiceImpl.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysUserRoleServiceImpl.java deleted file mode 100644 index a16251f..0000000 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysUserRoleServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.songpeng.sparchetype.system.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.songpeng.sparchetype.system.entity.SysUserRole; -import com.songpeng.sparchetype.system.mapper.SysUserRoleMapper; -import com.songpeng.sparchetype.system.service.ISysUserRoleService; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author SongPeng - * @since 2019-10-16 - */ -@Service -public class SysUserRoleServiceImpl extends ServiceImpl implements ISysUserRoleService { - -} diff --git a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysUserServiceImpl.java b/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysUserServiceImpl.java index f8bd32c..afe0c1d 100644 --- a/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysUserServiceImpl.java +++ b/sparchetype/src/main/java/com/songpeng/sparchetype/system/service/impl/SysUserServiceImpl.java @@ -31,6 +31,7 @@ public class SysUserServiceImpl extends ServiceImpl impl */ @Override public SysUserDto getUserAndRoleAndMenuByUsername(String username) throws Exception { - return sysUserMapper.getUserAndRoleAndMenuByUsername(username); + SysUserDto result = sysUserMapper.getUserAndRoleByUsername(username); + return result; } } diff --git a/sparchetype/src/main/resources/mapper/system/SysRoleMenuMapper.xml b/sparchetype/src/main/resources/mapper/system/SysRoleMenuMapper.xml deleted file mode 100644 index e171933..0000000 --- a/sparchetype/src/main/resources/mapper/system/SysRoleMenuMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sparchetype/src/main/resources/mapper/system/SysUserMapper.xml b/sparchetype/src/main/resources/mapper/system/SysUserMapper.xml index a152676..8dd23c8 100644 --- a/sparchetype/src/main/resources/mapper/system/SysUserMapper.xml +++ b/sparchetype/src/main/resources/mapper/system/SysUserMapper.xml @@ -23,37 +23,22 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + - SELECT t.*, - sr.name, sr.code, sr.descr, sr.status, - sm.name, sm.url, sm.parent_id, sm.grade, sm.sort_num, sm.type, sm.permission, sm.icon, sm.descr - FROM sp_sys_user t, sp_sys_user_role sur, sp_sys_role sr, sp_sys_role_menu srm, sp_sys_menu sm + sr.name, sr.code, sr.descr, sr.status + FROM sp_sys_user t, sp_sys_user_role sur, sp_sys_role sr WHERE t.username = #{username} AND t.id = sur.user_id - AND sur.user_id = sr.id - AND srm.role_id = sr.id - AND sm.id = srm.menu_id + AND sur.role_id = sr.id diff --git a/sparchetype/src/main/resources/mapper/system/SysUserRoleMapper.xml b/sparchetype/src/main/resources/mapper/system/SysUserRoleMapper.xml deleted file mode 100644 index 7b56f8c..0000000 --- a/sparchetype/src/main/resources/mapper/system/SysUserRoleMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/sparchetype/src/main/resources/static/js/admin.js b/sparchetype/src/main/resources/static/js/admin.js index da93e90..9f509b7 100644 --- a/sparchetype/src/main/resources/static/js/admin.js +++ b/sparchetype/src/main/resources/static/js/admin.js @@ -175,14 +175,11 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { tabAdd: function(title, url, id) { //判断当前id的元素是否存在于tab中 var li = $("#WeTabTip li[lay-id=" + id + "]").length; - //console.log(li); if(li > 0) { //tab已经存在,直接切换到指定Tab项 - //console.log(">0"); element.tabChange('wenav_tab', id); //切换到:用户管理 } else { //该id不存在,新增一个Tab项 - //console.log("<0"); element.tabAdd('wenav_tab', { title: title, content: '', @@ -230,7 +227,6 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { var aid = $(this).attr("lay-id"); //获取右键时li的lay-id属性 var popupmenu = $(".rightMenu"); popupmenu.find("li").attr("data-id", aid); - //console.log("popopmenuId:" + popupmenu.find("li").attr("data-id")); l = ($(document).width() - e.clientX) < popupmenu.width() ? (e.clientX - popupmenu.width()) : e.clientX; t = ($(document).height() - e.clientY) < popupmenu.height() ? (e.clientY - popupmenu.height()) : e.clientY; popupmenu.css({ @@ -245,10 +241,8 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { var type = $(this).attr("data-type"); var layId = $(this).attr("data-id") if(type == "current") { - //console.log("close this:" + layId); tab.tabDelete(layId); } else if(type == "all") { - //console.log("closeAll"); var tabtitle = $(".layui-tab-title li"); var ids = new Array(); $.each(tabtitle, function(i) { @@ -256,7 +250,6 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { }) tab.tabDeleteAll(ids); } else if(type == "fresh") { - //console.log("fresh:" + layId); tab.tabChange($(this).attr("data-id")); var othis = $('.layui-tab-title').find('>li[lay-id="' + layId + '"]'), index = othis.parent().children('li').index(othis), @@ -351,7 +344,6 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { //向iframe页的id=house的元素传值 // 参考 https://yq.aliyun.com/ziliao/133150 var body = layer.getChildFrame('body', index); body.contents().find("#js-id").val(id); - console.log(id); }, error: function(layero, index) { alert("aaa"); @@ -370,7 +362,6 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { * tab切换监听不能写字初始化加载$(function())方法内,否则不执行 */ element.on('tab(wenav_tab)', function(data) { - //console.log(this); //当前Tab标题所在的原始DOM元素 setStorageCurMenu(); }); /* @@ -378,7 +369,6 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { */ element.on('tabDelete(wenav_tab)', function(data) { var layId = $(this).parent('li').attr('lay-id'); - //console.log(layId); removeStorageMenu(layId); }); /** @@ -421,7 +411,6 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { text = text.split('ဆ')[0]; var url = $('.layui-tab-content').find('.layui-show').find('.weIframe').attr('src'); var id = $('.layui-tab-title').find('.layui-this').attr('lay-id'); - //console.log(text); curMenu = { title: text, url: url, @@ -475,8 +464,7 @@ layui.define(['jquery', 'form', 'layer', 'element'], function(exports) { $(which).attr('data-bit',i); var frame = $('.weIframe[tab-id='+layId+']'); frame.attr('src', frame.attr('src')); - console.log("reload:"+$(which).attr('data-bit')); - } + } } /** *@todo Frame内部的按钮点击打开其他frame的tab diff --git a/sparchetype/src/main/resources/static/json/menu.json b/sparchetype/src/main/resources/static/json/menu.json index efc41ab..03a80b2 100644 --- a/sparchetype/src/main/resources/static/json/menu.json +++ b/sparchetype/src/main/resources/static/json/menu.json @@ -83,7 +83,7 @@ "id": 15, "name": "角色管理", "icon": "", - "url": "/blog/article/listui" + "url": "/admin/sys/role/list-ui" }, { "id": 16, diff --git a/sparchetype/src/main/resources/templates/system/dict/list.ftl b/sparchetype/src/main/resources/templates/system/dict/list.ftl index 3282578..f12d02b 100644 --- a/sparchetype/src/main/resources/templates/system/dict/list.ftl +++ b/sparchetype/src/main/resources/templates/system/dict/list.ftl @@ -10,16 +10,6 @@ <#include "${request.contextPath}/common/common.ftl"> -
+ + + \ No newline at end of file diff --git a/sparchetype/src/main/resources/templates/system/role/list.ftl b/sparchetype/src/main/resources/templates/system/role/list.ftl new file mode 100644 index 0000000..b871c4d --- /dev/null +++ b/sparchetype/src/main/resources/templates/system/role/list.ftl @@ -0,0 +1,217 @@ + + + + + 系统角色列表 + + + + + <#include "${request.contextPath}/common/common.ftl"> + + +
+
+ +
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/sparchetype/src/main/resources/templates/system/user/addOrUpd.ftl b/sparchetype/src/main/resources/templates/system/user/addOrUpd.ftl index f52c5b1..67708d0 100644 --- a/sparchetype/src/main/resources/templates/system/user/addOrUpd.ftl +++ b/sparchetype/src/main/resources/templates/system/user/addOrUpd.ftl @@ -22,7 +22,7 @@ *姓名
- +
@@ -31,7 +31,7 @@ *用户名
- +
@@ -40,7 +40,7 @@ *密码
- +
@@ -49,7 +49,7 @@ *确认密码
- +
@@ -58,7 +58,7 @@ 部门id
- +
@@ -68,7 +68,7 @@
- +
@@ -77,7 +77,7 @@ *手机号
- +
@@ -86,16 +86,16 @@ 固定电话
- +
- - - + checked> + checked> + checked>
@@ -104,7 +104,7 @@ 出生年月日
- +
@@ -113,7 +113,7 @@ 图片id
- +
@@ -122,7 +122,7 @@ 身份证
- +
@@ -131,7 +131,7 @@ 爱好
- +
@@ -140,7 +140,7 @@ 省份
- +
@@ -149,7 +149,7 @@ 城市
- +
@@ -158,7 +158,7 @@ 区县
- +
@@ -167,7 +167,7 @@ 街道
- +
@@ -176,7 +176,7 @@ 门牌号
- +
@@ -185,15 +185,15 @@ 描述
- +
- - + checked> + checked>
diff --git a/sparchetype/src/main/resources/templates/system/user/list.ftl b/sparchetype/src/main/resources/templates/system/user/list.ftl index 912ba56..c260926 100644 --- a/sparchetype/src/main/resources/templates/system/user/list.ftl +++ b/sparchetype/src/main/resources/templates/system/user/list.ftl @@ -10,16 +10,6 @@ <#include "${request.contextPath}/common/common.ftl"> -