142 lines
4.3 KiB
JavaScript
142 lines
4.3 KiB
JavaScript
|
|
localStorage.setItem("indexWidth","1350")
|
||
|
|
localStorage.setItem("indexHeight","650")
|
||
|
|
|
||
|
|
$(function () {
|
||
|
|
timeTask();
|
||
|
|
})
|
||
|
|
|
||
|
|
var timeout = false; //启动及关闭按钮
|
||
|
|
// 60 *5s 刷新一次
|
||
|
|
function timeTask() {
|
||
|
|
if (!timeout) {
|
||
|
|
timeout = true;
|
||
|
|
} else {
|
||
|
|
connect2();
|
||
|
|
connect();
|
||
|
|
}
|
||
|
|
setTimeout(timeTask, 1000 * 60 * 10);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
$('.title>.left>div:nth-child(1)').css('color','#FFFFFF')
|
||
|
|
function jump(e,type){
|
||
|
|
$('.left>div').css('color','#006F78')
|
||
|
|
$('.right>div').css('color','#006F78')
|
||
|
|
$('.right>div>div>div').css('color','#006F78')
|
||
|
|
$('.right>div>span').css('color','#006F78')
|
||
|
|
if(type === 1){
|
||
|
|
//首页
|
||
|
|
$('iframe').attr('src','index/index.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
localStorage.setItem("indexWidth","1350")
|
||
|
|
localStorage.setItem("indexHeight","650")
|
||
|
|
}else if(type === 2){
|
||
|
|
//视频监控
|
||
|
|
$('iframe').attr('src','video/videoPlay.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 3){
|
||
|
|
//智慧用电
|
||
|
|
$('iframe').attr('src','electricity/electricitys.html')
|
||
|
|
$('.right>div>span').css('color','#FFFFFF')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 4){
|
||
|
|
//火灾报警
|
||
|
|
$('iframe').attr('src','googlealarm/googlealarm.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 5){
|
||
|
|
//安全防范
|
||
|
|
$('iframe').attr('src','securityPrevention/securityPrevention.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 6){
|
||
|
|
//道闸管理
|
||
|
|
$('iframe').attr('src','management/management.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 7){
|
||
|
|
//电子地图
|
||
|
|
$('iframe').attr('src','eMap/eMap.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 8){
|
||
|
|
//系统管理
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
window.open("http://192.168.0.110:8080/rearService/login.html");
|
||
|
|
}else if(type === 9){
|
||
|
|
//智慧空调
|
||
|
|
$('iframe').attr('src','airConditioner/airConditioner.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 10){
|
||
|
|
//智慧路灯
|
||
|
|
$('iframe').attr('src','streetLamp/streetLamp.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 11){
|
||
|
|
//智慧用水
|
||
|
|
$('iframe').attr('src','water/water.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 12){
|
||
|
|
//光伏储能
|
||
|
|
$('iframe').attr('src','photovoltaicEnergyStorage/photovoltaicEnergyStorage.html')
|
||
|
|
$(e).css('color','#FFFFFF')
|
||
|
|
}else if(type === 15){
|
||
|
|
//智慧空调-切换按键
|
||
|
|
$('iframe').attr('src','airConditioner/airConditioner.html')
|
||
|
|
$('.someClass').css('color', '#FFFFFF')
|
||
|
|
}else if(type === 16){
|
||
|
|
//智慧空调-切换按键
|
||
|
|
$('iframe').attr('src','airConditioner/electricityConsumption.html')
|
||
|
|
$('.someClass').css('color', '#FFFFFF')
|
||
|
|
}else if(type === 17){
|
||
|
|
//智慧路灯-切换按键
|
||
|
|
$('iframe').attr('src','streetLamp/streetLampTable.html')
|
||
|
|
$('.lampClass').css('color', '#FFFFFF')
|
||
|
|
}else if(type === 18){
|
||
|
|
//智慧路灯-切换按键
|
||
|
|
$('iframe').attr('src','streetLamp/streetLamp.html')
|
||
|
|
$('.lampClass').css('color', '#FFFFFF')
|
||
|
|
}else{
|
||
|
|
alert("页面出错,请联系技术人员")
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function showOptions(element) {
|
||
|
|
const options = element.querySelector('.options');
|
||
|
|
options.style.display = 'block'; // 显示选项
|
||
|
|
}
|
||
|
|
|
||
|
|
function hideOptions(element) {
|
||
|
|
const options = element.querySelector('.options');
|
||
|
|
options.style.display = 'none'; // 隐藏选项
|
||
|
|
}
|
||
|
|
|
||
|
|
function jumpVideo(){
|
||
|
|
$('.left>div').css('color','#006F78')
|
||
|
|
$('.right>div').css('color','#006F78')
|
||
|
|
//视频监控
|
||
|
|
$('iframe').attr('src','video/videoPlay.html')
|
||
|
|
$("#video_cl").css('color','#FFFFFF')
|
||
|
|
}
|
||
|
|
|
||
|
|
//告警信息
|
||
|
|
function alarmClick(){
|
||
|
|
//接口状态点击
|
||
|
|
var index = layer.open({
|
||
|
|
title: ['告警信息','color: #fff'],
|
||
|
|
type: 2,
|
||
|
|
closeBtn: 2,
|
||
|
|
content: '../page/index/child/alarm.html',
|
||
|
|
area: ["70%", "90%"],
|
||
|
|
maxmin: false
|
||
|
|
/*btn: ['确定', '关闭'],
|
||
|
|
success: function (layero, index) {
|
||
|
|
// localStorage.setItem("subName",params.name);
|
||
|
|
//var myIframe = window[layero.find('iframe')[0]['name']];
|
||
|
|
//var fnc = myIframe.setData(params.name); //aaa()为子页面的方法
|
||
|
|
},
|
||
|
|
yes: function (index, layero) {
|
||
|
|
// 获取弹出层中的form表单元素
|
||
|
|
// var formSubmit = layer.getChildFrame('form', index);
|
||
|
|
// var submited = formSubmit.find('button')[0];
|
||
|
|
// // 触发点击事件,会对表单进行验证,验证成功则提交表单,失败则返回错误信息
|
||
|
|
// submited.click();
|
||
|
|
},*/
|
||
|
|
});
|
||
|
|
}
|