修改机械分厂车间环境页面

This commit is contained in:
123456 2023-05-16 14:16:05 +08:00
parent c307ae5a62
commit 96652c9ea0
8 changed files with 32 additions and 29 deletions

View File

@ -42,7 +42,7 @@ import { calcWH } from "@/components/ts/selfAdaption";
import { getPowerData, getconsumeDetail } from "@/http/energyConsume";
import border6 from "@/components/borderBox/border6.vue";
import border3 from "@/components/borderBox/border3.vue";
import pm from "./chart/pm.vue";
import pm from "./../components/pm.vue";
import power from "./chart/power2023.vue";
import chart from "@/components/assembly/chart2.vue";
import { useRoute, useRouter } from "vue-router";

View File

@ -38,7 +38,7 @@ import border3 from "@/components/borderBox/border3.vue";
import { calcWH } from "@/components/ts/selfAdaption";
// import {getPowerData} from '@/http/environment'
import { getSensorByDept } from "@/http/PaintShopView/index";
import humidity from "./chart/humidity.vue";
import humidity from "./../components/humidity.vue";
import chart from "@/components/assembly/chart2.vue";
import verticalNum from "./../components/verticalNum.vue";
import { useRoute, useRouter } from "vue-router";
@ -82,13 +82,13 @@ function reset(val: any) {
const powerBox = (width: any, height: any) => {
let a = calcWH(height, width, 1, 24, 0);
//
verticalNum3.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20)
verticalNum4.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20)
verticalNum5.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20)
verticalNum6.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20)
verticalNum7.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20)
humidityref.value.setchartWH(a.oWidth * 5 - 40, a.oHeight - 40)
ductref.value.setchartWH(a.oWidth * 4 - 20, a.oHeight - 20);
verticalNum3.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
verticalNum4.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
verticalNum5.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
verticalNum6.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
verticalNum7.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
humidityref.value.setchartWH(a.oWidth * 3.42 - 40, a.oHeight - 40)
ductref.value.setchartWH(a.oWidth * 3.48 - 20, a.oHeight - 20);
};
let ductOption = reactive({
title: "",
@ -270,10 +270,10 @@ function setcontentData(val) {
verticalNum6.value.setData(CH2O, 'icon-app_icons--', 0.08, "mg/m3")
verticalNum7.value.setData(TVOC, 'icon-TVOC-Outlined', 0.5, "mg/m3")
// console.log(pmref.value);
humidityref.value.setData({ h: val.temp_humi[temp_humi_index].huim, c: val.temp_humi[temp_humi_index].temp })
humidityref.value.setData({ h: val.temp_humi[temp_humi_index].huim, c: val.temp_humi[temp_humi_index].temp, title: val.temp_humi[temp_humi_index].name })
if (val.temp_humi.length > 1) {
temp_humi_timer = setInterval(() => {
humidityref.value.setData({ h: val.temp_humi[temp_humi_index].huim, c: val.temp_humi[temp_humi_index].temp })
humidityref.value.setData({ h: val.temp_humi[temp_humi_index].huim, c: val.temp_humi[temp_humi_index].temp, title: val.temp_humi[temp_humi_index].name })
temp_humi_index++
if (temp_humi_index >= val.temp_humi.length) {
temp_humi_index = 0

View File

@ -1,5 +1,5 @@
<!--
* @FilePath: \wwwd:\code\screenFront\src\views\PaintShopView\machiningView\chart\humidity.vue
* @FilePath: \screenFront\src\views\PaintShopView\components\humidity.vue
* @Author: 王路平
* @文件版本: V1.0.0
* @Date: 2023-02-10 13:27:36

View File

@ -1,5 +1,5 @@
<!--
* @FilePath: \gitscreenFront\src\views\PaintShopView\components\pm.vue
* @FilePath: \screenFront\src\views\PaintShopView\components\pm.vue
* @Author: 王路平
* @文件版本: V1.0.0
* @Date: 2023-02-10 13:27:36
@ -38,10 +38,10 @@ const echartsData = reactive<EDataPerson>({
*/
const setData = (value: any) => {
echartsData.humiture!.div = humiture.value;
echartsData.humiture!.title = value.title;
echartsData.humiture!.title = value.title.split("车间")[1]||value.title;
echartsData.humiture!.data = {
title: {
text: value.title,
text: value.title.split("车间")[1]||value.title,
show: true,
textStyle: {
color: "#fff",

View File

@ -1,5 +1,5 @@
<!--
* @FilePath: \gitscreenFront\src\views\PaintShopView\components\verticalNum.vue
* @FilePath: \screenFront\src\views\PaintShopView\components\verticalNum.vue
* @Author: 王路平
* @文件版本: V1.0.0
* @Date: 2023-02-13 08:22:35
@ -21,7 +21,7 @@
: 'iconfont ' + value.iconname + ' icon-blue iconbig-size'
"></i>
<p class="unit" v-if="value.unit">
<p class="num">{{ item.val }}</p>
<p class="num">{{ item.val }}&nbsp;</p>
<span>{{ value.unit }}</span>
</p>
@ -78,12 +78,18 @@
}
const setData = (
data?: number | null,
data?: object[] | null,
iconname?: string,
quota?: number | null,
unit?: string
) => {
value.data = data;
let temp_data = data.map((item: any) => {
return {
name: item.name.split("车间")[1]||item.name,
val: item.val,
};
});
value.data = temp_data;
value.iconname = iconname;
value.quota = quota;
value.unit = unit;
@ -159,7 +165,7 @@
}
.num {
font-size: 32px;
font-size: 24px;
}
.unit {
@ -167,16 +173,13 @@
justify-content: center;
align-items: center;
vertical-align: top;
font-size: 25px;
font-size: 20px;
height: 5;
width: 100px;
}
.box>h2 {
font-size: 20px;
position: absolute;
top: 15px;
left:20px;
}

View File

@ -213,7 +213,7 @@ function setcontentData(val){
return color[params.dataIndex];
}
},
barWidth:'20%',
barWidth:'50%',
label: {
show: true,
color:'#fff',

View File

@ -1,5 +1,5 @@
<!--
* @FilePath: \gitscreenFront\src\views\PaintShopView\machiningView\bottom.vue
* @FilePath: \screenFront\src\views\PaintShopView\machiningView\bottom.vue
* @Author: 王路平
* @文件版本: V1.0.0
* @Date: 2023-02-13 14:43:28
@ -213,8 +213,8 @@ function setcontentData(val){
// return colors[params.dataIndex];
return color[params.dataIndex];
}
},
barWidth:'20%',
},
barWidth:'50%',
label: {
show: true,
color:'#fff',

View File

@ -283,7 +283,7 @@ function setcontentData(val) {
verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB")
// verticalNum5.value.setData(val.Smoke,'icon-yanwubaojingqi',200,"")
verticalNum6.value.setData(CH2O, 'icon-app_icons--', 0.08, "mg/m3")
verticalNum7.value.setData(TVOC, 'icon-TVOC-Outlined', 0.5, "PPM")
verticalNum7.value.setData(TVOC, 'icon-TVOC-Outlined', 0.5, "mg/m3")
// console.log(pmref.value);
humidityref.value.setData({ h: val.temp_humi[temp_humi_index].huim, c: val.temp_humi[temp_humi_index].temp })
if (val.temp_humi.length > 1) {