czt
20 小时以前 1360cdb47a4306039abb3bcbed77fb7093779081
fzzy-igdss-web/src/main/resources/static/common/igds-common.js
@@ -58,7 +58,8 @@
    // 发生了错误事件
    socket.onerror = function () {
        alert("Socket error……");
        // alert("Socket error……");
        console.log("Socket error……");
    };
    $(window).unload(function () {
@@ -216,23 +217,89 @@
 * @param pageTag
 */
function changePage(pageTag) {
    var url = "../dept-board/index";
    var url = "/group/board";
    if ("inout" == pageTag) {
        url = "../dept-board/inout";
    }
    if ("ai" == pageTag) {
        url = "../dept-board/ai";
    }
    if ("video" == pageTag) {
        url = "../dept-board/video";
    }
    //后台管理首页
    if ("backstage" == pageTag) {
        url = "../index";
        window.parent.open(url, "_self");
    if ("logout" == pageTag) {
        window.top.location.href = "/logout";
        return;
    }
    if ("index" == pageTag) {
        url = "/group/index";
    }
    if ("gis" == pageTag) {
        url = "/group/gis";
    }
    if ("video" == pageTag) {
        url = "/group/video";
    }
    if ("sys" == pageTag) {
        url = "/index?deptId=" + deptId;
    }
    window.location.href = url;
}
/**
 * 初始标语数据
 */
function initDicSlogan() {
    if (dicSlogan) {
        if (dicSlogan.color == "red") {
            $("#sloganText").css({
                color: "#DE2910"
            });
        } else {
            $("#sloganText").css({
                color: "#7ddfff"
            });
        }
        $("#sloganText").text(dicSlogan.content);
    }
}
//浏览器全屏
var fullscreen = false;
function changeScreen() {
    const element = document.documentElement
    // 如果是全屏状态
    if (fullscreen) {
        // 如果浏览器有这个Function
        if (document.exitFullscreen) {
            document.exitFullscreen()
        } else if (document.webkitCancelFullScreen) {
            document.webkitCancelFullScreen()
        } else if (document.mozCancelFullScreen) {
            document.mozCancelFullScreen()
        } else if (document.msExitFullscreen) {
            document.msExitFullscreen()
        }
    } else {
        // 如果浏览器有这个Function
        if (element.requestFullscreen) {
            element.requestFullscreen()
        } else if (element.webkitRequestFullScreen) {
            element.webkitRequestFullScreen()
        } else if (element.mozRequestFullScreen) {
            element.mozRequestFullScreen()
        } else if (element.msRequestFullscreen) {
            element.msRequestFullscreen()
        }
    }
    // 判断全屏状态的变量
    fullscreen = !fullscreen
}
function exitFullScreen() {
    // 如果浏览器有这个Function
    if (document.exitFullscreen) {
        document.exitFullscreen()
    } else if (document.webkitCancelFullScreen) {
        document.webkitCancelFullScreen()
    } else if (document.mozCancelFullScreen) {
        document.mozCancelFullScreen()
    } else if (document.msExitFullscreen) {
        document.msExitFullscreen()
    }
    fullscreen = false;
}