1、去掉ry-ui.min

2、登录去掉密码显示,
3、导出调整为绝对路径
4、新增一个detail详细方法
pull/26/head
RuoYi 2018-09-18 17:43:31 +08:00
parent ac14519d76
commit b6048e5429
29 changed files with 126 additions and 169 deletions

View File

@ -9,8 +9,8 @@ public class UserPasswordRetryLimitCountException extends UserException
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public UserPasswordRetryLimitCountException(int retryLimitCount, String password) public UserPasswordRetryLimitCountException(int retryLimitCount)
{ {
super("user.password.retry.limit.count", new Object[] { retryLimitCount, password }); super("user.password.retry.limit.count", new Object[] { retryLimitCount });
} }
} }

View File

@ -1,6 +1,6 @@
package com.ruoyi.common.utils.poi; package com.ruoyi.common.utils.poi;
import java.io.FileNotFoundException; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -34,9 +34,9 @@ import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.ss.util.CellRangeAddressList; import org.apache.poi.ss.util.CellRangeAddressList;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.util.ResourceUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.config.RuoYiConfig;
import com.ruoyi.framework.shiro.web.session.OnlineWebSessionManager; import com.ruoyi.framework.shiro.web.session.OnlineWebSessionManager;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.domain.AjaxResult;
@ -211,13 +211,14 @@ public class ExcelUtil<T>
/** /**
* listexcel * listexcel
* *
* @param list
* @param sheetName * @param sheetName
* @return
*/ */
public AjaxResult exportExcel(List<T> list, String sheetName) public AjaxResult exportExcel(List<T> list, String sheetName)
{ {
OutputStream out = null; OutputStream out = null;
HSSFWorkbook workbook = null; HSSFWorkbook workbook = null;
try try
{ {
// 得到所有定义字段 // 得到所有定义字段
@ -370,7 +371,7 @@ public class ExcelUtil<T>
} }
} }
String filename = encodingFilename(sheetName); String filename = encodingFilename(sheetName);
out = new FileOutputStream(getfile() + filename); out = new FileOutputStream(getAbsoluteFile(filename));
workbook.write(out); workbook.write(out);
return AjaxResult.success(filename); return AjaxResult.success(filename);
} }
@ -465,9 +466,20 @@ public class ExcelUtil<T>
return filename; return filename;
} }
public String getfile() throws FileNotFoundException /**
*
*
* @param filename
*/
public String getAbsoluteFile(String filename)
{ {
return ResourceUtils.getURL("classpath:").getPath() + "static/file/"; String downloadPath = RuoYiConfig.getDownloadPath() + filename;
File desc = new File(downloadPath);
if (!desc.getParentFile().exists())
{
desc.getParentFile().mkdirs();
}
return downloadPath;
} }
} }

View File

@ -33,7 +33,7 @@ public class ResourcesConfig implements WebMvcConfigurer
public void addResourceHandlers(ResourceHandlerRegistry registry) public void addResourceHandlers(ResourceHandlerRegistry registry)
{ {
/** 头像上传路径 */ /** 头像上传路径 */
registry.addResourceHandler("/profile/**").addResourceLocations("file:" + RuoYiConfig.getProfile()); registry.addResourceHandler("/profile/**").addResourceLocations("file:" + RuoYiConfig.getProfile() + "/");
/** swagger配置 */ /** swagger配置 */
registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");

View File

@ -73,4 +73,14 @@ public class RuoYiConfig
RuoYiConfig.addressEnabled = addressEnabled; RuoYiConfig.addressEnabled = addressEnabled;
} }
public static String getAvatarPath()
{
return profile + "/avatar/";
}
public static String getDownloadPath()
{
return profile + "/download/";
}
} }

View File

