修改设备类型选择

master
夜笙歌 2 years ago
parent 2cf98e9911
commit cc17237967

@ -9,6 +9,14 @@ export function getCarGpsList(query) {
}) })
} }
export function queryCardata(query) {
return request({
url: '/basecar/car/queryCardata',
method: 'get',
params: query
})
}
export function listBasetyre(query) { export function listBasetyre(query) {
return request({ return request({
url: '/carqueue/carqueue/carQueuelist', url: '/carqueue/carqueue/carQueuelist',

@ -44,6 +44,7 @@
<el-form-item :label="t('baseDevice.baseDevice.activeTime')" prop="activeTime"> <el-form-item :label="t('baseDevice.baseDevice.activeTime')" prop="activeTime">
<el-date-picker <el-date-picker
v-model="queryParams.activeTime" v-model="queryParams.activeTime"
value-format="YYYY-MM-DD"
:size="size" :size="size"
end-placeholder="结束时间" end-placeholder="结束时间"
range-separator="到" range-separator="到"
@ -54,6 +55,7 @@
<el-form-item :label="t('baseDevice.baseDevice.lastRunTime')" prop="lastRunTime"> <el-form-item :label="t('baseDevice.baseDevice.lastRunTime')" prop="lastRunTime">
<el-date-picker <el-date-picker
v-model="queryParams.lastRunTime" v-model="queryParams.lastRunTime"
value-format="YYYY-MM-DD"
:size="size" :size="size"
end-placeholder="结束时间" end-placeholder="结束时间"
range-separator="到" range-separator="到"

@ -7,7 +7,7 @@
<script setup> <script setup>
import AMapLoader from '@amap/amap-jsapi-loader'; import AMapLoader from '@amap/amap-jsapi-loader';
import {getCarGpsList, listBasetyre} from '@/api/realTimeMonitoring/vehicleMonitoring' import {getCarGpsList, listBasetyre,queryCardata} from '@/api/realTimeMonitoring/vehicleMonitoring'
import {parseTime} from "@/utils/ruoyi"; import {parseTime} from "@/utils/ruoyi";
import {onBeforeUnmount} from "@vue/runtime-core"; import {onBeforeUnmount} from "@vue/runtime-core";
@ -20,19 +20,26 @@ const treeClick = (data) => {
if (!data.baseCarList) { if (!data.baseCarList) {
map.remove(markers.value); map.remove(markers.value);
markers.value = [] markers.value = []
setMarker({id: data.id}, 14) setMarker({id: data.id}, 14,false)
} else { } else {
map.remove(markers.value); map.remove(markers.value);
markers.value = [] markers.value = []
setMarker({queueId: data.id}, 8) setMarker({queueId: data.id}, 8,true)
} }
} }
window.$tab = proxy.$tab window.$tab = proxy.$tab
const setMarker = async (data, zoom) => { const setMarker = async (data, zoom,isChildren) => {
const {data: markerArr} = await getCarGpsList(data) let markerArr = []
if(isChildren){
let e= await listBasetyre(data)
markerArr = e.rows?.[0]?.baseCarList
} else{
let e = await queryCardata(data)
markerArr = [e.data]
}
console.log(markerArr)
markerArr.forEach((e, index) => { markerArr.forEach((e, index) => {
// //
markers.value[index] = new AMap.Marker({ markers.value[index] = new AMap.Marker({
content: '<div class="markerIcon" />', content: '<div class="markerIcon" />',
@ -69,7 +76,7 @@ AMapLoader.load({
zoom: 8, // zoom: 8, //
center: [116.397428, 39.90923], // center: [116.397428, 39.90923], //
}); });
await setMarker() await setMarker(undefined,undefined,true)
// //

@ -18,7 +18,7 @@
<span class="yellow">最长连续报警时间&nbsp;&nbsp;</span> <span class="yellow">最长连续报警时间&nbsp;&nbsp;</span>
<span>{{ tireInfo.warringTime }}&nbsp;&nbsp;</span> <span>{{ tireInfo.warringTime }}&nbsp;&nbsp;</span>
<span class="yellow">历史最高胎压&nbsp;&nbsp;</span> <span class="yellow">历史最高胎压&nbsp;&nbsp;</span>
<span>{{ tireInfo.highTemHis }}&nbsp;&nbsp;</span> <span>{{ tireInfo.highPressHis }}&nbsp;&nbsp;</span>
</div> </div>
<div> <div>
<span class="yellow">预计剩余里程&nbsp;&nbsp;</span> <span class="yellow">预计剩余里程&nbsp;&nbsp;</span>
@ -26,7 +26,7 @@
<span class="yellow">最长连续工作时间&nbsp;&nbsp;</span> <span class="yellow">最长连续工作时间&nbsp;&nbsp;</span>
<span>{{ tireInfo.longestWorkTime }}&nbsp;&nbsp;</span> <span>{{ tireInfo.longestWorkTime }}&nbsp;&nbsp;</span>
<span class="yellow">历史最高胎温&nbsp;&nbsp;</span> <span class="yellow">历史最高胎温&nbsp;&nbsp;</span>
<span>{{ tireInfo.highPressHis }}&nbsp;&nbsp;</span> <span>{{ tireInfo.highTemHis }}&nbsp;&nbsp;</span>
</div> </div>
<div> <div>
<span class="yellow">报警次数&nbsp;&nbsp;</span> <span class="yellow">报警次数&nbsp;&nbsp;</span>

Loading…
Cancel
Save