bug修改
This commit is contained in:
parent
7b773d8a2c
commit
a8fed4a258
@ -15,7 +15,7 @@ const list = ref<any[]>([]) // 消息列表
|
||||
const getList = async () => {
|
||||
// list.value = await NotifyMessageApi.getUnreadNotifyMessageList()
|
||||
list.value = await NotifyMessageApi.warnMsgReadPage()
|
||||
console.log(list.value )
|
||||
console.log(list.value)
|
||||
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
||||
unreadCount.value = 0
|
||||
}
|
||||
@ -27,13 +27,14 @@ const getUnreadCount = async () => {
|
||||
// })
|
||||
NotifyMessageApi.warnMsgReadPage().then((data) => {
|
||||
// console.log(data)
|
||||
unreadCount.value = data&&data.length?data.length:0
|
||||
unreadCount.value = data && data.length ? data.length : 0
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 跳转我的站内信
|
||||
const popoverRef = ref()
|
||||
const goMyList = () => {
|
||||
popoverRef.value.hide()
|
||||
push({
|
||||
name: 'SystemCarError'
|
||||
})
|
||||
@ -58,7 +59,7 @@ onMounted(() => {
|
||||
</script>
|
||||
<template>
|
||||
<div class="message">
|
||||
<ElPopover :width="400" placement="bottom" trigger="click">
|
||||
<ElPopover ref="popoverRef" :width="400" placement="bottom" trigger="click">
|
||||
<template #reference>
|
||||
<ElBadge :is-dot="unreadCount > 0" class="item">
|
||||
<Icon
|
||||
@ -74,7 +75,6 @@ onMounted(() => {
|
||||
<ElTabPane label="我的站内信" name="notice">
|
||||
<el-scrollbar class="message-list">
|
||||
<template v-for="item in list" :key="item.id">
|
||||
|
||||
<div class="message-item">
|
||||
<!-- <img alt="" class="message-icon" src="@/assets/imgs/avatar.gif" /> -->
|
||||
|
||||
|
@ -113,7 +113,15 @@
|
||||
zIndex: 9999
|
||||
}"
|
||||
>
|
||||
<div style="font-size: 11px;position: absolute;top: -10px;left: 50%;transform: translateX(-50%);">
|
||||
<div
|
||||
style="
|
||||
font-size: 11px;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
"
|
||||
>
|
||||
{{ item.robotNo || '' }}
|
||||
</div>
|
||||
<img
|
||||
@ -763,13 +771,13 @@ const linkWebSocket = (url) => {
|
||||
data: JSON.parse(data[key])
|
||||
})
|
||||
}
|
||||
console.log('=====',data)
|
||||
console.log('=====', data)
|
||||
dataList.forEach((item) => {
|
||||
// console.log('=====', item.data.pose2d.robotNo)
|
||||
if(item.data.pose2d.robotNo == "zn002" ){
|
||||
if (item.data.pose2d.robotNo == 'zn002') {
|
||||
console.log(item)
|
||||
console.log('x',item.data.pose2d.x)
|
||||
console.log('y',item.data.pose2d.y)
|
||||
console.log('x', item.data.pose2d.x)
|
||||
console.log('y', item.data.pose2d.y)
|
||||
}
|
||||
})
|
||||
testCarList.value = dataList
|
||||
@ -894,10 +902,10 @@ const computedRatio = () => {
|
||||
item.origin = JSON.parse(nowObject.value.yamlJson).origin
|
||||
item.realX = convertActualToBrowser(item.data.pose2d.x, item.data.pose2d.y).x
|
||||
item.realY = convertActualToBrowser(item.data.pose2d.x, item.data.pose2d.y).y
|
||||
item.robotNo =item.data.pose2d.robotNo
|
||||
if(item.robotNo == 'zn002'){
|
||||
console.log('数据返回坐标',item.robotNo,item.data.pose2d.x,item.data.pose2d.y)
|
||||
console.log('计算返回坐标',item.robotNo,item.realX,item.realY)
|
||||
item.robotNo = item.data.pose2d.robotNo
|
||||
if (item.robotNo == 'zn002') {
|
||||
console.log('数据返回坐标', item.robotNo, item.data.pose2d.x, item.data.pose2d.y)
|
||||
console.log('计算返回坐标', item.robotNo, item.realX, item.realY)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -1033,7 +1041,7 @@ const boxLeft = ref(0)
|
||||
const getLeftPx = () => {
|
||||
let indexpageContainer = document.getElementById('indexpage-container')
|
||||
// console.log('距离左边的距离', indexpageContainer.getBoundingClientRect().left)
|
||||
boxLeft.value = indexpageContainer.getBoundingClientRect().left + 6
|
||||
boxLeft.value = indexpageContainer?.getBoundingClientRect().left + 6
|
||||
console.log(boxLeft.value)
|
||||
}
|
||||
// 封装监听元素宽度变化的方法
|
||||
|
Loading…
Reference in New Issue
Block a user