RuoYi 6 gadi atpakaļ
vecāks
revīzija
5f0fa0d42f
60 mainītis faili ar 169 papildinājumiem un 671 dzēšanām
  1. 0 14
      pom.xml
  2. 0 78
      src/main/java/com/ruoyi/common/utils/ExcelImportUtils.java
  3. 1 1
      src/main/java/com/ruoyi/project/monitor/job/controller/JobController.java
  4. 1 1
      src/main/java/com/ruoyi/project/monitor/job/controller/JobLogController.java
  5. 1 1
      src/main/java/com/ruoyi/project/monitor/logininfor/controller/LogininforController.java
  6. 1 1
      src/main/java/com/ruoyi/project/monitor/online/controller/UserOnlineController.java
  7. 1 1
      src/main/java/com/ruoyi/project/monitor/operlog/controller/OperlogController.java
  8. 1 1
      src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java
  9. 1 1
      src/main/java/com/ruoyi/project/system/dict/controller/DictDataController.java
  10. 1 1
      src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java
  11. 1 1
      src/main/java/com/ruoyi/project/system/post/controller/PostController.java
  12. 1 29
      src/main/java/com/ruoyi/project/system/user/controller/UserController.java
  13. 2 14
      src/main/java/com/ruoyi/project/system/user/service/IUserService.java
  14. 0 261
      src/main/java/com/ruoyi/project/system/user/service/UserServiceImpl.java
  15. 2 1
      src/main/java/com/ruoyi/project/tool/gen/controller/GenController.java
  16. 2 8
      src/main/resources/mybatis/system/RoleMapper.xml
  17. 4 2
      src/main/resources/static/ruoyi/js/ry-ui.js
  18. 47 50
      src/main/resources/static/ruoyi/system/role/role.js
  19. BIN
      src/main/resources/static/template/用户导入模板.xlsx
  20. 24 24
      src/main/resources/templates/include.html
  21. 10 10
      src/main/resources/templates/index.html
  22. 2 2
      src/main/resources/templates/main.html
  23. 1 2
      src/main/resources/templates/monitor/job/add.html
  24. 1 2
      src/main/resources/templates/monitor/job/edit.html
  25. 1 1
      src/main/resources/templates/monitor/job/job.html
  26. 1 1
      src/main/resources/templates/monitor/job/jobLog.html
  27. 1 1
      src/main/resources/templates/monitor/logininfor/logininfor.html
  28. 1 1
      src/main/resources/templates/monitor/online/online.html
  29. 1 1
      src/main/resources/templates/monitor/operlog/operlog.html
  30. 1 2
      src/main/resources/templates/system/config/add.html
  31. 1 1
      src/main/resources/templates/system/config/config.html
  32. 1 2
      src/main/resources/templates/system/config/edit.html
  33. 1 2
      src/main/resources/templates/system/dept/add.html
  34. 1 1
      src/main/resources/templates/system/dept/dept.html
  35. 1 2
      src/main/resources/templates/system/dept/edit.html
  36. 2 2
      src/main/resources/templates/system/dept/tree.html
  37. 1 1
      src/main/resources/templates/system/dict/data/add.html
  38. 1 1
      src/main/resources/templates/system/dict/data/data.html
  39. 1 1
      src/main/resources/templates/system/dict/data/edit.html
  40. 1 1
      src/main/resources/templates/system/dict/type/add.html
  41. 1 1
      src/main/resources/templates/system/dict/type/edit.html
  42. 1 1
      src/main/resources/templates/system/dict/type/type.html
  43. 2 2
      src/main/resources/templates/system/menu/add.html
  44. 2 2
      src/main/resources/templates/system/menu/edit.html
  45. 1 1
      src/main/resources/templates/system/menu/menu.html
  46. 2 2
      src/main/resources/templates/system/menu/tree.html
  47. 1 2
      src/main/resources/templates/system/post/add.html
  48. 1 2
      src/main/resources/templates/system/post/edit.html
  49. 2 3
      src/main/resources/templates/system/role/add.html
  50. 2 2
      src/main/resources/templates/system/role/edit.html
  51. 14 63
      src/main/resources/templates/system/role/role.html
  52. 3 4
      src/main/resources/templates/system/user/add.html
  53. 3 4
      src/main/resources/templates/system/user/edit.html
  54. 1 1
      src/main/resources/templates/system/user/profile/avatar.html
  55. 3 44
      src/main/resources/templates/system/user/user.html
  56. 4 4
      src/main/resources/templates/tool/build/build.html
  57. 1 1
      src/main/resources/templates/tool/gen/gen.html
  58. 1 2
      src/main/resources/templates/vm/html/add.html.vm
  59. 1 2
      src/main/resources/templates/vm/html/edit.html.vm
  60. 1 1
      src/main/resources/templates/vm/html/list.html.vm

+ 0 - 14
pom.xml

@@ -40,7 +40,6 @@
 		<kaptcha.version>2.3.2</kaptcha.version>
 		<swagger.version>2.7.0</swagger.version>
 		<jsoup.version>1.11.3</jsoup.version>
-		<poi.version>3.17</poi.version>
 	</properties>
 
 	<dependencies>
