diff --git a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue index 2378ca5..a5708af 100644 --- a/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue +++ b/ruoyi-ui/src/views/realTimeMonitoring/carMonitoring/index.vue @@ -36,10 +36,10 @@
+ :style="'border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top;background-color:'+setBg(index + 1,tyreList.find(e => e.tyrePositionS === (`${index + 1}-1-1`)))">
{{ @@ -61,7 +61,7 @@ :style="'vertical-align: top;width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid'+ (TireRow[index] === 2 ? '#666;' :'rgba(0,0,0,0);') + 'border-radius: 10%'" @click="getTyreInfo(`${index+1}-1-2`)">
+ :style="'border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align: top;background-color:'+setBg(index + 1,tyreList.find(e => e.tyrePositionS === (`${index + 1}-1-2`)))">
{{ @@ -83,7 +83,7 @@ :style="'vertical-align: top;width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid '+ (TireRow[index] === 2 ? '#666' :'rgba(0,0,0,0)') +';border-radius: 10%'" @click="getTyreInfo(`${index+1}-2-2`)">
+ :style="'border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top;background-color:'+setBg(index + 1,tyreList.find(e => e.tyrePositionS === (`${index + 1}-2-2`)))">
{{ @@ -103,7 +103,7 @@ style="vertical-align: top;width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%" @click="getTyreInfo(`${index+1}-2-1`)">
+ :style="'border-radius: 10%;width:100%;height:100%;background-color:green;vertical-align:top;background-color:'+setBg(index + 1,tyreList.find(e => e.tyrePositionS === (`${index + 1}-2-1`)))">
{{ @@ -284,6 +284,28 @@ const markers = ref(null) const tyreInfo = ref({}) const childrenList = ref([]) +const setBg = (index, e) => { + if (!e) return + if(parseFloat(e.temperature)>e.temperature_high){ + return 'rgb(248,213,104)' + } + if (index === 1) { + if(parseFloat(e.pressure)>e.z1_pressure_high){ + return 'rgb(136, 8, 8)' + } + if(parseFloat(e.pressure)e.z_pressure_high){ + return 'rgb(136, 8, 8)' + } + if(parseFloat(e.pressure) { console.log(e) console.log(tyreList.value) @@ -427,8 +449,9 @@ function handleQuery() { getList(); } -const toGPS = ()=>{ - proxy.$tab.openPage("/GPS/tyre"+"?id="+tyreInfo.value.id,"/GPS") + +const toGPS = () => { + proxy.$tab.openPage("/GPS/tyre" + "?id=" + tyreInfo.value.id, "/GPS") } /** 重置按钮操作 */