若依开源1.1.4发布
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# 项目名称、版本、版权年份
|
||||
ruoyi:
|
||||
name: RuoYi
|
||||
version: 1.1.3
|
||||
version: 1.1.4
|
||||
copyrightYear: 2018
|
||||
profile: D:/profile/
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ehcache name="ruoyi">
|
||||
|
||||
<!-- 磁盘缓存位置 -->
|
||||
<diskStore path="java.io.tmpdir"/>
|
||||
|
||||
<!-- 默认缓存 -->
|
||||
<defaultCache
|
||||
maxEntriesLocalHeap="1000"
|
||||
eternal="false"
|
||||
|
@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<select id="selectJobList" parameterType="Job" resultMap="JobResult">
|
||||
select job_id, job_name, job_group, method_name, params, cron_expression, status, create_by, create_time remark from sys_job
|
||||
select job_id, job_name, job_group, method_name, params, cron_expression, status, create_by, create_time, remark from sys_job
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND job_name like concat(concat('%', #{searchValue}), '%') OR method_name like concat(concat('%', #{searchValue}), '%')
|
||||
|
@ -16,8 +16,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertLogininfor" parameterType="Logininfor">
|
||||
insert into sys_logininfor (login_name, status, ipaddr, browser, os, msg)
|
||||
values (#{loginName}, #{status}, #{ipaddr}, #{browser}, #{os}, #{msg})
|
||||
insert into sys_logininfor (login_name, status, ipaddr, browser, os, msg, login_time)
|
||||
values (#{loginName}, #{status}, #{ipaddr}, #{browser}, #{os}, #{msg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectLogininforList" parameterType="Logininfor" resultMap="LogininforResult">
|
||||
|
@ -21,8 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertOperlog" parameterType="OperLog">
|
||||
insert into sys_oper_log(title, action, method, channel, login_name, dept_name, oper_url, oper_ip, oper_param, status, error_msg)
|
||||
values (#{title}, #{action}, #{method}, #{channel}, #{loginName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{status}, #{errorMsg})
|
||||
insert into sys_oper_log(title, action, method, channel, login_name, dept_name, oper_url, oper_ip, oper_param, status, error_msg, oper_time)
|
||||
values (#{title}, #{action}, #{method}, #{channel}, #{loginName}, #{deptName}, #{operUrl}, #{operIp}, #{operParam}, #{status}, #{errorMsg}, sysdate())
|
||||
</insert>
|
||||
|
||||
<select id="selectOperLogList" parameterType="OperLog" resultMap="OperLogResult">
|
||||
|
83
src/main/resources/mybatis/system/ConfigMapper.xml
Normal file
83
src/main/resources/mybatis/system/ConfigMapper.xml
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.system.config.mapper.ConfigMapper">
|
||||
|
||||
<resultMap type="Config" id="ConfigResult">
|
||||
<id property="configId" column="config_id" />
|
||||
<result property="configName" column="config_name" />
|
||||
<result property="configKey" column="config_key" />
|
||||
<result property="configValue" column="config_value" />
|
||||
<result property="configType" column="config_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectConfigById" parameterType="Integer" resultMap="ConfigResult">
|
||||
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark from sys_config
|
||||
where config_id = #{configId}
|
||||
</select>
|
||||
|
||||
<select id="selectConfigByKey" parameterType="String" resultMap="ConfigResult">
|
||||
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark from sys_config
|
||||
where config_key = #{configKey}
|
||||
</select>
|
||||
|
||||
<select id="selectConfigList" parameterType="Config" resultMap="ConfigResult">
|
||||
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark from sys_config
|
||||
<where>
|
||||
<if test="searchValue != null and searchValue != ''">
|
||||
AND config_name like concat(concat('%', #{searchValue}), '%') OR config_key like concat(concat('%', #{searchValue}), '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertConfig" parameterType="Config">
|
||||
insert into sys_config (
|
||||
<if test="configName != null and configName != '' ">config_name,</if>
|
||||
<if test="configKey != null and configKey != '' ">config_key,</if>
|
||||
<if test="configValue != null and configValue != '' ">config_value,</if>
|
||||
<if test="configType != null and configType != '' ">config_type,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="configName != null and configName != ''">#{configName},</if>
|
||||
<if test="configKey != null and configKey != ''">#{configKey},</if>
|
||||
<if test="configValue != null and configValue != ''">#{configValue},</if>
|
||||
<if test="configType != null and configType != ''">#{configType},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateConfig" parameterType="Config">
|
||||
update sys_config
|
||||
<set>
|
||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||
<if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
|
||||
<if test="configValue != null and configValue != ''">config_value = #{configValue},</if>
|
||||
<if test="configType != null and configType != ''">config_type = #{configType},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where config_id = #{configId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteConfigById" parameterType="Integer">
|
||||
delete from sys_config where config_id = #{value}
|
||||
</delete>
|
||||
|
||||
<delete id="batchDeleteConfig" parameterType="Integer">
|
||||
delete from sys_config where config_id in
|
||||
<foreach item="configId" collection="array" open="(" separator="," close=")">
|
||||
#{configId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@ -6622,7 +6622,7 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
|
||||
|
||||
.blue-skin {
|
||||
font-weight: 600;
|
||||
background: url("patterns/header-profile-skin-1.png") repeat scroll 0 0;
|
||||
background: url("patterns/header-profile-skin-blue.png") repeat scroll 0 0;
|
||||
}
|
||||
|
||||
.blue-skin:hover {
|
||||
@ -6631,7 +6631,7 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
|
||||
|
||||
.yellow-skin {
|
||||
font-weight: 600;
|
||||
background: url("patterns/header-profile-skin-3.png") repeat scroll 0 100%;
|
||||
background: url("patterns/header-profile-skin-yellow.png") repeat scroll 0 100%;
|
||||
}
|
||||
|
||||
.yellow-skin:hover {
|
||||
@ -6661,295 +6661,295 @@ body.rtls .top-navigation .footer.fixed, body.rtls.top-navigation .footer.fixed
|
||||
}
|
||||
/*
|
||||
*
|
||||
* SKIN 1 - H+ - 后台主题UI框架
|
||||
* NAME - Blue light
|
||||
* SKIN blue 若依管理系统
|
||||
* NAME - blue/purple
|
||||
*
|
||||
*/
|
||||
.skin-1 .minimalize-styl-2 {
|
||||
.skin-blue .minimalize-styl-2 {
|
||||
margin: 14px 5px 5px 30px;
|
||||
}
|
||||
|
||||
.skin-1 .navbar-top-links li:last-child {
|
||||
.skin-blue .navbar-top-links li:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.skin-1.fixed-nav .minimalize-styl-2 {
|
||||
.skin-blue.fixed-nav .minimalize-styl-2 {
|
||||
margin: 14px 5px 5px 15px;
|
||||
}
|
||||
|
||||
.skin-1 .spin-icon {
|
||||
.skin-blue .spin-icon {
|
||||
background: #0e9aef !important;
|
||||
}
|
||||
|
||||
.skin-1 .nav-header {
|
||||
.skin-blue .nav-header {
|
||||
background: #0e9aef;
|
||||
background: url('patterns/header-profile-skin-1.png');
|
||||
background: url('patterns/header-profile-skin-blue.png');
|
||||
}
|
||||
|
||||
.skin-1.mini-navbar .nav-second-level {
|
||||
.skin-blue.mini-navbar .nav-second-level {
|
||||
background: #3e495f;
|
||||
}
|
||||
|
||||
.skin-1 .breadcrumb {
|
||||
.skin-blue .breadcrumb {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.skin-1 .page-heading {
|
||||
.skin-blue .page-heading {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.skin-1 .nav>li.active {
|
||||
.skin-blue .nav>li.active {
|
||||
background: #3a4459;
|
||||
}
|
||||
|
||||
.skin-1 .nav>li>a {
|
||||
.skin-blue .nav>li>a {
|
||||
color: #9ea6b9;
|
||||
}
|
||||
|
||||
.skin-1 .nav>li.active>a {
|
||||
.skin-blue .nav>li.active>a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.skin-1 .navbar-minimalize {
|
||||
.skin-blue .navbar-minimalize {
|
||||
background: #0e9aef;
|
||||
border-color: #0e9aef;
|
||||
}
|
||||
|
||||
body.skin-1 {
|
||||
body.skin-blue {
|
||||
background: #3e495f;
|
||||
}
|
||||
|
||||
.skin-1 .navbar-static-top {
|
||||
.skin-blue .navbar-static-top {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.skin-1 .dashboard-header {
|
||||
.skin-blue .dashboard-header {
|
||||
background: transparent;
|
||||
border-bottom: none !important;
|
||||
border-top: none;
|
||||
padding: 20px 30px 10px 30px;
|
||||
}
|
||||
|
||||
.fixed-nav.skin-1 .navbar-fixed-top {
|
||||
.fixed-nav.skin-blue .navbar-fixed-top {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.skin-1 .wrapper-content {
|
||||
.skin-blue .wrapper-content {
|
||||
padding: 30px 15px;
|
||||
}
|
||||
|
||||
.skin-1 #page-wrapper {
|
||||
.skin-blue #page-wrapper {
|
||||
background: #f4f6fa;
|
||||
}
|
||||
|
||||
.skin-1 .ibox-title, .skin-1 .ibox-content {
|
||||
.skin-blue .ibox-title, .skin-blue .ibox-content {
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.skin-1 .ibox-content:last-child {
|
||||
.skin-blue .ibox-content:last-child {
|
||||
border-style: solid solid solid solid;
|
||||
}
|
||||
|
||||
.skin-1 .nav>li.active {
|
||||
.skin-blue .nav>li.active {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.skin-1 .nav-header {
|
||||
.skin-blue .nav-header {
|
||||
padding: 35px 25px 25px 25px;
|
||||
}
|
||||
|
||||
.skin-1 .nav-header a.dropdown-toggle {
|
||||
.skin-blue .nav-header a.dropdown-toggle {
|
||||
color: #fff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.skin-1 .nav-header a.dropdown-toggle .text-muted {
|
||||
.skin-blue .nav-header a.dropdown-toggle .text-muted {
|
||||
color: #fff;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.skin-1 .profile-element {
|
||||
.skin-blue .profile-element {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.skin-1 .img-circle {
|
||||
.skin-blue .img-circle {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.skin-1 .navbar-default .nav>li>a:hover, .skin-1 .navbar-default .nav>li>a:focus {
|
||||
.skin-blue .navbar-default .nav>li>a:hover, .skin-blue .navbar-default .nav>li>a:focus {
|
||||
background: #39aef5;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.skin-1 .nav.nav-tabs>li.active>a {
|
||||
.skin-blue .nav.nav-tabs>li.active>a {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.skin-1 .content-tabs {
|
||||
.skin-blue .content-tabs {
|
||||
border-bottom: solid 2px #39aef5;
|
||||
}
|
||||
|
||||
.skin-1 .nav.nav-tabs>li.active {
|
||||
.skin-blue .nav.nav-tabs>li.active {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.skin-1 .page-tabs a.active {
|
||||
.skin-blue .page-tabs a.active {
|
||||
background: #39aef5;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.skin-1 .page-tabs a.active:hover, .skin-1 .page-tabs a.active i:hover {
|
||||
.skin-blue .page-tabs a.active:hover, .skin-blue .page-tabs a.active i:hover {
|
||||
background: #0e9aef;
|
||||
color: #fff;
|
||||
}
|
||||
/*
|
||||
*
|
||||
* SKIN 3 - H+ - 后台主题UI框架
|
||||
* SKIN Yellow 若依管理系统
|
||||
* NAME - Yellow/purple
|
||||
*
|
||||
*/
|
||||
.skin-3 .minimalize-styl-2 {
|
||||
.skin-yellow .minimalize-styl-2 {
|
||||
margin: 14px 5px 5px 30px;
|
||||
}
|
||||
|
||||
.skin-3 .navbar-top-links li:last-child {
|
||||
.skin-yellow .navbar-top-links li:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.skin-3.fixed-nav .minimalize-styl-2 {
|
||||
.skin-yellow.fixed-nav .minimalize-styl-2 {
|
||||
margin: 14px 5px 5px 15px;
|
||||
}
|
||||
|
||||
.skin-3 .spin-icon {
|
||||
.skin-yellow .spin-icon {
|
||||
background: #ecba52 !important;
|
||||
}
|
||||
|
||||
body.boxed-layout.skin-3 #wrapper {
|
||||
body.boxed-layout.skin-yellow #wrapper {
|
||||
background: #3e2c42;
|
||||
}
|
||||
|
||||
.skin-3 .nav-header {
|
||||
.skin-yellow .nav-header {
|
||||
background: #ecba52;
|
||||
background: url('patterns/header-profile-skin-3.png');
|
||||
background: url('patterns/header-profile-skin-yellow.png');
|
||||
}
|
||||
|
||||
.skin-3.mini-navbar .nav-second-level {
|
||||
.skin-yellow.mini-navbar .nav-second-level {
|
||||
background: #3e2c42;
|
||||
}
|
||||
|
||||
.skin-3 .breadcrumb {
|
||||
.skin-yellow .breadcrumb {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.skin-3 .page-heading {
|
||||
.skin-yellow .page-heading {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.skin-3 .nav>li.active {
|
||||
.skin-yellow .nav>li.active {
|
||||
background: #38283c;
|
||||
}
|
||||
|
||||
.fixed-nav.skin-3 .navbar-fixed-top {
|
||||
.fixed-nav.skin-yellow .navbar-fixed-top {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.skin-3 .nav>li>a {
|
||||
.skin-yellow .nav>li>a {
|
||||
color: #948b96;
|
||||
}
|
||||
|
||||
.skin-3 .nav>li.active>a {
|
||||
.skin-yellow .nav>li.active>a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.skin-3 .navbar-minimalize {
|
||||
.skin-yellow .navbar-minimalize {
|
||||
background: #ecba52;
|
||||
border-color: #ecba52;
|
||||
}
|
||||
|
||||
body.skin-3 {
|
||||
body.skin-yellow {
|
||||
background: #3e2c42;
|
||||
}
|
||||
|
||||
.skin-3 .navbar-static-top {
|
||||
.skin-yellow .navbar-static-top {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.skin-3 .dashboard-header {
|
||||
.skin-yellow .dashboard-header {
|
||||
background: transparent;
|
||||
border-bottom: none !important;
|
||||
border-top: none;
|
||||
padding: 20px 30px 10px 30px;
|
||||
}
|
||||
|
||||
.skin-3 .wrapper-content {
|
||||
.skin-yellow .wrapper-content {
|
||||
padding: 30px 15px;
|
||||
}
|
||||
|
||||
.skin-3 #page-wrapper {
|
||||
.skin-yellow #page-wrapper {
|
||||
background: #f4f6fa;
|
||||
}
|
||||
|
||||
.skin-3 .ibox-title, .skin-3 .ibox-content {
|
||||
.skin-yellow .ibox-title, .skin-yellow .ibox-content {
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.skin-3 .ibox-content:last-child {
|
||||
.skin-yellow .ibox-content:last-child {
|
||||
border-style: solid solid solid solid;
|
||||
}
|
||||
|
||||
.skin-3 .nav>li.active {
|
||||
.skin-yellow .nav>li.active {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.skin-3 .nav-header {
|
||||
.skin-yellow .nav-header {
|
||||
padding: 35px 25px 25px 25px;
|
||||
}
|
||||
|
||||
.skin-3 .nav-header a.dropdown-toggle {
|
||||
.skin-yellow .nav-header a.dropdown-toggle {
|
||||
color: #fff;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.skin-3 .nav-header a.dropdown-toggle .text-muted {
|
||||
.skin-yellow .nav-header a.dropdown-toggle .text-muted {
|
||||
color: #fff;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.skin-3 .profile-element {
|
||||
.skin-yellow .profile-element {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.skin-3 .img-circle {
|
||||
.skin-yellow .img-circle {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.skin-3 .navbar-default .nav>li>a:hover, .skin-3 .navbar-default .nav>li>a:focus {
|
||||
.skin-yellow .navbar-default .nav>li>a:hover, .skin-yellow .navbar-default .nav>li>a:focus {
|
||||
background: #38283c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.skin-3 .nav.nav-tabs>li.active>a {
|
||||
.skin-yellow .nav.nav-tabs>li.active>a {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.skin-3 .nav.nav-tabs>li.active {
|
||||
.skin-yellow .nav.nav-tabs>li.active {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.skin-3 .content-tabs {
|
||||
.skin-yellow .content-tabs {
|
||||
border-bottom: solid 2px #3e2c42;
|
||||
}
|
||||
|
||||
.skin-3 .nav.nav-tabs>li.active {
|
||||
.skin-yellow .nav.nav-tabs>li.active {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.skin-3 .page-tabs a.active {
|
||||
.skin-yellow .page-tabs a.active {
|
||||
background: #3e2c42;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.skin-3 .page-tabs a.active:hover, .skin-3 .page-tabs a.active i:hover {
|
||||
.skin-yellow .page-tabs a.active:hover, .skin-yellow .page-tabs a.active i:hover {
|
||||
background: #38283c;
|
||||
color: #fff;
|
||||
}
|
||||
|
1
src/main/resources/static/css/style.min.css
vendored
1
src/main/resources/static/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
@ -365,10 +365,14 @@ $(function() {
|
||||
|
||||
// 右移按扭
|
||||
$('.tabRight').on('click', scrollTabRight);
|
||||
|
||||
// 关闭当前
|
||||
$('.tabCloseCurrent').on('click', function () {
|
||||
$('.page-tabs-content').find('.active i').trigger("click");
|
||||
});
|
||||
|
||||
// 关闭全部
|
||||
$('.tabCloseAll').on('click',
|
||||
function() {
|
||||
$('.tabCloseAll').on('click', function() {
|
||||
$('.page-tabs-content').children("[data-id]").not(":first").each(function() {
|
||||
$('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
|
||||
$(this).remove();
|
||||
@ -379,4 +383,5 @@ $(function() {
|
||||
});
|
||||
$('.page-tabs-content').css("margin-left", "0");
|
||||
});
|
||||
|
||||
});
|
39
src/main/resources/static/ruoyi/system/config/add.js
Normal file
39
src/main/resources/static/ruoyi/system/config/add.js
Normal file
@ -0,0 +1,39 @@
|
||||
$("#form-config-add").validate({
|
||||
rules:{
|
||||
configKey:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/config/checkConfigKeyUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"configKey" : function() {
|
||||
return $("input[name='configKey']").val();
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
configName:{
|
||||
required:true
|
||||
},
|
||||
configValue:{
|
||||
required:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"configKey": {
|
||||
remote: "参数键名已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
add();
|
||||
}
|
||||
});
|
||||
|
||||
function add() {
|
||||
_ajax_save(ctx + "system/config/save", $('#form-config-add').serialize());
|
||||
}
|
82
src/main/resources/static/ruoyi/system/config/config.js
Normal file
82
src/main/resources/static/ruoyi/system/config/config.js
Normal file
@ -0,0 +1,82 @@
|
||||
var prefix = ctx + "system/config"
|
||||
|
||||
$(function() {
|
||||
var columns = [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'configId',
|
||||
title : '参数主键'
|
||||
},
|
||||
{
|
||||
field : 'configName',
|
||||
title : '参数名称'
|
||||
},
|
||||
{
|
||||
field : 'configKey',
|
||||
title : '参数键名'
|
||||
},
|
||||
{
|
||||
field : 'configValue',
|
||||
title : '参数键值'
|
||||
},
|
||||
{
|
||||
field: 'configType',
|
||||
title: '系统内置',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
if (value == 'Y') {
|
||||
return '<span class="label label-success">是</span>';
|
||||
} else if (value == 'N') {
|
||||
return '<span class="label label-primary">否</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field : 'createDateTimeStr',
|
||||
title : '创建时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-primary btn-sm ' + editFlag + '" href="#" title="编辑" mce_href="#" onclick="edit(\'' + row.configId + '\')"><i class="fa fa-edit"></i></a> ');
|
||||
actions.push('<a class="btn btn-warning btn-sm ' + removeFlag + '" href="#" title="删除" onclick="remove(\'' + row.configId + '\')"><i class="fa fa-remove"></i></a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}];
|
||||
var url = prefix + "/list";
|
||||
$.initTable(columns, url);
|
||||
});
|
||||
|
||||
/*参数配置-新增*/
|
||||
function add() {
|
||||
var url = prefix + '/add';
|
||||
layer_showAuto("新增参数", url);
|
||||
}
|
||||
|
||||
/*参数配置-修改*/
|
||||
function edit(configId) {
|
||||
var url = prefix + '/edit/' + configId;
|
||||
layer_showAuto("修改参数", url);
|
||||
}
|
||||
|
||||
// 单条删除
|
||||
function remove(id) {
|
||||
$.modalConfirm("确定要删除选中参数配置吗?", function() {
|
||||
_ajax(prefix + "/remove/" + id, "", "post");
|
||||
})
|
||||
}
|
||||
|
||||
// 批量删除
|
||||
function batchRemove() {
|
||||
var rows = $.getSelections("configId");
|
||||
if (rows.length == 0) {
|
||||
$.modalMsg("请选择要删除的数据", "warning");
|
||||
return;
|
||||
}
|
||||
$.modalConfirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||
_ajax(prefix + '/batchRemove', { "ids": rows }, "post");
|
||||
});
|
||||
}
|
41
src/main/resources/static/ruoyi/system/config/edit.js
Normal file
41
src/main/resources/static/ruoyi/system/config/edit.js
Normal file
@ -0,0 +1,41 @@
|
||||
$("#form-config-edit").validate({
|
||||
rules:{
|
||||
configKey:{
|
||||
required:true,
|
||||
remote: {
|
||||
url: ctx + "system/config/checkConfigKeyUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"configId": function() {
|
||||
return $("input[name='configId']").val();
|
||||
},
|
||||
"configKey" : function() {
|
||||
return $("input[name='configKey']").val();
|
||||
}
|
||||
},
|
||||
dataFilter: function(data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
configName:{
|
||||
required:true
|
||||
},
|
||||
configValue:{
|
||||
required:true
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"configKey": {
|
||||
remote: "参数键名已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
update();
|
||||
}
|
||||
});
|
||||
function update() {
|
||||
_ajax_save(ctx + "system/config/save", $('#form-config-edit').serialize());
|
||||
}
|
@ -28,11 +28,11 @@ $("#form-dept-add").validate({
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
update();
|
||||
add();
|
||||
}
|
||||
});
|
||||
|
||||
function update() {
|
||||
function add() {
|
||||
_ajax_save(ctx + "system/dept/save", $("#form-dept-add").serialize());
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,7 @@ $("#form-user-add").validate({
|
||||
},
|
||||
phonenumber:{
|
||||
required:true,
|
||||
isPhone:true,
|
||||
remote: {
|
||||
url: ctx + "system/user/checkPhoneUnique",
|
||||
type: "post",
|
||||
|
@ -29,6 +29,7 @@ $("#form-user-edit").validate({
|
||||
},
|
||||
phonenumber:{
|
||||
required:true,
|
||||
isPhone:true,
|
||||
remote: {
|
||||
url: ctx + "system/user/checkPhoneUnique",
|
||||
type: "post",
|
||||
|
@ -26,6 +26,7 @@
|
||||
<!-- jquery-validate 表单验证插件 -->
|
||||
<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
|
||||
<script src="../static/ajax/libs/validate/messages_zh.min.js" th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
|
||||
<script src="../static/ajax/libs/validate/jquery.validate.extend.js" th:src="@{/ajax/libs/validate/jquery.validate.extend.js}"></script>
|
||||
<!-- jquery-validate 表单树插件 -->
|
||||
<script src="../static/ajax/libs/jqTreeGrid/jquery.treegrid.min.js" th:src="@{/ajax/libs/jqTreeGrid/jquery.treegrid.min.js}"></script>
|
||||
<script src="../static/ajax/libs/jqTreeGrid/jquery.treegrid.extension.js" th:src="@{/ajax/libs/jqTreeGrid/jquery.treegrid.extension.js}"></script>
|
||||
@ -33,8 +34,8 @@
|
||||
<script src="../static/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js" th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
|
||||
<script src="../static/ajax/libs/bootstrap-table/extensions/export/tableExport.js" th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ruoyi/js/common.js?v=1.1.3" th:src="@{/ruoyi/js/common.js?v=1.1.3}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js?v=1.1.3" th:src="@{/ruoyi/js/ry-ui.js?v=1.1.3}"></script>
|
||||
<script src="../static/ruoyi/js/common.js?v=1.1.4" th:src="@{/ruoyi/js/common.js?v=1.1.4}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js?v=1.1.4" th:src="@{/ruoyi/js/ry-ui.js?v=1.1.4}"></script>
|
||||
<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
|
||||
<script src="http://tajs.qq.com/stats?sId=62048022"></script>
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@
|
||||
.nav > li:hover .dropdown-menu {display: block;}
|
||||
</style>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden" th:classappend="${@configService.selectConfigByKey('sys.index.skinName')}">
|
||||
<div id="wrapper">
|
||||
|
||||
<!--左侧导航开始-->
|
||||
@ -96,7 +96,7 @@
|
||||
</button>
|
||||
<nav class="page-tabs menuTabs">
|
||||
<div class="page-tabs-content">
|
||||
<a href="javascript:;" class="active menuTab">首页</a>
|
||||
<a href="javascript:;" class="active menuTab" data-id="/system/main">首页</a>
|
||||
</div>
|
||||
</nav>
|
||||
<button class="roll-nav roll-right tabRight">
|
||||
@ -107,14 +107,15 @@
|
||||
页签操作<span class="caret"></span>
|
||||
</button>
|
||||
<ul role="menu" class="dropdown-menu dropdown-menu-right">
|
||||
<li class="tabCloseAll"><a>全部关闭</a></li>
|
||||
<li class="tabCloseOther"><a>关闭其他</a></li>
|
||||
<li><a class="tabCloseCurrent" href="javascript:void();">关闭当前</a></li>
|
||||
<li><a class="tabCloseOther" href="javascript:void();">关闭其他</a></li>
|
||||
<li><a class="tabCloseAll" href="javascript:void();">全部关闭</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href="#" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> 刷新</a>
|
||||
</div>
|
||||
<div class="row mainContent" id="content-main">
|
||||
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%"
|
||||
<iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" data-id="/system/main"
|
||||
th:src="@{/system/main}" frameborder="0" seamless></iframe>
|
||||
</div>
|
||||
<div class="footer">
|
||||
|
@ -10,7 +10,7 @@
|
||||
<meta name="description" content="RuoYi">
|
||||
<link href="../static/css/bootstrap.min.css" th:href="@{css/bootstrap.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/font-awesome.css" th:href="@{css/font-awesome.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.min.css" th:href="@{css/style.min.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/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
|
||||
<!--[if lt IE 9]>
|
||||
|
@ -75,9 +75,9 @@
|
||||
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<p><i class="fa fa-send-o"></i> 群:<a href="https://jq.qq.com/?_wv=1027&k=5HBAaYN" target="_blank">点击加入</a>
|
||||
<p><i class="fa fa-send-o"></i> 官网:<a href="http://www.ruoyi.club" target="_blank">http://www.ruoyi.club</a>
|
||||
</p>
|
||||
<p><i class="fa fa-qq"></i> QQ:<a href="http://wpa.qq.com/msgrd?v=3&uin=346039442&site=qq&menu=yes" target="_blank">346039442</a>
|
||||
<p><i class="fa fa-qq"></i> QQ群:<a href="https://jq.qq.com/?_wv=1027&k=5HBAaYN" target="_blank">1389287</a>
|
||||
</p>
|
||||
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
|
||||
</p>
|
||||
@ -94,16 +94,38 @@
|
||||
<div class="ibox-content no-padding">
|
||||
<div class="panel-body">
|
||||
<div class="panel-group" id="version">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v13">v1.1.3</a><code class="pull-right">2018.05.14</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v13" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增验证码(数组计算、字符验证)</li>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v14">v1.1.4</a><code class="pull-right">2018.05.20</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v14" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增参数管理</li>
|
||||
<li>修复头像上传bug</li>
|
||||
<li>手机邮箱唯一校验</li>
|
||||
<li>支持手机邮箱登录</li>
|
||||
<li>代码生成优化</li>
|
||||
<li>支持模糊查询</li>
|
||||
<li>支持切换主题皮肤</li>
|
||||
<li>修改权限即时生效</li>
|
||||
<li>修复页签Tab关闭问题</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v13">v1.1.3</a><code class="pull-right">2018.05.14</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v13" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增验证码(数组计算、字符验证)</li>
|
||||
<li>新增cookie记住我</li>
|
||||
<li>新增头像上传</li>
|
||||
<li>用户名密码长度限制</li>
|
||||
@ -111,15 +133,15 @@
|
||||
<li>支持自定义条件查询</li>
|
||||
<li>部门名称必填、时间格式调整</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v12">v1.1.2</a><code class="pull-right">2018.05.07</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v12">v1.1.2</a><code class="pull-right">2018.05.07</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v12" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -140,8 +162,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v11">v1.1.1</a><code class="pull-right">2018.04.23</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v11">v1.1.1</a><code class="pull-right">2018.04.23</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v11" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -159,8 +181,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v10">v1.1.0</a><code class="pull-right">2018.04.20</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v10">v1.1.0</a><code class="pull-right">2018.04.20</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v10" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -179,8 +201,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v09">v1.0.9</a><code class="pull-right">2018.04.14</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v09">v1.0.9</a><code class="pull-right">2018.04.14</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v09" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -194,8 +216,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v08">v1.0.8</a><code class="pull-right">2018.04.08</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v08">v1.0.8</a><code class="pull-right">2018.04.08</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v08" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -209,8 +231,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v07">v1.0.7</a><code class="pull-right">2018.04.04</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v07">v1.0.7</a><code class="pull-right">2018.04.04</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v07" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -224,8 +246,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v06">v1.0.6</a><code class="pull-right">2018.03.15</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v06">v1.0.6</a><code class="pull-right">2018.03.15</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v06" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -240,8 +262,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v05">v1.0.5</a><code class="pull-right">2018.03.12</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v05">v1.0.5</a><code class="pull-right">2018.03.12</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v05" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -255,8 +277,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v04">v1.0.4</a><code class="pull-right">2018.03.11</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v04">v1.0.4</a><code class="pull-right">2018.03.11</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v04" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -269,8 +291,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v03">v1.0.3</a><code class="pull-right">2018.03.08</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v03">v1.0.3</a><code class="pull-right">2018.03.08</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v03" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -283,8 +305,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v02">v1.0.2</a><code class="pull-right">2018.03.04</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v02">v1.0.2</a><code class="pull-right">2018.03.04</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v02" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
@ -297,8 +319,8 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v01">v1.0.1</a><code class="pull-right">2018.03.03</code>
|
||||
</h5>
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v01">v1.0.1</a><code class="pull-right">2018.03.03</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v01" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
|
57
src/main/resources/templates/system/config/add.html
Normal file
57
src/main/resources/templates/system/config/add.html
Normal file
@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-config-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">参数名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configName" name="configName" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">参数键名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configKey" name="configKey" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">参数键值:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configValue" name="configValue" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统内置:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" name="configType" value="Y" checked="">
|
||||
<label for="radio1">是</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" name="configType" value="N">
|
||||
<label for="radio2">否</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-control-static col-sm-offset-9">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button th:onclick="'javascript:layer_close()'" class="btn btn-danger" type="button">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script src="/ruoyi/system/config/add.js" th:src="@{/ruoyi/system/config/add.js}">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
25
src/main/resources/templates/system/config/config.html
Normal file
25
src/main/resources/templates/system/config/config.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="btn-group hidden-xs" id="tableToolbar" role="group">
|
||||
<button type="button" class="btn btn-outline btn-default" th:onclick="'javascript:add()'" shiro:hasPermission="system:config:add">
|
||||
<i class="glyphicon glyphicon-plus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline btn-default" th:onclick="'javascript:batchRemove()'" shiro:hasPermission="system:config:batchRemove">
|
||||
<i class="glyphicon glyphicon-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
<table class="bootstrap-table" data-mobile-responsive="true">
|
||||
</table>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script src="/ruoyi/system/config/config.js" th:src="@{/ruoyi/system/config/config.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permissionService.hasPermi('system:config:edit')}]];
|
||||
var removeFlag = [[${@permissionService.hasPermi('system:config:remove')}]];
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
58
src/main/resources/templates/system/config/edit.html
Normal file
58
src/main/resources/templates/system/config/edit.html
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-config-edit">
|
||||
<input id="configId" name="configId" th:value="${config.configId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">参数名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configName" name="configName" th:value="${config.configName}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">参数键名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configKey" name="configKey" th:value="${config.configKey}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">参数键值:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="configValue" name="configValue" th:value="${config.configValue}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">系统内置:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="radio radio-info radio-inline">
|
||||
<input type="radio" id="radio1" th:field="*{config.configType}" name="configType" value="Y">
|
||||
<label for="radio1">是</label>
|
||||
</div>
|
||||
<div class="radio radio-danger radio-inline">
|
||||
<input type="radio" id="radio2" th:field="*{config.configType}" name="configType" value="N">
|
||||
<label for="radio2">否</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea id="remark" name="remark" class="form-control">[[${config.remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-control-static col-sm-offset-9">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button th:onclick="'javascript:layer_close()'" class="btn btn-danger" type="button">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script src="/ruoyi/system/config/edit.js" th:src="@{/ruoyi/system/config/edit.js}">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -56,12 +56,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-control-static col-sm-offset-9">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button th:onclick="'javascript:layer_close()'" class="btn btn-danger" type="button">关闭</button>
|
||||
<div class="form-group">
|
||||
<div class="form-control-static col-sm-offset-9">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button th:onclick="'javascript:layer_close()'" class="btn btn-danger" type="button">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">密码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="password" name="password" id="password">
|
||||
<input class="form-control" type="password" name="password" id="password" th:value="${@configService.selectConfigByKey('sys.user.initPassword')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
@ -67,12 +67,55 @@
|
||||
},
|
||||
email:{
|
||||
required:true,
|
||||
email:true
|
||||
email:true,
|
||||
remote: {
|
||||
url: ctx + "system/user/checkEmailUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"userId": function() {
|
||||
return $("input[name='userId']").val();
|
||||
},
|
||||
"email": function() {
|
||||
return $("input[name='email']").val();
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
phonenumber:{
|
||||
required:true,
|
||||
isPhone:true,
|
||||
remote: {
|
||||
url: ctx + "system/user/checkPhoneUnique",
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: {
|
||||
"userId": function() {
|
||||
return $("input[name='userId']").val();
|
||||
},
|
||||
"phonenumber": function() {
|
||||
return $("input[name='phonenumber']").val();
|
||||
}
|
||||
},
|
||||
dataFilter: function (data, type) {
|
||||
if (data == "0") return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
messages: {
|
||||
"email": {
|
||||
remote: "Email已经存在"
|
||||
},
|
||||
"phonenumber":{
|
||||
remote: "手机号码已经存在"
|
||||
}
|
||||
},
|
||||
submitHandler:function(form){
|
||||
update();
|
||||
}
|
||||
|
@ -5,23 +5,24 @@
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-${classname}-add">
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $primaryKey.columnName)
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="${column.attrname}" name="${column.attrname}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $primaryKey.columnName)
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="${column.attrname}" name="${column.attrname}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
<div class="form-group">
|
||||
<div class="form-control-static col-sm-offset-9">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button th:onclick="'javascript:layer_close()'" class="btn btn-danger" type="button">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script src="/ruoyi/${moduleName}/${classname}/add.js" th:src="@{/ruoyi/${moduleName}/${classname}/add.js}">
|
||||
</script>
|
||||
|
@ -6,23 +6,23 @@
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-${classname}-edit">
|
||||
<input id="${primaryKey.attrname}" name="${primaryKey.attrname}" th:value="${${classname}.${primaryKey.attrname}}" type="hidden">
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $primaryKey.columnName)
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $primaryKey.columnName)
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="${column.attrname}" name="${column.attrname}" th:value="${${classname}.${column.attrname}}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
#end
|
||||
#end
|
||||
<div class="form-group">
|
||||
<div class="col-sm-8 col-sm-offset-3">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
#end
|
||||
#end
|
||||
<div class="form-group">
|
||||
<div class="form-control-static col-sm-offset-9">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button th:onclick="'javascript:layer_close()'" class="btn btn-danger" type="button">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script src="/ruoyi/${moduleName}/${classname}/edit.js" th:src="@{/ruoyi/${moduleName}/${classname}/edit.js}">
|
||||
|
@ -42,8 +42,8 @@ public class ${className}Controller extends BaseController
|
||||
/**
|
||||
* 查询${tableComment}列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@RequiresPermissions("${moduleName}:${classname}:list")
|
||||
@GetMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(${className} ${classname})
|
||||
{
|
||||
@ -55,8 +55,8 @@ public class ${className}Controller extends BaseController
|
||||
/**
|
||||
* 新增${tableComment}
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("${moduleName}:${classname}:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
@ -65,8 +65,8 @@ public class ${className}Controller extends BaseController
|
||||
/**
|
||||
* 修改${tableComment}
|
||||
*/
|
||||
@GetMapping("/edit/{${primaryKey.attrname}}")
|
||||
@RequiresPermissions("${moduleName}:${classname}:edit")
|
||||
@GetMapping("/edit/{${primaryKey.attrname}}")
|
||||
public String edit(@PathVariable("${primaryKey.attrname}") ${primaryKey.attrType} ${primaryKey.attrname}, Model model)
|
||||
{
|
||||
${className} ${classname} = ${classname}Service.select${className}ById(${primaryKey.attrname});
|
||||
@ -77,9 +77,9 @@ public class ${className}Controller extends BaseController
|
||||
/**
|
||||
* 保存${tableComment}
|
||||
*/
|
||||
@RequiresPermissions("${moduleName}:${classname}:save")
|
||||
PostMapping("/save")
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
@RequiresPermissions("${moduleName}:${classname}:add")
|
||||
public Message save(${className} ${classname})
|
||||
{
|
||||
if (${classname}Service.save${className}(${classname}) > 0)
|
||||
@ -92,9 +92,9 @@ public class ${className}Controller extends BaseController
|
||||
/**
|
||||
* 删除${tableComment}
|
||||
*/
|
||||
@RequiresPermissions("${moduleName}:${classname}:remove")
|
||||
@PostMapping( "/remove/{${primaryKey.attrname}}")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("${moduleName}:${classname}:remove")
|
||||
public Message remove(@PathVariable("${primaryKey.attrname}") ${primaryKey.attrType} ${primaryKey.attrname})
|
||||
{
|
||||
if (${classname}Service.delete${className}ById(${primaryKey.attrname}) > 0)
|
||||
@ -107,9 +107,9 @@ public class ${className}Controller extends BaseController
|
||||
/**
|
||||
* 批量删除${tableComment}
|
||||
*/
|
||||
@RequiresPermissions("${moduleName}:${classname}:batchRemove")
|
||||
@PostMapping( "/batchRemove")
|
||||
@ResponseBody
|
||||
@RequiresPermissions("${moduleName}:${classname}:batchRemove")
|
||||
public Message remove(@RequestParam("ids[]") ${primaryKey.attrType}[] ${primaryKey.attrname}s)
|
||||
{
|
||||
int rows = ${classname}Service.batchDelete${className}(${primaryKey.attrname}s);
|
||||
|
@ -6,7 +6,7 @@ import java.math.BigDecimal;
|
||||
#end
|
||||
|
||||
/**
|
||||
* ${tableName} ${tableComment}
|
||||
* ${tableComment}表 ${tableName}
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
|
@ -5,10 +5,10 @@ $("#form-${classname}-edit").validate({
|
||||
},
|
||||
},
|
||||
submitHandler:function(form){
|
||||
edit();
|
||||
update();
|
||||
}
|
||||
});
|
||||
|
||||
function edit() {
|
||||
function update() {
|
||||
_ajax_save(ctx + "${moduleName}/${classname}/save", $('#form-${classname}-edit').serialize());
|
||||
}
|
@ -4,12 +4,12 @@ $(function() {
|
||||
var columns = [{
|
||||
checkbox: true
|
||||
},
|
||||
#foreach($column in $columns)
|
||||
#foreach($column in $columns)
|
||||
{
|
||||
field : '${column.attrname}',
|
||||
title : '${column.columnComment}'
|
||||
},
|
||||
#end
|
||||
#end
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
|
@ -5,40 +5,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="${package}.mapper.${className}Mapper">
|
||||
|
||||
<resultMap type="${className}" id="${className}Result">
|
||||
#foreach ($column in $columns)
|
||||
#foreach ($column in $columns)
|
||||
<result property="${column.attrname}" column="${column.columnName}" />
|
||||
#end
|
||||
#end
|
||||
</resultMap>
|
||||
|
||||
<select id="select${className}ById" parameterType="${primaryKey.attrType}" resultMap="${className}Result">
|
||||
select #foreach($column in $columns) $column.columnName #if($velocityCount != $columns.size()),#end#end from ${tableName}
|
||||
select#foreach($column in $columns) $column.columnName#if($velocityCount != $columns.size()),#end#end from ${tableName}
|
||||
where ${primaryKey.columnName} = #{${primaryKey.attrname}}
|
||||
</select>
|
||||
|
||||
<select id="select${className}List" parameterType="${className}" resultMap="${className}Result">
|
||||
select #foreach($column in $columns) $column.columnName #if($velocityCount != $columns.size()),#end#end from ${tableName}
|
||||
select#foreach($column in $columns) $column.columnName#if($velocityCount != $columns.size()),#end#end from ${tableName}
|
||||
<where>
|
||||
#foreach($column in $columns)
|
||||
<if test="$column.attrname != null and $column.attrname.trim() != ''"> and $column.columnName = #{$column.attrname} </if>
|
||||
#end
|
||||
#foreach($column in $columns)
|
||||
<if test="$column.attrname != null and $column.attrname.trim() != ''"> and $column.columnName = #{$column.attrname}</if>
|
||||
#end
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insert${className}" parameterType="${className}"#if($primaryKey.extra == 'auto_increment') useGeneratedKeys="true" keyProperty="$primaryKey.attrname"#end>
|
||||
insert into ${tableName} (
|
||||
#foreach($column in $columns)
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $primaryKey.columnName || $primaryKey.extra != 'auto_increment')
|
||||
$column.columnName#if($velocityCount != $columns.size()), #end
|
||||
<if test="$column.attrname != null and $column.attrname != '' ">$column.columnName#if($velocityCount != $columns.size()), #end</if>
|
||||
#end
|
||||
#end
|
||||
)
|
||||
values (
|
||||
#foreach($column in $columns)
|
||||
)values(
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $primaryKey.columnName || $primaryKey.extra != 'auto_increment')
|
||||
#{$column.attrname}#if($velocityCount != $columns.size()), #end
|
||||
<if test="$column.attrname != null and $column.attrname != ''">#{$column.attrname}#if($velocityCount != $columns.size()), #end</if>
|
||||
#end
|
||||
#end
|
||||
)
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update${className}" parameterType="${className}">
|
||||
@ -46,7 +45,7 @@ $column.columnName#if($velocityCount != $columns.size()), #end
|
||||
<set>
|
||||
#foreach($column in $columns)
|
||||
#if($column.columnName != $primaryKey.columnName)
|
||||
<if test="$column.attrname != null">$column.columnName = #{$column.attrname}#if($velocityCount != $columns.size()), #end</if>
|
||||
<if test="$column.attrname != null and $column.attrname != ''">$column.columnName = #{$column.attrname}#if($velocityCount != $columns.size()), #end</if>
|
||||
#end
|
||||
#end
|
||||
</set>
|
||||
|
Reference in New Issue
Block a user