@@ -247,19 +246,6 @@
 			<version>${jsoup.version}</version>
 		</dependency>
 
-		<!-- POI-->
-		<dependency>
-			<groupId>org.apache.poi</groupId>
-			<artifactId>poi</artifactId>
-			<version>${poi.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.apache.poi</groupId>
-			<artifactId>poi-ooxml</artifactId>
-			<version>${poi.version}</version>
-		</dependency>
-
 	</dependencies>
 
 	<build>

+ 0 - 78
src/main/java/com/ruoyi/common/utils/ExcelImportUtils.java

@@ -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();
-    }
-}

+ 1 - 1
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)
     {

+ 1 - 1
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)
     {

+ 1 - 1
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)
     {

+ 1 - 1
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)
     {

+ 1 - 1
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)
     {

+ 1 - 1
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)
     {

+ 1 - 1
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)

+ 1 - 1
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)

+ 1 - 1
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)
     {

+ 1 - 29
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());
-        }
-    }
-
     /**
      * 校验用户名
      */

+ 2 - 14
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);
-
 }

+ 0 - 261
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<User> users=new ArrayList<User>();
-
-        List<Dept> depts=new ArrayList<Dept>();
-        List<Role> roles=new ArrayList<Role>();
-        List<Post> posts=new ArrayList<Post>();
-
-        //如果行数为空
-        /**
-         * 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<depts.size();k++){
-                       if(dept.equals(depts.get(k).getDeptName())){
-                           user.setDeptId(depts.get(k).getDeptId());
-                           break;
-                       }
-                  }
-               }
-               user.setCreateBy(ShiroUtils.getLoginName());
-               //角色--多个角色以","分割
-               String userRolesExcel=ExcelImportUtils.getCellValue(row.getCell(5));
-               if(StringUtils.isNotEmpty(userRolesExcel)){
-                   //Set可以去掉重复的值,
-                   Set<Long> sets=new HashSet<Long>();
-                   //判断是否有英文的"," 号
-                   if(userRolesExcel.contains(",")){
-                       List<String> results= Arrays.asList(userRolesExcel.split(","));
-                       for(String s:results){
-                           for(int l=0;l<roles.size();l++){
-                               if(s.equals(roles.get(l).getRoleName())){
-                                   sets.add(roles.get(l).getRoleId());
-                                     break;
-                               }
-                           }
-                       }
-
-                   }else {
-                      for(int j=0;j<roles.size();j++){
-                          if(userRolesExcel.equals(roles.get(j).getRoleName())){
-                              sets.add(roles.get(j).getRoleId());
-                                break;
-                          }
-                      }
-
-                   }
-                   for(Long longTes:sets){
-                       log.info("用户名={},角色ID={}",userName,longTes);
-                   }
-                   user.setRoleIds(sets.toArray(new Long[sets.size()]));
-               }
-
-               //岗位--多个岗位以","分割
-               String userPostExcel=ExcelImportUtils.getCellValue(row.getCell(6));
-               if(StringUtils.isNotEmpty(userPostExcel)){
-                   //去掉重复的值,
-                   Set<Long> setPosts=new HashSet<Long>();
-                   //判断是否有英文的"," 号
-                   if(userPostExcel.contains(",")){
-                       List<String> resultsp= Arrays.asList(userPostExcel.split(","));
-                       for(String p:resultsp){
-                           for(int h=0;h<posts.size();h++){
-                               if(p.equals(posts.get(h).getPostName())){
-                                   setPosts.add(posts.get(h).getPostId());
-                                   break;
-                               }
-                           }
-                       }
-
-                   }else {
-                       for(int m=0;m<posts.size();m++){
-                           if(userPostExcel.equals(posts.get(m).getPostName())){
-                               setPosts.add(posts.get(m).getPostId());
-                               break;
-                           }
-                       }
-
-                   }
-
-                   for(Long longTest:setPosts){
-                       log.info("用户名={},岗位ID={}",userName,longTest);
-                   }
-                   user.setPostIds(setPosts.toArray(new Long[setPosts.size()]));
-               }
-
-               //手机号
-               String phoneNumber=ExcelImportUtils.getCellValue(row.getCell(7));
-               if(StringUtils.isNotEmpty(phoneNumber)){
-                   //验证是否是手机号
-                   if(phoneNumber.matches(UserConstants.MOBILE_PHONE_NUMBER_PATTERN)){
-                       user.setPhonenumber(phoneNumber);
-                   }
-               }
-               //邮箱
-               String userEmail=ExcelImportUtils.getCellValue(row.getCell(8));
-               if(StringUtils.isNotEmpty(userEmail)){
-                   //验证是否是邮箱
-                   if(userEmail.matches(UserConstants.EMAIL_PATTERN)){
-                       user.setEmail(userEmail);
-                   }
-               }
-            users.add(user);
-           }
-       }
-       //实际添加行数
-       int realRow=0;
-        //如果添加的列表不为空
-       if(users.size()>0){
-           //批量插入用户
-            realRow=userMapper.batchAddUser(users);
-       }
-        log.info("成功导入用户共{}个",realRow);
-        if(realRow>0){
-            //用户和角色关联
-            List<UserRole> userRoles=new ArrayList<UserRole>();
-            //用户和岗位关联
-            List<UserPost> userPosts=new ArrayList<UserPost>();
-          for(User test:users){
-              //添加用户-角色关联表
-              for(int q=0;q<test.getRoleIds().length;q++){
-                    UserRole userRole=new UserRole();
-                    userRole.setUserId(test.getUserId());
-                    userRole.setRoleId(test.getRoleIds()[q]);
-                    userRoles.add(userRole);
-              }
-
-              for(int r=0;r<test.getPostIds().length;r++){
-                  UserPost userPost=new UserPost();
-                  userPost.setUserId(test.getUserId());
-                  userPost.setPostId(test.getPostIds()[r]);
-                  userPosts.add(userPost);
-              }
-
-          }
-            //批量添加用户-角色关联数据
-            userRoleMapper.batchUserRole(userRoles);
-            log.info("成功导入用户-角色关联数据");
-          //批量添加用户-岗位关联数据
-            userPostMapper.batchUserPost(userPosts);
-            log.info("成功导入用户-岗位关联数据");
-        }
-        return  realRow;
-    }
-
     /**
      * 修改用户信息
      * 

+ 2 - 1
src/main/java/com/ruoyi/project/tool/gen/controller/GenController.java

@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 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 com.alibaba.fastjson.JSON;
@@ -40,7 +41,7 @@ public class GenController extends BaseController
     }
 
     @RequiresPermissions("tool:gen:list")
-    @GetMapping("/list")
+    @PostMapping("/list")
     @ResponseBody
     public TableDataInfo list(TableInfo tableInfo)
     {

+ 2 - 8
src/main/resources/mybatis/system/RoleMapper.xml

@@ -20,14 +20,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<select id="selectRoleList" parameterType="Role" resultMap="RoleResult">
 		select role_id, role_name, role_key, role_sort, status, create_time, remark from sys_role
 		<where>
-			<if test="roleName != null and roleName != ''">
-				AND role_name like concat('%', #{roleName}, '%')
-			</if>
-			<if test="roleKey != null and roleKey != ''">
-				AND role_key like concat('%', #{roleKey}, '%')
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
+			<if test="searchValue != null and searchValue != ''">
+				AND role_key like concat('%', #{searchValue}, '%') OR role_name like concat('%', #{searchValue}, '%')
 			</if>
 		</where>
 	</select>

+ 4 - 2
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
 	    });

+ 47 - 50
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 '<span class="badge badge-primary">正常</span>';
-	                } else if (value == 1) {
-	                    return '<span class="badge badge-danger">禁用</span>';
-	                }
-	            }
-	        },
-	        {
-	            field: 'createDateTimeStr',
-	            title: '创建时间'
-	        },
-	        {
-	            title: '操作',
-	            align: 'center',
-	            formatter: function(value, row, index) {
-	            	var actions = [];
-					actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="edit(\'' + row.roleId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
-					actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.roleId + '\')"><i class="fa fa-remove"></i>删除</a>');
-					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 '<span class="badge badge-primary">正常</span>';
+                } else if (value == 1) {
+                    return '<span class="badge badge-danger">禁用</span>';
+                }
+            }
+        },
+        {
+            field: 'createDateTimeStr',
+            title: '创建时间'
+        },
+        {
+            title: '操作',
+            align: 'center',
+            formatter: function(value, row, index) {
+            	var actions = [];
+				actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="edit(\'' + row.roleId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+				actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.roleId + '\')"><i class="fa fa-remove"></i>删除</a>');
+				return actions.join('');
+            }
+        }];
+	var url = prefix + "/list";
+	$.initTable(columns, url);
 });
 
 /*角色管理-搜索*/

