提交 1b02407b 编写于 作者: guangjun.yang's avatar guangjun.yang

高度问题等

上级 7344ca1b
......@@ -2,7 +2,7 @@
.component-content {
display: flex;
flex-direction: row;
min-height: 600px;
// min-height: 600px;
min-width: 1200px;
font-size: 14px;
.left {
......
......@@ -8,7 +8,7 @@
<span @click="fetchOneTask">再来一个</span>
</div>
<p class="c-num">当前等待会话:{{this.sessionListData.waitingTaskCount}}</p>
<ul class="session-list" :style="{'height': containerHeight + 'px'}">
<ul id="sessionListId" class="session-list" :style="{'height': containerHeight + 'px'}">
<li
class="item"
:class="{'current': currentTaskLogId == session.taskLogId}"
......@@ -51,7 +51,11 @@
<!-- <span class="close-btn">结束会话</span> -->
</section>
<p class="refreshText"></p>
<section class="msg-content scroll-box" :style="{'height': (containerHeight - 35) + 'px'}">
<section
id="msgContentId"
class="msg-content scroll-box"
:style="{'height': (containerHeight - 35) + 'px'}"
>
<article
v-for="(item, index) in messageList"
:key="index"
......@@ -199,8 +203,8 @@ import {
import * as commonUtil from "@/utils/utils";
import { getPicaKFAccid, getPhomeDemain } from "@/utils";
import UserInfo from "@/components/IM/user-info.vue";
const CONTAINER_HEIGHT = 300;
// const CONTAINER_HEIGHT = 700;
// const CONTAINER_HEIGHT = 300;
const CONTAINER_HEIGHT = 700;
let forwardMsgIntervalId = null;
let sessionIntervalId = null;
let continueIntervalId = null;
......@@ -286,9 +290,9 @@ export default {
messageList: {
handler(newMsgList) {
let l = newMsgList.length;
if(l >= 2) {
for(let i = 1; i < l; i ++) {
if(newMsgList[i-1].taskLogId !== newMsgList[i].taskLogId) {
if (l >= 2) {
for (let i = 1; i < l; i++) {
if (newMsgList[i - 1].taskLogId !== newMsgList[i].taskLogId) {
newMsgList[i].sessionFlag = true;
}
}
......@@ -300,6 +304,15 @@ export default {
mounted() {
// this.resizeHeight();
this.$nextTick(() => {
_this.containerHeight =
_this.p_getElm('slidebar-container').getBoundingClientRect().height - 15;
_this.p_getElm('screenSet').style.height =
_this.containerHeight - 152 + "px";
console.log('_this.containerHeight', _this.containerHeight);
_this.p_getElm("sessionListId").style.height = "1000px";
_this.p_getElm("msgContentId").style.height = "965px";
});
},
methods: {
......@@ -314,9 +327,9 @@ export default {
_this.p_getElm(refHeightId).getBoundingClientRect().height - 15;
_this.p_getElm(containerHeightId).style.height =
_this.containerHeight - cMinusHeight + "px";
console.log('containerHeight', _this.containerHeight);
console.log("containerHeight", _this.containerHeight);
window.onresize = function() {
console.log('containerHeight2', _this.containerHeight);
console.log("containerHeight2", _this.containerHeight);
_this.containerHeight =
_this.p_getElm(refHeightId).getBoundingClientRect().height - 15;
_this.p_getElm(containerHeightId).style.height =
......@@ -324,8 +337,8 @@ export default {
};
},
p_getElm(elmId){
return document.getElementById(elmId)
p_getElm(elmId) {
return document.getElementById(elmId);
},
// 处理发送消息
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册