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

计量站工艺图

parent 3ec2b72e
......@@ -33,7 +33,8 @@ import { ref, reactive, onMounted, onUnmounted } from 'vue';
import { useRoute } from 'vue-router'
import store from "../../store/index";
import http from '../../api/http';
import { weatherArt } from '../../dataJson/RealPage/boilerArt';
import { pipeRealArt } from '../../dataJson/RealPage/measureArt';
const props = defineProps(['id', 'refreshTime']);
const route = useRoute()
const Pipe = ref();
......@@ -83,7 +84,6 @@ const BackFlowSum = ref();
getSupplysList();
function getSupplysList() {
var result = store.getters.getEnterprise();
console.log(result);
if (result) {
result.forEach(element => {
if (element.enterpriseId === enterpriseId.value) {
......@@ -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() {
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"];
})
temperature.value = weatherArt.data["temperature"];
wind.value = weatherArt.data["wind"];
illumination.value = weatherArt.data["illumination"];
humidity.value =weatherArt.data["humidity"];
}
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() {
let deviceType = 8;
http.post("/api/pipe/Real", { "enterpriseId": enterpriseId.value, "deviceType": deviceType }).then((result) => {
console.log(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"];
})
pipeRealArt.title.forEach(element => {
pipeRealArt.realData.forEach(item => {
PipeData[element.enName] = item[element.enName];
});
});
// 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"];
SupplyClearPressure.value = 0.84;
SupplyValuePressure.value = 0;
FirstInTemp.value = 87.2;
SupplyFlow.value = 1197;
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(() => {
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