From daa3eabcb782008f537a58afa38b4d16439def3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com>
Date: Thu, 9 Jun 2022 10:50:19 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/static/js/tankShell/device.js | 42 +++++++++----------
.../classes/static/js/tankShell/device.js | 42 +++++++++----------
2 files changed, 38 insertions(+), 46 deletions(-)
diff --git a/productionboard/src/main/resources/static/js/tankShell/device.js b/productionboard/src/main/resources/static/js/tankShell/device.js
index 22f447e..9b66238 100644
--- a/productionboard/src/main/resources/static/js/tankShell/device.js
+++ b/productionboard/src/main/resources/static/js/tankShell/device.js
@@ -57,40 +57,36 @@ $(() => {
/*数据信息*/
const statusArray = [0, 0, 0, 0, 0];
- var a = () => {
+ // var a = () => {
$.getJSON('/tankShellDevice/getDataInformation', function (result) {
- console.log(result);
dataInformationFunction(result)
});
$.getJSON('/tankShellDevice/getRunParameters', function (result) {
console.log(result);
energyProductionStatisticsFunction(result)
+ runParamStatisticsFunction(result)
+ $("#lossParam").text(result[8]);
+
+ $("#meterParam").text(result[9]);
});
$.getJSON('/tankShellDevice/getRunParameters', function (result) {
runParamStatisticsFunction(result)
});
- }
- dataInformationFunction(statusArray);
-
- energyProductionStatisticsFunction(statusArray);
-
- runParamStatisticsFunction(statusArray);
-
- $("#lossParam").text(123.87);
-
- $("#meterParam").text(123.65);
+ // }
})
/*数据信息*/
const dataInformationFunction = (statusArray) => {
+ let res = statusArray[0]
+ console.log(res);
let info = `
- ${statusArray[0] == 1 ? `运行正常` : `运行异常`} |
- 389kW |
+ ${res.deviceStatus == 1 ? `运行正常` : `运行异常`} |
+ ${res.devicePower}kW |
- 4563kW·h |
+ ${res.deviceEnergy}kW·h |
2 |
`;
@@ -102,10 +98,10 @@ const dataInformationFunction = (statusArray) => {
const energyProductionStatisticsFunction = (statusArray) => {
let info = `
- 68 |
- 675 |
- 68 |
- 675 |
+ ${statusArray[0]} |
+ ${statusArray[1]} |
+ ${statusArray[2]} |
+ ${statusArray[3]} |
`;
@@ -114,10 +110,10 @@ const energyProductionStatisticsFunction = (statusArray) => {
const runParamStatisticsFunction = (statusArray) => {
let info = `
- 68
- 685
- 685
- 685
+ ${statusArray[4]}
+ ${statusArray[5]}
+ ${statusArray[6]}
+ ${statusArray[7]}
`;
$("#runParamStatistics").append(info);
diff --git a/productionboard/target/classes/static/js/tankShell/device.js b/productionboard/target/classes/static/js/tankShell/device.js
index 22f447e..9b66238 100644
--- a/productionboard/target/classes/static/js/tankShell/device.js
+++ b/productionboard/target/classes/static/js/tankShell/device.js
@@ -57,40 +57,36 @@ $(() => {
/*数据信息*/
const statusArray = [0, 0, 0, 0, 0];
- var a = () => {
+ // var a = () => {
$.getJSON('/tankShellDevice/getDataInformation', function (result) {
- console.log(result);
dataInformationFunction(result)
});
$.getJSON('/tankShellDevice/getRunParameters', function (result) {
console.log(result);
energyProductionStatisticsFunction(result)
+ runParamStatisticsFunction(result)
+ $("#lossParam").text(result[8]);
+
+ $("#meterParam").text(result[9]);
});
$.getJSON('/tankShellDevice/getRunParameters', function (result) {
runParamStatisticsFunction(result)
});
- }
- dataInformationFunction(statusArray);
-
- energyProductionStatisticsFunction(statusArray);
-
- runParamStatisticsFunction(statusArray);
-
- $("#lossParam").text(123.87);
-
- $("#meterParam").text(123.65);
+ // }
})
/*数据信息*/
const dataInformationFunction = (statusArray) => {
+ let res = statusArray[0]
+ console.log(res);
let info = `
- ${statusArray[0] == 1 ? `运行正常` : `运行异常`} |
- 389kW |
+ ${res.deviceStatus == 1 ? `运行正常` : `运行异常`} |
+ ${res.devicePower}kW |
- 4563kW·h |
+ ${res.deviceEnergy}kW·h |
2 |
`;
@@ -102,10 +98,10 @@ const dataInformationFunction = (statusArray) => {
const energyProductionStatisticsFunction = (statusArray) => {
let info = `
- 68 |
- 675 |
- 68 |
- 675 |
+ ${statusArray[0]} |
+ ${statusArray[1]} |
+ ${statusArray[2]} |
+ ${statusArray[3]} |
`;
@@ -114,10 +110,10 @@ const energyProductionStatisticsFunction = (statusArray) => {
const runParamStatisticsFunction = (statusArray) => {
let info = `
- 68
- 685
- 685
- 685
+ ${statusArray[4]}
+ ${statusArray[5]}
+ ${statusArray[6]}
+ ${statusArray[7]}
`;
$("#runParamStatistics").append(info);