function getappheight() {
    var appheight = window.sessionStorage.getItem('appheight');
    var height = appheight - 15 + "px";
    return height;
}

function getechartsheight() {
    var appheight = window.sessionStorage.getItem('appheight');
    var echartsheight = appheight - 149;
    return echartsheight;
}

function gettwoechartsheight() {
    var appheight = window.sessionStorage.getItem('appheight');
    var twoechartsheight = (appheight - 149) / 2 + "px";
    return twoechartsheight;
}

function getheight() {
    var appheight = window.sessionStorage.getItem('appheight');
    var resttheight = (appheight - 149) / 2;
    return resttheight;
}

function getwidth() {
    var appwidth = document.getElementById("app-main-in").offsetWidth;
    var restwidth = appwidth - 310;
    return restwidth;
}

function getreal() {
    var appheight = window.sessionStorage.getItem('appheight');
    var resheight = appheight - (appheight * 1.19) / 2;
    return resheight;
}

function device() {
    var ratio = window.devicePixelRatio;

    return ratio;
}

function devicegetheight() {
    var appheight = window.sessionStorage.getItem('appheight');
    var ratio = window.devicePixelRatio;
    var resttheight = (appheight - 149) / 2;
    if (ratio == 1) {
        resttheight = resttheight + resttheight * 0.14;
    } else if (ratio == 1.25) {
        resttheight = resttheight + resttheight * 0.425;
    }

    return resttheight;
}

function tableheight() {
    var appheight = window.sessionStorage.getItem('appheight');
    var device = window.devicePixelRatio;

    var height = appheight - 15;
    if (device == 1) {
        height = height * 0.91;
    }
    if (device == 1.25) {
        height = height * 0.91;
    }
    if (device == 1.5) {
        height = height * 0.91;
    }

    return height;
}

function viewheight() {
    var appheight = window.sessionStorage.getItem('appheight');
    //  var device=window.devicePixelRatio
    var viewheight2 = appheight - 15;
    //console.log(viewheight2);
    return viewheight2;
}

export {
    getappheight,
    getechartsheight,
    gettwoechartsheight,
    getheight,
    getwidth,
    getreal,
    devicegetheight,
    tableheight,
    viewheight,
};