BIN
src/main/resources/static/template/用户导入模板.xlsx


+ 24 - 24
src/main/resources/templates/include.html

@@ -5,37 +5,37 @@
 	<meta name="keywords" content="">
 	<meta name="description" content="">
 	<link rel="shortcut icon" href="favicon.ico">
-	<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
-	<link href="../static/css/font-awesome.css" th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
+	<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
+	<link th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
 	<!-- bootstrap-table 表格插件样式 -->
-	<link href="../static/ajax/libs/bootstrap-table/bootstrap-table.min.css" th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
-	<link href="../static/ajax/libs/jqTreeGrid/jquery.treegrid.css" th:href="@{/ajax/libs/jqTreeGrid/jquery.treegrid.css}" rel="stylesheet"/>
-	<link href="../static/css/animate.css" th:href="@{/css/animate.css}" rel="stylesheet"/>
-	<link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
-	<link href="../static/css/checkbox.css" th:href="@{/css/checkbox.css}" rel="stylesheet"/>
+	<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
+	<link th:href="@{/ajax/libs/jqTreeGrid/jquery.treegrid.css}" rel="stylesheet"/>
+	<link th:href="@{/css/animate.css}" rel="stylesheet"/>
+	<link th:href="@{/css/style.css}" rel="stylesheet"/>
+	<link th:href="@{/css/checkbox.css}" rel="stylesheet"/>
 </head>
 <div th:fragment="footer">
-	<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
-	<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
+	<script th:src="@{/js/jquery.min.js}"></script>
+	<script th:src="@{/js/bootstrap.min.js}"></script>
 	
 	<!-- bootstrap-table 表格插件 -->
