This commit is contained in:
Vinjor 2025-09-02 15:57:13 +08:00
parent a33b1bff7e
commit 8dd3cccf87
2 changed files with 13 additions and 2 deletions

View File

@ -60,5 +60,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set is_read = 1 set is_read = 1
where main_id = #{sessionId} where main_id = #{sessionId}
and receiver_id = #{receiverId} and receiver_id = #{receiverId}
and is_read =0
</update> </update>
</mapper> </mapper>

View File

@ -142,11 +142,19 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.status==1"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-s-comment" icon="el-icon-s-comment"
@click="handleDetail(scope.row)" @click="handleDetail(scope.row)"
>聊天</el-button> >聊天</el-button>
<el-button
v-if="scope.row.status!=1"
size="mini"
type="text"
icon="el-icon-s-comment"
@click="handleDetail(scope.row,'view')"
>查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -274,8 +282,10 @@ export default {
* 查看聊天记录详情 * 查看聊天记录详情
* @param row * @param row
*/ */
handleDetail(row){ handleDetail(row,flag){
console.log(row,'sdfadsafadsf') if(flag && "view"==flag){
this.$refs.chatFrom.readOnly = true
}
this.$refs.chatFrom.show(row) this.$refs.chatFrom.show(row)
} }
} }