优化
This commit is contained in:
parent
64213fedce
commit
d8c5e5a3f9
@ -5,7 +5,7 @@ VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
# VITE_BASE_URL='http://192.168.77.50:48080'
|
||||
# VITE_BASE_URL='http://10.10.100.32:48080'
|
||||
# VITE_BASE_URL='http://10.10.100.19:48080'
|
||||
VITE_BASE_URL='http://10.10.5.5:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@ -68,25 +68,22 @@
|
||||
top: item.realY * radio + 'px',
|
||||
width: (carWidth / imgBgObj.resolution / 100) * radio + 'px',
|
||||
height: (carHeight / imgBgObj.resolution / 100) * radio + 'px',
|
||||
transform: 'rotate(' + radianToDegree(item.data.pose2d.yaw) + 'deg)',
|
||||
zIndex: 9999
|
||||
}"
|
||||
>
|
||||
<div
|
||||
style="
|
||||
font-size: 15px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 40%;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
color: greenyellow;
|
||||
"
|
||||
>
|
||||
<div style="font-size: 13px; color: #fff; z-index: 9999; background: #cb00c7">
|
||||
{{ item.robotNo || '' }}
|
||||
</div>
|
||||
<img
|
||||
src="@/assets/imgs/indexPage/chache-4备份 7@2x.png"
|
||||
style="width: 100%; height: 100%"
|
||||
:style="{
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
transform: 'rotate(' + radianToDegree(item.data.pose2d.yaw) + 'deg)'
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -380,6 +377,7 @@ import { is } from 'bpmn-js/lib/util/ModelUtil'
|
||||
import JSONBigInt from 'json-bigint'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@ -736,6 +734,7 @@ const linkWebSocket = (url) => {
|
||||
// 车辆信息
|
||||
if (jsonMsg.type == 'map_push') {
|
||||
let data = JSON.parse(jsonMsg.content)
|
||||
// console.log(data, dayjs().format('HH:mm:ss SSS'))
|
||||
let dataList = []
|
||||
for (let key in data) {
|
||||
dataList.push({
|
||||
@ -743,6 +742,7 @@ const linkWebSocket = (url) => {
|
||||
data: JSON.parse(data[key])
|
||||
})
|
||||
}
|
||||
|
||||
testCarList.value = mergeArraysWithoutDelete(testCarList.value, dataList)
|
||||
testCarList.value.forEach((item) => {
|
||||
item.originWidth = imgBgObj.width
|
||||
@ -796,6 +796,7 @@ const linkWebSocket = (url) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 现在车辆的逻辑是这样 websoket map_push类型推送消息 每次推送新车 我就添加到车辆列表中 testCarList 不删除车辆
|
||||
// 每几秒轮询调用查看当前楼层区域的在线车辆 如果不存在 则再把testCarList 中的车辆删除
|
||||
const robotByFloorAndAreaList = ref([]) // 机器人列表
|
||||
@ -811,13 +812,16 @@ const getRobotByFloorAndAreaList = () => {
|
||||
robotListTimerRef.value = setInterval(getRobotByFloorAndAreaList, 5000)
|
||||
|
||||
// 删掉不在线的车辆
|
||||
const filterArrayByRobotNo = (arr1, arr2) => {
|
||||
return arr1.filter((item) => {
|
||||
const robotNo = item.data.pose2d.robotNo
|
||||
return arr2.includes(robotNo)
|
||||
})
|
||||
const filterArrayByRobotNo = (fullArray, idArray) => {
|
||||
const idSet = new Set(idArray)
|
||||
return fullArray.filter((item) => idSet.has(item.data.pose2d.robotNo))
|
||||
}
|
||||
|
||||
//长时间情况下 有些车辆掉线 已经不在车辆列表里面 要剔除
|
||||
// const isItemVisible = (item) => {
|
||||
// return robotByFloorAndAreaList.value.includes(item.data.pose2d.robotNo)
|
||||
// }
|
||||
|
||||
const mergeCarArrays = (arr1, arr2) => {
|
||||
const result = []
|
||||
const macAddressSet = new Set()
|
||||
@ -1209,6 +1213,9 @@ onBeforeUnmount(() => {
|
||||
.indexpage-car-item {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.affix-container-left {
|
||||
@ -1292,14 +1299,12 @@ onBeforeUnmount(() => {
|
||||
font-size: 13px;
|
||||
user-select: none;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
}
|
||||
.sort-num-location {
|
||||
position: absolute;
|
||||
font-size: 13px;
|
||||
user-select: none;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.popover-robot-no {
|
||||
|
@ -76,10 +76,23 @@ export default ({command, mode}: ConfigEnv): UserConfig => {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
echarts: ['echarts'] // 将 echarts 单独打包,参考 https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues/IAB1SX 讨论
|
||||
}
|
||||
echarts: ['echarts'],
|
||||
// 将 Vue 相关库单独打包
|
||||
vue: ['vue', 'vue-router', 'pinia', 'vue-i18n'],
|
||||
// 将常用组件库单独打包
|
||||
vendor: ['element-plus', '@vueuse/core'],
|
||||
},
|
||||
// 分包策略
|
||||
chunkFileNames: 'assets/js/[name]-[hash].js',
|
||||
entryFileNames: 'assets/js/[name]-[hash].js',
|
||||
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]'
|
||||
},
|
||||
},
|
||||
// 启用 CSS 代码分割
|
||||
cssCodeSplit: true,
|
||||
// 启用 gzip 压缩
|
||||
reportCompressedSize: false,
|
||||
chunkSizeWarningLimit: 2000
|
||||
},
|
||||
optimizeDeps: {include, exclude}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user