-	<script src="../static/ajax/libs/bootstrap-table/bootstrap-table.min.js" th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js}"></script>
-	<script src="../static/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js" th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
-	<script src="../static/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" th:src="@{/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js}"></script>
-	<script src="../static/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js" th:src="@{/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js}"></script>
+	<script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js}"></script>
+	<script th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js}"></script>
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js}"></script>
 	<!-- jquery-validate 表单验证插件 -->
-	<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
-	<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
-	<script src="../static/ajax/libs/validate/jquery.validate.extend.js" th:src="@{/ajax/libs/validate/jquery.validate.extend.js}"></script>
+	<script th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
+	<script th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
+	<script th:src="@{/ajax/libs/validate/jquery.validate.extend.js}"></script>
 	<!-- jquery-validate 表单树插件 -->
-	<script src="../static/ajax/libs/jqTreeGrid/jquery.treegrid.min.js" th:src="@{/ajax/libs/jqTreeGrid/jquery.treegrid.min.js}"></script>
-	<script src="../static/ajax/libs/jqTreeGrid/jquery.treegrid.extension.js" th:src="@{/ajax/libs/jqTreeGrid/jquery.treegrid.extension.js}"></script>
+	<script th:src="@{/ajax/libs/jqTreeGrid/jquery.treegrid.min.js}"></script>
+	<script th:src="@{/ajax/libs/jqTreeGrid/jquery.treegrid.extension.js}"></script>
 	<!-- jquery-export 表格导出插件 -->
-	<script src="../static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js" th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
-	<script src="../static/ajax/libs/bootstrap-table/extensions/export/tableExport.js" th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
-	<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
-	<script src="../static/ruoyi/js/common.js?v=1.1.6" th:src="@{/ruoyi/js/common.js?v=1.1.6}"></script>
-	<script src="../static/ruoyi/js/ry-ui.js?v=1.1.6" th:src="@{/ruoyi/js/ry-ui.js?v=1.1.6}"></script>
-	<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
+	<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
+	<script th:src="@{/ruoyi/js/common.js?v=1.1.6}"></script>
+	<script th:src="@{/ruoyi/js/ry-ui.js?v=1.1.6}"></script>
 	<script src="http://tajs.qq.com/stats?sId=62048022"></script>
+	<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
 </div>

+ 10 - 10
src/main/resources/templates/index.html

@@ -10,11 +10,11 @@
     <!--[if lt IE 9]>
     <meta http-equiv="refresh" content="0;ie.html"/>
     <![endif]-->
-    <link href="../static/favicon.ico" th:href="@{favicon.ico}" rel="stylesheet"/>
-    <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
-    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
-    <link href="../static/css/animate.css" th:href="@{/css/animate.css}" rel="stylesheet"/>
-    <link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
+    <link th:href="@{favicon.ico}" rel="stylesheet"/>
+    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
+    <link th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
+    <link th:href="@{/css/animate.css}" rel="stylesheet"/>
+    <link th:href="@{/css/style.css}" rel="stylesheet"/>
     <style type="text/css">
         .nav > li:hover .dropdown-menu {display: block;}
     </style>
@@ -124,10 +124,10 @@
     <!--右侧部分结束-->
 </div>
 <!-- 全局js -->
-<script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
-<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
-<script src="../static/js/plugins/metisMenu/jquery.metisMenu.js" th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
-<script src="../static/js/plugins/slimscroll/jquery.slimscroll.min.js" th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
-<script src="../static/ruoyi/index.js" th:src="@{/ruoyi/index.js}"></script>
+<script th:src="@{/js/jquery.min.js}"></script>
+<script th:src="@{/js/bootstrap.min.js}"></script>
+<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
+<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
+<script th:src="@{/ruoyi/index.js}"></script>
 </body>
 </html>

+ 2 - 2
src/main/resources/templates/main.html

@@ -415,7 +415,7 @@
             </div>
         </div>
     </div>
-    <script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
-    <script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
+    <script th:src="@{/js/jquery.min.js}"></script>
+    <script th:src="@{/js/bootstrap.min.js}"></script>
 </body>
 </html>

+ 1 - 2
src/main/resources/templates/monitor/job/add.html

@@ -59,7 +59,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/monitor/job/add.js" th:src="@{/ruoyi/monitor/job/add.js}">
-	</script>
+	<script th:src="@{/ruoyi/monitor/job/add.js}"></script>
 </body>
 </html>

+ 1 - 2
src/main/resources/templates/monitor/job/edit.html

@@ -60,7 +60,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/monitor/job/edit.js" th:src="@{/ruoyi/monitor/job/edit.js}">
-	</script>
+	<script th:src="@{/ruoyi/monitor/job/edit.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/monitor/job/job.html

@@ -21,7 +21,7 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/monitor/job/job.js" th:src="@{/ruoyi/monitor/job/job.js}"></script>
+	<script th:src="@{/ruoyi/monitor/job/job.js}"></script>
 	<script th:inline="javascript">
 		var editFlag = [[${@permissionService.hasPermi('monitor:job:edit')}]];
 		var removeFlag = [[${@permissionService.hasPermi('monitor:job:remove')}]];

