Commit 65cd7448 authored by 方建宇's avatar 方建宇

计量站工艺图

parent 3ec2b72e
...@@ -33,7 +33,8 @@ import { ref, reactive, onMounted, onUnmounted } from 'vue'; ...@@ -33,7 +33,8 @@ import { ref, reactive, onMounted, onUnmounted } from 'vue';
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import store from "../../store/index"; import store from "../../store/index";
import http from '../../api/http'; import http from '../../api/http';
import { weatherArt } from '../../dataJson/RealPage/boilerArt';
import { pipeRealArt } from '../../dataJson/RealPage/measureArt';
const props = defineProps(['id', 'refreshTime']); const props = defineProps(['id', 'refreshTime']);
const route = useRoute() const route = useRoute()
const Pipe = ref(); const Pipe = ref();
...@@ -83,7 +84,6 @@ const BackFlowSum = ref(); ...@@ -83,7 +84,6 @@ const BackFlowSum = ref();
getSupplysList(); getSupplysList();
function getSupplysList() { function getSupplysList() {
var result = store.getters.getEnterprise(); var result = store.getters.getEnterprise();
console.log(result);
if (result) { if (result) {
result.forEach(element => { result.forEach(element => {
if (element.enterpriseId === enterpriseId.value) { if (element.enterpriseId === enterpriseId.value) {
...@@ -112,40 +112,75 @@ function getSupplysList() { ...@@ -112,40 +112,75 @@ function getSupplysList() {
} }
//获取气象实时数据 //获取气象实时数据
// function getweather() {
// http.post("/api/weather/Real", SupplyId.value).then((result) => {
// temperature.value = result.data["temperature"];
// wind.value = result.data["wind"];
// illumination.value = result.data["illumination"];
// humidity.value = result.data["humidity"];
// })
// }
function getweather() { function getweather() {
http.post("/api/weather/Real", SupplyId.value).then((result) => { temperature.value = weatherArt.data["temperature"];
temperature.value = result.data["temperature"]; wind.value = weatherArt.data["wind"];
wind.value = result.data["wind"]; illumination.value = weatherArt.data["illumination"];
illumination.value = result.data["illumination"]; humidity.value =weatherArt.data["humidity"];
humidity.value = result.data["humidity"];
})
} }
getPipeData(); getPipeData();
//获取计量站实时数据 // //获取计量站实时数据
// function getPipeData() {
// let deviceType = 8;
// http.post("/api/pipe/Real", { "enterpriseId": enterpriseId.value, "deviceType": deviceType }).then((result) => {
// // console.log(JSON.stringify(result));
// result.data.title.forEach(element => {
// result.data.realData.forEach(item => {
// if (item.id === id.value) {
// PipeData[element.enName] = item[element.enName[0].toLowerCase() + element.enName.substring(1)];
// }
// })
// })
// SupplyClearPressure.value = PipeData["SupplyClearPressure"];
// SupplyValuePressure.value = PipeData["SupplyValuePressure"];
// FirstInTemp.value = PipeData["FirstInTemp"];
// SupplyFlow.value = PipeData["SupplyFlow"];
// SupplyFlowSum.value = PipeData["SupplyFlowSum"];
// SupplyHeat.value = PipeData["SupplyHeat"];
// SupplyHeatSum.value = PipeData["SupplyHeatSum"];
// FirstOutTemp.value = PipeData["FirstOutTemp"];
// BackClearPressure.value = PipeData["BackClearPressure"];
// BackFlow.value = PipeData["BackFlow"];
// BackFlowSum.value = PipeData["BackFlowSum"];
// })
// }
//静态
function getPipeData() { function getPipeData() {
let deviceType = 8; pipeRealArt.title.forEach(element => {
http.post("/api/pipe/Real", { "enterpriseId": enterpriseId.value, "deviceType": deviceType }).then((result) => { pipeRealArt.realData.forEach(item => {
console.log(result); PipeData[element.enName] = item[element.enName];
result.data.title.forEach(element => { });
result.data.realData.forEach(item => { });
if (item.id === id.value) { // SupplyClearPressure.value = PipeData["SupplyClearPressure"];
PipeData[element.enName] = item[element.enName[0].toLowerCase() + element.enName.substring(1)]; // SupplyValuePressure.value = PipeData["SupplyValuePressure"];
} // FirstInTemp.value = PipeData["FirstInTemp"];
}) // SupplyFlow.value = PipeData["SupplyFlow"];
}) // SupplyFlowSum.value = PipeData["SupplyFlowSum"];
SupplyClearPressure.value = PipeData["SupplyClearPressure"]; // SupplyHeat.value = PipeData["SupplyHeat"];
SupplyValuePressure.value = PipeData["SupplyValuePressure"]; // SupplyHeatSum.value = PipeData["SupplyHeatSum"];
FirstInTemp.value = PipeData["FirstInTemp"]; // FirstOutTemp.value = PipeData["FirstOutTemp"];
SupplyFlow.value = PipeData["SupplyFlow"]; // BackClearPressure.value = PipeData["BackClearPressure"];
SupplyFlowSum.value = PipeData["SupplyFlowSum"]; // BackFlow.value = PipeData["BackFlow"];
SupplyHeat.value = PipeData["SupplyHeat"]; // BackFlowSum.value = PipeData["BackFlowSum"];
SupplyHeatSum.value = PipeData["SupplyHeatSum"]; SupplyClearPressure.value = 0.84;
FirstOutTemp.value = PipeData["FirstOutTemp"]; SupplyValuePressure.value = 0;
BackClearPressure.value = PipeData["BackClearPressure"]; FirstInTemp.value = 87.2;
BackFlow.value = PipeData["BackFlow"]; SupplyFlow.value = 1197;
BackFlowSum.value = PipeData["BackFlowSum"]; SupplyFlowSum.value = 36897000;
}) SupplyHeat.value = 235.27;
SupplyHeatSum.value = 6602950;
FirstOutTemp.value = 38.7;
BackClearPressure.value = 0.33;
BackFlow.value = 1119;
BackFlowSum.value = 4284070;
} }
setInterval(() => { setInterval(() => {
getPipeData(); getPipeData();
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment