提交 b939b964 编写于 作者: huangwensu's avatar huangwensu

Merge branch 'dev-phase1-0111' of...

Merge branch 'dev-phase1-0111' of http://192.168.110.53/com.pica.cloud.education.frontend/pica-admin-IM into dev-phase1-0111
......@@ -42,38 +42,10 @@ function getUrlParmByCode(paramList) {
return ''
}
// 计算高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'sidebarWrapperId',
containerHeightId = 'appContainerId', innerHeightId = 'elTableId'){
// if (!p_getElm(refHeightId) || !p_getElm(containerHeightId) || !p_getElm(innerHeightId)) {
// // window.onresize = null
// console.warn('No certain dom id!!!');
// }
let containerHeight = document.body.clientHeight - 80;
// let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if(p_getElm('elTableIdInner')){
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
window.onresize = function() {
containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 50
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px'
p_getElm(innerHeightId).style.height = containerHeight - iMinuxHeight + 'px'
if (p_getElm('elTableIdInner')) {
p_getElm('elTableIdInner').style.height = containerHeight - iMinuxHeight + 'px'
}
}
}
function p_getElm(elmId) {
return document.getElementById(elmId)
}
export function deepCopy(obj) {
var result = Array.isArray(obj) ? [] : {};
for (var key in obj) {
......
......@@ -7,7 +7,8 @@ export const containObject = function(...obj1) {
// 获取页面自适应高度
export function resizeHeight(cMinusHeight = 152, iMinuxHeight = 210, refHeightId = 'slidebar-container',
containerHeightId = 'screenSet'){
let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15;
// let containerHeight = p_getElm(refHeightId).getBoundingClientRect().height - 15;
let containerHeight = document.body.clientHeight - 80;
p_getElm(containerHeightId).style.height = containerHeight - cMinusHeight + 'px';
window.onresize = function() {
if(p_getElm(refHeightId) && p_getElm(containerHeightId)) {
......
......@@ -105,7 +105,7 @@ export default {
},
// 挂载到Dom完成时
mounted() {
commonUtil.resizeHeight();
commonUtil.resizeHeight(92);
this.search();
},
methods: {
......
......@@ -114,7 +114,7 @@ export default {
},
// 挂载到Dom完成时
mounted() {
commonUtil.resizeHeight();
commonUtil.resizeHeight(92);
this.getFiveContentList();
},
methods: {
......
......@@ -203,7 +203,6 @@ import {
closeLoading,
betaHandle,
} from "@/utils/utils";
import * as commonUtil from "@/utils/utils";
import { getPicaKFAccid, getPhomeDemain } from "@/utils";
import UserInfo from "@/components/IM/user-info.vue";
// const CONTAINER_HEIGHT = 300;
......@@ -307,11 +306,6 @@ export default {
mounted() {
this.$nextTick(() => {
// let containerHeight = 500, slidebarContainer = _this.getElmByID('slidebar-container');
// if(slidebarContainer) {
// containerHeight =
// _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
// }
_this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID('screenSet').style.height =
_this.containerHeight - 152 + "px";
......
......@@ -56,7 +56,6 @@ import BreadCrumb from "@/components/breadcrumb.vue";
import { doUpload, getFilePath } from "@/utils/qiniu-util";
import { openLoading, closeLoading, betaHandle, timeHandle } from "@/utils/utils";
import { getPicaKFAccid } from "@/utils";
// import * as commonUtil from "@/utils/utils";
export default {
components: {
BreadCrumb
......@@ -94,7 +93,8 @@ export default {
let _this = this;
setTimeout(() => {
let el = _this.getElmByID('scroll-set');
_this.containerHeight = _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
// _this.containerHeight = _this.getElmByID('slidebar-container').getBoundingClientRect().height - 15;
_this.containerHeight = document.body.clientHeight - 80;
_this.getElmByID('scroll-set').style.height = _this.containerHeight - 152 + "px";
if(_this.hasSearchDate) { // 有查询日期 滚动条最顶部
el.scrollTop = 10;
......
......@@ -108,7 +108,7 @@ export default {
},
// 挂载到Dom完成时
mounted() {
commonUtil.resizeHeight();
commonUtil.resizeHeight(92);
this.searchMessage();
},
methods: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册