会话存档

This commit is contained in:
liuye
2023-06-08 09:37:11 +08:00
parent 019e8262bb
commit 99d9d36549
2 changed files with 58 additions and 41 deletions

View File

@@ -26,7 +26,7 @@ export default {
}, },
data() { data() {
return { return {
component: "List", component: "Detail",
params: {}, params: {},
include: [], include: [],
}; };

View File

@@ -11,11 +11,11 @@
</div> </div>
<div class="addressBook-left__list--title"> <div class="addressBook-left__list--title">
<el-input <el-input
size="mini" size="mini"
placeholder="请输入联系人姓名" placeholder="请输入联系人姓名"
v-model="searchName" v-model="searchName"
clearable clearable
suffix-icon="iconfont iconSearch"> suffix-icon="iconfont iconSearch">
</el-input> </el-input>
</div> </div>
<div class="addressBook-left__list--wrapper"> <div class="addressBook-left__list--wrapper">
@@ -28,11 +28,11 @@
</div> </div>
</div> </div>
<AiEmpty v-if="!list.length"></AiEmpty> <AiEmpty v-if="!list.length"></AiEmpty>
<el-pagination class="pagination"
layout="prev, pager, next"
:total="total" @current-change="currentChange" :current-page="current" :page-size="20">
</el-pagination>
</div> </div>
<el-pagination class="pagination"
layout="prev, pager, next"
:total="total" @current-change="currentChange" :current-page="current" :page-size="20">
</el-pagination>
</div> </div>
</template> </template>
<template slot="content"> <template slot="content">
@@ -41,7 +41,7 @@
<h2 v-for="(item, index) in msgTypeList" :key="index" :class="msgType == index ? 'tab-active' : ''" @click="msgTypeClick(index)">{{item.name}}</h2> <h2 v-for="(item, index) in msgTypeList" :key="index" :class="msgType == index ? 'tab-active' : ''" @click="msgTypeClick(index)">{{item.name}}</h2>
</div> </div>
<div class="search-content"> <div class="search-content">
<el-date-picker v-model="time" size="small" type="daterange" value-format="yyyy-MM-dd" <el-date-picker v-model="time" size="small" type="daterange" value-format="yyyy-MM-dd"
range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" @change="onChange"> range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" @change="onChange">
</el-date-picker> </el-date-picker>
<el-input size="small" placeholder="输入搜索内容" v-model="searchMsg" clearable <el-input size="small" placeholder="输入搜索内容" v-model="searchMsg" clearable
@@ -85,11 +85,11 @@
</div> </div>
</div> </div>
<AiEmpty v-if="!msgList.length"></AiEmpty> <AiEmpty v-if="!msgList.length"></AiEmpty>
<el-pagination class="pagination"
layout="prev, pager, next"
:total="msgTotal" @current-change="msgCurrentChange" :current-page="msgCurrent" :page-size="20">
</el-pagination>
</div> </div>
<el-pagination class="msg-list-pagination"
layout="prev, pager, next"
:total="msgTotal" @current-change="msgCurrentChange" :current-page="msgCurrent" :page-size="20">
</el-pagination>
</template> </template>
</ai-list> </ai-list>
</template> </template>
@@ -116,11 +116,11 @@
name: '' name: ''
}, },
current: 1, current: 1,
total: '', total: 0,
list: [], list: [],
leftActiveIndex: 0, leftActiveIndex: 0,
msgCurrent: 1, msgCurrent: 1,
msgTotal: '', msgTotal: 0,
msgList: [], msgList: [],
msgType: 0, msgType: 0,
msgTypeList: [ msgTypeList: [
@@ -142,6 +142,7 @@
this.id = this.params.id this.id = this.params.id
this.getList() this.getList()
} }
this.getList()
}, },
methods: { methods: {
@@ -164,7 +165,7 @@
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.list = res.data.records this.list = res.data.records
this.total = res.data.total this.total = res.data.total || 0
this.getMsgListInit() this.getMsgListInit()
} }
this.isLoading = false this.isLoading = false
@@ -189,13 +190,13 @@
roomId: this.list[this.leftActiveIndex].type == 1 ? this.list[this.leftActiveIndex].roomId : '', roomId: this.list[this.leftActiveIndex].type == 1 ? this.list[this.leftActiveIndex].roomId : '',
type: this.list[this.leftActiveIndex].type, type: this.list[this.leftActiveIndex].type,
content: this.searchMsg, content: this.searchMsg,
startTime: this.time.length ? this.time[0] : '', startTime: this.time ? this.time[0] : '',
endTime: this.time.length ? this.time[1] : '' endTime: this.time ? this.time[1] : ''
} }
}).then(res => { }).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.msgList = res.data.records this.msgList = res.data.records
this.msgTotal = res.data.total this.msgTotal = res.data.total || 0
} }
this.isLoading = false this.isLoading = false
}).catch(() => { }).catch(() => {
@@ -207,7 +208,7 @@
this.getListInit() this.getListInit()
}, },
onChange() { onChange() {
this.getListInit() this.getMsgListInit()
}, },
currentChange(e) { currentChange(e) {
console.log(e) console.log(e)
@@ -262,6 +263,7 @@
width: 100%; width: 100%;
height: auto; height: auto;
background: #FAFAFB; background: #FAFAFB;
position: relative;
.addressBook-left__title { .addressBook-left__title {
display: flex; display: flex;
@@ -288,9 +290,9 @@
} }
.addressBook-left__list--wrapper { .addressBook-left__list--wrapper {
height: calc(100% - 68px); height: calc(100% - 110px);
padding: 8px; padding: 8px;
position: relative; overflow-y: scroll;
.addressBook-left__list--item { .addressBook-left__list--item {
line-height: 44px; line-height: 44px;
font-size: 16px; font-size: 16px;
@@ -313,12 +315,6 @@
background-color: #E8EFFF; background-color: #E8EFFF;
color: #26f; color: #26f;
} }
.pagination {
position: absolute;
bottom: 20px;
width: 100%;
text-align: center;
}
} }
.addressBook-left__list--title { .addressBook-left__list--title {
display: flex; display: flex;
@@ -339,6 +335,13 @@
margin-right: 8px; margin-right: 8px;
} }
} }
.pagination {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
background-color: #fff;
}
} }
:deep( .ai-list__content--right ){ :deep( .ai-list__content--right ){
@@ -349,14 +352,12 @@
.ai-list__content--right-wrapper { .ai-list__content--right-wrapper {
width: 100%; width: 100%;
position: relative;
padding: 0!important;
height: 100%;
} }
} }
:deep .ai-list__content--right-wrapper {
padding: 0!important;
position: relative;
}
.content-right-title { .content-right-title {
height: 40px; height: 40px;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
@@ -406,6 +407,8 @@
} }
.content-right-info { .content-right-info {
padding: 24px 16px; padding: 24px 16px;
height: calc(100% - 80px);
overflow-y: scroll;
.item { .item {
margin-bottom: 48px; margin-bottom: 48px;
.time { .time {
@@ -496,12 +499,26 @@
} }
} }
.pagination { }
position: absolute; .addressBook-left__list--wrapper::-webkit-scrollbar,
bottom: 0; .content-right-info::-webkit-scrollbar {
width: calc(100% - 32px); width: 4px;
text-align: center; }
} .addressBook-left__list--wrapper::-webkit-scrollbar-thumb,
.content-right-info::-webkit-scrollbar-thumb {
border-radius: 10px;
background: rgba(0,0,0,0.2);
}
.addressBook-left__list--wrapper::-webkit-scrollbar-track
.content-right-info::-webkit-scrollbar-track {
border-radius: 0;
background: rgba(0,0,0,0.1);
}
.msg-list-pagination {
position: absolute;
bottom: 0;
width: calc(100% - 32px);
text-align: center;
} }
} }