This commit is contained in:
liuye
2023-06-21 15:54:43 +08:00
parent 09a9ffd3a1
commit cdc1531293
3 changed files with 116 additions and 69 deletions

View File

@@ -26,7 +26,8 @@
<img src="./img/user-img.png" alt="" v-if="item.type != 1 && !item.userAvatar">
<div class="item-right">
<div class="name-flex">
<p>{{item.userName}}</p>
<p v-if="item.type == 1">{{item.toName}}</p>
<p v-else>{{item.userName}}</p>
<div class="time">{{item.createTime.substring(0, 16)}}</div>
</div>
<div v-html="item.text" class="item-content"></div>
@@ -71,14 +72,19 @@ export default {
this.$http.post(`/app/appsessionarchivekeywordrecord/list`, null, {
params: {
current: this.current,
size: 10,
size: 15,
content: this.keyword,
departmentId: this.deptUserList.length ? this.deptUserList[0].id : ''
}
}).then(res=> {
if(res?.data) {
res.data.records.map((item) => {
item.text = this.changeKeyRed(item.content, item.wordName)
if(item.type == 1) {
item.text = item.userName + ':' + this.changeKeyRed(item.content, item.wordName)
}else {
item.text = this.changeKeyRed(item.content, item.wordName)
}
})
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
this.pages = res.data.pages