| | |
| | | <link href="css/loading.css" type="text/css" rel="stylesheet" />
|
| | | <link href="jqueryui/jquery-ui.css" type="text/css" rel="stylesheet" />
|
| | | <link href="css/collapse.css" type="text/css" rel="stylesheet" />
|
| | | <link rel="stylesheet" type="text/css" href="css/confirm.css">
|
| | |
|
| | | <link rel="stylesheet" type="text/css" href="css/confirm.css">
|
| | | <link rel="stylesheet" href="css/common.css">
|
| | | <!-- font-awesome-4.7.0 -->
|
| | | <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css">
|
| | | <script type="text/javascript" src="js/echarts2.js"></script>
|
| | |
| | | <td><s:text name="Computer_room_IP"/></td> <!-- 机房IP -->
|
| | | <td id="StationIP"></td>
|
| | | </tr>
|
| | | <!-- <tr>
|
| | | <td><s:text name="Batt_group"/>ID</td> 电池组ID
|
| | | <tr>
|
| | | <td><s:text name="Batt_group"/>ID</td> <!-- 电池组ID -->
|
| | | <td id="batt_group_id"></td>
|
| | | </tr> -->
|
| | | </tr>
|
| | | <tr>
|
| | | <td><s:text name="Battery_name"/></td> <!-- 电池组名称 -->
|
| | | <td id="BattGroupName"></td>
|
| | |
| | | <script type="text/javascript" src="js/collapse.js"></script>
|
| | | <script type="text/javascript" src="js/charge.js"></script>
|
| | | <script type="text/javascript" src="js/myConfirm.js"></script> <!-- 确认框 -->
|
| | | <script type="text/javascript" src="pages/js/pages/siderbar.js"></script>
|
| | | <script type="text/javascript">
|
| | | var permits;
|
| | | <% Object obj=session.getAttribute("permits");
|
| | |
| | |
|
| | | //根据当前选中的电池组id查询当前电池组的基本信息
|
| | | function getBattinfById(){
|
| | | if(battinlist!=undefined && BattGroupId!=undefined){
|
| | | /* if(battinlist!=undefined && BattGroupId!=undefined){
|
| | | for(var i=0;i<battinlist.length;i++){
|
| | | for(var k=0;k<battinlist[i].length;k++){
|
| | | if(BattGroupId==battinlist[i][k].BattGroupId){
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | return undefined;
|
| | | return undefined; */
|
| | | var activeFile = $('.whyc-sider-menu .sider-menu-file.active');
|
| | | if(activeFile.length == 1) {
|
| | | return activeFile.data('attr');
|
| | | }else {
|
| | | return undefined;
|
| | | }
|
| | | }
|
| | |
|
| | | function clearfourPicture(){
|
| | |
| | | $(function() {
|
| | | $('body').on('click', '#nav a[href="control.jsp"]', function() {
|
| | | var batt = getBattinfById();
|
| | | //console.info(batt.StationId);
|
| | | $(this).attr('href', 'control.jsp?battgroupId='+BattGroupId+'&stationId='+batt.StationId);
|
| | | var province = batt.StationName1;
|
| | | var city = batt.StationName2;
|
| | | var home = batt.StationName;
|
| | | $(this).attr('href', 'control.jsp?province='+province+'&city='+city+'&home='+home);
|
| | | });
|
| | | });
|
| | |
|
| | |
| | | if(model.code == 1){
|
| | | //console.info(model.data);
|
| | | for(var i = 0;i<model.data.length;i++){
|
| | | if(model.data[i].batt_test_type == 3){
|
| | | var _data = model.data[i];
|
| | | if(_data.batt_test_type == 3){
|
| | | arr.push({
|
| | | note: model.data[i].note,
|
| | | val:model.data[i].BattGroupId,
|
| | | fbs: model.data[i].batt_test_tlong,
|
| | | note:_data.note,
|
| | | val:_data.BattGroupId,
|
| | | province: _data.stationName1,
|
| | | city: _data.stationName2,
|
| | | home: _data.stationName,
|
| | | isCharge:0
|
| | | });
|
| | | }else if(model.data[i].batt_test_type == 2){
|
| | | }else if(_data.batt_test_type == 2){
|
| | | arr.push({
|
| | | note: model.data[i].note,
|
| | | val:model.data[i].BattGroupId,
|
| | | fbs: model.data[i].batt_test_tlong,
|
| | | note: _data.note,
|
| | | val: _data.BattGroupId,
|
| | | province: _data.stationName1,
|
| | | city: _data.stationName2,
|
| | | home: _data.stationName,
|
| | | isCharge:1
|
| | | });
|
| | | }
|
| | |
| | |
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | // 生成充放电监测模块内容
|
| | | function createBattListen(ele, list) {
|
| | | //console.info(list);
|
| | | ele.text("");
|
| | | var discharge_num = 0;
|
| | | var charge_num = 0;
|
| | | var ul = $('<ul></ul>');
|
| | | for(var i = 0; i < list.length; i++) {
|
| | | var li = "";
|
| | | if(list[i].isCharge) {
|
| | | li = $('<li><a href="javascript:;" class="batt-charge" value="'+list[i].val+'" fbs="'+list[i].fbs+'" note="'+list[i].note+'">'+list[i].val+'电池组充电测试!</a></li>');
|
| | | charge_num++;
|
| | | }else {
|
| | | li = $('<li><a href="javascript:;" class="batt-discharge" value="'+list[i].val+'" fbs="'+list[i].fbs+'" note="'+list[i].note+'">'+list[i].val+'电池组放电测试!</a></li>');
|
| | | discharge_num++;
|
| | | }
|
| | | ul.append(li);
|
| | | }
|
| | | $('#ele_content .batt-listen .count-num').find('span').eq(0).text(discharge_num);
|
| | | $('#ele_content .batt-listen .count-num').find('span').eq(1).text(charge_num);
|
| | | ele.append(ul);
|
| | | }
|
| | | // 点击电池充放电监测列表触发事件
|
| | | $(function() {
|
| | | var batt_list = $('#ele_content .batt-listen .batt-list');
|
| | | batt_list.on('click', 'a', function(){
|
| | | var fbsId = $(this).attr('fbs');
|
| | | var isSpecial = regFbsId(fbsId);
|
| | | $('.special-mon-data').removeClass('show');
|
| | | batt_list.find('a').removeClass('active');
|
| | | $(this).addClass('active');
|
| | | BattGroupId=$(this).attr("value");
|
| | | locationBattPos($(this).attr('note'), $(this).attr('value'));
|
| | | if(isSpecial) {
|
| | | |
| | | }else {
|
| | | clearfourPicture();
|
| | | }
|
| | | });
|
| | | });
|
| | | |
| | | function BattlocationById(battid){
|
| | | if(battid!=undefined){
|
| | | BattGroupId = battid;
|
| | | $('#lside a').css({'background-color':'#fff'});
|
| | | //获得一级菜单并展示二级菜单
|
| | | var secTag =$('#'+battid).parent().parent().siblings().first().parent().parent().siblings().first().next();
|
| | | var secTagA = $('#'+battid).parent().parent().siblings().first();
|
| | | //console.info(secTagA.text()+'******');
|
| | | if(secTagA.text().trim().length == 0) {
|
| | | secTagA.hide();
|
| | | }
|
| | | secTag.show();
|
| | | //$('#'+thr_id).parent().parent().siblings().first().parent().parent().siblings().first().next().show();
|
| | | //获得二级菜单并展示三级菜单
|
| | | $('#'+battid).parent().parent().siblings().first().next().show();
|
| | | $('#'+battid).css('background-color','#9bbaf3');
|
| | | //一级菜单展开样式
|
| | | $('#'+battid).parent().parent().siblings().first().parent().parent().siblings().first().children('.arrow').removeClass("down");
|
| | | $('#'+battid).parent().parent().siblings().first().parent().parent().siblings().first().children('.arrow').addClass("up");
|
| | | $('#'+battid).parent().parent().siblings().first().children('.mark').text('-');
|
| | | $('#'+battid).parent().parent().siblings().first().children('.mark').addClass('black');
|
| | | //alert($('#'+thr_id).parent().parent().siblings().first().text());
|
| | | location.hash="#"+battid;
|
| | | location.hash = '';
|
| | | $('#'+battid).click();
|
| | | }
|
| | | }
|
| | |
|
| | | //跳转到指定的电池组统计分析查询
|
| | |
| | | });
|
| | | });
|
| | | searchAll_lowAction(); //获取阀值
|
| | | seachAllStation();
|
| | | //seachAllStation();
|
| | | //查询所有机房
|
| | | function seachAllStation(){
|
| | | $.ajax({
|
| | |
| | | var cont = '当前电池组的标称容量:<input style="border: 1px solid #ccc;height: 24px;" type="text" value="'+batt.MonCapStd+'" class ="batt-moncapstd">AH';
|
| | | myConfirm.show({content: cont, class: 'show-historydata'});
|
| | | }
|
| | | // siderbar模块
|
| | | $(function() {
|
| | | var TreeView = GLOBAL.pages.TreeView;
|
| | | var first = GLOBAL.pages.siderbar.first; // 一级导航
|
| | | var second = GLOBAL.pages.siderbar.second; // 二级导航
|
| | | var third = GLOBAL.pages.siderbar.third; // 三级导航
|
| | | var fourth = GLOBAL.pages.siderbar.fourth; // 四级导航
|
| | | var localSideBar = GLOBAL.pages.siderbar.localSideBar; // 定位机房
|
| | | var treeView = new TreeView($('#lside'));
|
| | | $('#lside').width($('#ele_content').width());
|
| | | treeView.setContainer();
|
| | | // 设置容器可拖动
|
| | | $('#ele_content').resizable({
|
| | | handles: 'e',
|
| | | maxWidth: 520,
|
| | | minWidth: 200,
|
| | | alsoResize: $('#lside'),
|
| | | resize:function() {
|
| | | treeView.setContainer();
|
| | | }
|
| | | });
|
| | | |
| | | // 生成一级导航-省
|
| | | first(treeView, treeView.container);
|
| | | |
| | | // 省->市
|
| | | treeView.ele.on('click', '.province', function() {
|
| | | var province = $(this).data('attr');
|
| | | second(treeView, $(this).parent(), province);
|
| | | });
|
| | | |
| | | // 市->机房
|
| | | treeView.ele.on('click', '.city', function() {
|
| | | var city = $(this).data('attr');
|
| | | third(treeView, $(this).parent(), city);
|
| | | });
|
| | | |
| | | battinlist = [];
|
| | | // 机房->电池组
|
| | | treeView.ele.on('click', '.home', function() {
|
| | | var home = $(this).data('attr');
|
| | | var tmp = {
|
| | | StationName1: home.StationName1,
|
| | | StationName2: home.StationName2,
|
| | | StationName: home.StationName,
|
| | | StationId: home.StationId
|
| | | };
|
| | | fourth(treeView, $(this).parent(), tmp);
|
| | | });
|
| | | |
| | | // 电池组
|
| | | treeView.ele.on('click', '.eleGroup', function() {
|
| | | var eleGroup = $(this).data('attr');
|
| | | |
| | | // 初始化特殊设备的图标
|
| | | initSpecialGraphLine();
|
| | | |
| | | //显示电池的详细信息
|
| | | $('#address_infor').text($(this).parent().parent().parent().parent().siblings().first().text()+"-"+$(this).parent().parent().siblings().first().text()+"-"+$(this).text());
|
| | | var fbsId = eleGroup.FBSDeviceId;
|
| | | var isSpecial = regFbsId(fbsId);
|
| | | $('.special-mon-data').removeClass('show');
|
| | | BattGroupId=$(this).attr("id");
|
| | | if(isSpecial) {
|
| | | $('.special-mon-data').addClass('show');
|
| | | var temp = {
|
| | | BattGroupId:$(this).attr("id")
|
| | | };
|
| | | searchMonTestInfo(temp);
|
| | | resizeSpecailGraph();
|
| | | }else {
|
| | | getBattStr();
|
| | | findBattinfObj();
|
| | | AllBataDate=new Array();
|
| | | clearfourPicture();
|
| | | findBatttestdata_infByBattGroupId();
|
| | | searchAll_lowAction(); //获取阀值
|
| | | }
|
| | | |
| | | // 电池充放电数据监控
|
| | | var batt_list = $('.batt-listen .batt-list');
|
| | | batt_list.on('click', 'a', function(){
|
| | | batt_list.find('a').removeClass('active');
|
| | | $(this).addClass('active');
|
| | | var battInfo = $(this).parent().data('attr'); |
| | | |
| | | var tmp = {
|
| | | province: battInfo.province,
|
| | | city: battInfo.city,
|
| | | home: battInfo.home,
|
| | | homeid: battInfo.note,
|
| | | battid: battInfo.val
|
| | | };
|
| | | console.log(tmp);
|
| | | localSideBar(treeView, treeView.container, tmp);
|
| | | });
|
| | | |
| | | |
| | | // 设置记录的笔数为-1
|
| | | $('#testrecordcout').val('-1');
|
| | | });
|
| | | });
|
| | | </script>
|
| | | </html>
|