| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 | /*全局自适应高度*/function autoFlashHeight(){    let headerHeight = $(".header").height();    let toolsbarHeight = $(".toolsbar").height();    let ftoolsbarHeight = $(".toolsbar-f").height();    let btntoolsbarHeight = $(".btn-toolbar").height();    // var feeRateToolsbarHeight = $(".toolsbar_feeRate").height();    let toolsBarHeightQ = $(".tools-bar-height-q").height();    let toolsBarHeightD = $(".tools-bar-height-d").height();    let toolsBarHeightZ = $(".tools-bar-height-z").height();    //$(".main-data-side-q").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightQ-302);    $(".main-data-side-q").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightQ-$('#qd').find('.bottom-content').find('.p-0').height()-5);    //$(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-302);    $(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-$('#stdSectionRations').height()-5);    $(".main-data-side-zb").height(($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightZ) - $('#billsGuidance_items').height() - $('#zyTools').height() - 12);    /*$(".main-data-side-zi").height($(window).height()-headerHeight-toolsbarHeight- toolsBarHeightZ - $(".main-data-side-zb").height());*/    $('.main-content').width($(window).width()-$('.main-nav').width()-$('.main-side').width()-5);    $('#glj_tree_div .modal-content').width($(window).width() < 1020 + 20 ? $(window).width() - 20 : 1020);    //$("#main .main-data-top").height($(window).height()-headerHeight-toolsbarHeight-bottomContentHeight-1);    typeof(loadMainSize)== 'function' ?loadMainSize():'';//zhang 2018-06-04  统一加载高度方法    typeof(loadProjectGljSize)== 'function'?loadProjectGljSize():'';    $(".main-data-full").height($(window).height()-headerHeight-toolsbarHeight-1);    $(".main-data-full-fl").height($(window).height()-headerHeight-toolsbarHeight-37);    $(".main-data-full-feeRate").height($(window).height()-headerHeight-78);    $(".main-data-full-tender").height($(window).height()-headerHeight-btntoolsbarHeight-10);    $(".main-data-not").height($(window).height()-headerHeight-1);    $(".main-data-side-search").height($(window).height()-headerHeight-toolsbarHeight-64);    $(".side-content").height($(window).height()-headerHeight );    $(".poj-list").height($(window).height()-headerHeight-toolsbarHeight);    $(".gc-list").height($(window).height()-headerHeight-toolsbarHeight-40);    $(".share-list").height($(window).height()-headerHeight-toolsbarHeight-40);    $(".form-view").height($(window).height()-headerHeight-ftoolsbarHeight);    $(".form-list").height($(window).height()-headerHeight);    $('#comments').find('textarea').height($('#comments').height() - 25);    typeof(adaptiveTzjnrWidth)== 'function' ?adaptiveTzjnrWidth():''};/*全局自适应高度结束*/$(function () {    $(window).resize(autoFlashHeight);    /*侧滑*/  /*  $(".open-sidebar").click(function () {        $(".slide-sidebar").animate({width: "800"}).addClass("open");    });    $("body").click(function (event) {        var e = event || window.event; //浏览器兼容性        if (!$(event.target).is('a')) {            var elem = event.target || e.srcElement;            while (elem) { //循环判断至跟节点,防止点击的是div子元素                if (elem.className == "open-sidebar" || elem.className == 'slide-sidebar open') {                    return false;                }                elem = elem.parentNode;            }            $(".slide-sidebar").animate({width: "0"}).removeClass("open")// 关闭处理        }    });*/    /*侧滑*/    /*工具提示*/    $(function () {        $('[data-toggle="tooltip"]').tooltip();        $('[data-toggle="tooltip"]').click(function () {            $(this).tooltip('hide');        })    });});/** * 设置本地缓存 * * @param {String} key * @param {String|Number} value * @return {void} */function setLocalCache(key, value) {    const storage = window.localStorage;    if (!storage || key === '' || value === '') {        return;    }    storage.setItem(key, value);}/** * 获取本地缓存 * * @param {String} key * @return {String} */function getLocalCache(key) {    const storage = window.localStorage;    if (!storage || key === '') {        return null;    }    return storage.getItem(key);}function removeLocalCache(key) {    const storage = window.localStorage;    if (!storage || key === '') {        return null;    }    return storage.removeItem(key);}function getFormatter(decimal) {    var pre = "0.";    if (decimal <= 0) {        return "0";    }    for (let i = 0; i < decimal; i++) {        pre += "0"    }    return pre;}function getFeeIndex(fees) {    let feesIndex = {};    if (fees) {        for(let fee of fees){            fee.unitFee = parseFloat(fee.unitFee);            fee.totalFee = parseFloat(fee.totalFee);            fee.tenderUnitFee = parseFloat(fee.tenderUnitFee);            fee.tenderTotalFee = parseFloat(fee.tenderTotalFee);            feesIndex[fee.fieldName] = fee;        }    }    return feesIndex;}function replaceAll(FindText, RepText,str) {    let regExp = new RegExp(FindText, "g");    return str.replace(regExp, RepText);};
 |