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

高度有问题

上级 1b02407b
...@@ -3,7 +3,7 @@ const vueFilter = { ...@@ -3,7 +3,7 @@ const vueFilter = {
if (!value) return ''; if (!value) return '';
return new Date(value).format("yyyy-MM-dd hh:mm:ss"); return new Date(value).format("yyyy-MM-dd hh:mm:ss");
}, },
continueTimesFilter: (value) => { continueTimesFilter: (value, flag) => {
if (!value) return ''; if (!value) return '';
var duration = value / 1000; var duration = value / 1000;
var s = Math.floor(duration % 60).toString(); var s = Math.floor(duration % 60).toString();
...@@ -18,10 +18,14 @@ const vueFilter = { ...@@ -18,10 +18,14 @@ const vueFilter = {
if (h.length < 2) { if (h.length < 2) {
h = '0' + h; h = '0' + h;
} }
if (parseInt(h) >= 1) { if (flag) {
return h + '时' + m + '分' + s + '秒'; return h + ':' + m + ':' + s;
} else { } else {
return m + '分' + s + '秒'; if (parseInt(h) >= 1) {
return h + '时' + m + '分' + s + '秒';
} else {
return m + '分' + s + '秒';
}
} }
}, },
liveFilter: (value) => { liveFilter: (value) => {
...@@ -227,10 +231,10 @@ const vueFilter = { ...@@ -227,10 +231,10 @@ const vueFilter = {
// 将字符串截短至指定长度,并用在最后追加特定字符串(例如:...) // 将字符串截短至指定长度,并用在最后追加特定字符串(例如:...)
shortName: function (value, length = 10, append = '...') { shortName: function (value, length = 10, append = '...') {
if (value && value.length > length) { if (value && value.length > length) {
return value.substring(0, length) + append return value.substring(0, length) + append
} else { } else {
return value return value
} }
}, },
} }
export default vueFilter export default vueFilter
\ No newline at end of file
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
<span @click="fetchOneTask">再来一个</span> <span @click="fetchOneTask">再来一个</span>
</div> </div>
<p class="c-num">当前等待会话:{{this.sessionListData.waitingTaskCount}}</p> <p class="c-num">当前等待会话:{{this.sessionListData.waitingTaskCount}}</p>
<ul id="sessionListId" class="session-list" :style="{'height': containerHeight + 'px'}"> <!-- <ul id="sessionListId" class="session-list" :style="{'height': containerHeight + 'px'}"> -->
<ul id="sessionListId" class="session-list">
<li <li
class="item" class="item"
:class="{'current': currentTaskLogId == session.taskLogId}" :class="{'current': currentTaskLogId == session.taskLogId}"
...@@ -51,10 +52,14 @@ ...@@ -51,10 +52,14 @@
<!-- <span class="close-btn">结束会话</span> --> <!-- <span class="close-btn">结束会话</span> -->
</section> </section>
<p class="refreshText"></p> <p class="refreshText"></p>
<section <!-- <section
id="msgContentId" id="msgContentId"
class="msg-content scroll-box" class="msg-content scroll-box"
:style="{'height': (containerHeight - 35) + 'px'}" :style="{'height': (containerHeight - 35) + 'px'}"
> -->
<section
id="msgContentId"
class="msg-content scroll-box"
> >
<article <article
v-for="(item, index) in messageList" v-for="(item, index) in messageList"
...@@ -310,8 +315,8 @@ export default { ...@@ -310,8 +315,8 @@ export default {
_this.p_getElm('screenSet').style.height = _this.p_getElm('screenSet').style.height =
_this.containerHeight - 152 + "px"; _this.containerHeight - 152 + "px";
console.log('_this.containerHeight', _this.containerHeight); console.log('_this.containerHeight', _this.containerHeight);
_this.p_getElm("sessionListId").style.height = "1000px"; _this.p_getElm("sessionListId").style.height = _this.containerHeight + 'px';
_this.p_getElm("msgContentId").style.height = "965px"; _this.p_getElm("msgContentId").style.height = _this.containerHeight - 35 + 'px';
}); });
}, },
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-table-column prop="userName" label="用户名" min-width="50" align="center"></el-table-column> <el-table-column prop="userName" label="用户名" min-width="50" align="center"></el-table-column>
<el-table-column prop="waitTime" label="等待时间" min-width="100" align="center"> <el-table-column prop="waitTime" label="等待时间" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.row.waitTime * 1000 | continueTimesFilter}}</span> <span>{{scope.row.waitTime * 1000 | continueTimesFilter(true)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="idType" label="用户类型" min-width="50" align="center"> <el-table-column prop="idType" label="用户类型" min-width="50" align="center">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册