From c73e68680f1884ed9e2260ea9c5dcde8e4d48615 Mon Sep 17 00:00:00 2001 From: hdw <496960745@qq.com> Date: 星期三, 24 十月 2018 15:50:01 +0800 Subject: [PATCH] 饼状图 --- gx_tieta/WebRoot/control.jsp | 42 +++++++++++++++++++++++++----------------- 1 files changed, 25 insertions(+), 17 deletions(-) diff --git a/gx_tieta/WebRoot/control.jsp b/gx_tieta/WebRoot/control.jsp index 0c733b9..692e91d 100644 --- a/gx_tieta/WebRoot/control.jsp +++ b/gx_tieta/WebRoot/control.jsp @@ -1013,29 +1013,32 @@ var unit = ""; if(lname == 'Voltage'){ unit ="V"; - max = batt.MonVolStd*1.25; + /* max = batt.MonVolStd*1.25; var tempmax = Math.max.apply( Math, array); if(tempmax > max){ max = tempmax*1.25; - } + } */ + max = Math.max.apply( Math, array)*1.1; max = max.toFixed(3); }else if(lname == 'Resistance'){ unit = "m惟"; - max = (batt.MonResStd*1.25); + /* max = (batt.MonResStd*1.25); max = 10; var tempmax = Math.max.apply( Math, array)*1.25; if(tempmax<max){ max = tempmax; - } + } */ + max = Math.max.apply( Math, array)*1.1; max = (max).toFixed(3); }else if(lname == 'Temperature'){ unit = "鈩�"; - max = (Math.max.apply( Math, array)*1.25).toFixed(3); + max = (Math.max.apply( Math, array)*1.5).toFixed(3); }else if(lname == 'Conductance'){ - max = (batt.MonSerStd*1.25).toFixed(3); + //max = (batt.MonSerStd*1.25).toFixed(3); + max = (Math.max.apply( Math, array)*1.1).toFixed(3); }else if(lname == 'MonJHCurr') { unit = "mA"; - max = (Math.max.apply( Math, array)*1.25).toFixed(3); + max = (Math.max.apply( Math, array)*1.1).toFixed(3); } //console.info("max:"+max+" min:"+min); if(lname=='Resistance' || lname=='Temperature'){ @@ -1669,17 +1672,20 @@ var array = getArray(lname); var batt = getBatt(); var min = (Math.min.apply( Math, array)*0.9).toFixed(3); - var max = 0 ; + var max = (Math.max.apply( Math, array)*1.1).toFixed(3); //console.info(batt); if(lname == 'Voltage'){ - max = (batt.MonVolStd*1.25).toFixed(3); + //max = (batt.MonVolStd*1.25).toFixed(3); + max = (Math.max.apply( Math, array)*1.1).toFixed(3); }else if(lname == 'Resistance'){ //max = (batt.MonResStd*1.25).toFixed(3); - max =10; + //max =10; + max = (Math.max.apply( Math, array)*1.1).toFixed(3); }else if(lname == 'Temperature'){ - max = (Math.max.apply( Math, array)*1.25).toFixed(3); + max = (Math.max.apply( Math, array)*1.5).toFixed(3); }else if(lname == 'Conductance'){ - max = (batt.MonSerStd*1.25).toFixed(3); + //max = (batt.MonSerStd*1.25).toFixed(3); + max = (Math.max.apply( Math, array)*1.1).toFixed(3); } //console.info("max:"+max+" min:"+min); if(lname=='Resistance' || lname=='Temperature'){ @@ -2669,9 +2675,12 @@ // 瀹炴椂-鍘嗗彶鍒囨崲瀹氫綅鍒板叿浣撶數姹犵粍 $(function() { - $('body').on('click', '#nav a[href="charge-test.jsp"]', function() { + $('body').on('click', '#nav a[href="charge-test.jsp"]', function(event) { var batt = getBatt(); - $(this).attr('href', 'charge-test.jsp?battgroupId='+BattGroupId+"&stationId="+batt.StationId); + var province = batt.StationName1; + var city = batt.StationName2; + var home = batt.StationName; + $(this).attr('href', 'charge-test.jsp?province='+province+'&city='+city+'&home='+home); }); }); @@ -3976,11 +3985,10 @@ // 鏈烘埧->鐢垫睜缁� treeView.ele.on('click', '.home', function() { var home = $(this).data('attr'); - console.log(home); var tmp = { StationName1: home.StationName1, StationName2: home.StationName2, - StationName3: home.StationName3, + StationName: home.StationName, StationId: home.StationId }; fourth(treeView, $(this).parent(), tmp); @@ -3994,7 +4002,7 @@ BattGroupId = eleGroup.BattGroupId; // 瀵笲TS9611鍋氱壒娈婄殑澶勭悊 var batt = getBatt(); - console.info(batt); + //console.info(batt); $('#eleCircleBtn').removeClass('hide'); if(regEquipType(batt.FBSDeviceId, globalPattern.BTSSreen)) { var isAct = $('#eleCircleBtn').hasClass('action'); -- Gitblit v1.9.1