From 49344270551b1601c21b5142bd9ea1b4b08761ba Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 11 Oct 2024 15:43:59 +0800 Subject: [PATCH 1/5] =?UTF-8?q?[fix]=20=E9=80=9A=E7=94=A8=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=20=E5=9C=A8=E9=80=9A=E7=94=A8=E6=A8=A1=E5=9D=97domain?= =?UTF-8?q?=E7=B1=BB=E4=B8=AD=E5=88=9B=E5=BB=BA=E5=AF=BC=E5=87=BA=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=9D=83=E9=99=90Vo=E7=B1=BB=EF=BC=8C=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E8=8F=9C=E5=8D=95=E3=80=81=E8=A7=92=E8=89=B2=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E5=92=8CZTree=E8=8A=82=E7=82=B9=E6=A0=91=E7=B1=BB?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=20=E6=A0=B9=E6=8D=AE=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E8=8F=9C=E5=8D=95=E5=88=97=E8=A1=A8=E6=A0=91?= =?UTF-8?q?=E7=9A=84=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=E7=9A=84=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=96=B9=E6=B3=95=E5=88=9B=E5=BB=BA=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E8=A7=92=E8=89=B2ID=E6=9F=A5=E8=AF=A2=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=E6=96=B9=E6=B3=95=EF=BC=9A=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86=E5=91=98=E5=92=8C=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=94=A8=E6=88=B7=EF=BC=9B=E8=B6=85=E7=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E6=8B=A5=E6=9C=89=E5=85=A8=E9=83=A8=E6=9D=83?= =?UTF-8?q?=E9=99=90=EF=BC=8C=E5=85=B6=E4=BB=96=E7=94=A8=E6=88=B7=E5=85=B3?= =?UTF-8?q?=E8=81=94=E8=8F=9C=E5=8D=95=E8=A1=A8=E3=80=81=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=A1=A8=E3=80=81=E8=A7=92=E8=89=B2=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=8B=A5=E6=9C=89=E7=9A=84=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/entity/vo/ExportRoleMenuVo.java | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/vo/ExportRoleMenuVo.java diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/vo/ExportRoleMenuVo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/vo/ExportRoleMenuVo.java new file mode 100644 index 00000000..e4d5e0d3 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/vo/ExportRoleMenuVo.java @@ -0,0 +1,67 @@ +package com.ruoyi.common.core.domain.entity.vo; + + +import com.ruoyi.common.annotation.Excel; + +//导出角色权限Vo类 + +public class ExportRoleMenuVo { + + /** 角色id */ + private Long roleId; + + /** 角色姓名 */ + @Excel(name = "角色姓名") + private String roleName; + + /** 角色权限字符串 */ + @Excel(name = "角色权限字符") + private String roleKey; + + /** 角色权限(对应节点标题) */ + @Excel(name = "角色权限") + private String title; + + public Long getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public String getRoleName() { + return roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + public String getRoleKey() { + return roleKey; + } + + public void setRoleKey(String roleKey) { + this.roleKey = roleKey; + } + + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + @Override + public String toString() { + return "ExportRoleMenuVo{" + + "roleId=" + roleId + + ", roleName='" + roleName + '\'' + + ", roleKey='" + roleKey + '\'' + + ", title='" + title + '\'' + + '}'; + } +} From 42aa2dfb34837b8c5c1c6e5099a611d4bcabad92 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 11 Oct 2024 15:50:23 +0800 Subject: [PATCH 2/5] =?UTF-8?q?[feat]=20=E7=B3=BB=E7=BB=9F=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=20=E7=B3=BB=E7=BB=9F=E8=A7=92=E8=89=B2=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E9=A1=B5=E9=9D=A2=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E8=A7=92=E8=89=B2=E6=9D=83=E9=99=90=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=92=8C=E5=AF=BC=E5=87=BA=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E7=9A=84js=E6=96=B9=E6=B3=95=20?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=A7=92=E8=89=B2=E5=90=8E=E7=AB=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=AF=BC=E5=87=BA=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E8=A7=92=E8=89=B2=E6=9D=83=E9=99=90=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E8=AF=BE=E9=80=89=E6=8B=A9=E7=9A=84=E6=95=B0=E6=8D=AE=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E6=8E=A5=E5=8F=A3=EF=BC=9B=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=A7=92=E8=89=B2mapper=EF=BC=8Cservice=E5=B1=82=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=A0=B9=E6=8D=AE=E8=A7=92=E8=89=B2id=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=9F=A5=E8=AF=A2=E8=A7=92=E8=89=B2=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysRoleController.java | 106 +++++++++++++++++- .../resources/templates/system/role/role.html | 59 ++++++++++ .../ruoyi/system/mapper/SysRoleMapper.java | 8 ++ .../ruoyi/system/service/ISysRoleService.java | 10 ++ .../service/impl/SysRoleServiceImpl.java | 12 ++ .../resources/mapper/system/SysRoleMapper.xml | 12 +- 6 files changed, 200 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java index 57d9aeac..514ca1be 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java @@ -1,16 +1,20 @@ package com.ruoyi.web.controller.system; +import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; + +import com.alibaba.excel.EasyExcel; +import com.ruoyi.common.core.domain.Ztree; +import com.ruoyi.common.core.domain.entity.vo.ExportRoleMenuVo; +import com.ruoyi.system.domain.SysSalesShippingInform; +import com.ruoyi.system.service.ISysMenuService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.controller.BaseController; @@ -43,6 +47,9 @@ public class SysRoleController extends BaseController @Autowired private ISysUserService userService; + @Autowired + private ISysMenuService menuService; + @RequiresPermissions("system:role:view") @GetMapping() public String role() @@ -295,4 +302,93 @@ public class SysRoleController extends BaseController { return toAjax(roleService.insertAuthUsers(roleId, userIds)); } + + /** + * 导出全部角色权限 + */ + @RequiresPermissions("system:role:export") + @Log(title = "角色管理", businessType = BusinessType.EXPORT) + @PostMapping("/exportAllRoleMenu") + @ResponseBody + public AjaxResult exportAllRoleMenu(SysRole role) { + try { + // 获取所有角色列表 + List sysRoles = roleService.selectRoleList(role); + + // 获取当前用户的ID + Long userId = ShiroUtils.getUserId(); + + // 初始化导出的角色菜单VO列表 + List exportRoleMenuVos = new ArrayList<>(); + + // 处理每个角色及其关联的已选菜单 + sysRoles.forEach(sysRole -> { + List ztrees = menuService.roleMenuTreeData(sysRole, userId); + List checkedMenus = ztrees.stream() + .filter(Ztree::isChecked) //只需要勾选的菜单权限 + .collect(Collectors.toList()); + + // 缓存角色信息以减少数据库查询次数 + SysRole tempSysRole = roleService.selectRoleById(sysRole.getRoleId()); + + checkedMenus.forEach(data -> { + ExportRoleMenuVo exportRoleMenuVo = new ExportRoleMenuVo(); + exportRoleMenuVo.setRoleName(tempSysRole.getRoleName()); + exportRoleMenuVo.setRoleKey(tempSysRole.getRoleKey()); + exportRoleMenuVo.setTitle(data.getTitle()); + exportRoleMenuVos.add(exportRoleMenuVo); + }); + }); + + ExcelUtil util = new ExcelUtil(ExportRoleMenuVo.class); + return util.exportExcel(exportRoleMenuVos, "角色菜单数据"); + } catch (Exception e) { + return AjaxResult.error("导出角色菜单数据失败"); + } + } + + + /** + * 导出选择的角色权限 + */ + @RequiresPermissions("system:role:export") + @Log(title = "角色管理", businessType = BusinessType.EXPORT) + @PostMapping("/exportRoleMenu") + @ResponseBody + public AjaxResult exportRoleMenu(@RequestBody String[] roleIds) { + try { + // 获取所有角色列表 + List sysRoles = roleService.selectRoleListByRoleIds(roleIds); + + // 获取当前用户的ID + Long userId = ShiroUtils.getUserId(); + + // 初始化导出的角色菜单VO列表 + List exportRoleMenuVos = new ArrayList<>(); + + // 处理每个角色及其关联的已选菜单 + sysRoles.forEach(sysRole -> { + List ztrees = menuService.roleMenuTreeData(sysRole, userId); + List checkedMenus = ztrees.stream() + .filter(Ztree::isChecked) //只需要勾选的菜单权限 + .collect(Collectors.toList()); + + // 缓存角色信息以减少数据库查询次数 + SysRole tempSysRole = roleService.selectRoleById(sysRole.getRoleId()); + + checkedMenus.forEach(data -> { + ExportRoleMenuVo exportRoleMenuVo = new ExportRoleMenuVo(); + exportRoleMenuVo.setRoleName(tempSysRole.getRoleName()); + exportRoleMenuVo.setRoleKey(tempSysRole.getRoleKey()); + exportRoleMenuVo.setTitle(data.getTitle()); + exportRoleMenuVos.add(exportRoleMenuVo); + }); + }); + ExcelUtil util = new ExcelUtil(ExportRoleMenuVo.class); + return util.exportExcel(exportRoleMenuVos, "角色菜单数据"); + } catch (Exception e) { + return AjaxResult.error("导出角色菜单数据失败"); + } + } + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/system/role/role.html b/ruoyi-admin/src/main/resources/templates/system/role/role.html index b3836611..7cbc4880 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/role.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/role.html @@ -50,6 +50,10 @@ 导出 + + 导出角色权限 + +
@@ -160,6 +164,61 @@ $.operate.post(prefix + "/changeStatus", { "roleId": roleId, "status": 0 }); }) } + + + //导出角色权限 + function exportRoleMenu(formId) { + // $.table.set(); + var roleIdData = []; + var selections = $("#bootstrap-table").bootstrapTable("getSelections"); + if(selections.length === 0){ + $.modal.confirm("确定导出所有角色权限吗?", function() { + var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; + var params = $("#bootstrap-table").bootstrapTable('getOptions'); + var dataParam = $("#" + currentId).serializeArray(); + dataParam.push({ "name": "orderByColumn", "value": params.sortName }); + dataParam.push({ "name": "isAsc", "value": params.sortOrder }); + $.modal.loading("正在导出数据,请稍后..."); + $.post(prefix + '/exportAllRoleMenu', dataParam, function(result) { + if (result.code == web_status.SUCCESS) { + window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; + } else if (result.code == web_status.WARNING) { + $.modal.alertWarning(result.msg) + } else { + $.modal.alertError(result.msg); + } + $.modal.closeLoading(); + }); + }); + }else { + $.modal.confirm("确定导出选中的所有角色权限吗?", function () { + //·拼接单号 + for(let i=0;i \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java index 78a3ec72..0b375e65 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java @@ -81,4 +81,12 @@ public interface SysRoleMapper * @return 角色信息 */ public SysRole checkRoleKeyUnique(String roleKey); + + /** + * 批量查询角色数据 + * + * @param roleIds 角色id集合 + * @return 角色数据集合信息 + */ + List selectRoleListByRoleIds(String[] roleIds); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java index af6921ef..02763fbb 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java @@ -20,6 +20,16 @@ public interface ISysRoleService */ public List selectRoleList(SysRole role); + + /** + * 根据条件分页查询角色数据 + * + * @param roleIds 角色id集合 + * @return 角色数据集合信息 + */ + public List selectRoleListByRoleIds(String[] roleIds); + + /** * 根据用户ID查询角色 * diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java index 3543f45a..ed4ee6d7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java @@ -57,6 +57,18 @@ public class SysRoleServiceImpl implements ISysRoleService return roleMapper.selectRoleList(role); } + /** + * 批量查询角色数据 + * + * @param roleIds 角色id集合 + * @return 角色数据集合信息 + */ + @Override + public List selectRoleListByRoleIds(String[] roleIds) { + List list = roleMapper.selectRoleListByRoleIds(roleIds); + return list; + } + /** * 根据用户ID查询权限 * diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml index e2972c66..588f2364 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml @@ -77,8 +77,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where r.role_key=#{roleKey} limit 1 - - + + + + update sys_role set del_flag = '2' where role_id = #{roleId} From a1534e634589a5b7722952bebd51b18d5aaca06b Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 11 Oct 2024 15:51:55 +0800 Subject: [PATCH 3/5] =?UTF-8?q?[fix]=20=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=A8=A1=E5=9D=97=20=E4=BF=AE=E5=A4=8D=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90FileUtils.writeStringToFile=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=89=BE=E4=B8=8D=E5=88=B0=E5=AF=BC=E8=87=B4=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/generator/service/impl/GenTableServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java index 7274cf06..6c4140d4 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java @@ -10,6 +10,8 @@ import java.util.Map; import java.util.stream.Collectors; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; + +import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; @@ -27,7 +29,6 @@ import com.ruoyi.common.core.text.CharsetKit; import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.generator.domain.GenTable; import com.ruoyi.generator.domain.GenTableColumn; import com.ruoyi.generator.mapper.GenTableColumnMapper; From c59a67b62dcd37560815e433f38241578d147c9c Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Fri, 11 Oct 2024 16:25:16 +0800 Subject: [PATCH 4/5] =?UTF-8?q?[fix]=20=E9=94=80=E5=94=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7=E7=9A=84=E6=93=8D=E4=BD=9C=E6=A0=8F=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=8E=92=E5=88=97=EF=BC=8C=E4=BD=BF=E7=94=A8=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E9=87=87=E7=94=A8=E4=B8=8B=E6=8B=89=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=B1=95=E7=A4=BA=E6=93=8D=E4=BD=9C=E6=A0=8F=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/system/customerQuote/customerQuote.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html index 7c309ba6..86c81adc 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html @@ -311,7 +311,8 @@ } // 详情 actions.push(' 详情 '); - return actions.join(''); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }], rowStyle: function (row, index) { From 99ecb3ba3374c882c83faea85b67ca3362d01ee5 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Sat, 12 Oct 2024 08:37:54 +0800 Subject: [PATCH 5/5] =?UTF-8?q?[fix]=20=E5=89=8D=E7=AB=AF=E9=80=9A?= =?UTF-8?q?=E7=94=A8=E6=A8=A1=E5=9D=97=20bootstrap-table=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=BC=95=E5=85=A5colResizable-1.6.min.js=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E4=BA=8E=E5=8F=AF=E4=BB=A5=E6=8B=89=E5=8A=A8?= =?UTF-8?q?table=E5=AE=BD=E5=BA=A6=20include.html=20=E9=80=9A=E7=94=A8CSS?= =?UTF-8?q?=E5=92=8Cjs=E6=A8=A1=E5=9D=97=20=E8=AE=BE=E7=BD=AEbootstrap-tab?= =?UTF-8?q?le-colResizable-js=E9=80=9A=E7=94=A8=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E4=BE=9B=E5=85=B6=E4=BB=96=E6=A8=A1=E5=9D=97=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extensions/colresizable/colResizable-1.6.min.js | 3 +++ ruoyi-admin/src/main/resources/templates/include.html | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/colresizable/colResizable-1.6.min.js diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/colresizable/colResizable-1.6.min.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/colresizable/colResizable-1.6.min.js new file mode 100644 index 00000000..3487db85 --- /dev/null +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/colresizable/colResizable-1.6.min.js @@ -0,0 +1,3 @@ +// colResizable 1.6 - a jQuery plugin by Alvaro Prieto Lauroba http://www.bacubacu.com/colresizable/ + +!function(t){var e,i=t(document),r=t("head"),o=null,s={},d=0,n="id",a="px",l="JColResizer",c="JCLRFlex",f=parseInt,h=Math,p=navigator.userAgent.indexOf("Trident/4.0")>0;try{e=sessionStorage}catch(g){}r.append("");var u=function(e,i){var o=t(e);if(o.opt=i,o.mode=i.resizeMode,o.dc=o.opt.disabledColumns,o.opt.disable)return w(o);var a=o.id=o.attr(n)||l+d++;o.p=o.opt.postbackSafe,!o.is("table")||s[a]&&!o.opt.partialRefresh||("e-resize"!==o.opt.hoverCursor&&r.append(""),o.addClass(l).attr(n,a).before('
'),o.g=[],o.c=[],o.w=o.width(),o.gc=o.prev(),o.f=o.opt.fixed,i.marginLeft&&o.gc.css("marginLeft",i.marginLeft),i.marginRight&&o.gc.css("marginRight",i.marginRight),o.cs=f(p?e.cellSpacing||e.currentStyle.borderSpacing:o.css("border-spacing"))||2,o.b=f(p?e.border||e.currentStyle.borderLeftWidth:o.css("border-left-width"))||1,s[a]=o,v(o))},w=function(t){var e=t.attr(n),t=s[e];t&&t.is("table")&&(t.removeClass(l+" "+c).gc.remove(),delete s[e])},v=function(i){var r=i.find(">thead>tr:first>th,>thead>tr:first>td");r.length||(r=i.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td")),r=r.filter(":visible"),i.cg=i.find("col"),i.ln=r.length,i.p&&e&&e[i.id]&&m(i,r),r.each(function(e){var r=t(this),o=-1!=i.dc.indexOf(e),s=t(i.gc.append('
')[0].lastChild);s.append(o?"":i.opt.gripInnerHtml).append('
'),e==i.ln-1&&(s.addClass("JCLRLastGrip"),i.f&&s.html("")),s.bind("touchstart mousedown",J),o?s.addClass("JCLRdisabledGrip"):s.removeClass("JCLRdisabledGrip").bind("touchstart mousedown",J),s.t=i,s.i=e,s.c=r,r.w=r.width(),i.g.push(s),i.c.push(r),r.width(r.w).removeAttr("width"),s.data(l,{i:e,t:i.attr(n),last:e==i.ln-1})}),i.cg.removeAttr("width"),i.find("td, th").not(r).not("table th, table td").each(function(){t(this).removeAttr("width")}),i.f||i.removeAttr("width").addClass(c),C(i)},m=function(t,i){var r,o,s=0,d=0,n=[];if(i){if(t.cg.removeAttr("width"),t.opt.flush)return void(e[t.id]="");for(r=e[t.id].split(";"),o=r[t.ln+1],!t.f&&o&&(t.width(o*=1),t.opt.overflow&&(t.css("min-width",o+a),t.w=o));d*{cursor:"+n.opt.dragCursor+"!important}"),a.addClass(n.opt.draggingClass),o=a,n.c[d.i].l)for(var f,h=0;h
+ +
+ +
+