+ 1 - 1
src/main/resources/templates/monitor/job/jobLog.html

@@ -15,7 +15,7 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/monitor/job/jobLog.js" th:src="@{/ruoyi/monitor/job/jobLog.js}"></script>
+	<script th:src="@{/ruoyi/monitor/job/jobLog.js}"></script>
 	<script th:inline="javascript">
 		var removeFlag = [[${@permissionService.hasPermi('monitor:job:remove')}]];
 	</script>

+ 1 - 1
src/main/resources/templates/monitor/logininfor/logininfor.html

@@ -15,6 +15,6 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/monitor/logininfor/logininfor.js" th:src="@{/ruoyi/monitor/logininfor/logininfor.js}"></script>
+	<script th:src="@{/ruoyi/monitor/logininfor/logininfor.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/monitor/online/online.html

@@ -16,7 +16,7 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/monitor/online/online.js" th:src="@{/ruoyi/monitor/online/online.js}"></script>
+	<script th:src="@{/ruoyi/monitor/online/online.js}"></script>
 	<script th:inline="javascript">
 		var forceFlag = [[${@permissionService.hasPermi('monitor:online:forceLogout')}]];
 	</script>

+ 1 - 1
src/main/resources/templates/monitor/operlog/operlog.html

@@ -16,7 +16,7 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/monitor/operlog/operlog.js" th:src="@{/ruoyi/monitor/operlog/operlog.js}"></script>
+	<script th:src="@{/ruoyi/monitor/operlog/operlog.js}"></script>
 	<script th:inline="javascript">
 		var detailFlag = [[${@permissionService.hasPermi('monitor:operlog:detail')}]];
 	</script>

+ 1 - 2
src/main/resources/templates/system/config/add.html

@@ -47,7 +47,6 @@
     </form>
     </div>
     <div th:include="include::footer"></div>
-    <script src="/ruoyi/system/config/add.js" th:src="@{/ruoyi/system/config/add.js}">
-    </script>
+    <script th:src="@{/ruoyi/system/config/add.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/system/config/config.html

@@ -16,7 +16,7 @@
         </table>
     </div>
     <div th:include="include :: footer"></div>
-    <script src="/ruoyi/system/config/config.js" th:src="@{/ruoyi/system/config/config.js}"></script>
+    <script th:src="@{/ruoyi/system/config/config.js}"></script>
     <script th:inline="javascript">
         var editFlag = [[${@permissionService.hasPermi('system:config:edit')}]];
         var removeFlag = [[${@permissionService.hasPermi('system:config:remove')}]];

+ 1 - 2
src/main/resources/templates/system/config/edit.html

@@ -48,7 +48,6 @@
     	</form>
     </div>
     <div th:include="include::footer"></div>
-    <script src="/ruoyi/system/config/edit.js" th:src="@{/ruoyi/system/config/edit.js}">
-    </script>
+    <script th:src="@{/ruoyi/system/config/edit.js}"></script>
 </body>
 </html>

+ 1 - 2
src/main/resources/templates/system/dept/add.html

@@ -61,7 +61,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/dept/add.js" th:src="@{/ruoyi/system/dept/add.js}">
-	</script>
+	<script th:src="@{/ruoyi/system/dept/add.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/system/dept/dept.html

@@ -16,7 +16,7 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/system/dept/dept.js" th:src="@{/ruoyi/system/dept/dept.js}"></script>
+	<script th:src="@{/ruoyi/system/dept/dept.js}"></script>
 	<script th:inline="javascript">
 		var addFlag = [[${@permissionService.hasPermi('system:dept:add')}]];
 		var editFlag = [[${@permissionService.hasPermi('system:dept:edit')}]];

+ 1 - 2
src/main/resources/templates/system/dept/edit.html

@@ -61,7 +61,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/dept/edit.js" th:src="@{/ruoyi/system/dept/edit.js}">
-	</script>
+	<script th:src="@{/ruoyi/system/dept/edit.js}"></script>
 </body>
 </html>

+ 2 - 2
src/main/resources/templates/system/dept/tree.html

@@ -30,8 +30,8 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
 		<a class="layui-layer-btn1" th:onclick="'javascript:layer_close()'"><i class="fa fa-close"></i> 关闭</a>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js" th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
-	<script src="/ruoyi/system/dept/tree.js" th:src="@{/ruoyi/system/dept/tree.js}"></script>
+	<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
+	<script th:src="@{/ruoyi/system/dept/tree.js}"></script>
 	<script th:inline="javascript">
 		var treeName = [[${treeName}]];
 		$("#treeName").val(treeName);

+ 1 - 1
src/main/resources/templates/system/dict/data/add.html

@@ -69,6 +69,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/dict/data/add.js" th:src="@{/ruoyi/system/dict/data/add.js}"></script>
+	<script th:src="@{/ruoyi/system/dict/data/add.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/system/dict/data/data.html

@@ -20,7 +20,7 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/system/dict/data/data.js" th:src="@{/ruoyi/system/dict/data/data.js}"></script>
+	<script th:src="@{/ruoyi/system/dict/data/data.js}"></script>
 	<script th:inline="javascript">
 		var editFlag = [[${@permissionService.hasPermi('system:dict:edit')}]];
 		var removeFlag = [[${@permissionService.hasPermi('system:dict:remove')}]];

