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