1.机械分厂传感器离线状态显示更新
This commit is contained in:
parent
9d3b769d7d
commit
9259b0951b
@ -253,16 +253,16 @@ let ductOption = reactive({
|
||||
let temp_humi_index = 0
|
||||
function setcontentData(val) {
|
||||
let CH2O = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.CH2O };
|
||||
return { name: item.name, val: item.CH2O,status:item.status };
|
||||
});
|
||||
let TVOC = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.TVOC };
|
||||
return { name: item.name, val: item.TVOC,status:item.status };
|
||||
});
|
||||
let Smoke = val.Smoke.map((item) => {
|
||||
return { name: item.name, val: item.data };
|
||||
return { name: item.name, val: item.data,status:item.status };
|
||||
});
|
||||
let noise = val.noise.map((item) => {
|
||||
return { name: item.name, val: item.data };
|
||||
return { name: item.name, val: item.data,status:item.status };
|
||||
});
|
||||
verticalNum3.value.setData(val.FIRE, 'icon-ranqi', 0, "")
|
||||
verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB")
|
||||
|
@ -16,11 +16,12 @@
|
||||
<h5 v-if="value.unit">{{ `${t('messages.NormalValue')}0-${value.quota}${value.unit}` }}</h5>
|
||||
<h5 v-else> </h5>
|
||||
<!-- <h2>{{ `${t(item.i18n[0])}${t(item.i18n[1])}`}}</h2> -->
|
||||
<i :class="+item.val > +value.quota
|
||||
<!-- <i :class="+item.val > +value.quota
|
||||
? 'iconfont ' + value.iconname + ' icon-red iconbig-size'
|
||||
: 'iconfont ' + value.iconname + ' icon-blue iconbig-size'
|
||||
"></i>
|
||||
<p class="unit" v-if="value.unit">
|
||||
"></i> -->
|
||||
<i :class="['iconfont','iconbig-size',icon,iconcolor]"></i>
|
||||
<p class="unit" v-if="value.unit&&item.status">
|
||||
<p class="num">{{ item.val }} </p>
|
||||
<span>{{ value.unit }}</span>
|
||||
</p>
|
||||
@ -48,8 +49,22 @@ let props = defineProps<{
|
||||
}>();
|
||||
let i = ref(0)
|
||||
let item = computed(() => {
|
||||
console.log(value.data[i.value]);
|
||||
|
||||
return value.data[i.value] || { "name": "", "val": "0", "type": "", "field": "", "ts": 0,"status":false};
|
||||
});
|
||||
let icon = computed(() => {
|
||||
return value.iconname
|
||||
});
|
||||
let iconcolor = computed(() => {
|
||||
console.log(value.data[i.value]);
|
||||
//开始进入渲染是没有获取到该数据则需要判断 如果没有则返回空
|
||||
if(value.data[i.value]){
|
||||
return value.data[i.value].status? +value.data[i.value].val > +value.quota ? "icon-red" : "icon-blue":"icon-grey";
|
||||
}else{
|
||||
return "icon-grey"
|
||||
}
|
||||
|
||||
return value.data[i.value] || { "name": "", "val": "0", "type": "", "field": "", "ts": 0 };
|
||||
});
|
||||
let keynum = ref(0);
|
||||
const value = reactive<any>({
|
||||
@ -91,6 +106,7 @@ const setData = (
|
||||
return {
|
||||
name: item.name.split("车间")[1] || item.name,
|
||||
val: item.val,
|
||||
status:item.status
|
||||
};
|
||||
});
|
||||
value.data = temp_data;
|
||||
@ -164,7 +180,12 @@ defineExpose({
|
||||
/* position: relative; */
|
||||
/* top: -15px; */
|
||||
}
|
||||
|
||||
.icon-grey {
|
||||
color: rgb(167, 166, 189);
|
||||
font-size: 100px;
|
||||
/* position: relative; */
|
||||
/* top: -15px; */
|
||||
}
|
||||
.iconsmall-size {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
@ -274,13 +274,13 @@ let temp_humi_index = 0
|
||||
console.log(val);
|
||||
|
||||
let CH2O = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.CH2O };
|
||||
return { name: item.name, val: item.CH2O,status:item.status };
|
||||
});
|
||||
let TVOC = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.TVOC };
|
||||
return { name: item.name, val: item.TVOC,status:item.status };
|
||||
});
|
||||
let noise = val.noise.map((item) => {
|
||||
return { name: item.name, val: item.data };
|
||||
return { name: item.name, val: item.data,status:item.status };
|
||||
});
|
||||
// verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"")
|
||||
verticalNum4.value.setData(noise,'icon-shengyin',120,"dB")
|
||||
|
@ -272,13 +272,13 @@ let temp_humi_index = 0
|
||||
|
||||
function setcontentData(val){
|
||||
let CH2O = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.CH2O };
|
||||
return { name: item.name, val: item.CH2O,status:item.status };
|
||||
});
|
||||
let TVOC = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.TVOC };
|
||||
return { name: item.name, val: item.TVOC,status:item.status };
|
||||
});
|
||||
let noise = val.noise.map((item) => {
|
||||
return { name: item.name, val: item.data };
|
||||
return { name: item.name, val: item.data,status:item.status };
|
||||
});
|
||||
// verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"")
|
||||
verticalNum4.value.setData(noise,'icon-shengyin',120,"dB")
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
* @FilePath: \screenFront\src\views\PaintShopView\stuffView\top.vue
|
||||
* @FilePath: \gitscreenFront\src\views\PaintShopView\stuffView\top.vue
|
||||
* @Author: 王路平
|
||||
* @文件版本: V1.0.0
|
||||
* @Date: 2023-02-13 14:43:28
|
||||
@ -272,13 +272,13 @@ function setcontentData(val) {
|
||||
clearInterval(temp_humi_timer)
|
||||
clearInterval(pm_timer)
|
||||
let CH2O = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.CH2O };
|
||||
return { name: item.name, val: item.CH2O,status:item.status };
|
||||
});
|
||||
let TVOC = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.TVOC };
|
||||
return { name: item.name, val: item.TVOC,status:item.status };
|
||||
});
|
||||
let noise = val.noise.map((item) => {
|
||||
return { name: item.name, val: item.data };
|
||||
return { name: item.name, val: item.data,status:item.status };
|
||||
});
|
||||
// verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"")
|
||||
verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB")
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
* @FilePath: \screenFront\src\views\PaintShopView\weldView\top.vue
|
||||
* @FilePath: \gitscreenFront\src\views\PaintShopView\weldView\top.vue
|
||||
* @Author: 王路平
|
||||
* @文件版本: V1.0.0
|
||||
* @Date: 2023-02-13 14:43:28
|
||||
@ -271,13 +271,13 @@ function setcontentData(val) {
|
||||
clearInterval(pm_timer)
|
||||
|
||||
let CH2O = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.CH2O };
|
||||
return { name: item.name, val: item.CH2O,status:item.status };
|
||||
});
|
||||
let TVOC = val.TVOC_CH2O.map((item) => {
|
||||
return { name: item.name, val: item.TVOC };
|
||||
return { name: item.name, val: item.TVOC,status:item.status };
|
||||
});
|
||||
let noise = val.noise.map((item) => {
|
||||
return { name: item.name, val: item.data };
|
||||
return { name: item.name, val: item.data,status:item.status };
|
||||
});
|
||||
// verticalNum3.value.setData(val.FIRE,'icon-ranqi',5,"")
|
||||
verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB")
|
||||
|
Loading…
Reference in New Issue
Block a user