+ 1 - 1
src/main/resources/templates/system/dict/data/edit.html

@@ -70,6 +70,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/dict/data/edit.js" th:src="@{/ruoyi/system/dict/data/edit.js}"></script>
+	<script th:src="@{/ruoyi/system/dict/data/edit.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/system/dict/type/add.html

@@ -42,6 +42,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/dict/type/add.js" th:src="@{/ruoyi/system/dict/type/add.js}"></script>
+	<script th:src="@{/ruoyi/system/dict/type/add.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/system/dict/type/edit.html

@@ -43,6 +43,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/dict/type/edit.js" th:src="@{/ruoyi/system/dict/type/edit.js}"></script>
+	<script th:src="@{/ruoyi/system/dict/type/edit.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/system/dict/type/type.html

@@ -19,7 +19,7 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/system/dict/type/type.js" th:src="@{/ruoyi/system/dict/type/type.js}"></script>
+	<script th:src="@{/ruoyi/system/dict/type/type.js}"></script>
 	<script th:inline="javascript">
 		var editFlag = [[${@permissionService.hasPermi('system:dict:edit')}]];
 		var listFlag = [[${@permissionService.hasPermi('system:dict:list')}]];

+ 2 - 2
src/main/resources/templates/system/menu/add.html

@@ -74,8 +74,8 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/menu/add.js" th:src="@{/ruoyi/system/menu/add.js}"></script>
-	<script src="/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
+	<script th:src="@{/ruoyi/system/menu/add.js}"></script>
+	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
 	 <script>
         $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
     </script>

+ 2 - 2
src/main/resources/templates/system/menu/edit.html

@@ -75,8 +75,8 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/menu/edit.js" th:src="@{/ruoyi/system/menu/edit.js}"></script>
-	<script src="/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
+	<script th:src="@{/ruoyi/system/menu/edit.js}"></script>
+	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
 	 <script>
         $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
     </script>

+ 1 - 1
src/main/resources/templates/system/menu/menu.html

@@ -15,7 +15,7 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/system/menu/menu.js" th:src="@{/ruoyi/system/menu/menu.js}"></script>
+	<script th:src="@{/ruoyi/system/menu/menu.js}"></script>
 	<script th:inline="javascript">
 		var addFlag = [[${@permissionService.hasPermi('system:menu:add')}]];
 		var editFlag = [[${@permissionService.hasPermi('system:menu:edit')}]];

+ 2 - 2
src/main/resources/templates/system/menu/tree.html

@@ -30,8 +30,8 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
 		<a class="layui-layer-btn1" th:onclick="'javascript:layer_close()'"><i class="fa fa-close"></i> 关闭</a>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js" th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
-	<script src="/ruoyi/system/menu/tree.js" th:src="@{/ruoyi/system/menu/tree.js}"></script>
+	<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
+	<script th:src="@{/ruoyi/system/menu/tree.js}"></script>
 	<script th:inline="javascript">
 		var treeName = [[${treeName}]];
 		$("#treeName").val(treeName);

+ 1 - 2
src/main/resources/templates/system/post/add.html

@@ -47,7 +47,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/post/add.js" th:src="@{/ruoyi/system/post/add.js}">
-	</script>
+	<script th:src="@{/ruoyi/system/post/add.js}"></script>
 </body>
 </html>

+ 1 - 2
src/main/resources/templates/system/post/edit.html

@@ -48,7 +48,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/post/edit.js" th:src="@{/ruoyi/system/post/edit.js}">
-	</script>
+	<script th:src="@{/ruoyi/system/post/edit.js}"></script>
 </body>
 </html>

+ 2 - 3
src/main/resources/templates/system/role/add.html

@@ -57,8 +57,7 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js" th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
-	<script src="/ruoyi/system/role/add.js" th:src="@{/ruoyi/system/role/add.js}">
-	</script>
+	<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
+	<script th:src="@{/ruoyi/system/role/add.js}"></script>
 </body>
 </html>

+ 2 - 2
src/main/resources/templates/system/role/edit.html

@@ -58,8 +58,8 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js" th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
-	<script src="/ruoyi/system/role/edit.js" th:src="@{/ruoyi/system/role/edit.js}">
+	<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
+	<script th:src="@{/ruoyi/system/role/edit.js}">
 	</script>
 </body>
 </html>

+ 14 - 63
src/main/resources/templates/system/role/role.html

@@ -3,71 +3,22 @@
 	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <meta charset="utf-8">
 <head th:include="include :: header"></head>
