From 471fcdb600fc902051eb847077013dac539ad96c Mon Sep 17 00:00:00 2001
From: ggd0920 <3276996802@qq.com>
Date: Fri, 9 Jun 2017 15:43:22 +0800
Subject: [PATCH] =?UTF-8?q?fixed=20=E4=BF=AE=E5=A4=8D=E6=9D=83=E9=99=90?=
=?UTF-8?q?=E9=80=89=E6=8B=A9=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/View/Permission/rule.html | 31 +++++++++++----------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/Application/Admin/View/Permission/rule.html b/Application/Admin/View/Permission/rule.html
index 37b0638..1304df7 100644
--- a/Application/Admin/View/Permission/rule.html
+++ b/Application/Admin/View/Permission/rule.html
@@ -7,21 +7,21 @@
-
+
@@ -39,13 +39,14 @@
layui.use('form', function(){
var form = layui.form();
form.on('checkbox(admin-check)', function(data){
+ var dataId = $(this).attr('data-id');
var $el = data.elem;
if( $el.checked ){
- $('input[fid="'+$el.value+'"]').prop('checked','checked');
- $('input[pid="'+$el.value+'"]').prop('checked','checked');
+ $('input[fid="'+dataId+'"]').prop('checked','checked');
+ $('input[pid="'+dataId+'"]').prop('checked','checked');
}else{
- $('input[fid="'+$el.value+'"]').prop('checked', false);
- $('input[pid="'+$el.value+'"]').prop('checked', false);
+ $('input[fid="'+dataId+'"]').prop('checked', false);
+ $('input[pid="'+dataId+'"]').prop('checked', false);
}
form.render();
});