diff --git a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/overall-analysis.html b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/overall-analysis.html index 6b4616c3..cab224e9 100644 --- a/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/overall-analysis.html +++ b/lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/overall-analysis.html @@ -350,7 +350,8 @@ changeArea(datas[0].deptId, datas[0].deptName,'1') } for(var i=0; i'+datas[i].deptName+'' + html += '
'+datas[i].deptName+'
' } $("#depts").html(html); @@ -449,13 +450,32 @@ queryStreetAndDistrict(id,name); } if (type === "2"){ - //gouxuan - - - - //bgouxuan - - + var checkFlag = 1; + //勾选 + var streetChildren = $('#streetDetail').children(); + var districtChildren = $('#districtDetail').children(); + // 遍历子元素 + districtChildren.each(function() { + if (this.className === "selitem selected active") { + checkFlag = 0; + } + }); + streetChildren.each(function() { + if (this.className === "selitem selected active") { + checkFlag = 0; + } + }); + //如果checkFlag=0代表刚刚是取消勾选操作 + if (checkFlag ===0) { + var deptChildren = $('#depts').children(); + deptChildren.each(function() { + if (this.className === "check_label selchk selnext") { + deptId = this.getAttribute('dpId'); + deptName = this.getAttribute('dpName'); + $("#dept_flag").html(deptName+"") + } + }); + } } sixIndicators(deptId, deptName,beginTime,endTime) sixIndicators_area(deptId, deptName,beginTime,endTime); @@ -465,9 +485,8 @@ reg_order(deptId,beginTime,endTime); complaint_order(deptId,beginTime,endTime); bureau_order(deptId,beginTime,endTime); - if (null == name) name = "全区" - $("#dept_flag").html(name+"") - console.log() + if (null == deptName) deptName = "全区" + $("#dept_flag").html(deptName+"") } function searchDate(time1, time2) { @@ -481,8 +500,8 @@ reg_order(deptId,beginTime,endTime); complaint_order(deptId,beginTime,endTime); bureau_order(deptId,beginTime,endTime); - if (null == name) name = "全区" - $("#dept_flag").html(name+"") + if (null == deptName) deptName = "全区" + $("#dept_flag").html(deptName+"") } function sixIndicators(deptId, area,beginTime,endTime) {