mirror of https://gitee.com/stylefeng/guns
添加全局禁言样式
parent
7168036c49
commit
5b7a807c9b
|
@ -21,4 +21,8 @@
|
||||||
|
|
||||||
.layui-card-body {
|
.layui-card-body {
|
||||||
padding-right: 55px;
|
padding-right: 55px;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[readonly]{
|
||||||
|
background-color: #efefef;
|
||||||
}
|
}
|
|
@ -1,8 +1,10 @@
|
||||||
layui.use(['table', 'admin', 'ax'], function () {
|
layui.use(['table', 'admin','func', 'HttpRequest', 'util'], function () {
|
||||||
var $ = layui.$;
|
var $ = layui.$;
|
||||||
var table = layui.table;
|
var table = layui.table;
|
||||||
var $ax = layui.ax;
|
var func = layui.func;
|
||||||
|
var HttpRequest = layui.HttpRequest;
|
||||||
var admin = layui.admin;
|
var admin = layui.admin;
|
||||||
|
var util = layui.util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置管理
|
* 参数配置管理
|
||||||
|
@ -17,10 +19,10 @@ layui.use(['table', 'admin', 'ax'], function () {
|
||||||
SysConfig.initColumn = function () {
|
SysConfig.initColumn = function () {
|
||||||
return [[
|
return [[
|
||||||
{type: 'checkbox'},
|
{type: 'checkbox'},
|
||||||
{field: 'id', hide: true, title: '主键'},
|
{field: 'configId', hide: true, title: '主键'},
|
||||||
{field: 'name', sort: true, align: "center", title: '名称'},
|
{field: 'configName', sort: true, align: "center", title: '名称'},
|
||||||
{field: 'code', sort: true, align: "center", title: '属性编码'},
|
{field: 'configCode', sort: true, align: "center", title: '属性编码'},
|
||||||
{field: 'value', sort: true, align: "center", title: '属性值'},
|
{field: 'configValue', sort: true, align: "center", title: '属性值'},
|
||||||
{field: 'remark', sort: true, align: "center", title: '备注'},
|
{field: 'remark', sort: true, align: "center", title: '备注'},
|
||||||
{field: 'createTime', sort: true, align: "center", title: '创建时间'},
|
{field: 'createTime', sort: true, align: "center", title: '创建时间'},
|
||||||
{field: 'updateTime', sort: true, align: "center", title: '更新时间'},
|
{field: 'updateTime', sort: true, align: "center", title: '更新时间'},
|
||||||
|
@ -33,7 +35,7 @@ layui.use(['table', 'admin', 'ax'], function () {
|
||||||
*/
|
*/
|
||||||
SysConfig.search = function () {
|
SysConfig.search = function () {
|
||||||
var queryData = {};
|
var queryData = {};
|
||||||
queryData['condition'] = $("#condition").val();
|
queryData['configName'] = $("#configName").val();
|
||||||
table.reload(SysConfig.tableId, {
|
table.reload(SysConfig.tableId, {
|
||||||
where: queryData, page: {curr: 1}
|
where: queryData, page: {curr: 1}
|
||||||
});
|
});
|
||||||
|
@ -43,7 +45,12 @@ layui.use(['table', 'admin', 'ax'], function () {
|
||||||
* 弹出添加对话框
|
* 弹出添加对话框
|
||||||
*/
|
*/
|
||||||
SysConfig.openAddDlg = function () {
|
SysConfig.openAddDlg = function () {
|
||||||
window.location.href = Feng.ctxPath + '/sysConfig/add';
|
func.open({
|
||||||
|
height: 800,
|
||||||
|
title: '添加系统配置',
|
||||||
|
content: Feng.ctxPath + '/config/addView',
|
||||||
|
tableId: SysConfig.tableId
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,7 +71,12 @@ layui.use(['table', 'admin', 'ax'], function () {
|
||||||
* @param data 点击按钮时候的行数据
|
* @param data 点击按钮时候的行数据
|
||||||
*/
|
*/
|
||||||
SysConfig.openEditDlg = function (data) {
|
SysConfig.openEditDlg = function (data) {
|
||||||
window.location.href = Feng.ctxPath + '/sysConfig/edit?id=' + data.id;
|
func.open({
|
||||||
|
height: 800,
|
||||||
|
title: '修改系统配置',
|
||||||
|
content: Feng.ctxPath + '/config/editView?configId=' + data.configId,
|
||||||
|
tableId: SysConfig.tableId
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,14 +86,14 @@ layui.use(['table', 'admin', 'ax'], function () {
|
||||||
*/
|
*/
|
||||||
SysConfig.onDeleteItem = function (data) {
|
SysConfig.onDeleteItem = function (data) {
|
||||||
var operation = function () {
|
var operation = function () {
|
||||||
var ajax = new $ax(Feng.ctxPath + "/sysConfig/delete", function (data) {
|
var httpRequest = new HttpRequest(Feng.ctxPath + "/sysConfig/delete",'post', function (data) {
|
||||||
Feng.success("删除成功!");
|
Feng.success("删除成功!");
|
||||||
table.reload(SysConfig.tableId);
|
table.reload(SysConfig.tableId);
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
Feng.error("删除失败!" + data.responseJSON.message + "!");
|
Feng.error(data.message + "!");
|
||||||
});
|
});
|
||||||
ajax.set("id", data.id);
|
httpRequest.set(data);
|
||||||
ajax.start();
|
httpRequest.start(true);
|
||||||
};
|
};
|
||||||
Feng.confirm("是否删除?", operation);
|
Feng.confirm("是否删除?", operation);
|
||||||
};
|
};
|
||||||
|
@ -89,11 +101,13 @@ layui.use(['table', 'admin', 'ax'], function () {
|
||||||
// 渲染表格
|
// 渲染表格
|
||||||
var tableResult = table.render({
|
var tableResult = table.render({
|
||||||
elem: '#' + SysConfig.tableId,
|
elem: '#' + SysConfig.tableId,
|
||||||
url: Feng.ctxPath + '/sysConfig/list',
|
url: Feng.ctxPath + '/sysConfig/page',
|
||||||
page: true,
|
page: true,
|
||||||
|
request: {pageName: 'pageNo', limitName: 'pageSize'}, //自定义分页参数
|
||||||
height: "full-158",
|
height: "full-158",
|
||||||
cellMinWidth: 100,
|
cellMinWidth: 100,
|
||||||
cols: SysConfig.initColumn()
|
cols: SysConfig.initColumn(),
|
||||||
|
parseData: Feng.parseData
|
||||||
});
|
});
|
||||||
|
|
||||||
// 搜索按钮点击事件
|
// 搜索按钮点击事件
|
||||||
|
|
Loading…
Reference in New Issue