103 lines
2.9 KiB
JavaScript
103 lines
2.9 KiB
JavaScript
import {ipAddress} from "../../../public/js/url.js";
|
|
import {setTokenActive} from "./session.js";
|
|
import { updateSystemName } from "./pop/popUpdateSystemName.js";
|
|
setTokenActive();
|
|
function addNavEvent(){
|
|
|
|
$(".setTitle").on('click',function(){
|
|
var systemName=$(this).html();
|
|
updateSystemName(systemName)
|
|
})
|
|
|
|
$(".policeProtectionLinkage").on('click',function(){
|
|
window.open("../../cmdDispatch.html");
|
|
})
|
|
|
|
$(".videoInspection").on('click',function(){
|
|
window.open("../video/index.html");
|
|
})
|
|
|
|
$(".starrating").on('click',function(){
|
|
window.open("../starrating/index.html");
|
|
})
|
|
|
|
$(".threeColorAlarm").on('click',function(){
|
|
window.open("../threeColorAlarm/index.html");
|
|
})
|
|
|
|
$(".workInClock").on('click',function(){
|
|
window.open("../workInClock/index.html");
|
|
})
|
|
|
|
$(".intelligenceEarlyWarning").on('click',function(){
|
|
window.open("../newIntelligenceEarlyWarning/index.html");
|
|
})
|
|
|
|
$(".schoolStyle").on('click',function(){
|
|
window.open("../schoolStyle/index.html");
|
|
})
|
|
|
|
$(".information").on('click',function(){
|
|
window.open("../information/nursingSchoolExamSituation/index.html");
|
|
})
|
|
|
|
$(".hikVideo").on('click',function(){
|
|
var unameInfoStr = JSON.parse(sessionStorage.getItem("unameInfoStr"));
|
|
var session=unameInfoStr["session"];
|
|
var theme=JSON.parse(unameInfoStr["theme"]);
|
|
var title=encodeURI(encodeURI(theme["title"]));
|
|
//window.open(`../hikVideo/index.html?title=${title}&session=${session}`);
|
|
window.open(`http://${ipAddress}/furong1/pages/hikVideo/index.html?title=${title}&session=${session}`);
|
|
})
|
|
|
|
//工具
|
|
//退出
|
|
$(".exit").on('click',function(){
|
|
window.location.href="../../login.html"
|
|
})
|
|
//全屏
|
|
$(".fullPage").on('click',function(){
|
|
var state=$(this).attr("state");
|
|
if (state == "close") {
|
|
fullScreen()
|
|
$(this).attr("state", "open")
|
|
$(this).html("退出全屏")
|
|
} else {
|
|
exitFullscreen()
|
|
$(this).attr("state", "close")
|
|
$(this).html("全屏")
|
|
}
|
|
})
|
|
}
|
|
|
|
//全屏
|
|
function fullScreen() {
|
|
var element = document.documentElement;
|
|
if (element.requestFullscreen) {
|
|
element.requestFullscreen();
|
|
} else if (element.msRequestFullscreen) {
|
|
element.msRequestFullscreen();
|
|
} else if (element.mozRequestFullScreen) {
|
|
element.mozRequestFullScreen();
|
|
} else if (element.webkitRequestFullscreen) {
|
|
element.webkitRequestFullscreen();
|
|
}
|
|
}
|
|
|
|
//退出全屏
|
|
function exitFullscreen() {
|
|
if (document.exitFullscreen) {
|
|
document.exitFullscreen();
|
|
} else if (document.msExitFullscreen) {
|
|
document.msExitFullscreen();
|
|
} else if (document.mozCancelFullScreen) {
|
|
document.mozCancelFullScreen();
|
|
} else if (document.webkitExitFullscreen) {
|
|
document.webkitExitFullscreen();
|
|
}
|
|
}
|
|
|
|
|
|
export {addNavEvent}
|
|
|