From 584583fa5882981cca36b4b8f18fb3a3b685c694 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Wed, 3 Mar 2021 22:09:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=A2=9Econfig?= =?UTF-8?q?=E7=9A=84sysFlag=E7=9A=84=E7=8A=B6=E6=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/assets/modular/system/config/sysConfig_add.js | 8 +++++++- .../webapp/pages/modular/system/config/sysConfig_add.html | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/assets/modular/system/config/sysConfig_add.js b/src/main/webapp/assets/modular/system/config/sysConfig_add.js index 78cb7cc4..65dde97b 100644 --- a/src/main/webapp/assets/modular/system/config/sysConfig_add.js +++ b/src/main/webapp/assets/modular/system/config/sysConfig_add.js @@ -4,9 +4,14 @@ layui.use(['form', 'admin', 'HttpRequest'], function () { var admin = layui.admin; var HttpRequest = layui.HttpRequest; - $("#groupCode").val(Feng.getUrlParam("groupCode")); + // 修改系统配置状态 + var checked = 'Y'; + form.on('switch(sysFlag)', function (obj) { + checked = obj.elem.checked ? 'Y' : 'N'; + }); + //表单提交事件 form.on('submit(btnSubmit)', function (data) { var httpRequest = new HttpRequest(Feng.ctxPath + "/sysConfig/add", 'post', function (data) { @@ -17,6 +22,7 @@ layui.use(['form', 'admin', 'HttpRequest'], function () { admin.closeThisDialog(); Feng.error("添加失败!" + data.message) }); + data.field.sysFlag = checked; httpRequest.set(data.field); httpRequest.start(true); }); diff --git a/src/main/webapp/pages/modular/system/config/sysConfig_add.html b/src/main/webapp/pages/modular/system/config/sysConfig_add.html index d4cf0962..cd29bd38 100644 --- a/src/main/webapp/pages/modular/system/config/sysConfig_add.html +++ b/src/main/webapp/pages/modular/system/config/sysConfig_add.html @@ -1,5 +1,5 @@ @layout("/layout/_form.html",{js:["/assets/modular/system/config/sysConfig_add.js"]}){ -
+
@@ -20,7 +20,7 @@
- +