若依开源1.1.4发布

This commit is contained in:
RuoYi
2018-05-20 09:25:01 +08:00
parent fab59267ed
commit 01d61b1d0e
50 changed files with 1364 additions and 261 deletions

View File

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

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

View 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");
});
}

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

View File

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

View File

@ -50,6 +50,7 @@ $("#form-user-add").validate({
},
phonenumber:{
required:true,
isPhone:true,
remote: {
url: ctx + "system/user/checkPhoneUnique",
type: "post",

View File

@ -29,6 +29,7 @@ $("#form-user-edit").validate({
},
phonenumber:{
required:true,
isPhone:true,
remote: {
url: ctx + "system/user/checkPhoneUnique",
type: "post",