修改问题
This commit is contained in:
parent
764a26b145
commit
00d05571ec
@ -314,7 +314,7 @@ import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import * as ChartsApi from '@/api/boardCharts'
|
||||
import { DICT_TYPE, getIntDictOptions, getDictOptions } from '@/utils/dict'
|
||||
import indexPage from '../../mapPage/realTimeMap/components/indexPage.vue'
|
||||
import indexPage from './indexPage.vue'
|
||||
import * as MapApi from '@/api/map/map'
|
||||
const router = useRouter() // 路由对象
|
||||
const indexPageRef = ref(null)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" :title="title" width="545" style="padding: 0;">
|
||||
<el-form :model="formData" label-width="auto" ref="formRef" :rules="formRules">
|
||||
<el-form-item label="设备类型" prop="robotModelId" >
|
||||
<el-form-item label="设备类型" prop="deviceType" >
|
||||
<el-select v-model="formData.deviceType" clearable placeholder="请选择设备类型">
|
||||
<el-option
|
||||
v-for="dict in getDictOptions(DICT_TYPE.DEVICE_TYPE)"
|
||||
@ -11,7 +11,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号" prop="robotNo">
|
||||
<el-form-item label="设备编号" prop="deviceNo">
|
||||
<el-input v-model="formData.deviceNo" :disabled="false" placeholder="请输入设备编号" />
|
||||
</el-form-item>
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备图标" prop="macAddress">
|
||||
<el-form-item label="设备图标" >
|
||||
<UploadImg v-model="formData.mapImageUrl" :limit="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备图配置" prop="pictureConfig">
|
||||
|
@ -18,6 +18,7 @@
|
||||
style="height: 40px;margin-right: 16px;"
|
||||
v-model="queryParams.deviceNo"
|
||||
placeholder="请输入关键词"
|
||||
@keyup.enter="getCarList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button :icon="'search'" @click="getCarList"/>
|
||||
|
@ -708,9 +708,28 @@ const linkWebSocket = (url) => {
|
||||
customClass: 'indexpage-custom-message-style'
|
||||
})
|
||||
}
|
||||
// 规划路线信息
|
||||
if (jsonMsg.type == 'planning_move_pose') {
|
||||
let data = JSON.parse(jsonMsg.content)
|
||||
// console.log('======规划路线======', JSON.parse(data).data)
|
||||
let dataList = JSON.parse(data).data
|
||||
if(lineList.value.length > 0) {
|
||||
console.log(lineList.value)
|
||||
lineList.value = setIsSelect(lineList.value, dataList)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const setIsSelect =(arr1, arr2) => {
|
||||
for (let i = 0; i < arr1.length; i++) {
|
||||
const element = arr1[i];
|
||||
const isExist = arr2.includes(element.id);
|
||||
element.isSelect = isExist;
|
||||
}
|
||||
return arr1;
|
||||
}
|
||||
// 查看更多异常列表
|
||||
const lookError = () => {
|
||||
// console.log('点击了')
|
||||
|
@ -217,7 +217,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 左下角图层 -->
|
||||
<div class="affix-container-left" :style="{ left: boxLeft + 'px' }" v-if="!isAllBoard">
|
||||
<!-- :style="{ left: boxLeft + 'px' }" -->
|
||||
<div class="affix-container-left" :style="{ left: 25 + 'px' }" v-if="!isAllBoard">
|
||||
<div class="affix-container-left-box">
|
||||
<div
|
||||
class="affix-container-left-box-item-box"
|
||||
@ -342,6 +343,7 @@ const carWidth = ref(60)
|
||||
const carHeight = ref(32)
|
||||
|
||||
const nodeStyle = (item, index) => {
|
||||
console.log(item.locationWidePx, item.locationDeepPx,item)
|
||||
return {
|
||||
verticalAlign: 'top',
|
||||
objectFit: 'cover',
|
||||
@ -701,7 +703,7 @@ const linkWebSocket = (url) => {
|
||||
// 车辆信息
|
||||
if (jsonMsg.type == 'map_push') {
|
||||
let data = JSON.parse(jsonMsg.content)
|
||||
console.log('======车位点======', data)
|
||||
// console.log('======车位点======', data)
|
||||
let dataList = []
|
||||
for (let key in data) {
|
||||
dataList.push({
|
||||
@ -745,9 +747,28 @@ const linkWebSocket = (url) => {
|
||||
customClass: 'indexpage-custom-message-style'
|
||||
})
|
||||
}
|
||||
// 规划路线信息
|
||||
if (jsonMsg.type == 'planning_move_pose') {
|
||||
let data = JSON.parse(jsonMsg.content)
|
||||
// console.log('======规划路线======', JSON.parse(data).data)
|
||||
let dataList = JSON.parse(data).data
|
||||
if(lineList.value.length > 0) {
|
||||
console.log(lineList.value)
|
||||
lineList.value = setIsSelect(lineList.value, dataList)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const setIsSelect =(arr1, arr2) => {
|
||||
for (let i = 0; i < arr1.length; i++) {
|
||||
const element = arr1[i];
|
||||
const isExist = arr2.includes(element.id);
|
||||
element.isSelect = isExist;
|
||||
}
|
||||
return arr1;
|
||||
}
|
||||
|
||||
// 查看更多异常列表
|
||||
const lookError = () => {
|
||||
// console.log('点击了')
|
||||
@ -768,7 +789,7 @@ const emitParent = () => {
|
||||
}
|
||||
//获取扫描图
|
||||
const getMapData = async (item) => {
|
||||
console.log('===22=========', JSON.parse(item.yamlJson))
|
||||
// console.log('===22=========', JSON.parse(item.yamlJson))
|
||||
widthVal.value = JSON.parse(item.yamlJson).width
|
||||
heightVal.value = JSON.parse(item.yamlJson).height
|
||||
testCarList.value = []
|
||||
@ -948,6 +969,7 @@ const getLeftPx = () => {
|
||||
let indexpageContainer = document.getElementById('indexpage-container')
|
||||
// console.log('距离左边的距离', indexpageContainer.getBoundingClientRect().left)
|
||||
boxLeft.value = indexpageContainer.getBoundingClientRect().left + 6
|
||||
console.log(boxLeft.value)
|
||||
}
|
||||
// 封装监听元素宽度变化的方法
|
||||
const observeWidthChange = (id, callback) => {
|
||||
@ -989,9 +1011,9 @@ onBeforeUnmount(() => {
|
||||
})
|
||||
// 组件卸载时停止监听
|
||||
onUnmounted(() => {
|
||||
if (stopObserving) {
|
||||
stopObserving()
|
||||
}
|
||||
// if (stopObserving) {
|
||||
// stopObserving()
|
||||
// }
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -1087,7 +1109,7 @@ onUnmounted(() => {
|
||||
cursor: pointer;
|
||||
}
|
||||
.affix-container-left {
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
bottom: 1.625rem;
|
||||
z-index: 999;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user