-<body class="white-bg">
-	<div class="row col-sm-12">
-		<div class="ibox float-e-margins">
-			<div class="ibox-title">
-				<h5>角色管理</h5>
-				<div class="ibox-tools">
-					<a href="javascript:add()" shiro:hasPermission="system:role:add">
-						<i class="fa fa-plus"></i>新增
-					</a>
-					<a href="javascript:batchRemove()" shiro:hasPermission="system:role:batchRemove">
-						<i class="fa fa-trash-o"></i>删除
-					</a>
-				</div>
-			</div>
-			<div class="ibox-content">
-				<div class="row">
-					<div class="col-xs-3">
-						<div class="input-group">
-							<div class="input-group-btn">
-								<button class="btn btn-white" type="button">角色名称</button>
-							</div>
-							<input type="text" class="form-control" id="roleName" placeholder="角色名称">
-						</div>
-					</div>
-						
-					<div class="col-xs-3">
-						<div class="input-group">
-							<div class="input-group-btn">
-								<button class="btn btn-white" type="button">权限字符</button>
-							</div>
-							 <input type="text" class="form-control" id="roleKey" placeholder="权限字符">
-						 </div>
-					</div>
-						
-					<div class="col-xs-3">
-						<div class="input-group">
-							 <div class="input-group-btn">
-								 <button class="btn btn-white" type="button">角色状态</button>
-							 </div>
-							 <select class="form-control input-s-sm inline" id="status" th:with="type=${@dictService.selectDictData('sys_normal_disable')}">
-								<option value="">请选择</option>
-								<option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
-							</select>
-						 </div>
-					</div>
-						
-					<div class="col-xs-3">
-						<div class="col-lg-12 col-sm-12">
-							<button type="button" class="btn btn-primary" onclick="search()" id=""><i class="fa fa-search"></i>&nbsp;搜索</button>
-						</div>
-					</div>
-
-				</div>
-				
-				<div class="table-responsive">
-					<table class="bootstrap-table" data-mobile-responsive="true" 
-						data-sort-name="role_sort" data-sort-order="asc">
-					</table>
-				</div>
-			</div>
-		</div>
+<body class="gray-bg">
+	<div class="wrapper wrapper-content">
+		<div class="btn-group hidden-xs" id="toolbar" role="group">
+			<button class="btn btn-outline btn-default" onclick="javascript:add()" shiro:hasPermission="system:role:add">
+                <i class="fa fa-plus"></i> 新增
+            </button>
+			<button class="btn btn-outline btn-default" onclick="javascript:batchRemove()" shiro:hasPermission="system:role:batchRemove">
+	            <i class="fa fa-trash-o"></i> 删除
+	        </button>
+        </div>
+		<table class="bootstrap-table" data-mobile-responsive="true"
+			   data-sort-name="role_sort" data-sort-order="asc">
+		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="../static/ruoyi/js/ry-table.js?v=1.1.6" th:src="@{/ruoyi/js/ry-table.js?v=1.1.6}"></script>
-	<script src="/ruoyi/system/role/role.js" th:src="@{/ruoyi/system/role/role.js}"></script>
+	<script th:src="@{/ruoyi/system/role/role.js}"></script>
 	<script th:inline="javascript">
 		var editFlag = [[${@permissionService.hasPermi('system:role:edit')}]];
 		var removeFlag = [[${@permissionService.hasPermi('system:role:remove')}]];

+ 3 - 4
src/main/resources/templates/system/user/add.html

@@ -92,10 +92,9 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/user/add.js" th:src="@{/ruoyi/system/user/add.js}">
-	</script>
-	<script src="/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
-	<script src="/ajax/libs/select/select2.js" th:src="@{/ajax/libs/select/select2.js}"></script>
+	<script th:src="@{/ruoyi/system/user/add.js}"></script>
+	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
+	<script th:src="@{/ajax/libs/select/select2.js}"></script>
 	<script>
         $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
     </script>

+ 3 - 4
src/main/resources/templates/system/user/edit.html

@@ -87,10 +87,9 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script src="/ruoyi/system/user/edit.js" th:src="@{/ruoyi/system/user/edit.js}">
-	</script>
-	<script src="/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
-	<script src="/ajax/libs/select/select2.js" th:src="@{/ajax/libs/select/select2.js}"></script>
+	<script th:src="@{/ruoyi/system/user/edit.js}"></script>
+	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
+	<script th:src="@{/ajax/libs/select/select2.js}"></script>
 	<script>
         $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
     </script>

+ 1 - 1
src/main/resources/templates/system/user/profile/avatar.html

@@ -23,7 +23,7 @@
 	   <div class="cropped"></div> 
     </div>
 <div th:include="include::footer"></div>
