|
@@ -324,201 +324,14 @@ async function getDataSource(systemID) {
|
|
|
const res = await getDevice({ devicetype: 'sys', systemID, type: 'all' });
|
|
|
console.log(res, 'res---------------');
|
|
|
|
|
|
- let objParams = reactive({
|
|
|
- "result": {
|
|
|
- "cmd": "monitordata",
|
|
|
- "msgTxt": [
|
|
|
- {
|
|
|
- "datalist": [
|
|
|
- {
|
|
|
- "msgType": null,
|
|
|
- "deviceID": "1705212847586627588",
|
|
|
- "strname": "12上302注氮机1",
|
|
|
- "strinstallpos": "12上302注氮机1",
|
|
|
- "fsectarea": "null",
|
|
|
- "stationname": "12s302kd制氮分站1",
|
|
|
- "deviceType": "nitrogen_zd_12s302zd",
|
|
|
- "typeName": "注氮机设备",
|
|
|
- "netStatus": 0,
|
|
|
- "warnFlag": 0,
|
|
|
- "warnLevel": 0,
|
|
|
- "warnLevel_str": "正常",
|
|
|
- "warnTime": null,
|
|
|
- "readTime": "2023-12-04 09:45:37",
|
|
|
- "warnDes": "",
|
|
|
- "frontGateOpenCtrl": null,
|
|
|
- "rearGateOpenCtrl": null,
|
|
|
- "readData": {
|
|
|
- "RunTime4": "2000",
|
|
|
- "RunTime3": "77",
|
|
|
- "RunTime2": "24",
|
|
|
- "RunTime1": "24",
|
|
|
- "sign": "0",
|
|
|
- "AirCompressor_ShortCutFaul": "0",
|
|
|
- "HMIReset": "0",
|
|
|
- "AirCompressor_Status": "0",
|
|
|
- "AirCompressor_OilGasBarrel_HighPressureFault": "0",
|
|
|
- "AirCompressor_PhaseFailureFault1": "0",
|
|
|
- "AirCompressor_OverVoltageFault": "0",
|
|
|
- "AirCompressor_TotalFailureSignal1": "0",
|
|
|
- "AirCompressor_PhaseFailureFault": "0",
|
|
|
- "InputFlux": "0.25",
|
|
|
- "AirCompressor_LoadTime": "1597",
|
|
|
- "AirCompressor_Fan_Current": "0",
|
|
|
- "FluxTotal1": (Math.random()*3972).toFixed(2),
|
|
|
- "FluxTotal2": "145.0",
|
|
|
- "AirCompressor_OilGasBarrel_SeparatorFault": "0",
|
|
|
- "AirCompressor_TotalFailureSignal": "1",
|
|
|
- "AirCompressor_RunTime": "1",
|
|
|
- "AirCompressor_MainMotor_OverTempFault": "0",
|
|
|
- "AirCompressor_PhaseSequenceFault1": "0",
|
|
|
- "AirCompressor_LoadorUnload": "0",
|
|
|
- "AirCompressor_OilPressureLowFault": "0",
|
|
|
- "AirCompressor_ExhaustTemp": "25",
|
|
|
- "HMIStartStop": "0",
|
|
|
- "AirCompressor_MainMotor_Current": "0",
|
|
|
- "AirCompressor_ExhaustPre": (Math.random()*2930).toFixed(2),
|
|
|
- "AirCompressor_CtrlMode": "1",
|
|
|
- "AirCompressor_UnbalanceFault": "0",
|
|
|
- "AirCompressor_NoWaterFault": "1",
|
|
|
- "AirCompressor_MainMotor_OverloadFault": "0",
|
|
|
- "o2Val": "20.7",
|
|
|
- "AirCompressor_OilGasBarrel_OverTempAlarm": "0",
|
|
|
- "NitrogenPurity": "79.63",
|
|
|
- "AirCompressor_LowVoltageFault": "0",
|
|
|
- "AirCompressor_Fan_OverloadFault": "0",
|
|
|
- "AirCompressor_LeakageLock": "0",
|
|
|
- "AirCompressor_PowerFault": "0",
|
|
|
- "temperature": "20.3",
|
|
|
- "AirCompressor_ExhaustPreHighFault": "0",
|
|
|
- "AirCompressor_SysVoltage": "1139",
|
|
|
- "AirCompressor_CloseFail": "0",
|
|
|
- "AirCompressor_ExhaustTemp1": "0",
|
|
|
- "PreMembraneTemperature": "23.0",
|
|
|
- "fumes": "0.0",
|
|
|
- "AirCompressor_OilGasBarrel_FilterBlockageFault": "0",
|
|
|
- "AirCompressor_OpenFail": "0",
|
|
|
- "AirCompressor_OilGasBarrel_OverTempAlarm1": "0",
|
|
|
- "isRun": "-2",
|
|
|
- "AirCompressor_PhaseSequenceFault": "0"
|
|
|
- },
|
|
|
- "readDataDes": null,
|
|
|
- "summaryHour": [],
|
|
|
- "summaryDay": [],
|
|
|
- "history": [],
|
|
|
- "totalInfo": null,
|
|
|
- "sign": null,
|
|
|
- "cameras": [],
|
|
|
- "links": [],
|
|
|
- "other1": null,
|
|
|
- "other2": null,
|
|
|
- "other3": null
|
|
|
- },
|
|
|
- {
|
|
|
- "msgType": null,
|
|
|
- "deviceID": "1705212847586627589",
|
|
|
- "strname": "12上302注氮机2",
|
|
|
- "strinstallpos": "12上302注氮机2",
|
|
|
- "fsectarea": "null",
|
|
|
- "stationname": "12s302kd制氮分站2",
|
|
|
- "deviceType": "nitrogen_zd_12s302zd",
|
|
|
- "typeName": "注氮机设备",
|
|
|
- "netStatus": 0,
|
|
|
- "warnFlag": 0,
|
|
|
- "warnLevel": 0,
|
|
|
- "warnLevel_str": "正常",
|
|
|
- "warnTime": null,
|
|
|
- "readTime": "2023-12-04 09:45:47",
|
|
|
- "warnDes": "",
|
|
|
- "frontGateOpenCtrl": null,
|
|
|
- "rearGateOpenCtrl": null,
|
|
|
- "readData": {
|
|
|
- "RunTime4": "2000",
|
|
|
- "RunTime3": "202",
|
|
|
- "RunTime2": "27",
|
|
|
- "RunTime1": "19",
|
|
|
- "sign": "0",
|
|
|
- "AirCompressor_ShortCutFaul": "0",
|
|
|
- "HMIReset": "0",
|
|
|
- "AirCompressor_Status": "0",
|
|
|
- "AirCompressor_OilGasBarrel_HighPressureFault": "0",
|
|
|
- "AirCompressor_PhaseFailureFault1": "0",
|
|
|
- "AirCompressor_OverVoltageFault": "0",
|
|
|
- "AirCompressor_TotalFailureSignal1": "0",
|
|
|
- "AirCompressor_PhaseFailureFault": "0",
|
|
|
- "InputFlux": "0.0",
|
|
|
- "AirCompressor_LoadTime": "1210",
|
|
|
- "AirCompressor_Fan_Current": "0",
|
|
|
- "FluxTotal1": (Math.random()*9350).toFixed(2),
|
|
|
- "FluxTotal2": "117.0",
|
|
|
- "AirCompressor_OilGasBarrel_SeparatorFault": "0",
|
|
|
- "AirCompressor_TotalFailureSignal": "1",
|
|
|
- "AirCompressor_RunTime": "1",
|
|
|
- "AirCompressor_MainMotor_OverTempFault": "0",
|
|
|
- "AirCompressor_PhaseSequenceFault1": "0",
|
|
|
- "AirCompressor_LoadorUnload": "0",
|
|
|
- "AirCompressor_OilPressureLowFault": "0",
|
|
|
- "AirCompressor_ExhaustTemp": "27",
|
|
|
- "HMIStartStop": "0",
|
|
|
- "AirCompressor_MainMotor_Current": "0",
|
|
|
- "AirCompressor_ExhaustPre": (Math.random()*4930).toFixed(2),
|
|
|
- "AirCompressor_CtrlMode": "1",
|
|
|
- "AirCompressor_UnbalanceFault": "0",
|
|
|
- "AirCompressor_NoWaterFault": "1",
|
|
|
- "AirCompressor_MainMotor_OverloadFault": "0",
|
|
|
- "o2Val": "20.7",
|
|
|
- "AirCompressor_OilGasBarrel_OverTempAlarm": "0",
|
|
|
- "NitrogenPurity": "79.45",
|
|
|
- "AirCompressor_LowVoltageFault": "0",
|
|
|
- "AirCompressor_Fan_OverloadFault": "0",
|
|
|
- "AirCompressor_LeakageLock": "0",
|
|
|
- "AirCompressor_PowerFault": "0",
|
|
|
- "temperature": "20.3",
|
|
|
- "AirCompressor_ExhaustPreHighFault": "0",
|
|
|
- "AirCompressor_SysVoltage": "1143",
|
|
|
- "AirCompressor_CloseFail": "0",
|
|
|
- "AirCompressor_ExhaustTemp1": "0",
|
|
|
- "PreMembraneTemperature": "22.63",
|
|
|
- "fumes": "0.0",
|
|
|
- "AirCompressor_OilGasBarrel_FilterBlockageFault": "0",
|
|
|
- "AirCompressor_OpenFail": "0",
|
|
|
- "AirCompressor_OilGasBarrel_OverTempAlarm1": "0",
|
|
|
- "isRun": "-2",
|
|
|
- "AirCompressor_PhaseSequenceFault": "0"
|
|
|
- },
|
|
|
- "readDataDes": null,
|
|
|
- "summaryHour": [],
|
|
|
- "summaryDay": [],
|
|
|
- "history": [],
|
|
|
- "totalInfo": null,
|
|
|
- "sign": null,
|
|
|
- "cameras": [],
|
|
|
- "links": [],
|
|
|
- "other1": null,
|
|
|
- "other2": null,
|
|
|
- "other3": null
|
|
|
- }
|
|
|
- ],
|
|
|
- "avginfo": {
|
|
|
- "warnFlag": {
|
|
|
- "value": 0
|
|
|
- }
|
|
|
- },
|
|
|
- "typeName": "注氮机设备",
|
|
|
- "type": "nitrogen_zd_12s302zd"
|
|
|
- },
|
|
|
-
|
|
|
- ]
|
|
|
- }
|
|
|
- })
|
|
|
+
|
|
|
|
|
|
if (res) {
|
|
|
- const result =objParams.result;
|
|
|
- if (!objParams.result || objParams.result.msgTxt.length < 1) return;
|
|
|
- objParams.result.msgTxt.forEach((item) => {
|
|
|
+ const result =res;
|
|
|
+ if (!result || result.msgTxt.length < 1) return;
|
|
|
+ result.msgTxt.forEach((item) => {
|
|
|
if (item.type && item.type.startsWith('nitrogen')) {
|
|
|
airCompressorState.length = 0;
|
|
|
-
|
|
|
monitorData.value = item['datalist'].filter((data) => {
|
|
|
const readData = data.readData;
|
|
|
airCompressorState.push({
|
|
@@ -552,43 +365,6 @@ async function getDataSource(systemID) {
|
|
|
refresh.value = false
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // if (res) {
|
|
|
- // const result = res;
|
|
|
- // if (!result || result.msgTxt.length < 1) return;
|
|
|
- // result.msgTxt.forEach((item) => {
|
|
|
- // if (item.type && item.type.startsWith('nitrogen')) {
|
|
|
- // airCompressorState.length = 0;
|
|
|
- // monitorData.value = item['datalist'].filter((data) => {
|
|
|
- // const readData = data.readData;
|
|
|
- // airCompressorState.push({
|
|
|
- // id: data.deviceID,
|
|
|
- // deviceType: data.deviceType,
|
|
|
- // HMIReset: readData.HMIReset,
|
|
|
- // HMIStartStop: readData.HMIStartStop
|
|
|
- // });
|
|
|
- // return Object.assign(data, readData);
|
|
|
- // });
|
|
|
- // const airCompressor = { readTime: monitorData.value[0]['readTime'].substring(11) }
|
|
|
- // const dataArr = lodash.cloneDeep(echartData.value)
|
|
|
- // //图表数据
|
|
|
- // if (dataArr.length <= 5) {
|
|
|
- // monitorData.value.forEach((el, index) => {
|
|
|
- // airCompressor[`InputFlux${index + 1}`] = el['InputFlux'] || 0
|
|
|
- // });
|
|
|
- // dataArr.push(airCompressor)
|
|
|
- // } else {
|
|
|
- // dataArr.shift()
|
|
|
- // dataArr.push(airCompressor)
|
|
|
- // }
|
|
|
- // echartData.value = dataArr
|
|
|
-
|
|
|
- // }
|
|
|
- // });
|
|
|
- // monitorDataGroupNum.value = monitorData.value.length;
|
|
|
- // }
|
|
|
}
|
|
|
|
|
|
function handlerDevice(data, bol) {
|