From 4dc6070fb0cb66eb3a72d581a022a9c26c450848 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 15 Jun 2018 15:25:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 14 - .../ruoyi/common/utils/ExcelImportUtils.java | 78 ------ .../monitor/job/controller/JobController.java | 2 +- .../job/controller/JobLogController.java | 2 +- .../controller/LogininforController.java | 2 +- .../controller/UserOnlineController.java | 2 +- .../operlog/controller/OperlogController.java | 2 +- .../config/controller/ConfigController.java | 2 +- .../dict/controller/DictDataController.java | 2 +- .../dict/controller/DictTypeController.java | 2 +- .../post/controller/PostController.java | 2 +- .../user/controller/UserController.java | 30 +- .../system/user/service/IUserService.java | 16 +- .../system/user/service/UserServiceImpl.java | 261 ------------------ .../tool/gen/controller/GenController.java | 3 +- .../resources/mybatis/system/RoleMapper.xml | 10 +- src/main/resources/static/ruoyi/js/ry-ui.js | 6 +- .../static/ruoyi/system/role/role.js | 97 ++++--- .../static/template/用户导入模板.xlsx | Bin 10017 -> 0 bytes src/main/resources/templates/include.html | 48 ++-- src/main/resources/templates/index.html | 20 +- src/main/resources/templates/main.html | 4 +- .../resources/templates/monitor/job/add.html | 3 +- .../resources/templates/monitor/job/edit.html | 3 +- .../resources/templates/monitor/job/job.html | 2 +- .../templates/monitor/job/jobLog.html | 2 +- .../monitor/logininfor/logininfor.html | 2 +- .../templates/monitor/online/online.html | 2 +- .../templates/monitor/operlog/operlog.html | 2 +- .../templates/system/config/add.html | 3 +- .../templates/system/config/config.html | 2 +- .../templates/system/config/edit.html | 3 +- .../resources/templates/system/dept/add.html | 3 +- .../resources/templates/system/dept/dept.html | 2 +- .../resources/templates/system/dept/edit.html | 3 +- .../resources/templates/system/dept/tree.html | 4 +- .../templates/system/dict/data/add.html | 2 +- .../templates/system/dict/data/data.html | 2 +- .../templates/system/dict/data/edit.html | 2 +- .../templates/system/dict/type/add.html | 2 +- .../templates/system/dict/type/edit.html | 2 +- .../templates/system/dict/type/type.html | 2 +- .../resources/templates/system/menu/add.html | 4 +- .../resources/templates/system/menu/edit.html | 4 +- .../resources/templates/system/menu/menu.html | 2 +- .../resources/templates/system/menu/tree.html | 4 +- .../resources/templates/system/post/add.html | 3 +- .../resources/templates/system/post/edit.html | 3 +- .../resources/templates/system/role/add.html | 5 +- .../resources/templates/system/role/edit.html | 4 +- .../resources/templates/system/role/role.html | 77 +----- .../resources/templates/system/user/add.html | 7 +- .../resources/templates/system/user/edit.html | 7 +- .../templates/system/user/profile/avatar.html | 2 +- .../resources/templates/system/user/user.html | 47 +--- .../resources/templates/tool/build/build.html | 8 +- .../resources/templates/tool/gen/gen.html | 2 +- .../resources/templates/vm/html/add.html.vm | 3 +- .../resources/templates/vm/html/edit.html.vm | 3 +- .../resources/templates/vm/html/list.html.vm | 2 +- 60 files changed, 169 insertions(+), 671 deletions(-) delete mode 100644 src/main/java/com/ruoyi/common/utils/ExcelImportUtils.java delete mode 100644 src/main/resources/static/template/用户导入模板.xlsx diff --git a/pom.xml b/pom.xml index 1b6e72e5..c4f35b30 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,6 @@ 2.3.2 2.7.0 1.11.3 - 3.17 @@ -247,19 +246,6 @@ ${jsoup.version} - - - org.apache.poi - poi - ${poi.version} - - - - org.apache.poi - poi-ooxml - ${poi.version} - - diff --git a/src/main/java/com/ruoyi/common/utils/ExcelImportUtils.java b/src/main/java/com/ruoyi/common/utils/ExcelImportUtils.java deleted file mode 100644 index 79f591b6..00000000 --- a/src/main/java/com/ruoyi/common/utils/ExcelImportUtils.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.ruoyi.common.utils; - -import org.apache.poi.hssf.usermodel.HSSFDateUtil; -import org.apache.poi.ss.usermodel.Cell; - -import java.text.DecimalFormat; -import java.util.Date; - -/** - * 导入Excel工具类 - */ -public class ExcelImportUtils { - - /** 是否是2003的excel,返回true是2003Excel文件**/ - public static boolean isExcel2003(String filePath){ - return filePath.matches("^.+\\.(?i)(xls)$"); - } - /** 是否是2007以上的excel,返回true是2007Excel文件**/ - public static boolean isExcel2007(String filePath){ - return filePath.matches("^.+\\.(?i)(xlsx)$"); - } - /** - * 验证EXCEL文件 - * - * @param filePath - * @return - */ - public static boolean validateExcel(String filePath) { - if (filePath == null || !(isExcel2003(filePath) || isExcel2007(filePath))) { - return false; - } - return true; - } - - /** - * 获取单元格的值 - * @param cell - * @return - */ - public static String getCellValue(Cell cell) { - String value = ""; - if (cell != null) { - switch(cell.getCellTypeEnum()){ - case NUMERIC:// 数字 - value = cell.getNumericCellValue()+ " "; - if(HSSFDateUtil.isCellDateFormatted(cell)){ - Date date = cell.getDateCellValue(); - if(date != null){ - value = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,date); // 日期格式化 - }else{ - value = ""; - } - }else { - // 解析cell时候 数字类型默认是double类型的 但是想要获取整数类型 需要格式化 - value = new DecimalFormat("0").format(cell.getNumericCellValue()); - } - break; - case STRING: // 字符串 - value = cell.getStringCellValue(); - break; - case BOOLEAN: // Boolean类型 - value = cell.getBooleanCellValue()+""; - break; - case BLANK: // 空值 - value = ""; - break; - case ERROR: // 错误类型 - value ="非法字符"; - break; - default: - value = "未知类型"; - break; - } - - } - return value.trim(); - } -} diff --git a/src/main/java/com/ruoyi/project/monitor/job/controller/JobController.java b/src/main/java/com/ruoyi/project/monitor/job/controller/JobController.java index a3088204..aa823ac3 100644 --- a/src/main/java/com/ruoyi/project/monitor/job/controller/JobController.java +++ b/src/main/java/com/ruoyi/project/monitor/job/controller/JobController.java @@ -40,7 +40,7 @@ public class JobController extends BaseController } @RequiresPermissions("monitor:job:list") - @GetMapping("/list") + @PostMapping("/list") @ResponseBody public TableDataInfo list(Job job) { diff --git a/src/main/java/com/ruoyi/project/monitor/job/controller/JobLogController.java b/src/main/java/com/ruoyi/project/monitor/job/controller/JobLogController.java index 2a73efc5..f198a6ba 100644 --- a/src/main/java/com/ruoyi/project/monitor/job/controller/JobLogController.java +++ b/src/main/java/com/ruoyi/project/monitor/job/controller/JobLogController.java @@ -39,7 +39,7 @@ public class JobLogController extends BaseController } @RequiresPermissions("monitor:job:list") - @GetMapping("/list") + @PostMapping("/list") @ResponseBody public TableDataInfo list(JobLog jobLog) { diff --git a/src/main/java/com/ruoyi/project/monitor/logininfor/controller/LogininforController.java b/src/main/java/com/ruoyi/project/monitor/logininfor/controller/LogininforController.java index 8f2dbd57..2e16ebf5 100644 --- a/src/main/java/com/ruoyi/project/monitor/logininfor/controller/LogininforController.java +++ b/src/main/java/com/ruoyi/project/monitor/logininfor/controller/LogininforController.java @@ -38,7 +38,7 @@ public class LogininforController extends BaseController } @RequiresPermissions("monitor:logininfor:list") - @GetMapping("/list") + @PostMapping("/list") @ResponseBody public TableDataInfo list(Logininfor logininfor) { diff --git a/src/main/java/com/ruoyi/project/monitor/online/controller/UserOnlineController.java b/src/main/java/com/ruoyi/project/monitor/online/controller/UserOnlineController.java index fb23a2fa..b3bfb861 100644 --- a/src/main/java/com/ruoyi/project/monitor/online/controller/UserOnlineController.java +++ b/src/main/java/com/ruoyi/project/monitor/online/controller/UserOnlineController.java @@ -44,7 +44,7 @@ public class UserOnlineController extends BaseController } @RequiresPermissions("monitor:online:list") - @GetMapping("/list") + @PostMapping("/list") @ResponseBody public TableDataInfo list(UserOnline userOnline) { diff --git a/src/main/java/com/ruoyi/project/monitor/operlog/controller/OperlogController.java b/src/main/java/com/ruoyi/project/monitor/operlog/controller/OperlogController.java index 1650153e..d7edb342 100644 --- a/src/main/java/com/ruoyi/project/monitor/operlog/controller/OperlogController.java +++ b/src/main/java/com/ruoyi/project/monitor/operlog/controller/OperlogController.java @@ -39,7 +39,7 @@ public class OperlogController extends BaseController } @RequiresPermissions("monitor:operlog:list") - @GetMapping("/list") + @PostMapping("/list") @ResponseBody public TableDataInfo list(OperLog operLog) { diff --git a/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java b/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java index e9b8d2d8..a872b904 100644 --- a/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java +++ b/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java @@ -43,7 +43,7 @@ public class ConfigController extends BaseController * 查询参数配置列表 */ @RequiresPermissions("system:config:list") - @GetMapping("/list") + @PostMapping("/list") @ResponseBody public TableDataInfo list(Config config) { diff --git a/src/main/java/com/ruoyi/project/system/dict/controller/DictDataController.java b/src/main/java/com/ruoyi/project/system/dict/controller/DictDataController.java index 6cca25da..b1acf1d1 100644 --- a/src/main/java/com/ruoyi/project/system/dict/controller/DictDataController.java +++ b/src/main/java/com/ruoyi/project/system/dict/controller/DictDataController.java @@ -39,7 +39,7 @@ public class DictDataController extends BaseController return prefix + "/data"; } - @GetMapping("/list") + @PostMapping("/list") @RequiresPermissions("system:dict:list") @ResponseBody public TableDataInfo list(DictData dictData) diff --git a/src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java b/src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java index b0faaecd..3f1c4904 100644 --- a/src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java +++ b/src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java @@ -39,7 +39,7 @@ public class DictTypeController extends BaseController return prefix + "/type"; } - @GetMapping("/list") + @PostMapping("/list") @RequiresPermissions("system:dict:list") @ResponseBody public TableDataInfo list(DictType dictType) diff --git a/src/main/java/com/ruoyi/project/system/post/controller/PostController.java b/src/main/java/com/ruoyi/project/system/post/controller/PostController.java index 5b50ac7e..0f90b7a2 100644 --- a/src/main/java/com/ruoyi/project/system/post/controller/PostController.java +++ b/src/main/java/com/ruoyi/project/system/post/controller/PostController.java @@ -40,7 +40,7 @@ public class PostController extends BaseController } @RequiresPermissions("system:post:list") - @GetMapping("/list") + @PostMapping("/list") @ResponseBody public TableDataInfo list(Post post) { diff --git a/src/main/java/com/ruoyi/project/system/user/controller/UserController.java b/src/main/java/com/ruoyi/project/system/user/controller/UserController.java index ed2c7809..a9c8669e 100644 --- a/src/main/java/com/ruoyi/project/system/user/controller/UserController.java +++ b/src/main/java/com/ruoyi/project/system/user/controller/UserController.java @@ -1,6 +1,5 @@ package com.ruoyi.project.system.user.controller; -import com.ruoyi.common.exception.user.UserException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.web.controller.BaseController; @@ -14,15 +13,11 @@ import com.ruoyi.project.system.user.domain.User; import com.ruoyi.project.system.user.domain.UserStatus; import com.ruoyi.project.system.user.service.IUserService; import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - import java.util.List; /** @@ -34,7 +29,6 @@ import java.util.List; @RequestMapping("/system/user") public class UserController extends BaseController { - private static final Logger log = LoggerFactory.getLogger(UserController.class); private String prefix = "system/user"; @Autowired @@ -54,7 +48,7 @@ public class UserController extends BaseController } @RequiresPermissions("system:user:list") - @GetMapping("/list") + @PostMapping("/list") @ResponseBody public TableDataInfo list(User user) { @@ -171,28 +165,6 @@ public class UserController extends BaseController return userService.saveUser(user) > 0 ? Message.success() : Message.error(); } - /** - * 批量新增用户 - */ - @RequiresPermissions("system:user:batchAdd") - @Log(title = "系统管理", action = "用户管理-批量新增用户") - @PostMapping("/batchAdd") - @Transactional(rollbackFor = Exception.class) - @ResponseBody - public Message batchAdd( @RequestParam("uploadfile") MultipartFile file) - { - try { - if(!file.isEmpty()){ - int rows=userService.batchImportUsers(file); - return Message.success(String.valueOf(rows)); - } - return Message.error(); - }catch (UserException e){ - log.error("批量添加用户失败 !---{}", e.getMessage()); - return Message.error(e.getMessage()); - } - } - /** * 校验用户名 */ diff --git a/src/main/java/com/ruoyi/project/system/user/service/IUserService.java b/src/main/java/com/ruoyi/project/system/user/service/IUserService.java index b433357b..50d3bcd7 100644 --- a/src/main/java/com/ruoyi/project/system/user/service/IUserService.java +++ b/src/main/java/com/ruoyi/project/system/user/service/IUserService.java @@ -1,8 +1,6 @@ package com.ruoyi.project.system.user.service; import com.ruoyi.project.system.user.domain.User; -import org.springframework.web.multipart.MultipartFile; - import java.util.List; /** @@ -28,7 +26,7 @@ public interface IUserService * @return 用户对象信息 */ public User selectUserByLoginName(String userName); - + /** * 通过手机号码查询用户 * @@ -36,7 +34,7 @@ public interface IUserService * @return 用户对象信息 */ public User selectUserByPhoneNumber(String phoneNumber); - + /** * 通过邮箱查询用户 * @@ -101,7 +99,6 @@ public interface IUserService */ public String checkLoginNameUnique(String loginName); - /** * 校验手机号码是否唯一 * @@ -110,7 +107,6 @@ public interface IUserService */ public String checkPhoneUnique(User user); - /** * 校验email是否唯一 * @@ -134,12 +130,4 @@ public interface IUserService * @return 结果 */ public String selectUserPostGroup(Long userId); - - /** - * Excel批量导入用户 - * @param myFile - * @return - */ - public int batchImportUsers(MultipartFile myFile); - } diff --git a/src/main/java/com/ruoyi/project/system/user/service/UserServiceImpl.java b/src/main/java/com/ruoyi/project/system/user/service/UserServiceImpl.java index f2adfd88..652a33ad 100644 --- a/src/main/java/com/ruoyi/project/system/user/service/UserServiceImpl.java +++ b/src/main/java/com/ruoyi/project/system/user/service/UserServiceImpl.java @@ -1,13 +1,9 @@ package com.ruoyi.project.system.user.service; import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.exception.user.UserException; -import com.ruoyi.common.utils.ExcelImportUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.security.ShiroUtils; import com.ruoyi.framework.shiro.service.PasswordService; -import com.ruoyi.project.system.dept.domain.Dept; -import com.ruoyi.project.system.dept.service.IDeptService; import com.ruoyi.project.system.post.domain.Post; import com.ruoyi.project.system.post.mapper.PostMapper; import com.ruoyi.project.system.role.domain.Role; @@ -18,18 +14,8 @@ import com.ruoyi.project.system.user.domain.UserRole; import com.ruoyi.project.system.user.mapper.UserMapper; import com.ruoyi.project.system.user.mapper.UserPostMapper; import com.ruoyi.project.system.user.mapper.UserRoleMapper; -import org.apache.poi.hssf.usermodel.HSSFWorkbook; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.usermodel.Workbook; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; - -import java.io.IOException; import java.util.*; /** @@ -40,7 +26,6 @@ import java.util.*; @Service("userService") public class UserServiceImpl implements IUserService { - private static final Logger log = LoggerFactory.getLogger(UserServiceImpl.class); @Autowired private UserMapper userMapper; @@ -59,10 +44,6 @@ public class UserServiceImpl implements IUserService @Autowired private PasswordService passwordService; - @Autowired - private IDeptService deptService; - - /** * 根据条件分页查询用户对象 * @@ -195,248 +176,6 @@ public class UserServiceImpl implements IUserService return count; } - /** - * 根据Execl 批量保存用户 - * 1. 使用HSSFWorkbook 打开或者创建 “Excel对象” - * 2. 用HSSFWorkbook返回对象或者创建sheet对象 - * 3. 用sheet返回行对象,用行对象得到Cell对象 - * 4. 对Cell对象进行读写 - * @param myFile - * @return - */ - @Override - public int batchImportUsers(MultipartFile myFile) { - //Excel工作簿 - Workbook workbook=null; - //获取文件名 - String filename=myFile.getOriginalFilename(); - log.info("【ExeclfileName】={}",filename); - if(StringUtils.isNotEmpty(filename)){ - //根据文件名判断文件是2003版本还是2007版本 - if(ExcelImportUtils.isExcel2003(filename)){ - try { - workbook=new HSSFWorkbook(myFile.getInputStream());//2003版本 - }catch (IOException e){ - throw new UserException("user.import.excel.fileinput.error",null); - } - }else if(ExcelImportUtils.isExcel2007(filename)){ - try { - workbook=new XSSFWorkbook(myFile.getInputStream());//2007以上版本 - }catch (IOException e){ - throw new UserException("user.import.excel.fileinputx.error",null); - } - }else{ - throw new UserException("user.import.excel.filetype.error",null); - } - }else { - throw new UserException("user.import.excel.file.error",null); - } - //得到第一个sheet - Sheet sheet = workbook.getSheetAt(0); - //得到Excel的行数 - int totalRows = sheet.getLastRowNum(); - log.info("【rows】{}",totalRows); - //新建用户list - List users=new ArrayList(); - - List depts=new ArrayList(); - List roles=new ArrayList(); - List posts=new ArrayList(); - - //如果行数为空 - /** - * getPhysicalNumberOfRows - * - * 获取有记录的行数,即:最后有数据的行是第n行,前面有m行是空行没数据,则返回n-m; - */ - if((totalRows==0)&&(sheet.getPhysicalNumberOfRows()==0)){ - throw new UserException("user.import.excel.null",null); - }else if((totalRows==0)&&(sheet.getPhysicalNumberOfRows()==1)){ - throw new UserException("user.import.excel.data.null",null); - } else{ - //获取全部部门信息 - depts=deptService.selectDeptAll(); - //获取全部角色信息 - roles=roleMapper.selectRolesAll(); - //获取全部岗位信息 - posts=postMapper.selectPostAll(); - } - - for(int i=1;i<=totalRows;i++){ - Row row = sheet.getRow(i); - if(row!=null){ - User user=new User(); - //登录名(用户名) - String userName=ExcelImportUtils.getCellValue(row.getCell(0)); - if(userName.isEmpty()){ - continue; - }else{ - //判断用户名是否唯一 - if(checkLoginNameUnique(userName).equals(UserConstants.USER_NAME_UNIQUE)){ - user.setLoginName(userName); - }else { - log.error("【rows】{}行用户名{}已经存在",i+1,userName); - continue; - } - } - //姓名 - String userRealName=ExcelImportUtils.getCellValue(row.getCell(1)); - user.setUserName(userRealName); - //性别 - String userSex=ExcelImportUtils.getCellValue(row.getCell(2)); - if(StringUtils.isNotEmpty(userSex)){ - if(userSex.equals("男")){ - user.setSex("0"); - }else if(userSex.equals("女")){ - user.setSex("1"); - }else { - user.setSex("2"); - } - } - //密码 - String passWord=ExcelImportUtils.getCellValue(row.getCell(3)); - if(passWord.isEmpty()){ - continue; - }else{ - user.randomSalt(); - user.setPassword(passwordService.encryptPassword(userName, passWord, user.getSalt())); - } - - //部门 - String dept=ExcelImportUtils.getCellValue(row.getCell(4)); - if(StringUtils.isNotEmpty(dept)){ - for (int k=0;k sets=new HashSet(); - //判断是否有英文的"," 号 - if(userRolesExcel.contains(",")){ - List results= Arrays.asList(userRolesExcel.split(",")); - for(String s:results){ - for(int l=0;l setPosts=new HashSet(); - //判断是否有英文的"," 号 - if(userPostExcel.contains(",")){ - List resultsp= Arrays.asList(userPostExcel.split(",")); - for(String p:resultsp){ - for(int h=0;h0){ - //批量插入用户 - realRow=userMapper.batchAddUser(users); - } - log.info("成功导入用户共{}个",realRow); - if(realRow>0){ - //用户和角色关联 - List userRoles=new ArrayList(); - //用户和岗位关联 - List userPosts=new ArrayList(); - for(User test:users){ - //添加用户-角色关联表 - for(int q=0;q select role_id, role_name, role_key, role_sort, status, create_time, remark from sys_role - - AND role_name like concat('%', #{roleName}, '%') - - - AND role_key like concat('%', #{roleKey}, '%') - - - AND status = #{status} + + AND role_key like concat('%', #{searchValue}, '%') OR role_name like concat('%', #{searchValue}, '%') diff --git a/src/main/resources/static/ruoyi/js/ry-ui.js b/src/main/resources/static/ruoyi/js/ry-ui.js index 321f4a9b..c0fcc339 100644 --- a/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/src/main/resources/static/ruoyi/js/ry-ui.js @@ -76,7 +76,7 @@ $(function(){ // 初始bootstrap table数据 $.initTable = function (_columns, _url) { $('.bootstrap-table').bootstrapTable({ - method: 'get', // 请求方式(*) + method: 'post', // 请求方式(*) dataType: "json", // 返回格式(*) url: _url, // 请求后台的URL(*) pagination: true, // 是否显示分页(*) @@ -93,6 +93,7 @@ $(function(){ showToggle: true, // 是否显示详细视图和列表视图的切换按钮 cache: false, // 是否使用缓存 showExport: true, // 是否支持导出文件 + contentType: "application/x-www-form-urlencoded", // 编码类型 queryParams: function(params) { return { // 传递参数查询参数 @@ -109,7 +110,7 @@ $(function(){ // 初始bootstrap table 自定义参数 $.initTableParams = function (_columns, _url, _queryParams) { $('.bootstrap-table').bootstrapTable({ - method: 'get', // 请求方式(*) + method: 'post', // 请求方式(*) dataType: "json", // 返回格式(*) url: _url, // 请求后台的URL(*) pagination: true, // 是否显示分页(*) @@ -126,6 +127,7 @@ $(function(){ showToggle: true, // 是否显示详细视图和列表视图的切换按钮 cache: false, // 是否使用缓存 showExport: true, // 是否支持导出文件 + contentType: "application/x-www-form-urlencoded", // 编码类型 queryParams: _queryParams, columns: _columns }); diff --git a/src/main/resources/static/ruoyi/system/role/role.js b/src/main/resources/static/ruoyi/system/role/role.js index dd235d9a..614025c5 100644 --- a/src/main/resources/static/ruoyi/system/role/role.js +++ b/src/main/resources/static/ruoyi/system/role/role.js @@ -1,56 +1,53 @@ var prefix = ctx + "system/role" $(function() { - var options = { - url: prefix + "/list", - queryParams: queryParams, - columns: [{ - checkbox: true - }, - { - field: 'roleId', - title: '角色编号' - }, - { - field: 'roleName', - title: '角色名称' - }, - { - field: 'roleKey', - title: '权限字符' - }, - { - field: 'roleSort', - title: '显示顺序' - }, - { - field: 'status', - title: '状态', - align: 'center', - formatter: function(value, row, index) { - if (value == 0) { - return '正常'; - } else if (value == 1) { - return '禁用'; - } - } - }, - { - field: 'createDateTimeStr', - title: '创建时间' - }, - { - title: '操作', - align: 'center', - formatter: function(value, row, index) { - var actions = []; - actions.push('编辑 '); - actions.push('删除'); - return actions.join(''); - } - }] - }; - $.table.init(options); + var columns = [{ + checkbox: true + }, + { + field: 'roleId', + title: '角色编号' + }, + { + field: 'roleName', + title: '角色名称' + }, + { + field: 'roleKey', + title: '权限字符' + }, + { + field: 'roleSort', + title: '显示顺序' + }, + { + field: 'status', + title: '状态', + align: 'center', + formatter: function(value, row, index) { + if (value == 0) { + return '正常'; + } else if (value == 1) { + return '禁用'; + } + } + }, + { + field: 'createDateTimeStr', + title: '创建时间' + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('编辑 '); + actions.push('删除'); + return actions.join(''); + } + }]; + var url = prefix + "/list"; + $.initTable(columns, url); }); /*角色管理-搜索*/ diff --git a/src/main/resources/static/template/用户导入模板.xlsx b/src/main/resources/static/template/用户导入模板.xlsx deleted file mode 100644 index ce242051d907224efa54b3113a0a5920f119fd76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10017 zcmeHtbyQqQ6Yt<|!6CT2hT!h*l0eYGT>^sz8{9RxL-3G5fWd;hlLU7Q5}csnO?JQi zvdiv!=l%a}pVM>CJ@;1K>F)YfRsX8hmEhp<0Ehr&002M*@JZ~a@`eEb0ucZJTmUlc zb15fBcc7!Yu{OvV=w`(3rvL0{vo3{%wmmKG8(*@-3gY( zc@?VZox-7wa#FkeDzWK3e5&`fZTQ3y25NmJ6Ug}Vl(u5q&5Vwu>3#hK6MTNwb8fLGfea7*n9IsPirZ z^1XTvC4Hia!Rmf*IXl!t2UloQy6Qy(0|E0N#oVt(zklx1U6}gXL@=Wy$5t0TwIX zQY7#}whfSBiTTk7YAuDZK^ryfLUo>zh>I!N90`VQPyAWj;Mvy^1h1i>yuXJ7sQ(4B zxG&m(uu#Y@LlKDvg{-kF(B6%M{pat$Q2igq=bwgNnW&-!$Aukw7<5lH+$uEBOg(AO zA+w`maRL0Ohl&AOdR zca4omI7zOuG5hkJfz~!}5L>_XwJwYN(hBo~ADXv7% z&J?lA=?qgg$wHS&)JJ%GM&*%(+~5jCFI%o!_@1iN*bI3)4HVO`#Ft2q#v5G5&r0r| zJ}J=6FQ)By>p%E4eDH?a9FCmf*q`PCJD@fj}Wc0ziiGvgi06HJ(nc zc4kgac0c3X9|(eh20JLc{>ynX1a`V1PYW@N-HwZ*AaY~G$AdCS5Ozcckv0Qe@Tp*vc+*+!DM(sKZ zuhBOjS16H}KN0Z_b*BvLm!o*al<2luklw6wxaux>Gsx6Ff5JL+c4)aV(D!K>y3&6) z8L(P}T^!U5MxZ8x1$_f*GJiIf=tQNcc~0!UL$E(m{*7$vQ7HBrYw`zscA%-Tl?+KA zwKvtk-p0JA{d&pUG!ccJ$$+q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{x1zgP*&hSpZ|Z6`wta9WXFFgB*FYm;X|(cp@N6R#4iOa(2~{9G5wdO zcqsaC3-n907P=$)>tKFuh#qSBYj*id2Q;68GX4*9&4 - - + + - - - - - + + + + +
- - + + - - - - + + + + - - - + + + - - + + - - - - - - + + + + + +
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 53c1bb90..dd85a071 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -10,11 +10,11 @@ - - - - - + + + + + @@ -124,10 +124,10 @@ - - - - - + + + + + diff --git a/src/main/resources/templates/main.html b/src/main/resources/templates/main.html index d995948a..81f81b08 100644 --- a/src/main/resources/templates/main.html +++ b/src/main/resources/templates/main.html @@ -415,7 +415,7 @@ - - + + diff --git a/src/main/resources/templates/monitor/job/add.html b/src/main/resources/templates/monitor/job/add.html index 6782c35b..0360d19e 100644 --- a/src/main/resources/templates/monitor/job/add.html +++ b/src/main/resources/templates/monitor/job/add.html @@ -59,7 +59,6 @@
- + diff --git a/src/main/resources/templates/monitor/job/edit.html b/src/main/resources/templates/monitor/job/edit.html index d3dc14d8..80d82b76 100644 --- a/src/main/resources/templates/monitor/job/edit.html +++ b/src/main/resources/templates/monitor/job/edit.html @@ -60,7 +60,6 @@
- + diff --git a/src/main/resources/templates/monitor/job/job.html b/src/main/resources/templates/monitor/job/job.html index 65ebf43a..b3d39287 100644 --- a/src/main/resources/templates/monitor/job/job.html +++ b/src/main/resources/templates/monitor/job/job.html @@ -21,7 +21,7 @@
- + + diff --git a/src/main/resources/templates/monitor/logininfor/logininfor.html b/src/main/resources/templates/monitor/logininfor/logininfor.html index bd503d2d..75e60de5 100644 --- a/src/main/resources/templates/monitor/logininfor/logininfor.html +++ b/src/main/resources/templates/monitor/logininfor/logininfor.html @@ -15,6 +15,6 @@
- + \ No newline at end of file diff --git a/src/main/resources/templates/monitor/online/online.html b/src/main/resources/templates/monitor/online/online.html index 0a64a530..88871122 100644 --- a/src/main/resources/templates/monitor/online/online.html +++ b/src/main/resources/templates/monitor/online/online.html @@ -16,7 +16,7 @@
- + diff --git a/src/main/resources/templates/monitor/operlog/operlog.html b/src/main/resources/templates/monitor/operlog/operlog.html index 81f6d0c3..bbbea33f 100644 --- a/src/main/resources/templates/monitor/operlog/operlog.html +++ b/src/main/resources/templates/monitor/operlog/operlog.html @@ -16,7 +16,7 @@
- + diff --git a/src/main/resources/templates/system/config/add.html b/src/main/resources/templates/system/config/add.html index 6344908b..6e8c791a 100644 --- a/src/main/resources/templates/system/config/add.html +++ b/src/main/resources/templates/system/config/add.html @@ -47,7 +47,6 @@
- + diff --git a/src/main/resources/templates/system/config/config.html b/src/main/resources/templates/system/config/config.html index 92b9eaac..cb8ab178 100644 --- a/src/main/resources/templates/system/config/config.html +++ b/src/main/resources/templates/system/config/config.html @@ -16,7 +16,7 @@
- + + diff --git a/src/main/resources/templates/system/dept/add.html b/src/main/resources/templates/system/dept/add.html index 3e8abd23..efa0d69b 100644 --- a/src/main/resources/templates/system/dept/add.html +++ b/src/main/resources/templates/system/dept/add.html @@ -61,7 +61,6 @@
- + diff --git a/src/main/resources/templates/system/dept/dept.html b/src/main/resources/templates/system/dept/dept.html index 70288f69..7a544dea 100644 --- a/src/main/resources/templates/system/dept/dept.html +++ b/src/main/resources/templates/system/dept/dept.html @@ -16,7 +16,7 @@
- + + diff --git a/src/main/resources/templates/system/dept/tree.html b/src/main/resources/templates/system/dept/tree.html index b34c1cd8..d8f0e0e9 100644 --- a/src/main/resources/templates/system/dept/tree.html +++ b/src/main/resources/templates/system/dept/tree.html @@ -30,8 +30,8 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;} 关闭
- - + + + diff --git a/src/main/resources/templates/system/dict/data/data.html b/src/main/resources/templates/system/dict/data/data.html index 1bede3eb..f145687a 100644 --- a/src/main/resources/templates/system/dict/data/data.html +++ b/src/main/resources/templates/system/dict/data/data.html @@ -20,7 +20,7 @@
- + + diff --git a/src/main/resources/templates/system/dict/type/add.html b/src/main/resources/templates/system/dict/type/add.html index 55ac2d27..a3641b6a 100644 --- a/src/main/resources/templates/system/dict/type/add.html +++ b/src/main/resources/templates/system/dict/type/add.html @@ -42,6 +42,6 @@
- + diff --git a/src/main/resources/templates/system/dict/type/edit.html b/src/main/resources/templates/system/dict/type/edit.html index 3bc06ff1..1a856662 100644 --- a/src/main/resources/templates/system/dict/type/edit.html +++ b/src/main/resources/templates/system/dict/type/edit.html @@ -43,6 +43,6 @@
- + diff --git a/src/main/resources/templates/system/dict/type/type.html b/src/main/resources/templates/system/dict/type/type.html index ccf11308..b9b4dba1 100644 --- a/src/main/resources/templates/system/dict/type/type.html +++ b/src/main/resources/templates/system/dict/type/type.html @@ -19,7 +19,7 @@
- + - + + diff --git a/src/main/resources/templates/system/menu/edit.html b/src/main/resources/templates/system/menu/edit.html index 49e15ea0..bba083bd 100644 --- a/src/main/resources/templates/system/menu/edit.html +++ b/src/main/resources/templates/system/menu/edit.html @@ -75,8 +75,8 @@
- - + + diff --git a/src/main/resources/templates/system/menu/menu.html b/src/main/resources/templates/system/menu/menu.html index a3185879..68ebcf62 100644 --- a/src/main/resources/templates/system/menu/menu.html +++ b/src/main/resources/templates/system/menu/menu.html @@ -15,7 +15,7 @@
- + - + + + diff --git a/src/main/resources/templates/system/post/edit.html b/src/main/resources/templates/system/post/edit.html index febb192a..86b05ea4 100644 --- a/src/main/resources/templates/system/post/edit.html +++ b/src/main/resources/templates/system/post/edit.html @@ -48,7 +48,6 @@
- + diff --git a/src/main/resources/templates/system/role/add.html b/src/main/resources/templates/system/role/add.html index b4dcd0b4..75bedfa7 100644 --- a/src/main/resources/templates/system/role/add.html +++ b/src/main/resources/templates/system/role/add.html @@ -57,8 +57,7 @@
- - + + diff --git a/src/main/resources/templates/system/role/edit.html b/src/main/resources/templates/system/role/edit.html index ed993504..b3afd7df 100644 --- a/src/main/resources/templates/system/role/edit.html +++ b/src/main/resources/templates/system/role/edit.html @@ -58,8 +58,8 @@
- - + diff --git a/src/main/resources/templates/system/role/role.html b/src/main/resources/templates/system/role/role.html index 7c66a838..128c6ce0 100644 --- a/src/main/resources/templates/system/role/role.html +++ b/src/main/resources/templates/system/role/role.html @@ -3,71 +3,22 @@ xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> - -
-
-
-
角色管理
- -
-
-
-
-
-
- -
- -
-
- -
-
-
- -
- -
-
- -
-
-
- -
- -
-
- -
-
- -
-
- -
- -
- -
-
-
-
+ +
+ + +
- - + - - + + + diff --git a/src/main/resources/templates/system/user/edit.html b/src/main/resources/templates/system/user/edit.html index cc4596b6..0e688693 100644 --- a/src/main/resources/templates/system/user/edit.html +++ b/src/main/resources/templates/system/user/edit.html @@ -87,10 +87,9 @@
- - - + + + diff --git a/src/main/resources/templates/system/user/profile/avatar.html b/src/main/resources/templates/system/user/profile/avatar.html index 09d0f8b0..dce7f9aa 100644 --- a/src/main/resources/templates/system/user/profile/avatar.html +++ b/src/main/resources/templates/system/user/profile/avatar.html @@ -23,7 +23,7 @@
- + - - - - - - - - - - + + + - - - + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/vm/html/add.html.vm b/src/main/resources/templates/vm/html/add.html.vm index 2b85c474..da90e442 100644 --- a/src/main/resources/templates/vm/html/add.html.vm +++ b/src/main/resources/templates/vm/html/add.html.vm @@ -24,7 +24,6 @@
- + diff --git a/src/main/resources/templates/vm/html/edit.html.vm b/src/main/resources/templates/vm/html/edit.html.vm index 67ec9218..d748fc1c 100644 --- a/src/main/resources/templates/vm/html/edit.html.vm +++ b/src/main/resources/templates/vm/html/edit.html.vm @@ -25,7 +25,6 @@
- + diff --git a/src/main/resources/templates/vm/html/list.html.vm b/src/main/resources/templates/vm/html/list.html.vm index 6486d0e2..f4d7d5ea 100644 --- a/src/main/resources/templates/vm/html/list.html.vm +++ b/src/main/resources/templates/vm/html/list.html.vm @@ -16,7 +16,7 @@
- +