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

This commit is contained in:
123456 2023-05-16 14:16:05 +08:00
parent c307ae5a62
commit ab30052b1a
9 changed files with 36 additions and 33 deletions

View File

@ -42,7 +42,7 @@ import { calcWH } from "@/components/ts/selfAdaption";
import { getPowerData, getconsumeDetail } from "@/http/energyConsume"; import { getPowerData, getconsumeDetail } from "@/http/energyConsume";
import border6 from "@/components/borderBox/border6.vue"; import border6 from "@/components/borderBox/border6.vue";
import border3 from "@/components/borderBox/border3.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 power from "./chart/power2023.vue";
import chart from "@/components/assembly/chart2.vue"; import chart from "@/components/assembly/chart2.vue";
import { useRoute, useRouter } from "vue-router"; 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 { calcWH } from "@/components/ts/selfAdaption";
// import {getPowerData} from '@/http/environment' // import {getPowerData} from '@/http/environment'
import { getSensorByDept } from "@/http/PaintShopView/index"; 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 chart from "@/components/assembly/chart2.vue";
import verticalNum from "./../components/verticalNum.vue"; import verticalNum from "./../components/verticalNum.vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
@ -82,13 +82,13 @@ function reset(val: any) {
const powerBox = (width: any, height: any) => { const powerBox = (width: any, height: any) => {
let a = calcWH(height, width, 1, 24, 0); let a = calcWH(height, width, 1, 24, 0);
// //
verticalNum3.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20) verticalNum3.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
verticalNum4.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20) verticalNum4.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
verticalNum5.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20) verticalNum5.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
verticalNum6.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20) verticalNum6.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
verticalNum7.value.setchartWH(a.oWidth * 3 - 20, a.oHeight - 20) verticalNum7.value.setchartWH(a.oWidth * 3.42 - 20, a.oHeight - 20)
humidityref.value.setchartWH(a.oWidth * 5 - 40, a.oHeight - 40) humidityref.value.setchartWH(a.oWidth * 3.42 - 40, a.oHeight - 40)
ductref.value.setchartWH(a.oWidth * 4 - 20, a.oHeight - 20); ductref.value.setchartWH(a.oWidth * 3.48 - 20, a.oHeight - 20);
}; };
let ductOption = reactive({ let ductOption = reactive({
title: "", title: "",
@ -270,10 +270,10 @@ function setcontentData(val) {
verticalNum6.value.setData(CH2O, 'icon-app_icons--', 0.08, "mg/m3") verticalNum6.value.setData(CH2O, 'icon-app_icons--', 0.08, "mg/m3")
verticalNum7.value.setData(TVOC, 'icon-TVOC-Outlined', 0.5, "mg/m3") verticalNum7.value.setData(TVOC, 'icon-TVOC-Outlined', 0.5, "mg/m3")
// console.log(pmref.value); // 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) { if (val.temp_humi.length > 1) {
temp_humi_timer = setInterval(() => { 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++ temp_humi_index++
if (temp_humi_index >= val.temp_humi.length) { if (temp_humi_index >= val.temp_humi.length) {
temp_humi_index = 0 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: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-02-10 13:27:36 * @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: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-02-10 13:27:36 * @Date: 2023-02-10 13:27:36
@ -38,10 +38,10 @@ const echartsData = reactive<EDataPerson>({
*/ */
const setData = (value: any) => { const setData = (value: any) => {
echartsData.humiture!.div = humiture.value; echartsData.humiture!.div = humiture.value;
echartsData.humiture!.title = value.title; echartsData.humiture!.title = value.title.split("车间")[1]||value.title;
echartsData.humiture!.data = { echartsData.humiture!.data = {
title: { title: {
text: value.title, text: value.title.split("车间")[1]||value.title,
show: true, show: true,
textStyle: { textStyle: {
color: "#fff", 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: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-02-13 08:22:35 * @Date: 2023-02-13 08:22:35
@ -21,7 +21,7 @@
: 'iconfont ' + value.iconname + ' icon-blue iconbig-size' : 'iconfont ' + value.iconname + ' icon-blue iconbig-size'
"></i> "></i>
<p class="unit" v-if="value.unit"> <p class="unit" v-if="value.unit">
<p class="num">{{ item.val }}</p> <p class="num">{{ item.val }}&nbsp;</p>
<span>{{ value.unit }}</span> <span>{{ value.unit }}</span>
</p> </p>
@ -78,12 +78,18 @@
} }
const setData = ( const setData = (
data?: number | null, data?: object[] | null,
iconname?: string, iconname?: string,
quota?: number | null, quota?: number | null,
unit?: string 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.iconname = iconname;
value.quota = quota; value.quota = quota;
value.unit = unit; value.unit = unit;
@ -159,7 +165,7 @@
} }
.num { .num {
font-size: 32px; font-size: 24px;
} }
.unit { .unit {
@ -167,16 +173,13 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
vertical-align: top; vertical-align: top;
font-size: 25px; font-size: 20px;
height: 5; height: 5;
width: 100px; width: 100px;
} }
.box>h2 { .box>h2 {
font-size: 20px; font-size: 20px;
position: absolute;
top: 15px;
left:20px;
} }

View File

@ -213,7 +213,7 @@ function setcontentData(val){
return color[params.dataIndex]; return color[params.dataIndex];
} }
}, },
barWidth:'20%', barWidth:'50%',
label: { label: {
show: true, show: true,
color:'#fff', 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: 王路平 * @Author: 王路平
* @文件版本: V1.0.0 * @文件版本: V1.0.0
* @Date: 2023-02-13 14:43:28 * @Date: 2023-02-13 14:43:28
@ -214,7 +214,7 @@ function setcontentData(val){
return color[params.dataIndex]; return color[params.dataIndex];
} }
}, },
barWidth:'20%', barWidth:'50%',
label: { label: {
show: true, show: true,
color:'#fff', color:'#fff',

View File

@ -45,8 +45,8 @@ import border3 from "@/components/borderBox/border3.vue";
import { calcWH } from "@/components/ts/selfAdaption"; import { calcWH } from "@/components/ts/selfAdaption";
// import {getPowerData} from '@/http/environment' // import {getPowerData} from '@/http/environment'
import { getSensorByDept } from "@/http/PaintShopView/index"; import { getSensorByDept } from "@/http/PaintShopView/index";
import humidity from "./chart/humidity.vue"; import humidity from "./../components/humidity.vue";
import pm from "./chart/pm.vue"; import pm from "./../components/pm.vue";
import chart from "@/components/assembly/chart2.vue"; import chart from "@/components/assembly/chart2.vue";
import verticalNum from "./../components/verticalNum.vue"; import verticalNum from "./../components/verticalNum.vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";

View File

@ -45,9 +45,9 @@ import border3 from "@/components/borderBox/border3.vue";
import { calcWH } from "@/components/ts/selfAdaption"; import { calcWH } from "@/components/ts/selfAdaption";
// import {getPowerData} from '@/http/environment' // import {getPowerData} from '@/http/environment'
import { getSensorByDept } from "@/http/PaintShopView/index"; 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 chart from "@/components/assembly/chart2.vue";
import pm from "./chart/pm.vue"; import pm from "./../components/pm.vue";
import verticalNum from "./../components/verticalNum.vue"; import verticalNum from "./../components/verticalNum.vue";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useEnergyConsumeStore } from "@/store/module/energyConsume"; import { useEnergyConsumeStore } from "@/store/module/energyConsume";
@ -283,7 +283,7 @@ function setcontentData(val) {
verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB") verticalNum4.value.setData(noise, 'icon-shengyin', 120, "dB")
// verticalNum5.value.setData(val.Smoke,'icon-yanwubaojingqi',200,"") // verticalNum5.value.setData(val.Smoke,'icon-yanwubaojingqi',200,"")
verticalNum6.value.setData(CH2O, 'icon-app_icons--', 0.08, "mg/m3") 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); // 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 })
if (val.temp_humi.length > 1) { if (val.temp_humi.length > 1) {