Commit a1305e12 by zhangzhijie

修复bug

parent 162a0ab1
......@@ -225,8 +225,10 @@
$("#msg").text("");
}
let dataOne = '${unit}';
let dataOne = [];
if ('${unit}' != null && '${unit}' != '') {
dataOne = JSON.parse('${unit}');
}
var zNodes = [];
for (var i = 0; i < dataOne.length; i++) {
zNodes.push({
......@@ -238,13 +240,16 @@
});
}
setTree(zNodes, "unit", "nocheck", "unitcode", "unitname", "");
let dataTwo = '${role}';
var zNodes = [];
for (var i = 0; i < dataTwo.length; i++) {
let dataTwo = [];
if ('${role}' != null && '${role}' != '') {
dataTwo = JSON.parse('${role}');
}
zNodes = [];
for (let j = 0; j < dataTwo.length; j++) {
zNodes.push({
id: dataTwo[i].id,
pId: dataTwo[i].pid,
name: dataTwo[i].rolename,
id: dataTwo[j].id,
pId: dataTwo[j].pid,
name: dataTwo[j].rolename,
open: false,
file: "core/simpleData"
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment