diff --git a/src/main/webapp/assets/expand/css/form.css b/src/main/webapp/assets/expand/css/form.css index a998d9a9..6ecafdcf 100644 --- a/src/main/webapp/assets/expand/css/form.css +++ b/src/main/webapp/assets/expand/css/form.css @@ -21,4 +21,8 @@ .layui-card-body { padding-right: 55px; +} + +input[readonly]{ + background-color: #efefef; } \ No newline at end of file diff --git a/src/main/webapp/assets/modular/sysConfig/sysConfig.js b/src/main/webapp/assets/modular/sysConfig/sysConfig.js index 41c7e118..752b0702 100644 --- a/src/main/webapp/assets/modular/sysConfig/sysConfig.js +++ b/src/main/webapp/assets/modular/sysConfig/sysConfig.js @@ -1,8 +1,10 @@ -layui.use(['table', 'admin', 'ax'], function () { +layui.use(['table', 'admin','func', 'HttpRequest', 'util'], function () { var $ = layui.$; var table = layui.table; - var $ax = layui.ax; + var func = layui.func; + var HttpRequest = layui.HttpRequest; var admin = layui.admin; + var util = layui.util; /** * 参数配置管理 @@ -17,10 +19,10 @@ layui.use(['table', 'admin', 'ax'], function () { SysConfig.initColumn = function () { return [[ {type: 'checkbox'}, - {field: 'id', hide: true, title: '主键'}, - {field: 'name', sort: true, align: "center", title: '名称'}, - {field: 'code', sort: true, align: "center", title: '属性编码'}, - {field: 'value', sort: true, align: "center", title: '属性值'}, + {field: 'configId', hide: true, title: '主键'}, + {field: 'configName', sort: true, align: "center", title: '名称'}, + {field: 'configCode', sort: true, align: "center", title: '属性编码'}, + {field: 'configValue', sort: true, align: "center", title: '属性值'}, {field: 'remark', sort: true, align: "center", title: '备注'}, {field: 'createTime', 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 () { var queryData = {}; - queryData['condition'] = $("#condition").val(); + queryData['configName'] = $("#configName").val(); table.reload(SysConfig.tableId, { where: queryData, page: {curr: 1} }); @@ -43,7 +45,12 @@ layui.use(['table', 'admin', 'ax'], 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 点击按钮时候的行数据 */ 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) { 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("删除成功!"); table.reload(SysConfig.tableId); }, function (data) { - Feng.error("删除失败!" + data.responseJSON.message + "!"); + Feng.error(data.message + "!"); }); - ajax.set("id", data.id); - ajax.start(); + httpRequest.set(data); + httpRequest.start(true); }; Feng.confirm("是否删除?", operation); }; @@ -89,11 +101,13 @@ layui.use(['table', 'admin', 'ax'], function () { // 渲染表格 var tableResult = table.render({ elem: '#' + SysConfig.tableId, - url: Feng.ctxPath + '/sysConfig/list', + url: Feng.ctxPath + '/sysConfig/page', page: true, + request: {pageName: 'pageNo', limitName: 'pageSize'}, //自定义分页参数 height: "full-158", cellMinWidth: 100, - cols: SysConfig.initColumn() + cols: SysConfig.initColumn(), + parseData: Feng.parseData }); // 搜索按钮点击事件