ewr
{"5":[{"treePCode":"15","areaCode":null,"code":"OCT_S1_QF1204","name":"沙河F23","pId":null,"id":"10115","type":"1","treeCode":"10115","children":[{"treePCode":"10115","areaCode":null,"code":"10110115","name":"东北E-5配电房","pId":"10115","id":"10110115","type":"1","treeCode":"10110115","children":[{"treePCode":"10110115","areaCode":null,"code":"10110110115","name":"康佳饭堂箱变","pId":"10110115","id":"10110110115","type":"1","treeCode":"10110110115","children":[{"treePCode":"10110110115","areaCode":null,"code":"OCT_S2_QF2103","name":"10001","pId":"10110110115","id":"10410110110115","type":"2","treeCode":"10410110110115","level":3,"tId":"pageTree_4","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S2_QF2204","name":"10002","pId":"10110110115","id":"10510110110115","type":"2","treeCode":"10510110110115","level":3,"tId":"pageTree_5","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S3_QF3101","name":"10003","pId":"10110110115","id":"10610110110115","type":"2","treeCode":"10610110110115","level":3,"tId":"pageTree_6","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6404","name":"10004","pId":"10110110115","id":"10710110110115","type":"2","treeCode":"10710110110115","level":3,"tId":"pageTree_7","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S4_QF4303","name":"10005","pId":"10110110115","id":"10810110110115","type":"2","treeCode":"10810110110115","level":3,"tId":"pageTree_8","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S4_QF4103","name":"10006","pId":"10110110115","id":"10910110110115","type":"2","treeCode":"10910110110115","level":3,"tId":"pageTree_9","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6303","name":"10007","pId":"10110110115","id":"11010110110115","type":"2","treeCode":"11010110110115","level":3,"tId":"pageTree_10","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S3_QF3202","name":"10008","pId":"10110110115","id":"11110110110115","type":"2","treeCode":"11110110110115","level":3,"tId":"pageTree_11","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S5_QS5202","name":"10009","pId":"10110110115","id":"11210110110115","type":"2","treeCode":"11210110110115","level":3,"tId":"pageTree_12","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S1_QF1303","name":"10010","pId":"10110110115","id":"11310110110115","type":"2","treeCode":"11310110110115","level":3,"tId":"pageTree_13","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S5_F49_QS5101","name":"10011","pId":"10110110115","id":"11410110110115","type":"2","treeCode":"11410110110115","level":3,"tId":"pageTree_14","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6103","name":"10012","pId":"10110110115","id":"11510110110115","type":"2","treeCode":"11510110110115","level":3,"tId":"pageTree_15","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_3","parentTId":"pageTree_2","open":true,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":true,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":1,"check_Focus":false}],"level":1,"tId":"pageTree_2","parentTId":"pageTree_1","open":true,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":1,"check_Focus":false},{"treePCode":"10115","areaCode":null,"code":"10210115","name":"东北A-3厂房线","pId":"10115","id":"10210115","type":"1","treeCode":"10210115","children":[{"treePCode":"10210115","areaCode":null,"code":"10110210115","name":"东北A-3西配电房","pId":"10210115","id":"10110210115","type":"1","treeCode":"10110210115","children":[{"treePCode":"10110210115","areaCode":null,"code":"","name":"1#变开关(102)","pId":"10110210115","id":"10110110210115","type":"2","treeCode":"10110110210115","level":3,"tId":"pageTree_18","parentTId":"pageTree_17","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110210115","areaCode":null,"code":"OCT_DBA-3_201-01-1X","name":"2#变开关(201)","pId":"10110210115","id":"10210110210115","type":"2","treeCode":"10210110210115","level":3,"tId":"pageTree_19","parentTId":"pageTree_17","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_17","parentTId":"pageTree_16","open":false,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false},{"treePCode":"10210115","areaCode":null,"code":"10210210115","name":"东部市场配电房","pId":"10210115","id":"10210210115","type":"1","treeCode":"10210210115","children":[{"treePCode":"10210210115","areaCode":null,"code":"OCT_DBSC_11AA-D","name":"1#变开关(11AA)","pId":"10210210115","id":"10110210210115","type":"2","treeCode":"10110210210115","level":3,"tId":"pageTree_21","parentTId":"pageTree_20","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10210210115","areaCode":null,"code":"OCT_DBSC_21AA-D","name":"2#变开关(21AA)","pId":"10210210115","id":"10210210210115","type":"2","treeCode":"10210210210115","level":3,"tId":"pageTree_22","parentTId":"pageTree_20","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_20","parentTId":"pageTree_16","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false},{"treePCode":"10210115","areaCode":null,"code":"10310210115","name":"东北E-2箱变","pId":"10210115","id":"10310210115","type":"1","treeCode":"10310210115","children":[{"treePCode":"10310210115","areaCode":null,"code":"OCT_E2_E-2","name":"1#变开关","pId":"10310210115","id":"10110310210115","type":"2","treeCode":"10110310210115","level":3,"tId":"pageTree_24","parentTId":"pageTree_23","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_23","parentTId":"pageTree_16","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false}],"level":1,"tId":"pageTree_16","parentTId":"pageTree_1","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false},{"treePCode":"10115","areaCode":null,"code":"10310115","name":"E-5厂房线","pId":"10115","id":"10310115","type":"1","treeCode":"10310115","children":[{"treePCode":"10310115","areaCode":null,"code":"10110310115","name":"东北E-5配电房","pId":"10310115","id":"10110310115","type":"1","treeCode":"10110310115","children":[{"treePCode":"10110310115","areaCode":null,"code":"OCT_E5_E-5","name":"1#变开关(1AA1)","pId":"10110310115","id":"10110110310115","type":"2","treeCode":"10110110310115","level":3,"tId":"pageTree_27","parentTId":"pageTree_26","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_26","parentTId":"pageTree_25","open":false,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false},{"treePCode":"10310115","areaCode":null,"code":"10210310115","name":"康佳苑住宅小区配电房","pId":"10310115","id":"10210310115","type":"1","treeCode":"10210310115","children":[{"treePCode":"10210310115","areaCode":null,"code":"","name":"1#变开关(11AA)","pId":"10210310115","id":"10110210310115","type":"2","treeCode":"10110210310115","level":3,"tId":"pageTree_29","parentTId":"pageTree_28","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10210310115","areaCode":null,"code":"","name":"2#变开关(21AA)","pId":"10210310115","id":"10210210310115","type":"2","treeCode":"10210210310115","level":3,"tId":"pageTree_30","parentTId":"pageTree_28","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_28","parentTId":"pageTree_25","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false}],"level":1,"tId":"pageTree_25","parentTId":"pageTree_1","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false},{"treePCode":"10115","areaCode":null,"code":"10410115","name":"锦绣花园四期一线","pId":"10115","id":"10410115","type":"1","treeCode":"10410115","children":[{"treePCode":"10410115","areaCode":null,"code":"10110410115","name":"锦绣花园四期配电房","pId":"10410115","id":"10110410115","type":"1","treeCode":"10110410115","level":2,"tId":"pageTree_32","parentTId":"pageTree_31","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10410115","areaCode":null,"code":"10110410115","name":"锦绣花园四期配电房","pId":"10410115","id":"10110410115","type":"1","treeCode":"10110410115","level":2,"tId":"pageTree_33","parentTId":"pageTree_31","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10410115","areaCode":null,"code":"10110410115","name":"锦绣花园四期配电房","pId":"10410115","id":"10110410115","type":"1","treeCode":"10110410115","children":[{"treePCode":"10110410115","areaCode":null,"code":"","name":"1#变开关(1AA1)","pId":"10110410115","id":"10110110410115","type":"2","treeCode":"10110110410115","level":3,"tId":"pageTree_35","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110410115","areaCode":null,"code":"","name":"2#变开关(2AA1)","pId":"10110410115","id":"10210110410115","type":"2","treeCode":"10210110410115","level":3,"tId":"pageTree_36","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110410115","areaCode":null,"code":"","name":"3#变开关(3AA4)","pId":"10110410115","id":"10310110410115","type":"2","treeCode":"10310110410115","level":3,"tId":"pageTree_37","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110410115","areaCode":null,"code":"","name":"1#变开关(1AA1)","pId":"10110410115","id":"10110110410115","type":"2","treeCode":"10110110410115","level":3,"tId":"pageTree_38","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110410115","areaCode":null,"code":"","name":"2#变开关(2AA1)","pId":"10110410115","id":"10210110410115","type":"2","treeCode":"10210110410115","level":3,"tId":"pageTree_39","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110410115","areaCode":null,"code":"","name":"3#变开关(3AA4)","pId":"10110410115","id":"10310110410115","type":"2","treeCode":"10310110410115","level":3,"tId":"pageTree_40","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110410115","areaCode":null,"code":"","name":"1#变开关(1AA1)","pId":"10110410115","id":"10110110410115","type":"2","treeCode":"10110110410115","level":3,"tId":"pageTree_41","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110410115","areaCode":null,"code":"","name":"2#变开关(2AA1)","pId":"10110410115","id":"10210110410115","type":"2","treeCode":"10210110410115","level":3,"tId":"pageTree_42","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110410115","areaCode":null,"code":"","name":"3#变开关(3AA4)","pId":"10110410115","id":"10310110410115","type":"2","treeCode":"10310110410115","level":3,"tId":"pageTree_43","parentTId":"pageTree_34","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_34","parentTId":"pageTree_31","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false}],"level":1,"tId":"pageTree_31","parentTId":"pageTree_1","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false},{"treePCode":"10115","areaCode":null,"code":"10510115","name":"锦绣花园二线","pId":"10115","id":"10510115","type":"1","treeCode":"10510115","children":[{"treePCode":"10510115","areaCode":null,"code":"10110510115","name":"锦绣花园3#配电房","pId":"10510115","id":"10110510115","type":"1","treeCode":"10110510115","children":[{"treePCode":"10110510115","areaCode":null,"code":"OCT_JXHY3_1H-1X","name":"1#变开关(01)","pId":"10110510115","id":"10110110510115","type":"2","treeCode":"10110110510115","level":3,"tId":"pageTree_46","parentTId":"pageTree_45","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110510115","areaCode":null,"code":"OCT_JXHY3_13H-X","name":"2#变开关(13)","pId":"10110510115","id":"10210110510115","type":"2","treeCode":"10210110510115","level":3,"tId":"pageTree_47","parentTId":"pageTree_45","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110510115","areaCode":null,"code":"OCT_JXHY3_14H","name":"3#变开关(14)","pId":"10110510115","id":"10310110510115","type":"2","treeCode":"10310110510115","level":3,"tId":"pageTree_48","parentTId":"pageTree_45","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110510115","areaCode":null,"code":"OCT_JXHY3_26H","name":"4#变开关(26)","pId":"10110510115","id":"10410110510115","type":"2","treeCode":"10410110510115","level":3,"tId":"pageTree_49","parentTId":"pageTree_45","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_45","parentTId":"pageTree_44","open":false,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false}],"level":1,"tId":"pageTree_44","parentTId":"pageTree_1","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false},{"treePCode":"10115","areaCode":null,"code":"10610115","name":"1#站变线","pId":"10115","id":"10610115","type":"1","treeCode":"10610115","children":[{"treePCode":"10610115","areaCode":null,"code":"10110610115","name":"1#开关站低压配电房","pId":"10610115","id":"10110610115","type":"1","treeCode":"10110610115","children":[{"treePCode":"10110610115","areaCode":null,"code":"OCT_1PDF_1AA-1D","name":"1#变开关(1AA)","pId":"10110610115","id":"10110110610115","type":"2","treeCode":"10110110610115","level":3,"tId":"pageTree_52","parentTId":"pageTree_51","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_51","parentTId":"pageTree_50","open":false,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false}],"level":1,"tId":"pageTree_50","parentTId":"pageTree_1","open":false,"isParent":true,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":0,"check_Focus":false}],"level":0,"tId":"pageTree_1","parentTId":null,"open":true,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":1,"check_Focus":false}],"8":[{"treePCode":"10115","areaCode":null,"code":"10110115","name":"东北E-5配电房","pId":"10115","id":"10110115","type":"1","treeCode":"10110115","children":[{"treePCode":"10110115","areaCode":null,"code":"10110110115","name":"康佳饭堂箱变","pId":"10110115","id":"10110110115","type":"1","treeCode":"10110110115","children":[{"treePCode":"10110110115","areaCode":null,"code":"OCT_S2_QF2103","name":"10001","pId":"10110110115","id":"10410110110115","type":"2","treeCode":"10410110110115","level":3,"tId":"pageTree_4","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S2_QF2204","name":"10002","pId":"10110110115","id":"10510110110115","type":"2","treeCode":"10510110110115","level":3,"tId":"pageTree_5","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S3_QF3101","name":"10003","pId":"10110110115","id":"10610110110115","type":"2","treeCode":"10610110110115","level":3,"tId":"pageTree_6","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6404","name":"10004","pId":"10110110115","id":"10710110110115","type":"2","treeCode":"10710110110115","level":3,"tId":"pageTree_7","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S4_QF4303","name":"10005","pId":"10110110115","id":"10810110110115","type":"2","treeCode":"10810110110115","level":3,"tId":"pageTree_8","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S4_QF4103","name":"10006","pId":"10110110115","id":"10910110110115","type":"2","treeCode":"10910110110115","level":3,"tId":"pageTree_9","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6303","name":"10007","pId":"10110110115","id":"11010110110115","type":"2","treeCode":"11010110110115","level":3,"tId":"pageTree_10","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S3_QF3202","name":"10008","pId":"10110110115","id":"11110110110115","type":"2","treeCode":"11110110110115","level":3,"tId":"pageTree_11","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S5_QS5202","name":"10009","pId":"10110110115","id":"11210110110115","type":"2","treeCode":"11210110110115","level":3,"tId":"pageTree_12","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S1_QF1303","name":"10010","pId":"10110110115","id":"11310110110115","type":"2","treeCode":"11310110110115","level":3,"tId":"pageTree_13","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S5_F49_QS5101","name":"10011","pId":"10110110115","id":"11410110110115","type":"2","treeCode":"11410110110115","level":3,"tId":"pageTree_14","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6103","name":"10012","pId":"10110110115","id":"11510110110115","type":"2","treeCode":"11510110110115","level":3,"tId":"pageTree_15","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_3","parentTId":"pageTree_2","open":true,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":true,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":1,"check_Focus":false}],"level":1,"tId":"pageTree_2","parentTId":"pageTree_1","open":true,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":1,"check_Focus":false}],"11":[{"treePCode":"10110115","areaCode":null,"code":"10110110115","name":"康佳饭堂箱变","pId":"10110115","id":"10110110115","type":"1","treeCode":"10110110115","children":[{"treePCode":"10110110115","areaCode":null,"code":"OCT_S2_QF2103","name":"10001","pId":"10110110115","id":"10410110110115","type":"2","treeCode":"10410110110115","level":3,"tId":"pageTree_4","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S2_QF2204","name":"10002","pId":"10110110115","id":"10510110110115","type":"2","treeCode":"10510110110115","level":3,"tId":"pageTree_5","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S3_QF3101","name":"10003","pId":"10110110115","id":"10610110110115","type":"2","treeCode":"10610110110115","level":3,"tId":"pageTree_6","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6404","name":"10004","pId":"10110110115","id":"10710110110115","type":"2","treeCode":"10710110110115","level":3,"tId":"pageTree_7","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S4_QF4303","name":"10005","pId":"10110110115","id":"10810110110115","type":"2","treeCode":"10810110110115","level":3,"tId":"pageTree_8","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S4_QF4103","name":"10006","pId":"10110110115","id":"10910110110115","type":"2","treeCode":"10910110110115","level":3,"tId":"pageTree_9","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6303","name":"10007","pId":"10110110115","id":"11010110110115","type":"2","treeCode":"11010110110115","level":3,"tId":"pageTree_10","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S3_QF3202","name":"10008","pId":"10110110115","id":"11110110110115","type":"2","treeCode":"11110110110115","level":3,"tId":"pageTree_11","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S5_QS5202","name":"10009","pId":"10110110115","id":"11210110110115","type":"2","treeCode":"11210110110115","level":3,"tId":"pageTree_12","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S1_QF1303","name":"10010","pId":"10110110115","id":"11310110110115","type":"2","treeCode":"11310110110115","level":3,"tId":"pageTree_13","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S5_F49_QS5101","name":"10011","pId":"10110110115","id":"11410110110115","type":"2","treeCode":"11410110110115","level":3,"tId":"pageTree_14","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S6_QF6103","name":"10012","pId":"10110110115","id":"11510110110115","type":"2","treeCode":"11510110110115","level":3,"tId":"pageTree_15","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":true,"isAjaxing":false,"checked":false,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}],"level":2,"tId":"pageTree_3","parentTId":"pageTree_2","open":true,"isParent":true,"zAsync":true,"isFirstNode":true,"isLastNode":true,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":1,"check_Focus":false}],"14":[{"treePCode":"10110110115","areaCode":null,"code":"OCT_S2_QF2103","name":"10001","pId":"10110110115","id":"10410110110115","type":"2","treeCode":"10410110110115","level":3,"tId":"pageTree_4","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":true,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false},{"treePCode":"10110110115","areaCode":null,"code":"OCT_S2_QF2204","name":"10002","pId":"10110110115","id":"10510110110115","type":"2","treeCode":"10510110110115","level":3,"tId":"pageTree_5","parentTId":"pageTree_3","open":false,"isParent":false,"zAsync":true,"isFirstNode":false,"isLastNode":false,"isAjaxing":false,"checked":true,"checkedOld":false,"nocheck":false,"chkDisabled":false,"halfCheck":false,"check_Child_State":-1,"check_Focus":false}]}
js
require.config({ baseUrl:'/static/ui/common/', paths:{ 'jquery':'js/libs/jquery-1.11.1.min', 'domReady':'js/functionality/domReady', 'ztree.core':'plugins/other/ztree/jquery.ztree.core', 'ztree.excheck':'plugins/other/ztree/jquery.ztree.excheck', 'tree':'plugins/formElems/downTree/ztreeSelect.1', 'util':'js/functionality/Util', 'addutil':'js/functionality/addutil', 'echart':'plugins/chart/echarts.min', 'bootstrap_datetimepicker':'plugins/formElems/time/bootstrap_datetimepicker/js/bootstrap-datetimepicker.min', 'zhCN':'plugins/formElems/time/bootstrap_datetimepicker/js/bootstrap-datetimepicker.zh-CN', 'DialogBySHF':'plugins/formElems/dialogbyshf/js/DialogBySHF', 'nicescroll':'plugins/other/nicescroll/jquery.nicescroll.min', 'bootstrap':'plugins/other/ipanel/bootstrap.min' }, shim:{ 'bootstrap':{deps:['jquery']}, 'ztree.core':{deps:['jquery']}, 'ztree.excheck':{deps:['ztree.core']} } }) var selectArr=[]; var treeSelObj={}; require(['jquery','domReady','echart','tree','nicescroll','bootstrap_datetimepicker','util','addutil','zhCN'] ,function($,domReady,echarts){ domReady(function(){ initComTree(); initEvent(); initTimeFormate("yyyy-mm-dd"); initTimeFormate("yyyy-mm-dd","","","end"); }) function initComTree(){ $('#areaCodeSelect').selZtree({ url:'/sys/companyInfo/findAllcomInfo', dataParams:null, initValue:null, onchange:function(){ //image_path=ztreeObj.getNodeByParam('id',$('#areaCodeSelect').val()).imagePath.split(';'); }, onclick:function(selnode){ //触发选中后让框隐藏 setTimeout(function () { $('.ztreeInput').blur(); $('#areaCodeSelect').parent().find('div.slimScroll').hide(); //让自己隐藏 }, 20); var code=selnode.areaCode; //initLfTree(code); initLfTree(code); }, complete:function(ztree,obj){ var tobj=obj.ztreeObj; var el=tobj.getNodes()[0]; // while(el.isParent){ // el=el.children[0] // } tobj.selectNode(el); tobj.setting.callback.onClick(null, tobj.setting.treeId, el);//设置第一个节点被点击 } }); } function initEvent(){ //点击当天到最近30天 $("#timess").off("click").on("click","li>a",function(){ $("#timess>li").removeClass("cur"); $(this).parent().addClass("cur"); }) //点击左右的图标 $("#time-click>span").off("click").on("click","",function(){ //判断是左还是右 var type=$(this).hasClass("icon-left")?"0":$(this).hasClass("icon-right")?"1":"2"; //得到当前激活的索引号 var idx=$("#timess .cur").index(); var leg=$("#timess li").length; idx+=type==="0"?-1:type==="1"?1:0; if(idx>leg-1){ idx=0; // $("#time-click .icon-right").addClass("dis"); // $("#time-click .icon-left").removeClass("dis"); } if(idx<0){ idx=$("#timess li").length-1; // $("#time-click .icon-right").removeClass("dis"); // $("#time-click .icon-left").addClass("dis"); } $("#timess li").removeClass("cur").eq(idx).addClass("cur"); }) $("#searchbtn").off("click").on("click","",function(){ //测试获取选中节点的编码 getChecknode(); }) } //异步加载左侧树 function initLfTree(code){ if(code===undefined){return} //获取到后台的数据 var setting = { view: { selectedMulti: true,//单选和多选 showIcon:false }, check:{ enable: true, }, async: { enable: true, url:"/findTModeClassByAreaCode", type:"GET", dataType:'json', autoParam: ["id"], //dataFilter: ajaxDataFilter,//预处理ajax的数据 otherParam: { "areaCode":code}//提交后台的参数 }, data: { key: { name: "name", }, simpleData: { enable: true, idKey: "id", pIdKey: "pId" } }, callback: { onAsyncSuccess: zTreeOnAsyncSuccess, // beforeAsync: zTreeBeforeAsync, // beforeExpand: beforeExpand, // onExpand: onExpand, //onCheck: zTreeOnCheck } }; $.fn.zTree.init($("#pageTree"), setting, []); } function zTreeOnAsyncSuccess(event, treeId, treeNode, msg) { var treeObj = $.fn.zTree.getZTreeObj(treeId); var selNodes=[]; //设置默认选中第一个 var el=treeObj.getNodes()[0]; while(el.isParent){ //展开节点 treeObj.expandNode(el,true,false,false); treeObj.checkNode(el); el=el.children[0] } //如果是最后一级就找他的父级 if(!el.isParent){ el=el.getParentNode(); if(!!el){ var c=el.children; for(var i=0;i<c.length;i++){ treeObj.checkNode(c[i]); } } } //getChecknode(); }; /** * 获取到所有全选和半选的节点的code,向后台发送请求 */ function getChecknode(){ var param={ type: 2, sTime: $("#systemtime").val(), measurType: '', eTime: $("#systemtime_end").val(), }; var treeObj = $.fn.zTree.getZTreeObj("pageTree"); selNodes=treeObj.getCheckedNodes(true); selectArr=[]; treeSelObj={}; param.snames=selNodes.reduce(function(o,v,i){ var c=v.code; if(!isNaN(c)||c===null||c==undefined||c==""){return o} if(!!o){ o+=";"; } o+=v.code+"_EPdel" selectArr.push(v.code+"_EPdel") treeSelObj[v.code+"_EPdel"]=v; return o; },'') //param.snames="OCT_S1_QF1204EPdel;OCT_DBA-3_201-01-1X"; //请求 $.ajax({ url:'/findEnergyDayTypeDataList', data:param, dataType:'json', success:function(data){ //处理数据 var dataObj=initData(data.detail); } }) } function initData(rowData){ //组成线路逐时分析数据用,只有第一级,只有一条线 var treeObj = $.fn.zTree.getZTreeObj("pageTree"); var selNodes=treeObj.getCheckedNodes(true); var parentNode=""; var pcode=""; var legend1=[],legend2=[] if(selNodes.length>0){ parentNode=selNodes[0]; } pcode=parentNode.code+"_EPdel"; var pArr=[];//总的 var elObj={}; var childObj={};//饼图用数据 for(var i=0;i<rowData.length;i++){ var d=rowData[i] if(d.sname===pcode){ pArr.push({ name:new Date(d.date+" "+d.time+":")+"", value:[d.date+" "+d.time,Number(d.data).toFixed(2)] }) }else{ if(elObj[d.sname]===undefined){ elObj[d.sname]=[]; childObj[d.sname]=[]; } elObj[d.sname].push({ name:new Date(d.date+" "+d.time+":")+"", value:[d.date+" "+d.time,Number(d.data).toFixed(2)], }) childObj[d.sname].push(d.data); } } //遍历选中的code var series=[]; var pieData=[]; for(var j=0;j<selectArr.length;j++){ var sel=selectArr[j] if(pcode==sel){continue} legend2.push(treeSelObj[sel].name); series.push({ name: treeSelObj[sel].name, sooth:true, type: 'line', showSymbol: false, hoverAnimation: false, data: elObj[sel] }); pieData.push({ code:sel, treeCode:treeSelObj[sel].treeCode, treePCode:treeSelObj[sel].treePCode, id:treeSelObj[sel].id, pId:treeSelObj[sel].pId, name: treeSelObj[sel].name, value:arrSum(childObj[sel]) }) } initechart02(pArr,parentNode) initechart03("echart_03",series,legend2) initechart04("echart_04",pieData,legend2)//饼图 initechart05(pieData); initechart01("echart_01",pieData)//三级图 } //根据id和pid分组节点树 function group(){ //获取选中节点的集合 var treeObj = $.fn.zTree.getZTreeObj("pageTree"); var data=treeObj.getCheckedNodes(true); console.log(selNodes); //分层 var obj={}; for(var i=0;i<data.length;i++){ var _l=data[i].id.length; //var _l=data[i].treePCode; if(obj[_l]===undefined){ obj[_l]=[data[i]]; }else{ obj[_l].push(data[i]) } } return obj; } function initechart01(id,data){ debugger; //得出每一个code所对应的值 var codevalObj=data.reduce(function(o,v,i){ o[v.treeCode]=v.value; return o; },{}) console.log(codevalObj); //将所有的id和pid进行分组 var links= [{ source: 'b1',//pid target: 'c',//id value: 2 }] var d=group(); //获取到排序的信息 var arr=Object.keys(d).sort(function(a,b){return Number(b)-Number(a)}); console.log(arr); var obj={}; for(var i=0;i<arr.length;i++){ for(var k=0;k<d[arr[i]].length;k++){ var o=d[arr[i]][k]; if(obj[o.pId]===undefined){ obj[o.pId]={l:0,s:0} } obj[o.pId].l++;//子节点的个数 obj[o.pId].s+=codevalObj[o.treeCode]===undefined?0:parseFloat(codevalObj[o.treeCode]);//父节点的值 } console.log(obj); } option = { series: { type: 'sankey', layout:'none', focusNodeAdjacency: 'allEdges', data: [{ name: 'a' }, { name: 'b' }, { name: 'a1' }, { name: 'a2' }, { name: 'b1' }, { name: 'c' }], links: [{ source: 'a', target: 'a1', value: 5 }, { source: 'a', target: 'a2', value: 3 }, { source: 'b', target: 'b1', value: 8 }, { source: 'a', target: 'b1', value: 3 }, { source: 'b1', target: 'a1', value: 1 }, { source: 'b1', target: 'c', value: 2 }] } }; var myChart = echarts.init(document.getElementById(id)); myChart.setOption($.extend({},option),true); myChart.resize(); } function initechart05(row){ var _rowData=JSON.parse(JSON.stringify(row)); var rowData=_rowData.sort(function(a,b){ return b.value-a.value; }) var total=arrtotal(rowData); var str=""; //得出总数 for(var i=0;i<rowData.length;i++){ var row=rowData[i]; var ratio=Number(row.value/total*100).toFixed(2) str+= '<li>'+ '<span style="10%">'+(i+1)+'</span>'+ '<span style="30%">'+row.name+'</span>'+ '<span style="35%">'+ '<i>'+row.value+'</i>'+ '<div class="progress pro-h">'+ '<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style=" '+ratio+'%">'+ '<span class="sr-only"></span>'+ '</div>'+ '</div>'+ '</span>'+ '<span style="25%">'+ratio+'%</span>'+ '</li>' } $("#rankratio").html(str); } function arrtotal(arr){ if(!arr||arr.length===0){ return 0; } var sum=arr.reduce(function(x,y){ var _y=y.value; x=isNaN(x)?0:x; y=isNaN(_y)?0:_y; return Number(parseFloat(x)+parseFloat(y)).toFixed(2); },0) return sum; } function initechart04(id,dataObj,legend2){ var option = { title : { text: '', subtext: '', x:'center' }, tooltip : { trigger: 'item', formatter: "{a} <br/>{b} : {c} ({d}%)" }, legend: { orient: 'vertical', left: 'left', data: legend2 }, series : [ { name: '', type: 'pie', radius : '55%', center: ['50%', '60%'], data:dataObj, itemStyle: { emphasis: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ] }; var myChart = echarts.init(document.getElementById(id)); myChart.setOption($.extend({},option),true); myChart.resize(); } function initechart03(id,series,legend){ initEc(id+"",{ title: { text: '', x:'center' }, tooltip: {//鼠标放在点上面的时候显示的数据格式2019/03/04 08:30 2455025 trigger: 'axis', formatter: function (params) { params = params[0]; var date = new Date(params.name); return date.getFullYear() +'/' + (date.getMonth() + 1) + '/' +date.getDate()+' '+date.getHours()+"时:"+ params.value[1]; }, axisPointer: { animation: false } }, legend:{ data:legend }, xAxis: { type: 'time', splitLine: { show: false } }, yAxis: { type: 'value', name:"kWh", // boundaryGap:[-4000,'110%'], splitLine: { show: false }, max:function(obj){//解决因数据值范围相差太大或是太小曲线显示不美观问题 var ma=obj.max; var mi=obj.min; var val=Math.ceil((ma+(ma-mi)/2)) return val }, min:function(obj){ var ma=obj.max; var mi=obj.min; var val=Math.ceil((mi-(ma-mi)/2)) return mi==0?0:val } }, dataZoom: [ { type: 'slider',//数据滑块 start:0, minSpan:8, //5min // minSpan:16, //10min // minSpan:24, //15min // minSpan:50, //30min dataBackground:{ lineStyle:{ color:'#95BC2F' }, areaStyle:{ color:'#95BC2F', opacity:1, } }, // fillerColor:'rgba(255,255,255,.6)' }, { type:'inside'//使鼠标在图表中时滚轮可用 } ], series: series }) } function initechart02(pArr,parentNode){ initEc("echart_02",{ title: { text: '', x:'center' }, tooltip: {//鼠标放在点上面的时候显示的数据格式2019/03/04 08:30 2455025 trigger: 'axis', formatter: function (params) { params = params[0]; var date = new Date(params.name); return date.getFullYear() +'/' + (date.getMonth() + 1) + '/' +date.getDate()+' '+date.getHours()+"时:"+ params.value[1]; }, axisPointer: { animation: false } }, legend:{ data:[parentNode.name] }, xAxis: { type: 'time', splitLine: { show: false } }, yAxis: { type: 'value', name:"kWh", // boundaryGap:[-4000,'110%'], splitLine: { show: false }, max:function(obj){//解决因数据值范围相差太大或是太小曲线显示不美观问题 var ma=obj.max; var mi=obj.min; var val=Math.ceil((ma+(ma-mi)/2)) return val }, min:function(obj){ var ma=obj.max; var mi=obj.min; var val=Math.ceil((mi-(ma-mi)/2)) return mi==0?0:val } }, dataZoom: [ { type: 'slider',//数据滑块 start:0, minSpan:8, //5min // minSpan:16, //10min // minSpan:24, //15min // minSpan:50, //30min dataBackground:{ lineStyle:{ color:'#95BC2F' }, areaStyle:{ color:'#95BC2F', opacity:1, } }, // fillerColor:'rgba(255,255,255,.6)' }, { type:'inside'//使鼠标在图表中时滚轮可用 } ], series: [{ name: parentNode.name, type: 'line', smooth:true, showSymbol: false, hoverAnimation: false, data: pArr }] }) } function zTreeOnCheck(event, treeId, treeNode) { //alert(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked); }; //同步加载树(未使用) function initLfTree1(code){ if(code===undefined){return} //获取到后台的数据 $.ajax({ url:'/findTModeClassByAreaCode', data:{areaCode:73}, dataType:'json', success:function(data){ initTr('pageTree',{ nodes:data, setting:{ view: { selectedMulti: true, showIcon: false }, }, callback: { //onCheck: zTreeOnCheck } }) } }) } //初始化公共的tree(未使用) function initTr(id,st){ var obj={}; obj.nodes = [ {id:1, pId:0, name: "父节点1"}, {id:11, pId:1, name: "子节点1"}, {id:12, pId:1, name: "子节点2"} ]; obj.setting = { view: { selectedMulti: false, showIcon: false }, check: { enable: true }, data: { simpleData: { enable: true } }, callback: { onAsyncSuccess: function (event, treeId, treeNode, msg) { }, } }; var oo=$.extend( true,{},obj,st);//深拷贝 $.fn.zTree.init($("#"+id), oo.setting, oo.nodes); } /** * 初始化历史曲线的时间 */ function initTimeFormate(format1, format2, view, end) { format1 = !!format1 ? format1 : "yyyy-mm-dd"; format2 = !!format2 ? format2 : "yyyy-MM-dd"; view = !!view ? view : 2; var selector = end ? $("#systemtime_end") : $("#systemtime"); selector.datetimepicker('remove'); selector.datetimepicker({ language:"zh", format: format1, autoclose: true, startView: view, minView: 2 }).on("click", function () { selector.datetimepicker('show'); }).off("changeDate").on("changeDate",function(ev){ var id=$(ev.target).attr("id"); var time=ev.date.Format("yyyy-MM-dd") if(id=="systemtime"){ $("#systemtime_end").datetimepicker("setStartDate",time) }else{ $("#systemtime").datetimepicker("setEndDate",time) } }); if(end){ var _date= new Date().Format(format2); //往前面减十天组成的数组 var sevenDate=getSubSeven(_date,1); selector.val(new Date().Format(format2)); $("#systemtime").val(sevenDate[sevenDate.length-1]); }else{ selector.val(new Date ().Format(format2)); } } function initEc(id,op){ var color=['#0093F1','#45BF98','#F28D4E','#C1232B','#B5C334','#FCCE10', '#E87C25','#27727B','#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD', '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0']; //var unit=unitList[$('#'+id).prev('div').find('.bar-type dt.cur').attr('unit')]; var option = { color:color, tooltip: { trigger: 'axis', axisPointer: { type: 'cross', crossStyle: { color: '#999' } } }, calculable:true, toolbox: { right:'10px', zlevel:600, z:600, feature: { dataView: {show: true, readOnly: false}, magicType: {show: true, type: ['line', 'bar','stack']}, restore: {show: true}, saveAsImage: {show: true} } }, // grid:{ // left:'70px', // right:'70px', // bottom:'60px', // //x:'10%', // //y2:'13%',//距离最下面的边距 // }, legend: { data:['bar'], }, calculable:true, noDataLoadingOption:{ //没有数据时, effect: "bubble", text:"暂无数据", effectOption:{ effect:{ n:0 } }, textStyle:{ fontSize:32, fontWeight:'bold' } }, xAxis: [ { type: 'category', data:[], axisPointer: { type: 'shadow' } } ], yAxis: [ { type: 'value', //name:unit, name:"千瓦时", axisLabel: { formatter: '{value}' } } ], series: [{ name:'bar', type:'bar', data:[] }] }; var myChart = echarts.init(document.getElementById(id)); myChart.setOption($.extend({},option,op),true); myChart.resize(); } })
arr