@ -58,7 +58,7 @@ public class PasswordService
if (!matches(user, password)) if (!matches(user, password))
{ {
AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, Constants.LOGIN_FAIL, MessageUtils.message("user.password.retry.limit.count", retryCount, password))); AsyncManager.me().execute(AsyncFactory.recordLogininfor(loginName, Constants.LOGIN_FAIL, MessageUtils.message("user.password.retry.limit.count", retryCount)));
loginRecordCache.put(loginName, retryCount); loginRecordCache.put(loginName, retryCount);
throw new UserPasswordNotMatchException(); throw new UserPasswordNotMatchException();
} }

View File

@ -7,9 +7,9 @@ import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.framework.config.RuoYiConfig;
/** /**
* *
@ -27,7 +27,7 @@ public class CommonController
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1); String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
try try
{ {
String filePath = ResourceUtils.getURL("classpath:").getPath() + "static/file/" + fileName; String filePath = RuoYiConfig.getDownloadPath() + fileName;
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setContentType("multipart/form-data"); response.setContentType("multipart/form-data");

View File

@ -54,19 +54,12 @@ public class JobController extends BaseController
@RequiresPermissions("monitor:job:export") @RequiresPermissions("monitor:job:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Job job) throws Exception public AjaxResult export(Job job)
{
try
{ {
List<Job> list = jobService.selectJobList(job); List<Job> list = jobService.selectJobList(job);
ExcelUtil<Job> util = new ExcelUtil<Job>(Job.class); ExcelUtil<Job> util = new ExcelUtil<Job>(Job.class);
return util.exportExcel(list, "job"); return util.exportExcel(list, "job");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
@Log(title = "定时任务", businessType = BusinessType.DELETE) @Log(title = "定时任务", businessType = BusinessType.DELETE)
@RequiresPermissions("monitor:job:remove") @RequiresPermissions("monitor:job:remove")

View File

@ -52,19 +52,12 @@ public class JobLogController extends BaseController
@RequiresPermissions("monitor:job:export") @RequiresPermissions("monitor:job:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(JobLog jobLog) throws Exception public AjaxResult export(JobLog jobLog)
{
try
{ {
List<JobLog> list = jobLogService.selectJobLogList(jobLog); List<JobLog> list = jobLogService.selectJobLogList(jobLog);
ExcelUtil<JobLog> util = new ExcelUtil<JobLog>(JobLog.class); ExcelUtil<JobLog> util = new ExcelUtil<JobLog>(JobLog.class);
return util.exportExcel(list, "jobLog"); return util.exportExcel(list, "jobLog");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
@Log(title = "调度日志", businessType = BusinessType.DELETE) @Log(title = "调度日志", businessType = BusinessType.DELETE)
@RequiresPermissions("monitor:job:remove") @RequiresPermissions("monitor:job:remove")

View File

@ -52,19 +52,12 @@ public class LogininforController extends BaseController
@RequiresPermissions("monitor:logininfor:export") @RequiresPermissions("monitor:logininfor:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Logininfor logininfor) throws Exception public AjaxResult export(Logininfor logininfor)
{
try
{ {
List<Logininfor> list = logininforService.selectLogininforList(logininfor); List<Logininfor> list = logininforService.selectLogininforList(logininfor);
ExcelUtil<Logininfor> util = new ExcelUtil<Logininfor>(Logininfor.class); ExcelUtil<Logininfor> util = new ExcelUtil<Logininfor>(Logininfor.class);
return util.exportExcel(list, "logininfor"); return util.exportExcel(list, "logininfor");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
@RequiresPermissions("monitor:logininfor:remove") @RequiresPermissions("monitor:logininfor:remove")
@Log(title = "登陆日志", businessType = BusinessType.DELETE) @Log(title = "登陆日志", businessType = BusinessType.DELETE)

View File

@ -54,19 +54,12 @@ public class OperlogController extends BaseController
@RequiresPermissions("monitor:operlog:export") @RequiresPermissions("monitor:operlog:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(OperLog operLog) throws Exception public AjaxResult export(OperLog operLog)
{
try
{ {
List<OperLog> list = operLogService.selectOperLogList(operLog); List<OperLog> list = operLogService.selectOperLogList(operLog);
ExcelUtil<OperLog> util = new ExcelUtil<OperLog>(OperLog.class); ExcelUtil<OperLog> util = new ExcelUtil<OperLog>(OperLog.class);
return util.exportExcel(list, "operLog"); return util.exportExcel(list, "operLog");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
@RequiresPermissions("monitor:operlog:remove") @RequiresPermissions("monitor:operlog:remove")
@PostMapping("/remove") @PostMapping("/remove")

View File

@ -57,19 +57,12 @@ public class ConfigController extends BaseController
@RequiresPermissions("system:config:export") @RequiresPermissions("system:config:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Config config) throws Exception public AjaxResult export(Config config)
{
try
{ {
List<Config> list = configService.selectConfigList(config); List<Config> list = configService.selectConfigList(config);
ExcelUtil<Config> util = new ExcelUtil<Config>(Config.class); ExcelUtil<Config> util = new ExcelUtil<Config>(Config.class);
return util.exportExcel(list, "config"); return util.exportExcel(list, "config");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
/** /**
* *

View File

@ -54,19 +54,12 @@ public class DictDataController extends BaseController
@RequiresPermissions("system:dict:export") @RequiresPermissions("system:dict:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(DictData dictData) throws Exception public AjaxResult export(DictData dictData)
{
try
{ {
List<DictData> list = dictDataService.selectDictDataList(dictData); List<DictData> list = dictDataService.selectDictDataList(dictData);
ExcelUtil<DictData> util = new ExcelUtil<DictData>(DictData.class); ExcelUtil<DictData> util = new ExcelUtil<DictData>(DictData.class);
return util.exportExcel(list, "dictData"); return util.exportExcel(list, "dictData");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
/** /**
* *

View File

@ -54,19 +54,13 @@ public class DictTypeController extends BaseController
@RequiresPermissions("system:dict:export") @RequiresPermissions("system:dict:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(DictType dictType) throws Exception public AjaxResult export(DictType dictType)
{
try
{ {
List<DictType> list = dictTypeService.selectDictTypeList(dictType); List<DictType> list = dictTypeService.selectDictTypeList(dictType);
ExcelUtil<DictType> util = new ExcelUtil<DictType>(DictType.class); ExcelUtil<DictType> util = new ExcelUtil<DictType>(DictType.class);
return util.exportExcel(list, "dictType"); return util.exportExcel(list, "dictType");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
/** /**
* *

View File

@ -54,19 +54,12 @@ public class PostController extends BaseController
@RequiresPermissions("system:post:export") @RequiresPermissions("system:post:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Post post) throws Exception public AjaxResult export(Post post)
{
try
{ {
List<Post> list = postService.selectPostList(post); List<Post> list = postService.selectPostList(post);
ExcelUtil<Post> util = new ExcelUtil<Post>(Post.class); ExcelUtil<Post> util = new ExcelUtil<Post>(Post.class);
return util.exportExcel(list, "post"); return util.exportExcel(list, "post");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
@RequiresPermissions("system:post:remove") @RequiresPermissions("system:post:remove")
@Log(title = "岗位管理", businessType = BusinessType.DELETE) @Log(title = "岗位管理", businessType = BusinessType.DELETE)

View File

@ -56,19 +56,12 @@ public class RoleController extends BaseController
@RequiresPermissions("system:role:export") @RequiresPermissions("system:role:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Role role) throws Exception public AjaxResult export(Role role)
{
try
{ {
List<Role> list = roleService.selectRoleList(role); List<Role> list = roleService.selectRoleList(role);
ExcelUtil<Role> util = new ExcelUtil<Role>(Role.class); ExcelUtil<Role> util = new ExcelUtil<Role>(Role.class);
return util.exportExcel(list, "role"); return util.exportExcel(list, "role");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
/** /**
* *

View File

@ -16,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.FileUploadUtils;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.config.RuoYiConfig;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.service.DictService; import com.ruoyi.framework.web.service.DictService;
@ -137,7 +138,7 @@ public class ProfileController extends BaseController
{ {
if (!file.isEmpty()) if (!file.isEmpty())
{ {
String avatar = FileUploadUtils.upload(file); String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file);
user.setAvatar(avatar); user.setAvatar(avatar);
if (userService.updateUserInfo(user) > 0) if (userService.updateUserInfo(user) > 0)
{ {

View File

@ -64,19 +64,12 @@ public class UserController extends BaseController
@RequiresPermissions("system:user:export") @RequiresPermissions("system:user:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(User user) throws Exception public AjaxResult export(User user)
{
try
{ {
List<User> list = userService.selectUserList(user); List<User> list = userService.selectUserList(user);
ExcelUtil<User> util = new ExcelUtil<User>(User.class); ExcelUtil<User> util = new ExcelUtil<User>(User.class);
return util.exportExcel(list, "user"); return util.exportExcel(list, "user");
} }
catch (Exception e)
{
return error("导出Excel失败请联系网站管理员");
}
}
/** /**
* *

View File

@ -1,18 +1,19 @@
# 项目相关配置 # 项目相关配置
ruoyi: ruoyi:
#名称 # 名称
name: RuoYi name: RuoYi
#版本 # 版本
version: 2.4.0 version: 2.4.0
#版权年份 # 版权年份
copyrightYear: 2018 copyrightYear: 2018
#头像上传路径 # 文件上传路径
profile: D:/profile/ profile: D:/profile
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: false
#开发环境配置
# 开发环境配置
server: server:
#服务端口 # 服务端口
port: 80 port: 80
servlet: servlet:
# 项目contextPath # 项目contextPath
@ -24,41 +25,48 @@ server:
max-threads: 800 max-threads: 800
# Tomcat启动初始化的线程数默认值25 # Tomcat启动初始化的线程数默认值25
min-spare-threads: 30 min-spare-threads: 30
#日志配置
# 日志配置
logging: logging:
level: level:
com.ruoyi: debug com.ruoyi: debug
org.springframework: WARN org.springframework: WARN
org.spring.springboot.dao: debug org.spring.springboot.dao: debug
#用户配置
# 用户配置
user: user:
password: password:
#密码错误{maxRetryCount}次锁定10分钟 # 密码错误{maxRetryCount}次锁定10分钟
maxRetryCount: 5 maxRetryCount: 5
#Spring配置
# Spring配置
spring: spring:
# 模板引擎
thymeleaf: thymeleaf:
mode: HTML mode: HTML
encoding: utf-8 encoding: utf-8
# 禁用缓存 # 禁用缓存
cache: false cache: false
# 资源信息
messages: messages:
#国际化资源文件路径 # 国际化资源文件路径
basename: i18n/messages basename: i18n/messages
jackson: jackson:
time-zone: GMT+8 time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
profiles: profiles:
active: druid active: druid
#文件上传 # 文件上传
servlet: servlet:
multipart: multipart:
max-file-size: 30MB max-file-size: 30MB
max-request-size: 30MB max-request-size: 30MB
# 服务模块
devtools: devtools:
restart: restart:
#热部署开关 # 热部署开关
enabled: true enabled: true
# MyBatis # MyBatis
mybatis: mybatis:
# 搜索指定包别名 # 搜索指定包别名
@ -67,12 +75,14 @@ mybatis:
mapperLocations: classpath:mybatis/**/*Mapper.xml mapperLocations: classpath:mybatis/**/*Mapper.xml
# 加载全局的配置文件 # 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper
# PageHelper分页插件
pagehelper: pagehelper:
helperDialect: mysql helperDialect: mysql
reasonable: true reasonable: true
supportMethodsArguments: true supportMethodsArguments: true
params: count=countSql params: count=countSql
# Shiro # Shiro
shiro: shiro:
user: user:
@ -102,6 +112,7 @@ shiro:
dbSyncPeriod: 1 dbSyncPeriod: 1
# 相隔多久检查一次session的有效性默认就是10分钟 # 相隔多久检查一次session的有效性默认就是10分钟
validationInterval: 10 validationInterval: 10
# 防止XSS攻击 # 防止XSS攻击
xss: xss:
# 过滤开关 # 过滤开关
@ -110,6 +121,7 @@ xss:
excludes: /system/notice/* excludes: /system/notice/*
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*
# 代码生成 # 代码生成
gen: gen:
# 作者 # 作者

View File

@ -3,7 +3,7 @@ not.null=* 必须填写
user.jcaptcha.error=验证码错误 user.jcaptcha.error=验证码错误
user.not.exists=用户不存在/密码错误 user.not.exists=用户不存在/密码错误
user.password.not.match=用户不存在/密码错误 user.password.not.match=用户不存在/密码错误
user.password.retry.limit.count=密码输入错误{0}次{1} user.password.retry.limit.count=密码输入错误{0}次
user.password.retry.limit.exceed=密码输入错误{0}次帐户锁定10分钟 user.password.retry.limit.exceed=密码输入错误{0}次帐户锁定10分钟
user.password.delete=对不起,您的账号已被删除 user.password.delete=对不起,您的账号已被删除
user.blocked=用户已封禁,原因:{0} user.blocked=用户已封禁,原因:{0}

File diff suppressed because one or more lines are too long

View File

@ -398,6 +398,11 @@
post: function(url, data) { post: function(url, data) {
$.operate.submit(url, "post", "json", data); $.operate.submit(url, "post", "json", data);
}, },
// 详细信息
detail: function(id) {
var url = $.common.isEmpty(id) ? $.table._option.detailUrl : $.table._option.detailUrl.replace("{id}", id);
$.modal.open($.table._option.modalName + "详细", url);
},
// 删除信息 // 删除信息
remove: function(id) { remove: function(id) {
$.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() { $.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
<link th:href="@{/css/animate.css}" rel="stylesheet"/> <link th:href="@{/css/animate.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/> <link th:href="@{/css/style.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/select/select2.css}" rel="stylesheet"/> <link th:href="@{/ajax/libs/select/select2.css}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.min.css}" rel="stylesheet"/> <link th:href="@{/ruoyi/css/ry-ui.css}" rel="stylesheet"/>
</head> </head>
<div th:fragment="footer"> <div th:fragment="footer">
<script th:src="@{/js/jquery.min.js}"></script> <script th:src="@{/js/jquery.min.js}"></script>
@ -39,7 +39,7 @@
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script> <script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script th:src="@{/ajax/libs/layui/layui.js}"></script> <script th:src="@{/ajax/libs/layui/layui.js}"></script>
<script th:src="@{/ruoyi/js/common.js?v=2.4.0}"></script> <script th:src="@{/ruoyi/js/common.js?v=2.4.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script> <script th:src="@{/ruoyi/js/ry-ui.js?v=2.4.0}"></script>
<script src="http://tajs.qq.com/stats?sId=62048022"></script> <script src="http://tajs.qq.com/stats?sId=62048022"></script>
<script th:inline="javascript"> var ctx = [[@{/}]]; </script> <script th:inline="javascript"> var ctx = [[@{/}]]; </script>
</div> </div>

View File

@ -15,7 +15,7 @@
<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/> <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link th:href="@{/css/animate.css}" rel="stylesheet"/> <link th:href="@{/css/animate.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/> <link th:href="@{/css/style.css}" rel="stylesheet"/>
<link th:href="@{/ruoyi/css/ry-ui.min.css?v=2.4.0}" rel="stylesheet"/> <link th:href="@{/ruoyi/css/ry-ui.css?v=2.4.0}" rel="stylesheet"/>
<style type="text/css"> <style type="text/css">
.nav > li:hover .dropdown-menu {display: block;} .nav > li:hover .dropdown-menu {display: block;}
</style> </style>
@ -32,10 +32,10 @@
<ul class="nav" id="side-menu"> <ul class="nav" id="side-menu">
<li class="nav-header"> <li class="nav-header">
<div class="dropdown profile-element"> <span> <div class="dropdown profile-element"> <span>
<img th:src="(${user.avatar} == '') ? '/img/profile.jpg' : '/profile/' + ${user.avatar}" alt="image" class="img-circle" height="60" width="60"/></span> <img th:src="(${user.avatar} == '') ? '/img/profile.jpg' : '/profile/avatar/' + ${user.avatar}" alt="image" class="img-circle" height="60" width="60"/></span>
<a data-toggle="dropdown" class="dropdown-toggle" href="#"> <a data-toggle="dropdown" class="dropdown-toggle" href="#">
<span class="clear"><span class="block m-t-xs"><strong class="font-bold">[[${user.userName}]]</strong></span> <span class="clear"><span class="block m-t-xs"><strong class="font-bold" th:text="${user.userName}">用户</strong></span>
<span class="text-muted text-xs block"><span th:if="${not #strings.isEmpty(user.dept)}">[[${user.dept.deptName}]]</span> <b class="caret"></b></span> </span> </a> <span class="text-muted text-xs block"><span th:text="${user.dept?.deptName}">部门</span> <b class="caret"></b></span> </span> </a>
<ul class="dropdown-menu animated fadeInRight m-t-xs"> <ul class="dropdown-menu animated fadeInRight m-t-xs">
<li><a class="menuItem" th:href="@{/system/user/profile}">个人信息</a></li> <li><a class="menuItem" th:href="@{/system/user/profile}">个人信息</a></li>
<li class="divider"></li> <li class="divider"></li>
@ -136,7 +136,7 @@
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script> <script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script> <script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="http://tajs.qq.com/stats?sId=62048022"></script> <script src="http://tajs.qq.com/stats?sId=62048022"></script>
<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script> <script th:src="@{/ruoyi/js/ry-ui.js?v=2.4.0}"></script>
<script th:src="@{/ruoyi/index.js}"></script> <script th:src="@{/ruoyi/index.js}"></script>
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script> <script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
</body> </body>

View File

@ -12,7 +12,7 @@
<link href="../static/css/style.css" th:href="@{css/style.css}" rel="stylesheet"/> <link href="../static/css/style.css" th:href="@{css/style.css}" rel="stylesheet"/>
<link href="../static/css/login.min.css" th:href="@{css/login.min.css}" rel="stylesheet"/> <link href="../static/css/login.min.css" th:href="@{css/login.min.css}" rel="stylesheet"/>
<link href="../static/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/> <link href="../static/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
<link href="../static/ruoyi/css/ry-ui.min.css" th:href="@{/ruoyi/css/ry-ui.min.css?v=2.4.0}" rel="stylesheet"/> <link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=2.4.0}" rel="stylesheet"/>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" /> <meta http-equiv="refresh" content="0;ie.html" />
<![endif]--> <![endif]-->
@ -83,7 +83,7 @@
<script src="../static/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script> <script src="../static/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script> <script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="http://tajs.qq.com/stats?sId=62048022"></script> <script src="http://tajs.qq.com/stats?sId=62048022"></script>
<script src="../static/ruoyi/js/ry-ui.min.js" th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script> <script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=2.4.0}"></script>
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script> <script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
</body> </body>
</html> </html>

View File

@ -59,10 +59,12 @@
$(function() { $(function() {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
detailUrl: prefix + "/detail/{id}",
removeUrl: prefix + "/remove", removeUrl: prefix + "/remove",
exportUrl: prefix + "/export", exportUrl: prefix + "/export",
sortName: "operTime", sortName: "operTime",
sortOrder: "desc", sortOrder: "desc",
modalName: "日志",
search: false, search: false,
showExport: false, showExport: false,
columns: [{ columns: [{
@ -123,19 +125,13 @@
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="#" onclick="detail(\'' + row.operId + '\')"><i class="fa fa-search"></i>详细</a>'); actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="#" onclick="$.operate.detail(\'' + row.operId + '\')"><i class="fa fa-search"></i>详细</a>');
return actions.join(''); return actions.join('');
} }
}] }]
}; };
$.table.init(options); $.table.init(options);
}); });
/*操作日志-详细*/
function detail(id) {
var url = prefix + '/detail/' + id;
$.modal.open("操作日志详细", url);
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -30,7 +30,7 @@ $(window).load(function() {
var options = { var options = {
thumbBox: '.thumbBox', thumbBox: '.thumbBox',
spinner: '.spinner', spinner: '.spinner',
imgSrc: $.common.isEmpty(avatar) ? '/img/profile.jpg' : '/profile/' + avatar imgSrc: $.common.isEmpty(avatar) ? '/img/profile.jpg' : '/profile/avatar/' + avatar
} }
var cropper = $('.imageBox').cropbox(options); var cropper = $('.imageBox').cropbox(options);
$('#avatar').on('change', $('#avatar').on('change',

View File

@ -35,7 +35,7 @@
<div class="contact-box"> <div class="contact-box">
<div class="col-sm-4"> <div class="col-sm-4">
<div class="text-center"> <div class="text-center">
<img alt="image" class="img-circle m-t-xs img-responsive" th:src="(${user.avatar} == '') ? '/img/profile.jpg' : '/profile/' + ${user.avatar}"> <img alt="image" class="img-circle m-t-xs img-responsive" th:src="(${user.avatar} == '') ? '/img/profile.jpg' : '/profile/avatar/' + ${user.avatar}">
<div class="m-t-xs font-bold">[[${user.loginIp}]]</div> <div class="m-t-xs font-bold">[[${user.loginIp}]]</div>
</div> </div>
</div> </div>
@ -43,7 +43,7 @@
<h3><strong>[[${user.loginName}]]</strong></h3> <h3><strong>[[${user.loginName}]]</strong></h3>
<p><i class="fa fa-user"></i> [[${user.userName}]] / [[${#strings.defaultString(roleGroup,'无角色')}]] <p><i class="fa fa-user"></i> [[${user.userName}]] / [[${#strings.defaultString(roleGroup,'无角色')}]]
<p><i class="fa fa-phone"></i> [[${user.phonenumber}]]</p> <p><i class="fa fa-phone"></i> [[${user.phonenumber}]]</p>
<p><i class="fa fa-group"></i> [[${user.dept.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p> <p><i class="fa fa-group"></i> [[${user.dept?.deptName}]] / [[${#strings.defaultString(postGroup,'无岗位')}]]</p>
<p><i class="fa fa-transgender"></i> 性别:[[${user.sex}]]</p> <p><i class="fa fa-transgender"></i> 性别:[[${user.sex}]]</p>
<p><i class="fa fa-envelope-o"></i> [[${user.email}]]</p> <p><i class="fa fa-envelope-o"></i> [[${user.email}]]</p>
<p><i class="fa fa-calendar"></i> [[${#dates.format(user.createTime, 'yyyy-MM-dd HH:mm:ss')}]]</p> <p><i class="fa fa-calendar"></i> [[${#dates.format(user.createTime, 'yyyy-MM-dd HH:mm:ss')}]]</p>

View File

@ -2,7 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<link th:href="@{/ruoyi/css/ry-ui.min.css}" rel="stylesheet"/> <link th:href="@{/ruoyi/css/ry-ui.css}" rel="stylesheet"/>
<link th:href="@{/ajax/libs/datapicker/datepicker3.css}" rel="stylesheet"/> <link th:href="@{/ajax/libs/datapicker/datepicker3.css}" rel="stylesheet"/>
<style> <style>
.droppable-active{background-color:#ffe!important}.tools a{cursor:pointer;font-size:80%}.form-body .col-md-6,.form-body .col-md-12{min-height:400px}.draggable{cursor:move} .droppable-active{background-color:#ffe!important}.tools a{cursor:pointer;font-size:80%}.form-body .col-md-6,.form-body .col-md-12{min-height:400px}.draggable{cursor:move}