msgQueryPartitionService在没数据情况下才查

This commit is contained in:
bob
2024-11-04 16:44:26 +08:00
parent 122d18df97
commit da90acfb3c
2 changed files with 16 additions and 12 deletions

View File

@@ -182,13 +182,15 @@ onMounted(async () => {
handleSelectedSession(router.currentRoute.value.query.sessionId)
}
msgQueryPartitionService().then((res) => {
const partitions = {}
res.data.data.forEach((item) => {
partitions[item.partitionId] = item
if (Object.keys(messageData.partitions).length === 0) {
msgQueryPartitionService().then((res) => {
const partitions = {}
res.data.data.forEach((item) => {
partitions[item.partitionId] = item
})
messageData.setPartitions(partitions)
})
messageData.setPartitions(partitions)
})
}
})
const handleMsgListWheel = async () => {