From fac22486524719667a87ffcc20df4ba103a981b1 Mon Sep 17 00:00:00 2001 From: zxm <154040976@qq.com> Date: Thu, 25 Jan 2018 15:47:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=89=8D=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=EF=BC=8C=E7=BB=9F=E4=B8=80ajax=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/len/controller/RoleController.java | 23 +- .../com/len/controller/UserController.java | 51 +-- .../java/com/len/service/SysUserService.java | 3 +- .../len/service/impl/SysUserServiceImpl.java | 42 +- .../resources/ftl/system/role/add-role.ftl | 10 +- .../resources/ftl/system/role/roleList.ftl | 10 +- .../resources/ftl/system/user/add-user.ftl | 14 +- .../resources/ftl/system/user/userList.ftl | 12 +- .../main/resources/plugin/build/css/app.css | 364 +++++++++++++++++- 9 files changed, 466 insertions(+), 63 deletions(-) diff --git a/len-sys/src/main/java/com/len/controller/RoleController.java b/len-sys/src/main/java/com/len/controller/RoleController.java index dd49a6e..3bf4182 100644 --- a/len-sys/src/main/java/com/len/controller/RoleController.java +++ b/len-sys/src/main/java/com/len/controller/RoleController.java @@ -73,10 +73,11 @@ public class RoleController extends BaseController { @Log(desc = "添加角色") @PostMapping(value = "addRole") @ResponseBody - public String addRole(SysRole sysRole,String[] menus){ + public JsonUtil addRole(SysRole sysRole,String[] menus){ if(StringUtils.isEmpty(sysRole.getRoleName())){ - return "角色名称不能为空"; + JsonUtil.error("角色名称不能为空"); } + JsonUtil j=new JsonUtil(); try{ roleService.insertSelective(sysRole); //操作role-menu data @@ -88,10 +89,13 @@ public class RoleController extends BaseController { sysRoleMenu.setMenuId(menu); roleMenuService.insert(sysRoleMenu); } + j.setMsg("保存成功"); }catch (MyException e){ + j.setMsg("保存失败"); + j.setFlag(false); e.printStackTrace(); } - return "保存成功"; + return j; } @GetMapping(value = "updateRole") @@ -136,6 +140,7 @@ public class RoleController extends BaseController { jsonUtil.setFlag(true); jsonUtil.setMsg("修改成功"); } catch (MyException e) { + jsonUtil.setMsg("修改失败"); e.printStackTrace(); } return jsonUtil; @@ -146,22 +151,26 @@ public class RoleController extends BaseController { @PostMapping(value = "del") @ResponseBody @RequiresPermissions("role:del") - public String del(String id) { + public JsonUtil del(String id) { if (StringUtils.isEmpty(id)) { - return "获取数据失败"; + return JsonUtil.error("获取数据失败"); } SysRoleUser sysRoleUser=new SysRoleUser(); sysRoleUser.setRoleId(id); + JsonUtil j=new JsonUtil(); try { int count= roleUserService.selectCountByCondition(sysRoleUser); if(count>0){ - return "已分配给用户,删除失败"; + return JsonUtil.error("已分配给用户,删除失败"); } roleService.deleteByPrimaryKey(id); + j.setMsg("删除成功"); } catch (MyException e) { + j.setMsg("删除失败"); + j.setFlag(false); e.printStackTrace(); } - return "删除成功"; + return j; } } diff --git a/len-sys/src/main/java/com/len/controller/UserController.java b/len-sys/src/main/java/com/len/controller/UserController.java index 75cb7b3..5039cbf 100644 --- a/len-sys/src/main/java/com/len/controller/UserController.java +++ b/len-sys/src/main/java/com/len/controller/UserController.java @@ -84,24 +84,24 @@ public class UserController extends BaseController{ @Log(desc = "添加用户") @PostMapping(value = "addUser") @ResponseBody - public String addUser(SysUser user,String[] role) { + public JsonUtil addUser(SysUser user,String[] role) { if (user == null) { - return "获取数据失败"; + return JsonUtil.error("获取数据失败"); } if (StringUtils.isBlank(user.getUsername())) { - - return "用户名不能为空"; + return JsonUtil.error("用户名不能为空"); } if (StringUtils.isBlank(user.getPassword())) { - return "密码不能为空"; + return JsonUtil.error("密码不能为空"); } if(role==null){ - return "请选择角色"; + return JsonUtil.error("请选择角色"); } int result = userService.checkUser(user.getUsername()); if (result > 0) { - return "用户名已存在"; + return JsonUtil.error("用户名已存在"); } + JsonUtil j=new JsonUtil(); try { userService.insertSelective(user); SysRoleUser sysRoleUser=new SysRoleUser(); @@ -110,10 +110,13 @@ public class UserController extends BaseController{ sysRoleUser.setRoleId(r); roleUserService.insertSelective(sysRoleUser); } + j.setMsg("保存成功"); } catch (MyException e) { + j.setMsg("保存失败"); + j.setFlag(false); e.printStackTrace(); } - return "保存成功"; + return j; } @GetMapping(value = "updateUser") @@ -170,34 +173,8 @@ public class UserController extends BaseController{ @PostMapping(value = "/del") @ResponseBody @RequiresPermissions("user:del") - public String del(String id, boolean flag) { - if (StringUtils.isEmpty(id)) { - return "获取数据失败"; - } - - try { - SysUser sysUser = userService.selectByPrimaryKey(id); - if("admin".equals(sysUser.getUsername())){ - return "超管无法删除"; - } - SysRoleUser roleUser=new SysRoleUser(); - roleUser.setUserId(id); - int count=roleUserService.selectCountByCondition(roleUser); - if(count>0){ - return "账户已经绑定角色,无法删除"; - } - if (flag) { - //逻辑 - sysUser.setDelFlag(Byte.parseByte("1")); - userService.updateByPrimaryKeySelective(sysUser); - } else { - //物理 - userService.delById(id); - } - } catch (MyException e) { - e.printStackTrace(); - } - return "删除成功"; + public JsonUtil del(String id, boolean flag) { + return userService.delById(id,flag); } @GetMapping(value = "goRePass") @@ -213,7 +190,7 @@ public class UserController extends BaseController{ /** * 修改密码 * @param id - * @param password + * @param pass * @param newPwd * @return */ diff --git a/len-sys/src/main/java/com/len/service/SysUserService.java b/len-sys/src/main/java/com/len/service/SysUserService.java index e2ff9bc..4327673 100644 --- a/len-sys/src/main/java/com/len/service/SysUserService.java +++ b/len-sys/src/main/java/com/len/service/SysUserService.java @@ -5,6 +5,7 @@ import com.len.base.BaseService; import com.len.entity.SysRoleUser; import com.len.entity.SysUser; import com.len.util.Checkbox; +import com.len.util.JsonUtil; import java.util.List; /** @@ -40,7 +41,7 @@ public interface SysUserService extends BaseService { * @param id * @return */ - int delById(String id); + JsonUtil delById(String id,boolean flag); int checkUser(String username); diff --git a/len-sys/src/main/java/com/len/service/impl/SysUserServiceImpl.java b/len-sys/src/main/java/com/len/service/impl/SysUserServiceImpl.java index 318970f..9c7d8d1 100644 --- a/len-sys/src/main/java/com/len/service/impl/SysUserServiceImpl.java +++ b/len-sys/src/main/java/com/len/service/impl/SysUserServiceImpl.java @@ -5,15 +5,19 @@ import com.len.base.impl.BaseServiceImpl; import com.len.entity.SysRole; import com.len.entity.SysRoleUser; import com.len.entity.SysUser; +import com.len.exception.MyException; import com.len.mapper.SysRoleUserMapper; import com.len.mapper.SysUserMapper; import com.len.service.RoleService; +import com.len.service.RoleUserService; import com.len.service.SysUserService; import com.len.util.Checkbox; +import com.len.util.JsonUtil; import com.len.util.Md5Util; import java.util.ArrayList; import java.util.Date; import java.util.List; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -30,8 +34,12 @@ public class SysUserServiceImpl extends BaseServiceImpl implemen @Autowired SysRoleUserMapper sysRoleUserMapper; + @Autowired RoleService roleService; + + @Autowired + RoleUserService roleUserService; @Override public BaseMapper getMappser() { return sysUserMapper; @@ -105,8 +113,38 @@ public class SysUserServiceImpl extends BaseServiceImpl implemen } @Override - public int delById(String id) { - return sysUserMapper.delById(id); + public JsonUtil delById(String id,boolean flag) { + if (StringUtils.isEmpty(id)) { + return JsonUtil.error("获取数据失败"); + } + JsonUtil j=null; + try { + SysUser sysUser = selectByPrimaryKey(id); + if("admin".equals(sysUser.getUsername())){ + return JsonUtil.error("超管无法删除"); + } + SysRoleUser roleUser=new SysRoleUser(); + roleUser.setUserId(id); + int count=roleUserService.selectCountByCondition(roleUser); + if(count>0){ + return JsonUtil.error("账户已经绑定角色,无法删除"); + } + j=new JsonUtil(); + if (flag) { + //逻辑 + sysUser.setDelFlag(Byte.parseByte("1")); + updateByPrimaryKeySelective(sysUser); + } else { + //物理 + sysUserMapper.delById(id); + } + j.setMsg("删除成功"); + } catch (MyException e) { + j.setMsg("删除失败"); + j.setFlag(false); + e.printStackTrace(); + } + return j; } diff --git a/len-sys/src/main/resources/ftl/system/role/add-role.ftl b/len-sys/src/main/resources/ftl/system/role/add-role.ftl index ccca993..b68d3cd 100644 --- a/len-sys/src/main/resources/ftl/system/role/add-role.ftl +++ b/len-sys/src/main/resources/ftl/system/role/add-role.ftl @@ -133,12 +133,16 @@ To change this template use File | Settings | File Templates.--> type:'post', data:data.field, async:false, traditional: true, - success:function(msg){ - console.info('msg:'+msg); + success:function(d){ + if(d.flag){ var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); window.parent.layui.table.reload('roleList'); - window.top.layer.msg(msg,{icon:6,offset: 'rb',area:['120px','80px'],anim:2}); + window.top.layer.msg(d.msg,{icon:6,offset: 'rb',area:['120px','80px'],anim:2}); + }else{ + layer.msg(d.msg,{icon:5,offset: 'rb',area:['120px','80px'],anim:2}); + } + },error:function(){ layer.alert("请求失败", {icon: 6},function () { var index = parent.layer.getFrameIndex(window.name); diff --git a/len-sys/src/main/resources/ftl/system/role/roleList.ftl b/len-sys/src/main/resources/ftl/system/role/roleList.ftl index 2fa64ff..8622fbc 100644 --- a/len-sys/src/main/resources/ftl/system/role/roleList.ftl +++ b/len-sys/src/main/resources/ftl/system/role/roleList.ftl @@ -223,9 +223,13 @@ url: "del", type: "post", data: {id: id}, - success: function (msg) { - layer.msg(msg,{icon:6,offset: 'rb',area:['120px','80px'],anim:2}); - layui.table.reload('roleList'); + success: function (d) { + if(d.msg){ + layer.msg(d.msg,{icon:6,offset: 'rb',area:['120px','80px'],anim:2}); + layui.table.reload('roleList'); + }else{ + layer.msg(d.msg,{icon:5,offset: 'rb',area:['120px','80px'],anim:2}); + } } }); } diff --git a/len-sys/src/main/resources/ftl/system/user/add-user.ftl b/len-sys/src/main/resources/ftl/system/user/add-user.ftl index 8edc807..12f6a81 100644 --- a/len-sys/src/main/resources/ftl/system/user/add-user.ftl +++ b/len-sys/src/main/resources/ftl/system/user/add-user.ftl @@ -245,11 +245,15 @@ To change this template use File | Settings | File Templates.--> type:'post', data:data.field, async:false,traditional: true, - success:function(msg){ - var index = parent.layer.getFrameIndex(window.name); - parent.layer.close(index); - window.parent.layui.table.reload('userList'); - window.top.layer.msg(msg,{icon:6,offset: 'rb',area:['120px','80px'],anim:2}); + success:function(d){ + if(d.flag){ + var index = parent.layer.getFrameIndex(window.name); + parent.layer.close(index); + window.parent.layui.table.reload('userList'); + window.top.layer.msg(d.msg,{icon:6,offset: 'rb',area:['120px','80px'],anim:2}); + }else{ + layer.msg(d.msg,{icon:5,offset: 'rb',area:['120px','80px'],anim:2}); + } },error:function(){ var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); diff --git a/len-sys/src/main/resources/ftl/system/user/userList.ftl b/len-sys/src/main/resources/ftl/system/user/userList.ftl index 61a5ae1..e8a4401 100644 --- a/len-sys/src/main/resources/ftl/system/user/userList.ftl +++ b/len-sys/src/main/resources/ftl/system/user/userList.ftl @@ -244,9 +244,13 @@ url:"del", type:"post", data:{id:id,flag:flag},async:false, - success:function(msg){ - window.top.layer.msg(msg,{icon:6,offset: 'rb',area:['120px','80px'],anim:2}); - layui.table.reload('userList'); + success:function(d){ + if(d.flag){ + window.top.layer.msg(d.msg,{icon:6,offset: 'rb',area:['120px','80px'],anim:2}); + layui.table.reload('userList'); + }else{ + window.top.layer.msg(d.msg,{icon:5,offset: 'rb',area:['120px','80px'],anim:2}); + } },error:function(){ alert('error'); } @@ -258,7 +262,7 @@ title = false; }; if (url == null || url == '') { - url = "404.html"; + url = "error/404"; }; if (w == null || w == '') { w = ($(window).width() * 0.9); diff --git a/len-sys/src/main/resources/plugin/build/css/app.css b/len-sys/src/main/resources/plugin/build/css/app.css index d169285..2c7fb89 100644 --- a/len-sys/src/main/resources/plugin/build/css/app.css +++ b/len-sys/src/main/resources/plugin/build/css/app.css @@ -1 +1,363 @@ -.kit-sided .layui-side-scroll .layui-nav-item a,.layui-layout-admin .layui-header .layui-layout-right{padding:0}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-button:vertical{display:none}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:#e2e2e2}::-webkit-scrollbar-thumb{border-radius:0;background-color:rgba(0,0,0,.3)}::-webkit-scrollbar-thumb:vertical:hover{background-color:rgba(0,0,0,.35)}::-webkit-scrollbar-thumb:vertical:active{background-color:rgba(0,0,0,.38)}a,button{position:relative;border:none;outline:0;cursor:pointer;overflow:hidden;user-select:none}.ripple{position:absolute;background:rgba(0,0,0,.15);border-radius:100%;transform:scale(0);pointer-events:none}.kit-table,.kit-table .kit-table-header{position:relative;box-shadow:0 1px 7px 0 #ccc}.kit-nav .layui-this,.layui-layout-left .layui-nav-item:hover{background-color:#393D49!important}.ripple.show{animation:ripple .75s ease-out}@keyframes ripple{to{transform:scale(2);opacity:0}}.kit-layout-admin .kit-logo-mobile{display:none}.kit-nav .layui-nav-item{line-height:50px}.kit-nav .layui-nav-item .layui-nav-more{top:22px}.kit-nav .layui-nav-item .layui-nav-mored{top:16px}.kit-nav .layui-nav-item .layui-nav-child{top:55px}.kit-nav *{font-size:13px}.kit-nav .layui-nav-bar{height:0}.kit-nav .layui-this:after{content:none}.kit-layout-admin .layui-footer{height:35px;line-height:35px}.kit-layout-admin .layui-body{bottom:35px;top:50px}.kit-layout-admin .layui-header{height:50px}.kit-layout-admin .layui-logo{line-height:50px}.kit-layout-admin .kit-side{top:50px}.kit-layout-admin .kit-sided{width:50px}.kit-side .layui-side-scroll,.kit-side .layui-side-scroll .layui-nav-tree{width:auto}.kit-side .layui-side-scroll .kit-side-fold{height:35px;background-color:#4A5064;color:#aeb9c2;line-height:35px;text-align:center;cursor:pointer}.kit-sided .layui-side-scroll .layui-nav-item{text-align:center}.kit-side .layui-nav-tree .layui-nav-child a{padding-left:30px}.kit-sided .layui-nav-tree .layui-nav-child a{padding-left:0}.kit-sided .layui-side-scroll a span{display:none}.kit-layout-admin .kit-body-folded,.kit-layout-admin .kit-footer-folded{left:50px}.kit-table .kit-table-header{height:50px}.kit-table .kit-table-header .kit-search-btns{padding:10px;position:absolute}.kit-table .kit-table-header .kit-search-inputs{position:absolute;right:70px;top:0;padding:10px 25px 10px 10px}.kit-table .kit-table-header .kit-search-inputs .kit-search-keyword{margin-right:10px;position:relative}.kit-table .kit-table-header .kit-search-inputs .kit-search-more{cursor:pointer;color:#009688;position:absolute;top:15px;right:-50px}.kit-table .kit-table-header .kit-search-inputs .kit-search-keyword input{height:30px;line-height:30px;width:200px;padding-right:32px}.kit-table .kit-table-header .kit-search-inputs .kit-search-keyword button{position:absolute;right:0;top:0;width:30px;height:30px;border:0;cursor:pointer;background-color:#009688;color:#fff}.kit-table .kit-table-header .kit-search-btns .layui-btn{padding:0 15px}.kit-table .kit-search-mored{height:auto;top:51px;background-color:#fff;z-index:5;box-shadow:-4px 4px 7px -3px #ccc;position:absolute;margin-bottom:10px;display:none;right:0;width:50%}.kit-table .kit-search-mored .kit-search-body{padding:10px 10px 45px}.kit-table .kit-search-mored .kit-search-footer{height:50px;bottom:0;left:0;position:absolute;width:100%;border-top:1px solid #e2e2e2;text-align:right}.kit-tab,.kit-table .kit-table-body{position:relative}.kit-table .kit-search-mored .kit-search-footer .kit-btn{margin:10px 5px;padding:0 15px}.kit-table .kit-search-mored .kit-search-footer .kit-btn:last-child{margin-right:15px}.kit-tab,.kit-table .kit-table-body .layui-table-view{margin:0}.kit-tab{border-bottom:0;box-shadow:none}.kit-tab .kit-tab-tool,.kit-tab .kit-tab-tool-body .kit-line{border-bottom:1px solid #e2e2e2}.kit-tab .kit-tab-tool{position:absolute;width:60px;height:40px;top:0;right:0;border-left:1px solid #e2e2e2;line-height:40px;text-align:center;cursor:pointer;border-right:1px solid #e2e2e2}.kit-tab .kit-tab-tool:hover{background-color:#f3f3f3}.kit-tab .kit-tab-tool-body{position:absolute;top:40px;right:10px;width:150px;border:1px solid #e2e2e2;display:none;background-color:#fff;z-index:999}.kit-tab .kit-tab-tool-body ul{text-align:center;padding:8px 0}.kit-tab .kit-tab-tool-body ul li.kit-item{line-height:35px;cursor:pointer;color:#393D49}.kit-tab .kit-tab-tool-body ul li.kit-item:hover{background-color:#f3f3f3}.kit-tab .layui-tab-title{width:calc(100% - 71px);padding-right:10px;position:absolute;z-index:2}.kit-tab .layui-tab-content{padding:0;position:relative;top:41px;overflow-y:auto}.kit-tab .layui-tab-content iframe{width:100%;border:0}@media (max-width:992px){.kit-layout-admin .layui-body,.kit-layout-admin .layui-footer,.kit-layout-admin .layui-layout-left{left:50px}.kit-layout-admin .kit-side{width:50px}.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item,.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item dl dd{text-align:center}.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item a,.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item dl dd a{padding:0}.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item a span,.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item dl dd a span,.kit-layout-admin .layui-logo,.kit-side .layui-side-scroll .kit-side-fold{display:none}.kit-layout-admin .kit-logo-mobile{display:block;width:50px}.kit-table .kit-search-mored{width:100%;box-shadow:0 4px 7px -3px #ccc}.kit-side .layui-nav-tree .layui-nav-child a,.kit-sided .layui-nav-tree .layui-nav-child a{padding-left:0}} \ No newline at end of file +.kit-sided .layui-side-scroll .layui-nav-item a,.layui-layout-admin .layui-header .layui-layout-right { + padding: 0 +} + +::-webkit-scrollbar { + width: 10px; + height: 10px +} + +::-webkit-scrollbar-button:vertical { + display: none +} + +::-webkit-scrollbar-corner,::-webkit-scrollbar-track { + background-color: #e2e2e2 +} + +::-webkit-scrollbar-thumb { + border-radius: 0; + background-color: rgba(0,0,0,.3) +} + +::-webkit-scrollbar-thumb:vertical:hover { + background-color: rgba(0,0,0,.35) +} + +::-webkit-scrollbar-thumb:vertical:active { + background-color: rgba(0,0,0,.38) +} + +a,button { + position: relative; + border: none; + outline: 0; + cursor: pointer; + overflow: hidden; + user-select: none +} + +.ripple { + position: absolute; + background: rgba(0,0,0,.15); + border-radius: 100%; + transform: scale(0); + pointer-events: none +} + +.kit-table,.kit-table .kit-table-header { + position: relative; + box-shadow: 0 1px 7px 0 #ccc +} + +.kit-nav .layui-this,.layui-layout-left .layui-nav-item:hover { + background-color: #393D49!important +} + +.ripple.show { + animation: ripple .75s ease-out +} + +@keyframes ripple { + to { + transform: scale(2); + opacity: 0 + } +} + +.kit-layout-admin .kit-logo-mobile { + display: none +} + +.kit-nav .layui-nav-item { + line-height: 50px +} + +.kit-nav .layui-nav-item .layui-nav-more { + top: 22px +} + +.kit-nav .layui-nav-item .layui-nav-mored { + top: 16px +} + +.kit-nav .layui-nav-item .layui-nav-child { + top: 55px +} + +.kit-nav * { + font-size: 13px +} + +.kit-nav .layui-nav-bar { + height: 0 +} + +.kit-nav .layui-this:after { + content: none +} + +.kit-layout-admin .layui-footer { + height: 35px; + line-height: 35px +} + +.kit-layout-admin .layui-body { + bottom: 35px; + top: 50px +} + +.kit-layout-admin .layui-header { + height: 50px +} + +.kit-layout-admin .layui-logo { + line-height: 50px +} + +.kit-layout-admin .kit-side { + top: 50px +} + +.kit-layout-admin .kit-sided { + width: 50px +} + +.kit-side .layui-side-scroll,.kit-side .layui-side-scroll .layui-nav-tree { + width: auto +} + +.kit-side .layui-side-scroll .kit-side-fold { + height: 35px; + background-color: #4A5064; + color: #aeb9c2; + line-height: 35px; + text-align: center; + cursor: pointer +} + +.kit-sided .layui-side-scroll .layui-nav-item { + text-align: center +} + +.kit-side .layui-nav-tree .layui-nav-child a { + padding-left: 30px +} + +.kit-sided .layui-nav-tree .layui-nav-child a { + padding-left: 0 +} + +.kit-sided .layui-side-scroll a span { + display: none +} + +.kit-layout-admin .kit-body-folded,.kit-layout-admin .kit-footer-folded { + left: 50px +} + +.kit-table .kit-table-header { + height: 50px +} + +.kit-table .kit-table-header .kit-search-btns { + padding: 10px; + position: absolute +} + +.kit-table .kit-table-header .kit-search-inputs { + position: absolute; + right: 70px; + top: 0; + padding: 10px 25px 10px 10px +} + +.kit-table .kit-table-header .kit-search-inputs .kit-search-keyword { + margin-right: 10px; + position: relative +} + +.kit-table .kit-table-header .kit-search-inputs .kit-search-more { + cursor: pointer; + color: #009688; + position: absolute; + top: 15px; + right: -50px +} + +.kit-table .kit-table-header .kit-search-inputs .kit-search-keyword input { + height: 30px; + line-height: 30px; + width: 200px; + padding-right: 32px +} + +.kit-table .kit-table-header .kit-search-inputs .kit-search-keyword button { + position: absolute; + right: 0; + top: 0; + width: 30px; + height: 30px; + border: 0; + cursor: pointer; + background-color: #009688; + color: #fff +} + +.kit-table .kit-table-header .kit-search-btns .layui-btn { + padding: 0 15px +} + +.kit-table .kit-search-mored { + height: auto; + top: 51px; + background-color: #fff; + z-index: 5; + box-shadow: -4px 4px 7px -3px #ccc; + position: absolute; + margin-bottom: 10px; + display: none; + right: 0; + width: 50% +} + +.kit-table .kit-search-mored .kit-search-body { + padding: 10px 10px 45px +} + +.kit-table .kit-search-mored .kit-search-footer { + height: 50px; + bottom: 0; + left: 0; + position: absolute; + width: 100%; + border-top: 1px solid #e2e2e2; + text-align: right +} + +.kit-tab,.kit-table .kit-table-body { + position: relative +} + +.kit-table .kit-search-mored .kit-search-footer .kit-btn { + margin: 10px 5px; + padding: 0 15px +} + +.kit-table .kit-search-mored .kit-search-footer .kit-btn:last-child { + margin-right: 15px +} + +.kit-tab,.kit-table .kit-table-body .layui-table-view { + margin: 0 +} + +.kit-tab { + border-bottom: 0; + box-shadow: none +} + +.kit-tab .kit-tab-tool,.kit-tab .kit-tab-tool-body .kit-line { + border-bottom: 1px solid #e2e2e2 +} + +.kit-tab .kit-tab-tool { + position: absolute; + width: 60px; + height: 40px; + top: 0; + right: 0; + border-left: 1px solid #e2e2e2; + line-height: 40px; + text-align: center; + cursor: pointer; + border-right: 1px solid #e2e2e2 +} +/*.kit-tab-tool{ + background-color: #009688; + color: white; +}*/ +.kit-tab .kit-tab-tool:hover { + background-color: #f3f3f3 +} + +.kit-tab .kit-tab-tool-body { + position: absolute; + top: 40px; + right: 10px; + width: 150px; + border: 1px solid #e2e2e2; + display: none; + background-color: #fff; + z-index: 999 +} + +.kit-tab .kit-tab-tool-body ul { + text-align: center; + padding: 8px 0 +} + +.kit-tab .kit-tab-tool-body ul li.kit-item { + line-height: 35px; + cursor: pointer; + color: #393D49 +} + +.kit-tab .kit-tab-tool-body ul li.kit-item:hover { + background-color: #f3f3f3 +} + +.kit-tab .layui-tab-title { + width: calc(100% - 71px); + padding-right: 10px; + position: absolute; + z-index: 2 +} + +.kit-tab .layui-tab-content { + padding: 0; + position: relative; + top: 41px; + overflow-y: auto +} + +.kit-tab .layui-tab-content iframe { + width: 100%; + border: 0 +} + +@media (max-width:992px) { + .kit-layout-admin .layui-body,.kit-layout-admin .layui-footer,.kit-layout-admin .layui-layout-left { + left: 50px + } + + .kit-layout-admin .kit-side { + width: 50px + } + + .kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item,.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item dl dd { + text-align: center + } + + .kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item a,.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item dl dd a { + padding: 0 + } + + .kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item a span,.kit-layout-admin .kit-side .layui-side-scroll .layui-nav li.layui-nav-item dl dd a span,.kit-layout-admin .layui-logo,.kit-side .layui-side-scroll .kit-side-fold { + display: none + } + + .kit-layout-admin .kit-logo-mobile { + display: block; + width: 50px + } + + .kit-table .kit-search-mored { + width: 100%; + box-shadow: 0 4px 7px -3px #ccc + } + + .kit-side .layui-nav-tree .layui-nav-child a,.kit-sided .layui-nav-tree .layui-nav-child a { + padding-left: 0 + } +} \ No newline at end of file