From 10e9cc1310fcd551af9cd8d54bc49d69070a491a Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 19 Feb 2025 13:30:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=8A=B6=E6=80=81=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E6=97=B6=E9=80=BB=E8=BE=91=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../evaluate/template/evaluateTemplate.html | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/main/resources/static/pages/evaluate/template/evaluateTemplate.html b/src/main/resources/static/pages/evaluate/template/evaluateTemplate.html index acde9db..1239e45 100644 --- a/src/main/resources/static/pages/evaluate/template/evaluateTemplate.html +++ b/src/main/resources/static/pages/evaluate/template/evaluateTemplate.html @@ -114,7 +114,7 @@ , { field: 'isEnable', align: 'center', title: '启用状态', templet: function (d) { - // 根据 isUse 字段的值决定开关的状态 + // 根据 isEnable 字段的值决定开关的状态 return ''; @@ -176,15 +176,20 @@ url: ctxPath + '/setTemplate/changeEnable', data: { configId }, success: function (data) { - layer.close(index); + if (data.res == 1) { + layer.msg(data.resMsg, { icon: 1, time: 2000 }) + initTable() + } else { + obj.elem.checked = false; + layui.form.render('switch') + layer.msg(data.resMsg, { icon: 2, time: 2000 }) + } - console.log('状态修改结果', data) - // if (data.res === 1) { - // layer.msg(data.resMsg, { icon: 1, time: 2000 }); - // search(1); - // } else { - // layer.msg(data.resMsg, { icon: 2, time: 2000 }); - // } + }, + error: function (data) { + obj.elem.checked = false; + layui.form.render('switch') + layer.msg(data.resMsg, { icon: 1, time: 2000 }) } }); }