var WindowsTMp = 0;
|
localStorage.setItem("voicesCon","0")
|
function speakTexts() {
|
var dts = [];
|
if(localStorage.getItem("voices") == 0){
|
return
|
}
|
|
if (localStorage.getItem("voicesCon") == 0){
|
$.ajax({
|
url: "/hxzkuwb/findYuYinWarning",
|
async: false,
|
success: function(data) {
|
for (var i = 0; i < data.length; i++) {
|
dts.push(data[i].baoliu2 +"-"+fenList[data[i].baoliu8] + "。");
|
}
|
}
|
});
|
var texts = dts;
|
var voices = window.speechSynthesis.getVoices();
|
var currentIndex = 0;
|
|
window.speechSynthesis.onvoiceschanged = function() {
|
voices = window.speechSynthesis.getVoices();
|
playNextText()
|
WindowsTMp=1;
|
};
|
if (WindowsTMp == 1){
|
playNextText()
|
}
|
function playNextText() {
|
if (localStorage.getItem("voices") == 0){
|
return
|
}else{
|
if (currentIndex < texts.length){
|
var msg = new SpeechSynthesisUtterance();
|
msg.voice = voices[58];
|
msg.text = texts[currentIndex];
|
window.speechSynthesis.speak(msg);
|
currentIndex++;
|
msg.onend = playNextText;
|
}else{
|
if (texts!=0){
|
$.ajax({
|
url: "/hxzkuwb/UpWarningBaoLiu9", // 替换成你的后端接口URL
|
method: "POST",
|
contentType: "application/json", // 设置请求内容类型为JSON
|
data: JSON.stringify(texts), // 将数组转换为JSON字符串并作为请求数据发送
|
success: function(response) {
|
|
// 在这里处理成功返回的数据
|
},
|
error: function(xhr, status, error) {
|
console.error('错误:', error);
|
// 在这里处理错误情况
|
}
|
});
|
}else{
|
notify.alert(languages83)
|
localStorage.setItem("voicesCon","3")
|
}
|
speakTexts()
|
}
|
}
|
}
|
|
}else if (localStorage.getItem("voicesCon") == 1){
|
$.ajax({
|
url: "/hxzkuwb/findYuYinWarningYiCi",
|
async: false,
|
success: function(data) {
|
for (var i = 0; i < data.length; i++) {
|
dts.push(data[i].baoliu2 +"-"+ fenList[data[i].baoliu8] + "。");
|
}
|
}
|
});
|
|
var texts = dts;
|
var voices = window.speechSynthesis.getVoices();
|
var currentIndex = 0;
|
|
window.speechSynthesis.onvoiceschanged = function() {
|
voices = window.speechSynthesis.getVoices();
|
playNextText()
|
WindowsTMp=1;
|
};
|
if (WindowsTMp == 1){
|
playNextText()
|
}
|
function playNextText() {
|
if (localStorage.getItem("voices") == 0){
|
return
|
}else{
|
if (currentIndex < texts.length){
|
var msg = new SpeechSynthesisUtterance();
|
msg.voice = voices[58];
|
msg.text = texts[currentIndex];
|
window.speechSynthesis.speak(msg);
|
currentIndex++;
|
msg.onend = playNextText;
|
}else{
|
if (texts!=0){
|
$.ajax({
|
url: "/hxzkuwb/UpWarningBaoLiu9", // 替换成你的后端接口URL
|
method: "POST",
|
contentType: "application/json", // 设置请求内容类型为JSON
|
data: JSON.stringify(texts), // 将数组转换为JSON字符串并作为请求数据发送
|
success: function(response) {
|
|
// 在这里处理成功返回的数据
|
},
|
error: function(xhr, status, error) {
|
console.error('错误:', error);
|
// 在这里处理错误情况
|
}
|
});
|
}else{
|
notify.alert(languages83)
|
localStorage.setItem("voicesCon","3")
|
}
|
speakTexts()
|
}
|
}
|
}
|
}else{
|
setTimeout(function (){
|
speakTexts()
|
},5000)
|
}
|
|
|
|
}
|
|
|
function ello(){
|
var td = $("#ello").css("right");
|
$("#ello").animate({ right: '1%' }, 1000);
|
$("#ello").show()
|
}
|
|
$.ajax({
|
url: "/hxzkuwb/FindSetting",
|
type: "POST",
|
async: false,
|
success: function (data) {
|
if (data[0].anchorShow =="1"){
|
var flag = document.getElementById("showJiZhan")
|
flag.checked = true
|
}
|
if (data[0].shipinShow =="1"){
|
var flag = document.getElementById("ShowJianKong")
|
flag.checked = true
|
}
|
if (data[0].tagOffline =="1"){
|
var flag = document.getElementById("ShowLiXianes")
|
flag.checked = true
|
onLine = 1
|
}else{
|
onLine = 0
|
}
|
if (data[0].tianMap =="1"){
|
var flagt = document.getElementById("TianMap")
|
flagt.checked = true
|
TianDiMap()
|
}
|
if (data[0].wangguanShow =="1"){
|
var flag = document.getElementById("ShowWangGuan")
|
flag.checked = true
|
}
|
if (data[0].weilanShow =="1"){
|
var flagt = document.getElementById("WeiLan")
|
flagt.checked = true
|
onFence = 1
|
}else{
|
onFence = 0
|
}
|
if (data[0].opacity == "1"){
|
opacitys = "1"
|
}else{
|
opacitys = "0"
|
}
|
if (data[0].sdtitle == "1"){
|
asdtitle = "1"
|
}else{
|
asdtitle = "0"
|
}
|
},
|
error: function (xhr, status, error) {
|
// 处理错误
|
console.error(error);
|
}
|
});
|
|
|
|
function showWangGuan(){
|
var flag = document.getElementById("ShowWangGuan")
|
var wangguanshow;
|
if (flag.checked) {
|
//设置网关显示
|
wangguanshow = "1";
|
notify.success(languages84)
|
} else {
|
//设置网关隐藏
|
wangguanshow = "0";
|
notify.error(languages85)
|
}
|
var data = "baoliu6="+wangguanshow;
|
$.get("/hxzkuwb/UpWangGuanShow",data,function (data){
|
|
})
|
var data1 = "wangguanShow="+wangguanshow
|
$.post("/hxzkuwb/UpSetting",data1,function (data){
|
})
|
}
|
function showJiZhan(){
|
var flag = document.getElementById("showJiZhan")
|
var jizhanshow;
|
if (flag.checked) {
|
//设置基站显示
|
jizhanshow = "1";
|
notify.success(languages86)
|
} else {
|
//设置基站隐藏
|
jizhanshow = "0";
|
notify.error(languages87)
|
}
|
var data = "baoliu18="+jizhanshow;
|
$.get("/hxzkuwb/UpJiZhanShow",data,function (data){
|
|
})
|
var data1 = "anchorShow="+jizhanshow
|
$.post("/hxzkuwb/UpSetting",data1,function (data){
|
|
})
|
}
|
function showJianKong(){
|
var flag = document.getElementById("ShowJianKong")
|
var showJianKong;
|
if (flag.checked) {
|
//设置基站显示
|
showJianKong = "1";
|
notify.success(languages88)
|
} else {
|
//设置基站隐藏
|
showJianKong = "0";
|
notify.error(languages89)
|
}
|
var data = "baoliu6="+showJianKong;
|
$.get("/hxzkuwb/UpJianKong",data,function (data){
|
|
})
|
var data1 = "shipinShow="+showJianKong
|
$.post("/hxzkuwb/UpSetting",data1,function (data){
|
|
})
|
}
|
|
function showLiXian(){
|
var flag = document.getElementById("ShowLiXianes")
|
if (flag.checked) {
|
//开启离线显示
|
sessionStorage.setItem("oNLine","Yes")
|
onLine = 1;
|
notify.success(languages90)
|
} else {
|
//关闭离线显示
|
sessionStorage.setItem("oNLine","No")
|
onLine = 0;
|
notify.error(languages91)
|
}
|
var data1 = "tagOffline="+onLine
|
$.post("/hxzkuwb/UpSetting",data1,function (data){
|
|
})
|
}
|
function WeiLan(){
|
var flagt = document.getElementById("WeiLan")
|
if(flagt.checked){
|
//修改为卫星模式
|
onFence = 1
|
notify.success(languages92)
|
}else{
|
onFence = 0
|
//修改路网模式
|
notify.error(languages93)
|
}
|
var data1 = "weilanShow="+onFence
|
$.post("/hxzkuwb/UpSetting",data1,function (data){
|
|
})
|
|
}
|
function YuYinMoShi(){
|
var flagt = document.getElementById("YuYinMoShi")
|
if(flagt.checked){
|
localStorage.setItem("voices","1")
|
speakTexts()
|
notify.success(languages94)
|
}else{
|
localStorage.setItem("voices","0")
|
notify.error(languages95)
|
}
|
}
|
|
function YuYinBoBao(){
|
var flagt = document.getElementById("YuYinBoBao")
|
if(flagt.checked){
|
localStorage.setItem("voicesCon","1")
|
notify.success(languages96)
|
}else{
|
localStorage.setItem("voicesCon","0")
|
notify.error(languages97)
|
}
|
}
|
function TianMap(){
|
var flagt = document.getElementById("TianMap")
|
var tians;
|
if(flagt.checked){
|
tians = 1
|
TianDiMap()
|
}else{
|
tians = 0
|
init()
|
}
|
var data1 = "tianMap="+tians
|
$.post("/hxzkuwb/UpSetting",data1,function (data){
|
|
})
|
}
|
function CesiumMap(){
|
var flagt = document.getElementById("CesiumMap")
|
if(flagt.checked){
|
notify.success("已勾选,即将打开到三维地图,请稍等......")
|
setTimeout(function (){
|
window.open("Mars3dMap.jsp")
|
},2000)
|
}else{
|
notify.error("已取消,停止跳转到三维地图,")
|
}
|
}
|
function QuYuKuangXuan(){
|
var flag = document.getElementById("QuYuKuangXuan")
|
if (flag.checked) {
|
//开启区域框选
|
sessionStorage.setItem("QuYuKuangXuan","1")
|
sessionStorage.setItem("kqhuizhi",true)
|
} else {
|
//关闭区域框选
|
sessionStorage.setItem("QuYuKuangXuan","0")
|
sessionStorage.setItem("kqhuizhi","false1")
|
}
|
}
|
|
window.onload = function() {
|
var flagt = document.getElementById("YuYinMoShi")
|
if (localStorage.getItem("voices") === "1") {
|
flagt.checked = true;
|
speakTexts();
|
}
|
};
|
sessionStorage.setItem("oNLine","No")
|
|
function closeGengDuo(){
|
if ($("#ello").css("boxShadow") == "none"){
|
$("#ello").hide()
|
}else{
|
$("#ello").animate({ right: '-40%' }, 1000);
|
}
|
}
|
function ZuiXiaoHuaGengDuo(){
|
if ($("#ello").css("boxShadow") == "none"){
|
$("#ello").css("right","0%")
|
var element = document.getElementById('ello');
|
element.style.removeProperty('left');
|
$("#ello").css("top","0%")
|
$("#ello").css("width","33%")
|
$("#ello").css("height","100%")
|
$("#ello").css("boxShadow","#0C0C0C 5px 5px 5px 5px")
|
$("#ello").css("border","none")
|
$("#ello").css("overflow","hidden")
|
}else{
|
$("#ello").css("right","30%")
|
$("#ello").css("left","30%")
|
$("#ello").css("top","10%")
|
$("#ello").css("width","40%")
|
$("#ello").css("height","60%")
|
$("#ello").css("boxShadow","none")
|
$("#ello").css("border","1px solid #ccc")
|
$("#ello").css("overflow","scroll")
|
}
|
|
}
|
//三维~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
function showWangGuan1(){
|
// var flag = document.getElementById("ShowWangGuan")
|
// var wangguanshow;
|
// if (flag.checked) {
|
// //设置网关显示
|
// wangguanshow = "1";
|
// } else {
|
// //设置网关隐藏
|
// wangguanshow = "0";
|
// }
|
// var data = "baoliu6="+wangguanshow;
|
// $.get("/hxzkuwb/UpWangGuanShow",data,function (data){
|
//
|
// })
|
notify.error('三维地图功能维护中!')
|
}
|
function showJiZhan1(){
|
// var flag = document.getElementById("showJiZhan")
|
// var jizhanshow;
|
// if (flag.checked) {
|
// //设置基站显示
|
// jizhanshow = "1";
|
// } else {
|
// //设置基站隐藏
|
// jizhanshow = "0";
|
// }
|
// var data = "baoliu18="+jizhanshow;
|
// $.get("/hxzkuwb/UpJiZhanShow",data,function (data){
|
//
|
// })
|
notify.error(languages98)
|
}
|
function showJianKong1(){
|
// var flag = document.getElementById("ShowJianKong")
|
// var showJianKong;
|
// if (flag.checked) {
|
// //设置基站显示
|
// showJianKong = "1";
|
// } else {
|
// //设置基站隐藏
|
// showJianKong = "0";
|
// }
|
// var data = "baoliu6="+showJianKong;
|
// $.get("/hxzkuwb/UpJianKong",data,function (data){
|
//
|
// })
|
notify.error(languages98)
|
}
|
function showLiXian1(){
|
// var flag = document.getElementById("ShowLiXianes")
|
// if (flag.checked) {
|
// //开启离线显示
|
// sessionStorage.setItem("oNLine","Yes")
|
// onLine = 1;
|
// } else {
|
// //关闭离线显示
|
// sessionStorage.setItem("oNLine","No")
|
// onLine = 0;
|
//
|
// }
|
notify.error(languages98)
|
}
|
function JuJiXianShi1(){
|
// var flag = document.getElementById("JuJiXianShi")
|
// if (flag.checked) {
|
// //开启聚集显示
|
// sessionStorage.setItem("PerCircles","Yes")
|
// } else {
|
// //关闭聚集显示
|
// sessionStorage.setItem("PerCircles","No")
|
//
|
// }
|
notify.error(languages98)
|
}
|