|
|
@@ -134,13 +134,13 @@ function initTree(nid) {
|
|
134
|
134
|
}, function(result) {
|
|
135
|
135
|
result = $.parseJSON(result);
|
|
136
|
136
|
if(result.state === 'success'){
|
|
137
|
|
- if(nid && result.data && result.data.length){
|
|
138
|
|
- $(result.data).each(function(i, n) {
|
|
139
|
|
- if(n.F_ischeck) {
|
|
140
|
|
- n.checked = "true";
|
|
141
|
|
- }
|
|
142
|
|
- })
|
|
143
|
|
- }
|
|
|
137
|
+// if(nid && result.data && result.data.length){
|
|
|
138
|
+// $(result.data).each(function(i, n) {
|
|
|
139
|
+// if(n.F_ischeck) {
|
|
|
140
|
+// n.checked = "true";
|
|
|
141
|
+// }
|
|
|
142
|
+// })
|
|
|
143
|
+// }
|
|
144
|
144
|
$.fn.zTree.init($("#treeDemo"), setting, result.data);
|
|
145
|
145
|
}
|
|
146
|
146
|
});
|
|
|
@@ -152,7 +152,8 @@ var setting = {
|
|
152
|
152
|
},
|
|
153
|
153
|
data: {
|
|
154
|
154
|
key: {
|
|
155
|
|
- name: "F_Name"
|
|
|
155
|
+ name: "F_Name",
|
|
|
156
|
+ checked: "F_ischeck"
|
|
156
|
157
|
},
|
|
157
|
158
|
simpleData: {
|
|
158
|
159
|
enable: true,
|
|
|
@@ -178,6 +179,7 @@ function zTreeOnClick(e, treeId, treeNode) {
|
|
178
|
179
|
}
|
|
179
|
180
|
}
|
|
180
|
181
|
|
|
|
182
|
+// 全选
|
|
181
|
183
|
$('#checkAll').on('click',function (e) {
|
|
182
|
184
|
var zTree = $.fn.zTree.getZTreeObj("treeDemo");
|
|
183
|
185
|
var node = zTree.getNodes();
|
|
|
@@ -193,12 +195,6 @@ $('#checkAll').on('click',function (e) {
|
|
193
|
195
|
})
|
|
194
|
196
|
|
|
195
|
197
|
|
|
196
|
|
-
|
|
197
|
|
-
|
|
198
|
|
-
|
|
199
|
|
-
|
|
200
|
|
-
|
|
201
|
|
-
|
|
202
|
198
|
/**
|
|
203
|
199
|
* 角色用户列表下拉
|
|
204
|
200
|
* el 元素
|