-<script src="/ajax/libs/cropbox/cropbox.js" th:src="@{/ajax/libs/cropbox/cropbox.js}"></script>
+<script th:src="@{/ajax/libs/cropbox/cropbox.js}"></script>
 <script type="text/javascript">
 $(window).load(function() {
     var options = {

+ 3 - 44
src/main/resources/templates/system/user/user.html

@@ -6,8 +6,6 @@
 <link href="/ruoyi/css/RuoYi.css" th:href="@{/ruoyi/css/RuoYi.css}" rel="stylesheet"/>
 <link href="/ajax/libs/jquery-layout/jquery.layout-latest.css" th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>
 <link href="/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css" th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
-<!--  文件输入框-->
-<link href="/css/plugins/fileinput/fileinput.min.css" th:href="@{/css/plugins/fileinput/fileinput.min.css}" rel="stylesheet"/>
 
 <body class="white-bg">
 	<div class="ui-layout-west">
@@ -36,10 +34,6 @@
         	<button class="btn btn-outline btn-default" onclick="javascript:add()" shiro:hasPermission="system:user:add">
                 <i class="fa fa-plus"></i> 新增
             </button>
-			<button class="btn btn-outline btn-default" data-toggle="modal" data-target="#exampleModal" shiro:hasPermission="system:user:batchAdd">
-				<i class="fa fa-plus-square"></i> 批量新增
-			</button>
-
             <button class="btn btn-outline btn-default" onclick="javascript:batchRemove()" shiro:hasPermission="system:user:batchRemove">
                 <i class="fa fa-trash-o"></i> 删除
             </button>
@@ -50,46 +44,11 @@
 			   data-sort-name="create_time" data-sort-order="desc">
 		</table>
 	</div>
-	<!-- Modal -->
-
-	<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
-		<div class="modal-dialog modal-lg" role="document">
-			<div class="modal-content">
-				<div class="modal-header">
-					<h3 class="modal-title" id="exampleModalLabel">导入Execl表</h3>
-					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
-						<span aria-hidden="true">&times;</span>
-					</button>
-					<a  class="btn" style="font-size:15px" href="../static/template/用户导入模板.xlsx" th:href="@{/template/用户导入模板.xlsx}">
-						用户导入模板.xlsx
-					</a>
-				</div>
-					<div class="modal-body">
-						<div class="file-loading">
-							<input id="uploadfile" name="uploadfile" multiple type="file" accept=".xls,.xlsx">
-						</div>
-						<div id="upload-file-errors"></div>
-						<div class="modal-footer">
-							<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
-							<button type="button" class="btn btn-primary" onclick="javascript:batchAdd()">保存</button>
-						</div>
-					</div>
-			</div>
-		</div>
-	</div>
 
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/system/user/user.js" th:src="@{/ruoyi/system/user/user.js}"></script>
-	<script src="/ajax/libs/jquery-layout/jquery.layout-latest.js" th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
-	<script src="/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js" th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
-
-	<!--  文件输入框-->
-	<script src="/js/plugins/fileinput/fileinput.min.js" th:src="@{/js/plugins/fileinput/fileinput.min.js}"></script>
-	<script src="/js/plugins/fileinput/locales/zh.js" th:src="@{/js/plugins/fileinput/locales/zh.js}"></script>
-	<script src="/js/plugins/fileinput/plugins/piexif.js" th:src="@{/js/plugins/fileinput/plugins/piexif.js}"></script>
-	<script src="/js/plugins/fileinput/plugins/purify.js" th:src="@{/js/plugins/fileinput/plugins/purify.js}"></script>
-	<script src="/js/plugins/fileinput/plugins/sortable.js" th:src="@{/js/plugins/fileinput/plugins/sortable.js}"></script>
-
+	<script th:src="@{/ruoyi/system/user/user.js}"></script>
+	<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
+	<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
 	<script th:inline="javascript">
 		var editFlag = [[${@permissionService.hasPermi('system:user:edit')}]];
 		var removeFlag = [[${@permissionService.hasPermi('system:user:remove')}]];

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 4 - 4
src/main/resources/templates/tool/build/build.html


+ 1 - 1
src/main/resources/templates/tool/gen/gen.html

@@ -14,6 +14,6 @@
 		</table>
 	</div>
 	<div th:include="include :: footer"></div>
-	<script src="/ruoyi/tool/gen/gen.js" th:src="@{/ruoyi/tool/gen/gen.js}"></script>
+	<script th:src="@{/ruoyi/tool/gen/gen.js}"></script>
 </body>
 </html>

+ 1 - 2
src/main/resources/templates/vm/html/add.html.vm

@@ -24,7 +24,6 @@
 		</form>
 	</div>
     <div th:include="include::footer"></div>
-    <script src="/ruoyi/${moduleName}/${classname}/add.js" th:src="@{/ruoyi/${moduleName}/${classname}/add.js}">
-    </script>
+    <script th:src="@{/ruoyi/${moduleName}/${classname}/add.js}"></script>
 </body>
 </html>

+ 1 - 2
src/main/resources/templates/vm/html/edit.html.vm

@@ -25,7 +25,6 @@
 		</form>
     </div>
     <div th:include="include::footer"></div>
-    <script src="/ruoyi/${moduleName}/${classname}/edit.js" th:src="@{/ruoyi/${moduleName}/${classname}/edit.js}">
-    </script>
+    <script th:src="@{/ruoyi/${moduleName}/${classname}/edit.js}"></script>
 </body>
 </html>

+ 1 - 1
src/main/resources/templates/vm/html/list.html.vm

@@ -16,7 +16,7 @@
         </table>
     </div>
     <div th:include="include :: footer"></div>
-    <script src="/ruoyi/${moduleName}/${classname}/${classname}.js" th:src="@{/ruoyi/${moduleName}/${classname}/${classname}.js}"></script>
+    <script th:src="@{/ruoyi/${moduleName}/${classname}/${classname}.js}"></script>
     <script th:inline="javascript">
         var editFlag = [[${@permissionService.hasPermi('${moduleName}:${classname}:edit')}]];
         var removeFlag = [[${@permissionService.hasPermi('${moduleName}:${classname}:remove')}]];

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels