diff --git a/sql/ry_20180822.sql b/sql/ry_20180823.sql similarity index 90% rename from sql/ry_20180822.sql rename to sql/ry_20180823.sql index 05bfa92d6..f57a8ca7d 100644 --- a/sql/ry_20180822.sql +++ b/sql/ry_20180823.sql @@ -431,8 +431,8 @@ create table sys_dict_data dict_label varchar(100) default '' comment '字典标签', dict_value varchar(100) default '' comment '字典键值', dict_type varchar(100) default '' comment '字典类型', - css_class varchar(500) default '' comment '样式属性', - list_class varchar(500) default '' comment '回显样式', + css_class varchar(500) default '' comment '样式属性(其他样式扩展)', + list_class varchar(500) default '' comment '表格回显样式', is_default char(1) default 'N' comment '是否默认(Y是 N否)', status char(1) default '0' comment '状态(0正常 1停用)', create_by varchar(64) default '' comment '创建者', @@ -444,31 +444,31 @@ create table sys_dict_data ) engine=innodb auto_increment=100 default charset=utf8 comment = '字典数据表'; -insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别男'); -insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别女'); -insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别未知'); -insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '显示菜单'); -insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '隐藏菜单'); -insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); -insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); -insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); -insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); -insert into sys_dict_data values(10, 1, '是', 'Y', 'sys_yes_no', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认是'); -insert into sys_dict_data values(11, 2, '否', 'N', 'sys_yes_no', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认否'); -insert into sys_dict_data values(12, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知'); -insert into sys_dict_data values(13, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '公告'); -insert into sys_dict_data values(14, 1, '正常', '0', 'sys_notice_status', 'radio radio-info radio-inline', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); -insert into sys_dict_data values(15, 2, '关闭', '1', 'sys_notice_status', 'radio radio-danger radio-inline', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '关闭状态'); -insert into sys_dict_data values(16, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(17, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(18, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(19, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(20, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(21, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(22, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(23, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(24, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); -insert into sys_dict_data values(25, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); +insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别男'); +insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别女'); +insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别未知'); +insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '显示菜单'); +insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '隐藏菜单'); +insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); +insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); +insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); +insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); +insert into sys_dict_data values(10, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认是'); +insert into sys_dict_data values(11, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认否'); +insert into sys_dict_data values(12, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知'); +insert into sys_dict_data values(13, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '公告'); +insert into sys_dict_data values(14, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); +insert into sys_dict_data values(15, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '关闭状态'); +insert into sys_dict_data values(16, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(17, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(18, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(19, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(20, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(21, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(22, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(23, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(24, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); +insert into sys_dict_data values(25, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); -- ---------------------------- diff --git a/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java b/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java index 3c55fda37..da22fe264 100644 --- a/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java +++ b/src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java @@ -10,7 +10,6 @@ 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.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; @@ -134,12 +133,7 @@ public class ConfigController extends BaseController @ResponseBody public String checkConfigKeyUnique(Config config) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(config)) - { - uniqueFlag = configService.checkConfigKeyUnique(config); - } - return uniqueFlag; + return configService.checkConfigKeyUnique(config); } } diff --git a/src/main/java/com/ruoyi/project/system/dept/controller/DeptController.java b/src/main/java/com/ruoyi/project/system/dept/controller/DeptController.java index dce032734..4edbde523 100644 --- a/src/main/java/com/ruoyi/project/system/dept/controller/DeptController.java +++ b/src/main/java/com/ruoyi/project/system/dept/controller/DeptController.java @@ -11,7 +11,6 @@ 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.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.web.controller.BaseController; @@ -120,12 +119,7 @@ public class DeptController extends BaseController @ResponseBody public String checkDeptNameUnique(Dept dept) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(dept)) - { - uniqueFlag = deptService.checkDeptNameUnique(dept); - } - return uniqueFlag; + return deptService.checkDeptNameUnique(dept); } /** diff --git a/src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java b/src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java index 4bfd98132..5fd2ef57a 100644 --- a/src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java +++ b/src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java @@ -10,7 +10,6 @@ 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.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; @@ -147,11 +146,6 @@ public class DictTypeController extends BaseController @ResponseBody public String checkDictTypeUnique(DictType dictType) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(dictType)) - { - uniqueFlag = dictTypeService.checkDictTypeUnique(dictType); - } - return uniqueFlag; + return dictTypeService.checkDictTypeUnique(dictType); } } diff --git a/src/main/java/com/ruoyi/project/system/menu/controller/MenuController.java b/src/main/java/com/ruoyi/project/system/menu/controller/MenuController.java index 5f9c4878d..bf69afc1d 100644 --- a/src/main/java/com/ruoyi/project/system/menu/controller/MenuController.java +++ b/src/main/java/com/ruoyi/project/system/menu/controller/MenuController.java @@ -11,7 +11,6 @@ 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.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.framework.web.controller.BaseController; @@ -142,12 +141,7 @@ public class MenuController extends BaseController @ResponseBody public String checkMenuNameUnique(Menu menu) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(menu)) - { - uniqueFlag = menuService.checkMenuNameUnique(menu); - } - return uniqueFlag; + return menuService.checkMenuNameUnique(menu); } /** diff --git a/src/main/java/com/ruoyi/project/system/post/controller/PostController.java b/src/main/java/com/ruoyi/project/system/post/controller/PostController.java index 71a084d95..bef020367 100644 --- a/src/main/java/com/ruoyi/project/system/post/controller/PostController.java +++ b/src/main/java/com/ruoyi/project/system/post/controller/PostController.java @@ -10,7 +10,6 @@ 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.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; @@ -135,12 +134,7 @@ public class PostController extends BaseController @ResponseBody public String checkPostNameUnique(Post post) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(post)) - { - uniqueFlag = postService.checkPostNameUnique(post); - } - return uniqueFlag; + return postService.checkPostNameUnique(post); } /** @@ -150,12 +144,7 @@ public class PostController extends BaseController @ResponseBody public String checkPostCodeUnique(Post post) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(post)) - { - uniqueFlag = postService.checkPostCodeUnique(post); - } - return uniqueFlag; + return postService.checkPostCodeUnique(post); } } diff --git a/src/main/java/com/ruoyi/project/system/role/controller/RoleController.java b/src/main/java/com/ruoyi/project/system/role/controller/RoleController.java index 6bab38cec..d77969e7f 100644 --- a/src/main/java/com/ruoyi/project/system/role/controller/RoleController.java +++ b/src/main/java/com/ruoyi/project/system/role/controller/RoleController.java @@ -11,7 +11,6 @@ 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.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; @@ -140,12 +139,7 @@ public class RoleController extends BaseController @ResponseBody public String checkRoleNameUnique(Role role) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(role)) - { - uniqueFlag = roleService.checkRoleNameUnique(role); - } - return uniqueFlag; + return roleService.checkRoleNameUnique(role); } /** @@ -155,12 +149,7 @@ public class RoleController extends BaseController @ResponseBody public String checkRoleKeyUnique(Role role) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(role)) - { - uniqueFlag = roleService.checkRoleKeyUnique(role); - } - return uniqueFlag; + return roleService.checkRoleKeyUnique(role); } /** diff --git a/src/main/java/com/ruoyi/project/system/user/controller/UserController.java b/src/main/java/com/ruoyi/project/system/user/controller/UserController.java index d8013ebf0..d8363405e 100644 --- a/src/main/java/com/ruoyi/project/system/user/controller/UserController.java +++ b/src/main/java/com/ruoyi/project/system/user/controller/UserController.java @@ -176,12 +176,7 @@ public class UserController extends BaseController @ResponseBody public String checkLoginNameUnique(User user) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(user)) - { - uniqueFlag = userService.checkLoginNameUnique(user.getLoginName()); - } - return uniqueFlag; + return userService.checkLoginNameUnique(user.getLoginName()); } /** @@ -191,12 +186,7 @@ public class UserController extends BaseController @ResponseBody public String checkPhoneUnique(User user) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(user)) - { - uniqueFlag = userService.checkPhoneUnique(user); - } - return uniqueFlag; + return userService.checkPhoneUnique(user); } /** @@ -206,11 +196,6 @@ public class UserController extends BaseController @ResponseBody public String checkEmailUnique(User user) { - String uniqueFlag = "0"; - if (StringUtils.isNotNull(user)) - { - uniqueFlag = userService.checkEmailUnique(user); - } - return uniqueFlag; + return userService.checkEmailUnique(user); } } \ No newline at end of file diff --git a/src/main/resources/static/css/checkbox.css b/src/main/resources/static/css/checkbox.css deleted file mode 100644 index f61a64e06..000000000 --- a/src/main/resources/static/css/checkbox.css +++ /dev/null @@ -1,251 +0,0 @@ -.checkbox { - padding-left: 20px; -} -.checkbox label { - display: inline-block; - vertical-align: middle; - position: relative; - padding-left: 5px; -} -.checkbox label::before { - content: ""; - display: inline-block; - position: absolute; - width: 17px; - height: 17px; - left: 0; - margin-left: -20px; - border: 1px solid #cccccc; - border-radius: 3px; - background-color: #fff; - -webkit-transition: border 0.15s ease-in-out, color 0.15s ease-in-out; - -o-transition: border 0.15s ease-in-out, color 0.15s ease-in-out; - transition: border 0.15s ease-in-out, color 0.15s ease-in-out; -} -.checkbox label::after { - display: inline-block; - position: absolute; - width: 16px; - height: 16px; - left: 0; - top: 0; - margin-left: -20px; - padding-left: 3px; - padding-top: 1px; - font-size: 11px; - color: #555555; -} -.checkbox input[type="checkbox"], -.checkbox input[type="radio"] { - opacity: 0; - z-index: 1; -} -.checkbox input[type="checkbox"]:focus + label::before, -.checkbox input[type="radio"]:focus + label::before { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.checkbox input[type="checkbox"]:checked + label::after, -.checkbox input[type="radio"]:checked + label::after { - font-family: "FontAwesome"; - content: "\f00c"; -} -.checkbox input[type="checkbox"]:disabled + label, -.checkbox input[type="radio"]:disabled + label { - opacity: 0.65; -} -.checkbox input[type="checkbox"]:disabled + label::before, -.checkbox input[type="radio"]:disabled + label::before { - background-color: #eeeeee; - cursor: not-allowed; -} -.checkbox.checkbox-circle label::before { - border-radius: 50%; -} -.checkbox.checkbox-inline { - margin-top: 0; -} - -.checkbox-primary input[type="checkbox"]:checked + label::before, -.checkbox-primary input[type="radio"]:checked + label::before { - background-color: #337ab7; - border-color: #337ab7; -} -.checkbox-primary input[type="checkbox"]:checked + label::after, -.checkbox-primary input[type="radio"]:checked + label::after { - color: #fff; -} - -.checkbox-danger input[type="checkbox"]:checked + label::before, -.checkbox-danger input[type="radio"]:checked + label::before { - background-color: #d9534f; - border-color: #d9534f; -} -.checkbox-danger input[type="checkbox"]:checked + label::after, -.checkbox-danger input[type="radio"]:checked + label::after { - color: #fff; -} - -.checkbox-info input[type="checkbox"]:checked + label::before, -.checkbox-info input[type="radio"]:checked + label::before { - background-color: #5bc0de; - border-color: #5bc0de; -} -.checkbox-info input[type="checkbox"]:checked + label::after, -.checkbox-info input[type="radio"]:checked + label::after { - color: #fff; -} - -.checkbox-warning input[type="checkbox"]:checked + label::before, -.checkbox-warning input[type="radio"]:checked + label::before { - background-color: #f0ad4e; - border-color: #f0ad4e; -} -.checkbox-warning input[type="checkbox"]:checked + label::after, -.checkbox-warning input[type="radio"]:checked + label::after { - color: #fff; -} - -.checkbox-success input[type="checkbox"]:checked + label::before, -.checkbox-success input[type="radio"]:checked + label::before { - background-color: #5cb85c; - border-color: #5cb85c; -} -.checkbox-success input[type="checkbox"]:checked + label::after, -.checkbox-success input[type="radio"]:checked + label::after { - color: #fff; -} - -.radio { - padding-left: 20px; -} -.radio label { - display: inline-block; - vertical-align: middle; - position: relative; - padding-left: 5px; -} -.radio label::before { - content: ""; - display: inline-block; - position: absolute; - width: 17px; - height: 17px; - left: 0; - margin-left: -20px; - border: 1px solid #cccccc; - border-radius: 50%; - background-color: #fff; - -webkit-transition: border 0.15s ease-in-out; - -o-transition: border 0.15s ease-in-out; - transition: border 0.15s ease-in-out; -} -.radio label::after { - display: inline-block; - position: absolute; - content: " "; - width: 11px; - height: 11px; - left: 3px; - top: 3px; - margin-left: -20px; - border-radius: 50%; - background-color: #555555; - -webkit-transform: scale(0, 0); - -ms-transform: scale(0, 0); - -o-transform: scale(0, 0); - transform: scale(0, 0); - -webkit-transition: -webkit-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33); - -moz-transition: -moz-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33); - -o-transition: -o-transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33); - transition: transform 0.1s cubic-bezier(0.8, -0.33, 0.2, 1.33); -} -.radio input[type="radio"] { - opacity: 0; - z-index: 1; -} -.radio input[type="radio"]:focus + label::before { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.radio input[type="radio"]:checked + label::after { - -webkit-transform: scale(1, 1); - -ms-transform: scale(1, 1); - -o-transform: scale(1, 1); - transform: scale(1, 1); -} -.radio input[type="radio"]:disabled + label { - opacity: 0.65; -} -.radio input[type="radio"]:disabled + label::before { - cursor: not-allowed; -} -.radio.radio-inline { - margin-top: 0; -} - -.radio-primary input[type="radio"] + label::after { - background-color: #337ab7; -} -.radio-primary input[type="radio"]:checked + label::before { - border-color: #337ab7; -} -.radio-primary input[type="radio"]:checked + label::after { - background-color: #337ab7; -} - -.radio-danger input[type="radio"] + label::after { - background-color: #d9534f; -} -.radio-danger input[type="radio"]:checked + label::before { - border-color: #d9534f; -} -.radio-danger input[type="radio"]:checked + label::after { - background-color: #d9534f; -} - -.radio-info input[type="radio"] + label::after { - background-color: #5bc0de; -} -.radio-info input[type="radio"]:checked + label::before { - border-color: #5bc0de; -} -.radio-info input[type="radio"]:checked + label::after { - background-color: #5bc0de; -} - -.radio-warning input[type="radio"] + label::after { - background-color: #f0ad4e; -} -.radio-warning input[type="radio"]:checked + label::before { - border-color: #f0ad4e; -} -.radio-warning input[type="radio"]:checked + label::after { - background-color: #f0ad4e; -} - -.radio-success input[type="radio"] + label::after { - background-color: #5cb85c; -} -.radio-success input[type="radio"]:checked + label::before { - border-color: #5cb85c; -} -.radio-success input[type="radio"]:checked + label::after { - background-color: #5cb85c; -} - -input[type="checkbox"].styled:checked + label:after, -input[type="radio"].styled:checked + label:after { - font-family: 'FontAwesome'; - content: "\f00c"; -} -input[type="checkbox"] .styled:checked + label::before, -input[type="radio"] .styled:checked + label::before { - color: #fff; -} -input[type="checkbox"] .styled:checked + label::after, -input[type="radio"] .styled:checked + label::after { - color: #fff; -} diff --git a/src/main/resources/static/ruoyi/css/ry-ui.css b/src/main/resources/static/ruoyi/css/ry-ui.css index 09fd3969c..be5116caa 100644 --- a/src/main/resources/static/ruoyi/css/ry-ui.css +++ b/src/main/resources/static/ruoyi/css/ry-ui.css @@ -144,6 +144,15 @@ label.error { max-width: none; } +/** 内联复选框&单选框 */ +.check-box,.radio-box { + display:inline-block; + box-sizing:border-box; + cursor:pointer; + position:relative; + padding-right:20px +} + /** 遮罩层 */ .loaderbox { display: inline-block; @@ -225,20 +234,20 @@ li { padding-left: 10px; } -label{ +label { font-weight: normal; } -.container-div{ +.container-div { padding:10px 35px; height:100%; } -.container-div .row{ +.container-div .row { height: 100%; } -.select-info{ +.select-info { width:100%; background: #fff; border-radius: 6px; @@ -247,28 +256,25 @@ label{ box-shadow: 1px 1px 3px rgba(0,0,0,.2); } -.select-info{ +.select-table { + width:100%; + background: #fff; + border-radius: 6px; + margin-top:10px; + padding-bottom: 13px; + box-shadow: 1px 1px 3px rgba(0,0,0,.2); +} + +.select-info { position: relative; } -.select-info .save-btn,.select-info .close-btn{ - width: 20px; - position: absolute; - right: 20px; - top: 15px; - cursor: pointer; -} - -.select-info .save-btn{ - right: 50px; -} - -.select-info .col-sm-6 .control-label{ +.select-info .col-sm-6 .control-label { color:#333; } @media ( max-width : 768px) { - .select-list { + .select-info { display: none; } } @@ -303,17 +309,17 @@ label{ width:280px; } -.select-list .time input{ +.select-list .select-time input{ width:133px; } -.time label,.time span,.time input{ +.select-time label,.select-time span,.select-time input{ float:left; } -.time label{ +.select-time label{ margin-top: 5px; } -.time span{ +.select-time span{ display: block; margin: 5px 5px; } diff --git a/src/main/resources/static/ruoyi/css/ry-ui.min.css b/src/main/resources/static/ruoyi/css/ry-ui.min.css index 3bf37b7d9..77e7391b7 100644 --- a/src/main/resources/static/ruoyi/css/ry-ui.min.css +++ b/src/main/resources/static/ruoyi/css/ry-ui.min.css @@ -2,4 +2,4 @@ * ruoyi.css * Author: Ruoyi */ -.box{position:relative;border-radius:3px;background:#fff;border-top:3px solid #d2d6de;margin-bottom:20px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,0.1)}.box-header:before,.box-body:before,.box-footer:before,.box-header:after,.box-body:after,.box-footer:after{content:" ";display:table}.box-header:after,.box-body:after,.box-footer:after{clear:both}.btn-box-tool{padding:5px;font-size:12px;background:transparent;color:#97a0b3}.open .btn-box-tool,.btn-box-tool:hover{color:#606c84}.box-main{margin:0;border:0;padding-top:2px;border-radius:0;box-shadow:none}.box-main>.box-header{border-bottom:1px solid #eee;padding:12px 10px 2px 15px}.box-header .box-title{display:inline-block;font-size:18px;margin:0;line-height:1}.box-main>.box-header .box-title{font-size:16px;margin-bottom:13px;float:left}.box-main>.box-header .box-title .fa{font-size:14px;padding-right:3px;margin-top:-2px}.box-main>.box-header .box-tools{position:relative;top:-5px;right:0}.box-main>.box-header .box-tools .btn{padding:3px 10px 5px 10px;font-size:14px;margin-bottom:2px}.box-main>.box-header .box-tools .btn-box-tool{padding:4px 2px}.box-main form>.box-footer,.nav-main form>.box-footer{background:#fafafa}.box-main form>.box-footer .row,.nav-main form>.box-footer .row{margin:5px 0 5px -25px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#1ab394;border-color:#1ab394;padding:1px 10px;color:#fff}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{margin-right:5px;color:rgba(255,255,255,0.7)}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#fff}.select2-container .select2-selection--single .select2-selection__rendered{padding-right:10px}label.error{position:absolute;right:18px;top:5px;color:#ef392b;font-size:12px}.Validform_error,input.error,select.error{background-color:#fbe2e2;border-color:#c66161;color:#c00}.Validform_wrong,.Validform_right,.Validform_warning{display:inline-block;height:20px;font-size:12px;vertical-align:middle;padding-left:25px}.i-checks label.error,.check-box label.error,.radio-box label.error{right:auto;width:150px;left:210px;top:-1px;max-width:none}.loaderbox{display:inline-block;min-width:125px;padding:10px;margin:0 auto;color:#000!important;font-size:13px;font-weight:400;text-align:center;vertical-align:middle;border:1px solid #ddd;background-color:#eee;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 8px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 8px rgba(0,0,0,0.1);box-shadow:0 1px 8px rgba(0,0,0,0.1)}.loaderbox .loading-activity{float:left;width:18px;height:18px;border:solid 2px transparent;border-top-color:#000;border-left-color:#000;border-radius:10px;-webkit-animation:pace-spinner 400ms linear infinite;-moz-animation:pace-spinner 400ms linear infinite;-ms-animation:pace-spinner 400ms linear infinite;-o-animation:pace-spinner 400ms linear infinite;animation:pace-spinner 400ms linear infinite}@media(max-width:767px){.loading-activity{width:18px;height:18px}}@-ms-keyframes pace-spinner{0%{-ms-transform:rotate(0deg);transform:rotate(0deg)}100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes pace-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}li{list-style:none}.time-input{display:block;width:100%;padding-left:10px}label{font-weight:normal}.container-div{padding:10px 35px;height:100%}.container-div .row{height:100%}.select-info{width:100%;background:#fff;border-radius:6px;margin-top:10px;padding-bottom:13px;box-shadow:1px 1px 3px rgba(0,0,0,.2)}.select-info{position:relative}.select-info .save-btn,.select-info .close-btn{width:20px;position:absolute;right:20px;top:15px;cursor:pointer}.select-info .save-btn{right:50px}.select-info .col-sm-6 .control-label{color:#333}@media(max-width :768px){.select-list{display:none}}.select-list li{float:left;color:#333;margin:5px 15px 5px 0}.select-list li input{border:1px solid #ddd;border-radius:4px;background:transparent;outline:0;height:30px;width:280px}.select-list li .submit-btn{border:0;border-radius:4px;background:transparent;outline:0;width:40px;height:23px}.select-list li select{border:1px solid #ddd;border-radius:4px;background:transparent;outline:0;height:30px;width:280px}.select-list .time input{width:133px}.time label,.time span,.time input{float:left}.time label{margin-top:5px}.time span{display:block;margin:5px 5px}.search-btn{background-color:#1ab394;border-color:#1ab394;color:#FFF;margin-bottom:5px;display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;border-radius:3px;vertical-align:middle;cursor:pointer}.table-striped{min-height:75%}.table-striped .bootstrap-table{border:0!important}.table-striped .table,.fixed-table-container,table,.table-striped .table,.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{border-bottom:1px solid #ccc!important;background-color:transparent!important;border:0}.table-striped .table>thead>tr>th,.table-striped .table>tbody>tr>th{border-bottom:1px solid #ccc!important;border-top:0!important}.table-striped .table>thead:first-child>tr:first-child>th{color:#333}.table-bordered td,.table-bordered th{border:1px solid #ddd!important} \ No newline at end of file +.box{position:relative;border-radius:3px;background:#fff;border-top:3px solid #d2d6de;margin-bottom:20px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,0.1)}.box-header:before,.box-body:before,.box-footer:before,.box-header:after,.box-body:after,.box-footer:after{content:" ";display:table}.box-header:after,.box-body:after,.box-footer:after{clear:both}.btn-box-tool{padding:5px;font-size:12px;background:transparent;color:#97a0b3}.open .btn-box-tool,.btn-box-tool:hover{color:#606c84}.box-main{margin:0;border:0;padding-top:2px;border-radius:0;box-shadow:none}.box-main>.box-header{border-bottom:1px solid #eee;padding:12px 10px 2px 15px}.box-header .box-title{display:inline-block;font-size:18px;margin:0;line-height:1}.box-main>.box-header .box-title{font-size:16px;margin-bottom:13px;float:left}.box-main>.box-header .box-title .fa{font-size:14px;padding-right:3px;margin-top:-2px}.box-main>.box-header .box-tools{position:relative;top:-5px;right:0}.box-main>.box-header .box-tools .btn{padding:3px 10px 5px 10px;font-size:14px;margin-bottom:2px}.box-main>.box-header .box-tools .btn-box-tool{padding:4px 2px}.box-main form>.box-footer,.nav-main form>.box-footer{background:#fafafa}.box-main form>.box-footer .row,.nav-main form>.box-footer .row{margin:5px 0 5px -25px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#1ab394;border-color:#1ab394;padding:1px 10px;color:#fff}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{margin-right:5px;color:rgba(255,255,255,0.7)}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#fff}.select2-container .select2-selection--single .select2-selection__rendered{padding-right:10px}label.error{position:absolute;right:18px;top:5px;color:#ef392b;font-size:12px}.Validform_error,input.error,select.error{background-color:#fbe2e2;border-color:#c66161;color:#c00}.Validform_wrong,.Validform_right,.Validform_warning{display:inline-block;height:20px;font-size:12px;vertical-align:middle;padding-left:25px}.i-checks label.error,.check-box label.error,.radio-box label.error{right:auto;width:150px;left:210px;top:-1px;max-width:none}.check-box,.radio-box{display:inline-block;box-sizing:border-box;cursor:pointer;position:relative;padding-right:20px}.loaderbox{display:inline-block;min-width:125px;padding:10px;margin:0 auto;color:#000!important;font-size:13px;font-weight:400;text-align:center;vertical-align:middle;border:1px solid #ddd;background-color:#eee;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 8px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 8px rgba(0,0,0,0.1);box-shadow:0 1px 8px rgba(0,0,0,0.1)}.loaderbox .loading-activity{float:left;width:18px;height:18px;border:solid 2px transparent;border-top-color:#000;border-left-color:#000;border-radius:10px;-webkit-animation:pace-spinner 400ms linear infinite;-moz-animation:pace-spinner 400ms linear infinite;-ms-animation:pace-spinner 400ms linear infinite;-o-animation:pace-spinner 400ms linear infinite;animation:pace-spinner 400ms linear infinite}@media(max-width:767px){.loading-activity{width:18px;height:18px}}@-ms-keyframes pace-spinner{0%{-ms-transform:rotate(0deg);transform:rotate(0deg)}100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes pace-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}li{list-style:none}.time-input{display:block;width:100%;padding-left:10px}label{font-weight:normal}.container-div{padding:10px 35px;height:100%}.container-div .row{height:100%}.select-info{width:100%;background:#fff;border-radius:6px;margin-top:10px;padding-bottom:13px;box-shadow:1px 1px 3px rgba(0,0,0,.2)}.select-table{width:100%;background:#fff;border-radius:6px;margin-top:10px;padding-bottom:13px;box-shadow:1px 1px 3px rgba(0,0,0,.2)}.select-info{position:relative}.select-info .col-sm-6 .control-label{color:#333}@media(max-width :768px){.select-info{display:none}}.select-list li{float:left;color:#333;margin:5px 15px 5px 0}.select-list li input{border:1px solid #ddd;border-radius:4px;background:transparent;outline:0;height:30px;width:280px}.select-list li .submit-btn{border:0;border-radius:4px;background:transparent;outline:0;width:40px;height:23px}.select-list li select{border:1px solid #ddd;border-radius:4px;background:transparent;outline:0;height:30px;width:280px}.select-list .select-time input{width:133px}.select-time label,.select-time span,.select-time input{float:left}.select-time label{margin-top:5px}.select-time span{display:block;margin:5px 5px}.search-btn{background-color:#1ab394;border-color:#1ab394;color:#FFF;margin-bottom:5px;display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;border-radius:3px;vertical-align:middle;cursor:pointer}.table-striped{min-height:75%}.table-striped .bootstrap-table{border:0!important}.table-striped .table,.fixed-table-container,table,.table-striped .table,.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{border-bottom:1px solid #ccc!important;background-color:transparent!important;border:0}.table-striped .table>thead>tr>th,.table-striped .table>tbody>tr>th{border-bottom:1px solid #ccc!important;border-top:0!important}.table-striped .table>thead:first-child>tr:first-child>th{color:#333}.table-bordered td,.table-bordered th{border:1px solid #ddd!important} \ No newline at end of file diff --git a/src/main/resources/static/ruoyi/js/common.js b/src/main/resources/static/ruoyi/js/common.js index 466925e2c..79a149789 100644 --- a/src/main/resources/static/ruoyi/js/common.js +++ b/src/main/resources/static/ruoyi/js/common.js @@ -18,7 +18,13 @@ $(function(){ radioClass: "iradio_square-green", }) } - if ($(".time").length > 0) { + if ($(".radio-box").length > 0) { + $(".radio-box").iCheck({ + checkboxClass: "icheckbox_square-green", + radioClass: "iradio_square-green", + }) + } + if ($(".select-time").length > 0) { layui.use('laydate', function() { var laydate = layui.laydate; laydate.render({ elem: '#startTime', theme: 'molv' }); diff --git a/src/main/resources/static/ruoyi/js/ry-ui.js b/src/main/resources/static/ruoyi/js/ry-ui.js index b321df404..dc59fe343 100644 --- a/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/src/main/resources/static/ruoyi/js/ry-ui.js @@ -374,7 +374,7 @@ }); }, // 批量删除信息 - batRemove: function() { + removeAll: function() { var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id); if (rows.length == 0) { $.modal.alertWarning("请至少选择一条记录"); @@ -440,6 +440,16 @@ $.modal.closeLoading(); } }, + // 校验封装处理 + validate: { + // 判断返回标识是否唯一 false 不存在 true 存在 + unique: function (value) { + if (value == "0") { + return true; + } + return false; + } + }, // 通用方法封装处理 common: { // 判断字符串是否为空 diff --git a/src/main/resources/static/ruoyi/js/ry-ui.min.js b/src/main/resources/static/ruoyi/js/ry-ui.min.js index 9e91c4eb4..bb098bc32 100644 --- a/src/main/resources/static/ruoyi/js/ry-ui.min.js +++ b/src/main/resources/static/ruoyi/js/ry-ui.min.js @@ -2,4 +2,4 @@ * ruoyi.js * Author: Ruoyi */ -(function($){$.extend({table:{_option:{},_params:{},init:function(options){$.table._option=options;$.table._params=$.common.isEmpty(options.queryParams)?$.table.queryParams:options.queryParams;_sortOrder=$.common.isEmpty(options.sortOrder)?"asc":options.sortOrder;_sortName=$.common.isEmpty(options.sortName)?"":options.sortName;$("#bootstrap-table").bootstrapTable({url:options.url,contentType:"application/x-www-form-urlencoded",method:"post",cache:false,sortable:true,sortStable:true,sortName:_sortName,sortOrder:_sortOrder,pagination:$.common.visible(options.pagination),pageNumber:1,pageSize:10,pageList:[10,25,50],iconSize:"outline",toolbar:"#toolbar",sidePagination:"server",search:$.common.visible(options.search),showRefresh:$.common.visible(options.showRefresh),showColumns:$.common.visible(options.showColumns),showToggle:$.common.visible(options.showToggle),showExport:$.common.visible(options.showExport),queryParams:$.table._params,columns:options.columns,responseHandler:$.table.responseHandler})},queryParams:function(params){return{pageSize:params.limit,pageNum:params.offset/params.limit+1,searchValue:params.search,orderByColumn:params.sort,isAsc:params.order}},responseHandler:function(res){if(res.code==0){return{rows:res.rows,total:res.total}}else{$.modal.alertWarning(res.msg);return{rows:[],total:0}}},search:function(formId){var currentId=$.common.isEmpty(formId)?$("form").attr("id"):formId;var params=$("#bootstrap-table").bootstrapTable("getOptions");params.queryParams=function(params){var search={};$.each($("#"+currentId).serializeArray(),function(i,field){search[field.name]=field.value});search.pageSize=params.limit;search.pageNum=params.offset/params.limit+1;search.searchValue=params.search;search.orderByColumn=params.sort;search.isAsc=params.order;return search};$("#bootstrap-table").bootstrapTable("refresh",params)},exportExcel:function(formId){var currentId=$.common.isEmpty(formId)?$("form").attr("id"):formId;$.modal.loading("正在导出数据,请稍后...");$.post($.table._option.exportUrl,$("#"+currentId).serializeArray(),function(result){if(result.code==web_status.SUCCESS){window.location.href=ctx+"common/download?fileName="+result.msg+"&delete="+true}else{$.modal.alertError(result.msg)}$.modal.closeLoading()})},refresh:function(){$("#bootstrap-table").bootstrapTable("refresh",{url:$.table._option.url,silent:true})},selectColumns:function(column){return $.map($("#bootstrap-table").bootstrapTable("getSelections"),function(row){return row[column]})},selectFirstColumns:function(){return $.map($("#bootstrap-table").bootstrapTable("getSelections"),function(row){return row[$.table._option.columns[1].field]})},selectDictLabel:function(_datas,_value){var actions=[];$.each(_datas,function(index,dict){if(dict.dictValue==_value){actions.push(""+dict.dictLabel+"");return false}});return actions.join("")}},treeTable:{_option:{},_treeTable:{},init:function(options){$.table._option=options;var treeTable=$("#bootstrap-table").bootstrapTreeTable({code:options.id,parentCode:options.parentId,type:"get",url:options.url,ajaxParams:{},expandColumn:"0",striped:false,bordered:true,expandAll:$.common.visible(options.expandAll),columns:options.columns});$.treeTable._treeTable=treeTable},search:function(formId){var currentId=$.common.isEmpty(formId)?$("form").attr("id"):formId;var params={};$.each($("#"+currentId).serializeArray(),function(i,field){params[field.name]=field.value});$.treeTable._treeTable.bootstrapTreeTable("refresh",params)},refresh:function(){$.treeTable._treeTable.bootstrapTreeTable("refresh")},},form:{selectCheckeds:function(name){var checkeds="";$('input:checkbox[name="'+name+'"]:checked').each(function(i){if(0==i){checkeds=$(this).val()}else{checkeds+=(","+$(this).val())}});return checkeds},selectSelects:function(name){var selects="";$("#"+name+" option:selected").each(function(i){if(0==i){selects=$(this).val()}else{selects+=(","+$(this).val())}});return selects}},modal:{icon:function(type){var icon="";if(type==modal_status.WARNING){icon=0}else{if(type==modal_status.SUCCESS){icon=1}else{if(type==modal_status.FAIL){icon=2}else{icon=3}}}return icon},msg:function(content,type){if(type!=undefined){layer.msg(content,{icon:$.modal.icon(type),time:1000,shift:5})}else{layer.msg(content)}},msgError:function(content){$.modal.msg(content,modal_status.FAIL)},msgSuccess:function(content){$.modal.msg(content,modal_status.SUCCESS)},msgWarning:function(content){$.modal.msg(content,modal_status.WARNING)},alert:function(content,type){layer.alert(content,{icon:$.modal.icon(type),title:"系统提示",btn:["确认"],btnclass:["btn btn-primary"],})},msgReload:function(msg,type){layer.msg(msg,{icon:$.modal.icon(type),time:500,shade:[0.1,"#8F8F8F"]},function(){$.modal.reload()})},alertError:function(content){$.modal.alert(content,modal_status.FAIL)},alertSuccess:function(content){$.modal.alert(content,modal_status.SUCCESS)},alertWarning:function(content){$.modal.alert(content,modal_status.WARNING)},close:function(){var index=parent.layer.getFrameIndex(window.name);parent.layer.close(index)},confirm:function(content,callBack){layer.confirm(content,{icon:3,title:"系统提示",btn:["确认","取消"],btnclass:["btn btn-primary","btn btn-danger"],},function(index){layer.close(index);callBack(true)})},open:function(title,url,width,height){if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){width="auto";height="auto"}if($.common.isEmpty(title)){title=false}if($.common.isEmpty(url)){url="404.html"}if($.common.isEmpty(width)){width=800}if($.common.isEmpty(height)){height=($(window).height()-50)}layer.open({type:2,area:[width+"px",height+"px"],fix:false,maxmin:true,shade:0.3,title:title,content:url})},openFull:function(title,url,width,height){if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){width="auto";height="auto"}if($.common.isEmpty(title)){title=false}if($.common.isEmpty(url)){url="404.html"}if($.common.isEmpty(width)){width=800}if($.common.isEmpty(height)){height=($(window).height()-50)}var index=layer.open({type:2,area:[width+"px",height+"px"],fix:false,maxmin:true,shade:0.3,title:title,content:url});layer.full(index)},loading:function(message){$.blockUI({message:'
'+message+"
"})},closeLoading:function(){setTimeout(function(){$.unblockUI()},50)},reload:function(){parent.location.reload()}},operate:{submit:function(url,type,dataType,data){$.modal.loading("正在处理中,请稍后...");var config={url:url,type:type,dataType:dataType,data:data,success:function(result){$.operate.ajaxSuccess(result)}};$.ajax(config)},post:function(url,data){$.operate.submit(url,"post","json",data)},remove:function(id){$.modal.confirm("确定删除该条"+$.table._option.modalName+"信息吗?",function(){var url=$.common.isEmpty(id)?$.table._option.removeUrl:$.table._option.removeUrl.replace("{id}",id);var data={"ids":id};$.operate.submit(url,"post","json",data)})},batRemove:function(){var rows=$.common.isEmpty($.table._option.id)?$.table.selectFirstColumns():$.table.selectColumns($.table._option.id);if(rows.length==0){$.modal.alertWarning("请至少选择一条记录");return}$.modal.confirm("确认要删除选中的"+rows.length+"条数据吗?",function(){var url=$.table._option.removeUrl;var data={"ids":rows.join()};$.operate.submit(url,"post","json",data)})},add:function(id){var url=$.common.isEmpty(id)?$.table._option.createUrl:$.table._option.createUrl.replace("{id}",id);$.modal.open("添加"+$.table._option.modalName,url)},edit:function(id){var url=$.table._option.updateUrl.replace("{id}",id);$.modal.open("修改"+$.table._option.modalName,url)},addFull:function(id){var url=$.common.isEmpty(id)?$.table._option.createUrl:$.table._option.createUrl.replace("{id}",id);$.modal.openFull("添加"+$.table._option.modalName,url)},editFull:function(id){var url=$.table._option.updateUrl.replace("{id}",id);$.modal.openFull("修改"+$.table._option.modalName,url)},save:function(url,data){$.modal.loading("正在处理中,请稍后...");var config={url:url,type:"post",dataType:"json",data:data,success:function(result){$.operate.saveSuccess(result)}};$.ajax(config)},ajaxSuccess:function(result){if(result.code==web_status.SUCCESS){$.modal.msgSuccess(result.msg);$.table.refresh()}else{$.modal.alertError(result.msg)}$.modal.closeLoading()},saveSuccess:function(result){if(result.code==web_status.SUCCESS){$.modal.msgReload("保存成功,正在刷新数据请稍后……",modal_status.SUCCESS)}else{$.modal.alertError(result.msg)}$.modal.closeLoading()}},common:{isEmpty:function(value){if(value==null||this.trim(value)==""){return true}return false},visible:function(value){if($.common.isEmpty(value)||value==true){return true}return false},trim:function(value){if(value==null){return""}return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g,"")},random:function(min,max){return Math.floor((Math.random()*max)+min)}}})})(jQuery);web_status={SUCCESS:0,FAIL:500};modal_status={SUCCESS:"success",FAIL:"error",WARNING:"warning"}; \ No newline at end of file +(function($){$.extend({table:{_option:{},_params:{},init:function(options){$.table._option=options;$.table._params=$.common.isEmpty(options.queryParams)?$.table.queryParams:options.queryParams;_sortOrder=$.common.isEmpty(options.sortOrder)?"asc":options.sortOrder;_sortName=$.common.isEmpty(options.sortName)?"":options.sortName;$("#bootstrap-table").bootstrapTable({url:options.url,contentType:"application/x-www-form-urlencoded",method:"post",cache:false,sortable:true,sortStable:true,sortName:_sortName,sortOrder:_sortOrder,pagination:$.common.visible(options.pagination),pageNumber:1,pageSize:10,pageList:[10,25,50],iconSize:"outline",toolbar:"#toolbar",sidePagination:"server",search:$.common.visible(options.search),showRefresh:$.common.visible(options.showRefresh),showColumns:$.common.visible(options.showColumns),showToggle:$.common.visible(options.showToggle),showExport:$.common.visible(options.showExport),queryParams:$.table._params,columns:options.columns,responseHandler:$.table.responseHandler})},queryParams:function(params){return{pageSize:params.limit,pageNum:params.offset/params.limit+1,searchValue:params.search,orderByColumn:params.sort,isAsc:params.order}},responseHandler:function(res){if(res.code==0){return{rows:res.rows,total:res.total}}else{$.modal.alertWarning(res.msg);return{rows:[],total:0}}},search:function(formId){var currentId=$.common.isEmpty(formId)?$("form").attr("id"):formId;var params=$("#bootstrap-table").bootstrapTable("getOptions");params.queryParams=function(params){var search={};$.each($("#"+currentId).serializeArray(),function(i,field){search[field.name]=field.value});search.pageSize=params.limit;search.pageNum=params.offset/params.limit+1;search.searchValue=params.search;search.orderByColumn=params.sort;search.isAsc=params.order;return search};$("#bootstrap-table").bootstrapTable("refresh",params)},exportExcel:function(formId){var currentId=$.common.isEmpty(formId)?$("form").attr("id"):formId;$.modal.loading("正在导出数据,请稍后...");$.post($.table._option.exportUrl,$("#"+currentId).serializeArray(),function(result){if(result.code==web_status.SUCCESS){window.location.href=ctx+"common/download?fileName="+result.msg+"&delete="+true}else{$.modal.alertError(result.msg)}$.modal.closeLoading()})},refresh:function(){$("#bootstrap-table").bootstrapTable("refresh",{url:$.table._option.url,silent:true})},selectColumns:function(column){return $.map($("#bootstrap-table").bootstrapTable("getSelections"),function(row){return row[column]})},selectFirstColumns:function(){return $.map($("#bootstrap-table").bootstrapTable("getSelections"),function(row){return row[$.table._option.columns[1].field]})},selectDictLabel:function(_datas,_value){var actions=[];$.each(_datas,function(index,dict){if(dict.dictValue==_value){actions.push(""+dict.dictLabel+"");return false}});return actions.join("")}},treeTable:{_option:{},_treeTable:{},init:function(options){$.table._option=options;var treeTable=$("#bootstrap-table").bootstrapTreeTable({code:options.id,parentCode:options.parentId,type:"get",url:options.url,ajaxParams:{},expandColumn:"0",striped:false,bordered:true,expandAll:$.common.visible(options.expandAll),columns:options.columns});$.treeTable._treeTable=treeTable},search:function(formId){var currentId=$.common.isEmpty(formId)?$("form").attr("id"):formId;var params={};$.each($("#"+currentId).serializeArray(),function(i,field){params[field.name]=field.value});$.treeTable._treeTable.bootstrapTreeTable("refresh",params)},refresh:function(){$.treeTable._treeTable.bootstrapTreeTable("refresh")},},form:{selectCheckeds:function(name){var checkeds="";$('input:checkbox[name="'+name+'"]:checked').each(function(i){if(0==i){checkeds=$(this).val()}else{checkeds+=(","+$(this).val())}});return checkeds},selectSelects:function(name){var selects="";$("#"+name+" option:selected").each(function(i){if(0==i){selects=$(this).val()}else{selects+=(","+$(this).val())}});return selects}},modal:{icon:function(type){var icon="";if(type==modal_status.WARNING){icon=0}else{if(type==modal_status.SUCCESS){icon=1}else{if(type==modal_status.FAIL){icon=2}else{icon=3}}}return icon},msg:function(content,type){if(type!=undefined){layer.msg(content,{icon:$.modal.icon(type),time:1000,shift:5})}else{layer.msg(content)}},msgError:function(content){$.modal.msg(content,modal_status.FAIL)},msgSuccess:function(content){$.modal.msg(content,modal_status.SUCCESS)},msgWarning:function(content){$.modal.msg(content,modal_status.WARNING)},alert:function(content,type){layer.alert(content,{icon:$.modal.icon(type),title:"系统提示",btn:["确认"],btnclass:["btn btn-primary"],})},msgReload:function(msg,type){layer.msg(msg,{icon:$.modal.icon(type),time:500,shade:[0.1,"#8F8F8F"]},function(){$.modal.reload()})},alertError:function(content){$.modal.alert(content,modal_status.FAIL)},alertSuccess:function(content){$.modal.alert(content,modal_status.SUCCESS)},alertWarning:function(content){$.modal.alert(content,modal_status.WARNING)},close:function(){var index=parent.layer.getFrameIndex(window.name);parent.layer.close(index)},confirm:function(content,callBack){layer.confirm(content,{icon:3,title:"系统提示",btn:["确认","取消"],btnclass:["btn btn-primary","btn btn-danger"],},function(index){layer.close(index);callBack(true)})},open:function(title,url,width,height){if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){width="auto";height="auto"}if($.common.isEmpty(title)){title=false}if($.common.isEmpty(url)){url="404.html"}if($.common.isEmpty(width)){width=800}if($.common.isEmpty(height)){height=($(window).height()-50)}layer.open({type:2,area:[width+"px",height+"px"],fix:false,maxmin:true,shade:0.3,title:title,content:url})},openFull:function(title,url,width,height){if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){width="auto";height="auto"}if($.common.isEmpty(title)){title=false}if($.common.isEmpty(url)){url="404.html"}if($.common.isEmpty(width)){width=800}if($.common.isEmpty(height)){height=($(window).height()-50)}var index=layer.open({type:2,area:[width+"px",height+"px"],fix:false,maxmin:true,shade:0.3,title:title,content:url});layer.full(index)},loading:function(message){$.blockUI({message:'
'+message+"
"})},closeLoading:function(){setTimeout(function(){$.unblockUI()},50)},reload:function(){parent.location.reload()}},operate:{submit:function(url,type,dataType,data){$.modal.loading("正在处理中,请稍后...");var config={url:url,type:type,dataType:dataType,data:data,success:function(result){$.operate.ajaxSuccess(result)}};$.ajax(config)},post:function(url,data){$.operate.submit(url,"post","json",data)},remove:function(id){$.modal.confirm("确定删除该条"+$.table._option.modalName+"信息吗?",function(){var url=$.common.isEmpty(id)?$.table._option.removeUrl:$.table._option.removeUrl.replace("{id}",id);var data={"ids":id};$.operate.submit(url,"post","json",data)})},removeAll:function(){var rows=$.common.isEmpty($.table._option.id)?$.table.selectFirstColumns():$.table.selectColumns($.table._option.id);if(rows.length==0){$.modal.alertWarning("请至少选择一条记录");return}$.modal.confirm("确认要删除选中的"+rows.length+"条数据吗?",function(){var url=$.table._option.removeUrl;var data={"ids":rows.join()};$.operate.submit(url,"post","json",data)})},add:function(id){var url=$.common.isEmpty(id)?$.table._option.createUrl:$.table._option.createUrl.replace("{id}",id);$.modal.open("添加"+$.table._option.modalName,url)},edit:function(id){var url=$.table._option.updateUrl.replace("{id}",id);$.modal.open("修改"+$.table._option.modalName,url)},addFull:function(id){var url=$.common.isEmpty(id)?$.table._option.createUrl:$.table._option.createUrl.replace("{id}",id);$.modal.openFull("添加"+$.table._option.modalName,url)},editFull:function(id){var url=$.table._option.updateUrl.replace("{id}",id);$.modal.openFull("修改"+$.table._option.modalName,url)},save:function(url,data){$.modal.loading("正在处理中,请稍后...");var config={url:url,type:"post",dataType:"json",data:data,success:function(result){$.operate.saveSuccess(result)}};$.ajax(config)},ajaxSuccess:function(result){if(result.code==web_status.SUCCESS){$.modal.msgSuccess(result.msg);$.table.refresh()}else{$.modal.alertError(result.msg)}$.modal.closeLoading()},saveSuccess:function(result){if(result.code==web_status.SUCCESS){$.modal.msgReload("保存成功,正在刷新数据请稍后……",modal_status.SUCCESS)}else{$.modal.alertError(result.msg)}$.modal.closeLoading()}},validate:{unique:function(value){if(value=="0"){return true}return false}},common:{isEmpty:function(value){if(value==null||this.trim(value)==""){return true}return false},visible:function(value){if($.common.isEmpty(value)||value==true){return true}return false},trim:function(value){if(value==null){return""}return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g,"")},random:function(min,max){return Math.floor((Math.random()*max)+min)}}})})(jQuery);web_status={SUCCESS:0,FAIL:500};modal_status={SUCCESS:"success",FAIL:"error",WARNING:"warning"}; \ No newline at end of file diff --git a/src/main/resources/templates/include.html b/src/main/resources/templates/include.html index a9fb90a6c..b786648a3 100644 --- a/src/main/resources/templates/include.html +++ b/src/main/resources/templates/include.html @@ -12,8 +12,8 @@ - +
@@ -36,6 +36,7 @@ + diff --git a/src/main/resources/templates/monitor/job/add.html b/src/main/resources/templates/monitor/job/add.html index 5c94cf65d..13862642a 100644 --- a/src/main/resources/templates/monitor/job/add.html +++ b/src/main/resources/templates/monitor/job/add.html @@ -46,10 +46,10 @@
-
-
- - +
+
+ +
diff --git a/src/main/resources/templates/monitor/job/edit.html b/src/main/resources/templates/monitor/job/edit.html index d0e41b489..321a85052 100644 --- a/src/main/resources/templates/monitor/job/edit.html +++ b/src/main/resources/templates/monitor/job/edit.html @@ -47,10 +47,10 @@
-
-
- - +
+
+ +
diff --git a/src/main/resources/templates/monitor/job/job.html b/src/main/resources/templates/monitor/job/job.html index bcef54355..03a881449 100644 --- a/src/main/resources/templates/monitor/job/job.html +++ b/src/main/resources/templates/monitor/job/job.html @@ -20,7 +20,7 @@
  • 任务状态:
  • @@ -36,7 +36,7 @@ 新增 - + 删除 @@ -44,7 +44,7 @@
  • -
    +
    diff --git a/src/main/resources/templates/monitor/job/jobLog.html b/src/main/resources/templates/monitor/job/jobLog.html index a558f893b..ea5c7d135 100644 --- a/src/main/resources/templates/monitor/job/jobLog.html +++ b/src/main/resources/templates/monitor/job/jobLog.html @@ -20,10 +20,10 @@
  • -
  • +
  • - @@ -39,12 +39,12 @@
  • -
    +
    diff --git a/src/main/resources/templates/monitor/logininfor/logininfor.html b/src/main/resources/templates/monitor/logininfor/logininfor.html index 4e820b48d..970577690 100644 --- a/src/main/resources/templates/monitor/logininfor/logininfor.html +++ b/src/main/resources/templates/monitor/logininfor/logininfor.html @@ -20,10 +20,10 @@
  • -
  • +
  • - @@ -39,12 +39,12 @@
  • -
    +
    diff --git a/src/main/resources/templates/monitor/online/online.html b/src/main/resources/templates/monitor/online/online.html index f840ffda8..d0b81157c 100644 --- a/src/main/resources/templates/monitor/online/online.html +++ b/src/main/resources/templates/monitor/online/online.html @@ -31,7 +31,7 @@ -
    +
    diff --git a/src/main/resources/templates/monitor/operlog/operlog.html b/src/main/resources/templates/monitor/operlog/operlog.html index 9e3cf212a..bccce858a 100644 --- a/src/main/resources/templates/monitor/operlog/operlog.html +++ b/src/main/resources/templates/monitor/operlog/operlog.html @@ -20,10 +20,10 @@
  • -
  • +
  • - @@ -39,12 +39,12 @@ -
    +
    diff --git a/src/main/resources/templates/system/config/add.html b/src/main/resources/templates/system/config/add.html index 657697ae7..0749ca295 100644 --- a/src/main/resources/templates/system/config/add.html +++ b/src/main/resources/templates/system/config/add.html @@ -25,10 +25,10 @@
    -
    -
    - - +
    +
    + +
    @@ -60,12 +60,11 @@ dataType: "json", data: { "configKey": function() { - return $("input[name='configKey']").val(); + return $.common.trim($("#configKey").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/config/config.html b/src/main/resources/templates/system/config/config.html index ac335d580..2bf1a6c9b 100644 --- a/src/main/resources/templates/system/config/config.html +++ b/src/main/resources/templates/system/config/config.html @@ -19,10 +19,10 @@
  • 系统内置:
  • -
  • +
  • - @@ -41,11 +41,11 @@ 新增 - + 删除 -
    +
    diff --git a/src/main/resources/templates/system/config/edit.html b/src/main/resources/templates/system/config/edit.html index 2ca6d7830..6d9dfbc58 100644 --- a/src/main/resources/templates/system/config/edit.html +++ b/src/main/resources/templates/system/config/edit.html @@ -26,10 +26,10 @@
    -
    -
    - - +
    +
    + +
    @@ -61,15 +61,14 @@ dataType: "json", data: { "configId": function() { - return $("input[name='configId']").val(); + return $("#configId").val(); }, "configKey": function() { - return $("input[name='configKey']").val(); + return $.common.trim($("#configKey").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/dept/add.html b/src/main/resources/templates/system/dept/add.html index 28ac7d19e..3d9fcced6 100644 --- a/src/main/resources/templates/system/dept/add.html +++ b/src/main/resources/templates/system/dept/add.html @@ -44,10 +44,10 @@
    -
    -
    - - +
    +
    + +
    @@ -74,12 +74,11 @@ dataType: "json", data: { "deptName" : function() { - return $("input[name='deptName']").val(); + return $.common.trim($("#deptName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/dept/dept.html b/src/main/resources/templates/system/dept/dept.html index dac5e5676..d4678391e 100644 --- a/src/main/resources/templates/system/dept/dept.html +++ b/src/main/resources/templates/system/dept/dept.html @@ -16,7 +16,7 @@
  • 部门状态:
  • @@ -32,7 +32,7 @@ 新增 -
    +
    diff --git a/src/main/resources/templates/system/dept/edit.html b/src/main/resources/templates/system/dept/edit.html index 04e37b7c4..9c2351566 100644 --- a/src/main/resources/templates/system/dept/edit.html +++ b/src/main/resources/templates/system/dept/edit.html @@ -45,10 +45,10 @@
    -
    -
    - - +
    +
    + +
    @@ -74,15 +74,14 @@ dataType: "json", data: { "deptId": function() { - return $("input[name='deptId']").val(); + return $.common.trim($("#deptId").val()); }, "deptName": function() { - return $("input[name='deptName']").val(); + return $.common.trim($("#deptName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/dict/data/add.html b/src/main/resources/templates/system/dict/data/add.html index 4a8181b48..bbe8b1904 100644 --- a/src/main/resources/templates/system/dict/data/add.html +++ b/src/main/resources/templates/system/dict/data/add.html @@ -29,6 +29,12 @@
    +
    + +
    + +
    +
    @@ -41,29 +47,24 @@ + table表格字典列显示样式属性
    -
    -
    - - +
    +
    + +
    -
    - -
    - -
    -
    -
    -
    - - +
    +
    + +
    diff --git a/src/main/resources/templates/system/dict/data/data.html b/src/main/resources/templates/system/dict/data/data.html index 1372df010..3cc08228a 100644 --- a/src/main/resources/templates/system/dict/data/data.html +++ b/src/main/resources/templates/system/dict/data/data.html @@ -22,7 +22,7 @@
  • 数据状态:
  • @@ -38,12 +38,12 @@ 新增 - + 删除 -
    +
    diff --git a/src/main/resources/templates/system/dict/data/edit.html b/src/main/resources/templates/system/dict/data/edit.html index e3664e7df..88848fd51 100644 --- a/src/main/resources/templates/system/dict/data/edit.html +++ b/src/main/resources/templates/system/dict/data/edit.html @@ -30,6 +30,12 @@ +
    + +
    + +
    +
    @@ -42,29 +48,24 @@ + table表格字典列显示样式属性
    -
    -
    - - +
    +
    + +
    -
    - -
    - -
    -
    -
    -
    - - +
    +
    + +
    diff --git a/src/main/resources/templates/system/dict/type/add.html b/src/main/resources/templates/system/dict/type/add.html index cf03ff19f..fab59695b 100644 --- a/src/main/resources/templates/system/dict/type/add.html +++ b/src/main/resources/templates/system/dict/type/add.html @@ -19,10 +19,10 @@
    -
    -
    - - +
    +
    + +
    @@ -59,12 +59,11 @@ dataType: "json", data: { name : function() { - return $.trim($("#dictType").val()); + return $.common.trim($("#dictType").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/dict/type/edit.html b/src/main/resources/templates/system/dict/type/edit.html index b42c2fae4..46a25d8bb 100644 --- a/src/main/resources/templates/system/dict/type/edit.html +++ b/src/main/resources/templates/system/dict/type/edit.html @@ -20,10 +20,10 @@
    -
    -
    - - +
    +
    + +
    @@ -60,15 +60,14 @@ dataType: "json", data: { dictId : function() { - return $.trim($("#dictId").val()); + return $("#dictId").val(); }, dictType : function() { - return $.trim($("#dictType").val()); + return $.common.trim($("#dictType").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/dict/type/type.html b/src/main/resources/templates/system/dict/type/type.html index b08b41478..1df47bd3d 100644 --- a/src/main/resources/templates/system/dict/type/type.html +++ b/src/main/resources/templates/system/dict/type/type.html @@ -20,10 +20,10 @@
  • 字典状态:
  • -
  • +
  • - @@ -42,12 +42,12 @@ 新增 - + 删除 -
    +
    diff --git a/src/main/resources/templates/system/menu/add.html b/src/main/resources/templates/system/menu/add.html index 17f434c59..d4ce71012 100644 --- a/src/main/resources/templates/system/menu/add.html +++ b/src/main/resources/templates/system/menu/add.html @@ -58,10 +58,10 @@
    -
    -
    - - +
    +
    + +
    @@ -90,12 +90,11 @@ dataType: "json", data: { "menuName" : function() { - return $.trim($("#menuName").val()); + return $.common.trim($("#menuName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/menu/edit.html b/src/main/resources/templates/system/menu/edit.html index 007a2cabd..3f641eb0e 100644 --- a/src/main/resources/templates/system/menu/edit.html +++ b/src/main/resources/templates/system/menu/edit.html @@ -59,10 +59,10 @@
    -
    -
    - - +
    +
    + +
    @@ -97,15 +97,14 @@ dataType: "json", data: { "menuId": function() { - return $("input[name='menuId']").val(); + return $("#menuId").val(); }, "menuName": function() { - return $("input[name='menuName']").val(); + return $.common.trim($("#menuName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/menu/menu.html b/src/main/resources/templates/system/menu/menu.html index 79f610a45..c516f3a4c 100644 --- a/src/main/resources/templates/system/menu/menu.html +++ b/src/main/resources/templates/system/menu/menu.html @@ -16,7 +16,7 @@
  • 菜单状态:
  • @@ -32,7 +32,7 @@ 新增 -
    +
    diff --git a/src/main/resources/templates/system/notice/add.html b/src/main/resources/templates/system/notice/add.html index c9e58ef66..7849e6f47 100644 --- a/src/main/resources/templates/system/notice/add.html +++ b/src/main/resources/templates/system/notice/add.html @@ -17,7 +17,7 @@
    @@ -30,10 +30,10 @@
    -
    -
    - - +
    +
    + +
    diff --git a/src/main/resources/templates/system/notice/edit.html b/src/main/resources/templates/system/notice/edit.html index 8bc96d2bc..74671e2fd 100644 --- a/src/main/resources/templates/system/notice/edit.html +++ b/src/main/resources/templates/system/notice/edit.html @@ -18,7 +18,7 @@
    @@ -31,10 +31,10 @@
    -
    -
    - - +
    +
    + +
    diff --git a/src/main/resources/templates/system/notice/notice.html b/src/main/resources/templates/system/notice/notice.html index 9f42bed54..69b0e3cb9 100644 --- a/src/main/resources/templates/system/notice/notice.html +++ b/src/main/resources/templates/system/notice/notice.html @@ -19,7 +19,7 @@
  • 公告类型:
  • @@ -34,12 +34,12 @@ 新增 - + 删除 -
    +
    diff --git a/src/main/resources/templates/system/post/add.html b/src/main/resources/templates/system/post/add.html index a5d9290fc..6266f5622 100644 --- a/src/main/resources/templates/system/post/add.html +++ b/src/main/resources/templates/system/post/add.html @@ -25,10 +25,10 @@
    -
    -
    - - +
    +
    + +
    @@ -60,12 +60,11 @@ dataType: "json", data: { "postName" : function() { - return $.trim($("#postName").val()); + return $.common.trim($("#postName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, @@ -77,12 +76,11 @@ dataType: "json", data: { "postCode" : function() { - return $.trim($("#postCode").val()); + return $.common.trim($("#postCode").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/post/edit.html b/src/main/resources/templates/system/post/edit.html index 0498c887b..4e15051a2 100644 --- a/src/main/resources/templates/system/post/edit.html +++ b/src/main/resources/templates/system/post/edit.html @@ -26,10 +26,10 @@
    -
    -
    - - +
    +
    + +
    @@ -64,12 +64,11 @@ return $("input[name='postId']").val(); }, "postName" : function() { - return $.trim($("#postName").val()); + return $.common.trim($("#postName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, @@ -84,12 +83,11 @@ return $("input[name='postId']").val(); }, "postCode" : function() { - return $.trim($("#postCode").val()); + return $.common.trim($("#postCode").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/post/post.html b/src/main/resources/templates/system/post/post.html index ada31734b..0e9d5fb5b 100644 --- a/src/main/resources/templates/system/post/post.html +++ b/src/main/resources/templates/system/post/post.html @@ -20,7 +20,7 @@
  • 岗位状态:
  • @@ -36,12 +36,12 @@ 新增 - + 删除 -
    +
    diff --git a/src/main/resources/templates/system/role/add.html b/src/main/resources/templates/system/role/add.html index 208abfa01..c64af035d 100644 --- a/src/main/resources/templates/system/role/add.html +++ b/src/main/resources/templates/system/role/add.html @@ -87,12 +87,11 @@ dataType: "json", data: { "roleName" : function() { - return $.trim($("#roleName").val()); + return $.common.trim($("#roleName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, @@ -104,12 +103,11 @@ dataType: "json", data: { "roleName" : function() { - return $.trim($("#roleName").val()); + return $.common.trim($("#roleName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/role/edit.html b/src/main/resources/templates/system/role/edit.html index ef3e10efe..bafe78585 100644 --- a/src/main/resources/templates/system/role/edit.html +++ b/src/main/resources/templates/system/role/edit.html @@ -88,15 +88,14 @@ dataType: "json", data: { "roleId": function() { - return $("input[name='roleId']").val(); + return $("#roleId").val(); }, "roleName": function() { - return $("input[name='roleName']").val(); + return $.common.trim($("#roleName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, @@ -108,15 +107,14 @@ dataType: "json", data: { "roleId": function() { - return $("input[name='roleId']").val(); + return $("#roleId").val(); }, "roleKey": function() { - return $("input[name='roleKey']").val(); + return $.common.trim($("#roleKey").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/role/role.html b/src/main/resources/templates/system/role/role.html index cbff9e8ec..14f1d3bb9 100644 --- a/src/main/resources/templates/system/role/role.html +++ b/src/main/resources/templates/system/role/role.html @@ -20,10 +20,10 @@
  • 角色状态:
  • -
  • +
  • - @@ -42,12 +42,12 @@ 新增 - + 删除 -
    +
    diff --git a/src/main/resources/templates/system/user/add.html b/src/main/resources/templates/system/user/add.html index 4159ae3fa..472237e96 100644 --- a/src/main/resources/templates/system/user/add.html +++ b/src/main/resources/templates/system/user/add.html @@ -47,7 +47,7 @@
    @@ -105,12 +105,11 @@ dataType: "json", data: { name : function() { - return $.trim($("#loginName").val()); + return $.common.trim($("#loginName").val()); } }, dataFilter: function(data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, @@ -134,12 +133,11 @@ dataType: "json", data: { name: function () { - return $.trim($("#email").val()); + return $.common.trim($("#email").val()); } }, dataFilter: function (data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, @@ -152,12 +150,11 @@ dataType: "json", data: { name: function () { - return $.trim($("#phonenumber").val()); + return $.common.trim($("#phonenumber").val()); } }, dataFilter: function (data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/user/edit.html b/src/main/resources/templates/system/user/edit.html index a3afe15a5..fdd76a90c 100644 --- a/src/main/resources/templates/system/user/edit.html +++ b/src/main/resources/templates/system/user/edit.html @@ -42,7 +42,7 @@
    @@ -105,15 +105,14 @@ dataType: "json", data: { "userId": function() { - return $("input[name='userId']").val(); + return $("#userId").val(); }, "email": function() { - return $("input[name='email']").val(); + return $.common.trim($("#email").val()); } }, dataFilter: function (data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, @@ -126,15 +125,14 @@ dataType: "json", data: { "userId": function() { - return $("input[name='userId']").val(); + return $("#userId").val(); }, "phonenumber": function() { - return $("input[name='phonenumber']").val(); + return $.common.trim($("#phonenumber").val()); } }, dataFilter: function (data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/user/profile/edit.html b/src/main/resources/templates/system/user/profile/edit.html index 137d88309..8e64f84e1 100644 --- a/src/main/resources/templates/system/user/profile/edit.html +++ b/src/main/resources/templates/system/user/profile/edit.html @@ -74,15 +74,14 @@ dataType: "json", data: { "userId": function() { - return $("input[name='userId']").val(); + return $("#userId").val(); }, "email": function() { - return $("input[name='email']").val(); + return $.common.trim($("#email").val()); } }, dataFilter: function (data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, @@ -95,15 +94,14 @@ dataType: "json", data: { "userId": function() { - return $("input[name='userId']").val(); + return $("#userId").val(); }, "phonenumber": function() { - return $("input[name='phonenumber']").val(); + return $.common.trim($("#phonenumber").val()); } }, dataFilter: function (data, type) { - if (data == "0") return true; - else return false; + return $.validate.unique(data); } } }, diff --git a/src/main/resources/templates/system/user/profile/resetPwd.html b/src/main/resources/templates/system/user/profile/resetPwd.html index 6832f495a..e7836ef45 100644 --- a/src/main/resources/templates/system/user/profile/resetPwd.html +++ b/src/main/resources/templates/system/user/profile/resetPwd.html @@ -28,6 +28,7 @@
    + 请再次输入您的密码
    diff --git a/src/main/resources/templates/system/user/user.html b/src/main/resources/templates/system/user/user.html index 376cb1886..d3ec76cd1 100644 --- a/src/main/resources/templates/system/user/user.html +++ b/src/main/resources/templates/system/user/user.html @@ -45,10 +45,10 @@
  • 用户状态:
  • -
  • +
  • - @@ -67,12 +67,12 @@ 新增 - + 删除 -
    +
    diff --git a/src/main/resources/templates/tool/gen/gen.html b/src/main/resources/templates/tool/gen/gen.html index 9857d0a2e..0c8408ef4 100644 --- a/src/main/resources/templates/tool/gen/gen.html +++ b/src/main/resources/templates/tool/gen/gen.html @@ -16,7 +16,7 @@
  • 表描述:
  • -
  • +
  • - @@ -36,7 +36,7 @@ -
    +
    diff --git a/src/main/resources/templates/vm/html/list.html.vm b/src/main/resources/templates/vm/html/list.html.vm index ae4fad444..d7dd2c14e 100644 --- a/src/main/resources/templates/vm/html/list.html.vm +++ b/src/main/resources/templates/vm/html/list.html.vm @@ -8,12 +8,12 @@ 新增 - + 删除 -
    +