feat : 传感器区域新增显示范围
This commit is contained in:
@@ -210,7 +210,7 @@ const getScreenInfo = (now) => {
|
||||
windPressureObj = {
|
||||
equipmentId: item.equipmentId,
|
||||
equipmentName: item.equipmentName,
|
||||
max: 120,
|
||||
max: item.maxRange,
|
||||
value: item.value,
|
||||
point: item.valueThreshold,
|
||||
unit: item.unit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div id="wind-pressure-item" :class="{ abnormal:isWaring }">
|
||||
<div class="label">
|
||||
<img src="../../../../assets/images/windPressure/icon.png" alt=""/>
|
||||
<img src="@/assets/images/windPressure/icon.png" alt=""/>
|
||||
<span>{{params.wp.equipmentName}}</span>
|
||||
</div>
|
||||
<div class="container" ref="length">
|
||||
@@ -27,17 +27,15 @@ const params = defineProps({
|
||||
const length = ref(null);
|
||||
const value = ref(null);
|
||||
const point = ref(null);
|
||||
onMounted(handleOnMounted);
|
||||
|
||||
function handleOnMounted() {
|
||||
onMounted(()=>{
|
||||
setValue();
|
||||
}
|
||||
});
|
||||
|
||||
watch(() => params.wp.value, () => {
|
||||
setValue();
|
||||
});
|
||||
|
||||
function setValue() {
|
||||
const setValue=()=> {
|
||||
let width = (params.wp.value * length.value.offsetWidth) / params.wp.max;
|
||||
value.value.style.width = `${width}px`;
|
||||
let flag = (params.wp.point * length.value.offsetWidth) / params.wp.max;
|
||||
@@ -107,7 +105,7 @@ let isWaring = computed(() => {
|
||||
|
||||
.container {
|
||||
width: 500px;
|
||||
height: 24px;
|
||||
height: 25px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #0f82af;
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user