12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- /*全局自适应高度*/
- function autoFlashHeight(){
- let headerHeight = $(".header").height();
- let toolsbarHeight = $(".toolsbar").height();
- let ftoolsbarHeight = $(".toolsbar-f").height();
- // var feeRateToolsbarHeight = $(".toolsbar_feeRate").height();
- let mainBottomContentHeight = $("#main .bottom-content").height();
- let gljBottomContentHeight = $("#project-glj-main .bottom-content").height();
- let toolsBarHeightQ = $(".tools-bar-height-q").height();
- let toolsBarHeightD = $(".tools-bar-height-d").height();
- $(".main-data-side-q").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightQ-302);
- $(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-302);
- //$("#main .main-data-top").height($(window).height()-headerHeight-toolsbarHeight-bottomContentHeight-1);
- $("#billsSpread").height($(window).height()-headerHeight-toolsbarHeight-mainBottomContentHeight-1);
- $("#project_glj_sheet").height($(window).height()-headerHeight-toolsbarHeight-gljBottomContentHeight-25);
- $(".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-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);
- $(".form-view").height($(window).height()-headerHeight-ftoolsbarHeight);
- $(".form-list").height($(window).height()-headerHeight-50 );
- };
- /*全局自适应高度结束*/
- $(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();
- });
- });
- /**
- * 设置本地缓存
- *
- * @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);
- }
|