| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- export const monitorDataGroupArr = [
- [1, 2],
- [3, 4],
- [5, 6],
- ];
- export const prefix = ['Compressor', 'Compressor', 'PreFan'];
- export const preMonitorList = [
- {
- title: `供气压力`,
- code: `CompressorGasSupplyPressure`,
- unit: 'MPa',
- child: [],
- },
- {
- title: `排气温度`,
- code: `CompressorExhaustTemp`,
- unit: '℃',
- child: [],
- },
- {
- title: `电机电流`,
- code: `CompressorCurrentA`,
- unit: 'A',
- child: [],
- },
- {
- title: `加载时间`,
- code: `CompressorLoadTime`,
- unit: 'h',
- child: [],
- },
- {
- title: `运行时间`,
- code: `CompressorRunTime`,
- unit: 'h',
- child: [],
- },
- {
- code: 'signal',
- child: [
- {
- title: `运行信号`,
- code: `CompressorWorking`,
- },
- {
- title: `故障信号`,
- code: `CompressorFault`,
- },
- ],
- },
- {
- code: 'signal',
- child: [
- {
- title: `闸阀关到位`,
- code: `CompressorGateValveOpen`,
- },
- {
- title: `闸阀关到位`,
- code: `CompressorGateValveShut`,
- },
- ],
- },
- ];
- export const cqgMonitorList = [
- {
- title: `风包压力`,
- code: `CompressorWindBagPressure`,
- unit: '℃',
- child: [],
- },
- {
- title: `风包温度`,
- code: `CompressorWindBagTemp`,
- unit: 'MPa',
- child: [],
- },
- ];
- export const preFanMonitorData = [
- {
- title: '前轴温度',
- code: 'PreFanFrontTemp',
- unit: '℃',
- },
- {
- title: '后轴温度',
- code: 'PreFanBehindTemp',
- unit: '℃',
- },
- {
- title: '垂直振动值',
- code: 'PreFanVerticalVibration',
- unit: 'mm',
- },
- {
- title: '水平振动值',
- code: 'PreFanLevelVibration',
- unit: 'mm',
- },
- {
- title: '外壳温度',
- code: 'PreFanShellTemp',
- unit: '℃',
- },
- {
- title: '系统故障',
- code: 'PreFanSystemFault',
- unit: 'signal',
- },
- {
- title: '启动故障',
- code: 'PreFanStartFault',
- unit: 'signal',
- },
- {
- title: '阀门故障',
- code: 'PreFanValveFault',
- unit: 'signal',
- },
- ];
- export const totalData = [
- {
- title: '总压力',
- code: 'MainPipePressure',
- unit: 'bar',
- },
- ];
- export type State = {
- isRun: boolean;
- fault: boolean;
- };
- export function getSysState(monitorData) {
- const stateArr = <State[]>[];
- monitorDataGroupArr.forEach((group) => {
- const stateObj = { isRun: false, fault: false };
- group.forEach((item) => {
- if (monitorData['CompressorWorking'.replace('Compressor', 'Compressor' + item)]) {
- stateObj.isRun = monitorData['CompressorWorking'.replace('Compressor', 'Compressor' + item)] == '1';
- }
- monitorData['CompressorFault'.replace('Compressor', 'Compressor' + item)] === undefined
- ? '-'
- : monitorData['CompressorFault'.replace('Compressor', 'Compressor' + item)];
- monitorData['PreFanSystemFault'.replace('PreFan', 'PreFan' + item)] === undefined
- ? '-'
- : monitorData['PreFanSystemFault'.replace('PreFan', 'PreFan' + item)];
- monitorData['PreFanStartFault'.replace('PreFan', 'PreFan' + item)] === undefined
- ? '-'
- : monitorData['PreFanStartFault'.replace('PreFan', 'PreFan' + item)];
- monitorData['PreFanValveFault'.replace('PreFan', 'PreFan' + item)] === undefined
- ? '-'
- : monitorData['PreFanValveFault'.replace('PreFan', 'PreFan' + item)];
- stateObj.fault =
- monitorData['CompressorFault'.replace('Compressor', 'Compressor' + item)] == '1' ||
- monitorData['PreFanSystemFault'.replace('PreFan', 'PreFan' + item)] == '1' ||
- monitorData['PreFanStartFault'.replace('PreFan', 'PreFan' + item)] == '1' ||
- monitorData['PreFanValveFault'.replace('PreFan', 'PreFan' + item)] == '1';
- });
- stateArr.push(stateObj);
- });
- return stateArr;
- }
|