import { reactive, defineAsyncComponent } from 'vue'; import { useGlobSetting } from '/@/hooks/setting'; import { Interface } from 'readline'; export const warningConfig = reactive({ header: ['设备名称', '预警信息', '时间'], data: [ ['火焰6', '严重报警', '03-05'], ['测点43', '一般预警', '03-05'], ['CO23', '一般预警', '03-05'], ['测点6', '超高预警', '03-05'], ['测点65', '超高预警', '03-05'], ['温度4', '一般预警', '03-05'], ['测点61', '一般预警', '03-05'], ['测点87', '一般信息', '03-05'], ], index: false, // columnWidth: [150, 80, 150, 150], headerBGC: '#3d9dd45d', oddRowBGC: '#009acd10', evenRowBGC: '#009acd05', align: ['center', 'center', 'center'], }); // export const pumpMonitorData = [ // { // title: '运行状态', // code: 'CentrifugalPump_PU_CBStatus', // type: 'sign', // }, // { // title: '启动准备', // code: 'CentrifugalPump_PU_Ready', // type: 'sign', // }, // { // title: '电压(V)', // code: 'CentrifugalPump_PU_SysVoltage', // type: '', // }, // { // title: 'A相电流(A)', // code: 'CentrifugalPump_PU_Ia', // type: '', // }, // { // title: 'B相电流(A)', // code: 'CentrifugalPump_PU_Ib', // type: '', // }, // { // title: 'C相电流(A)', // code: 'CentrifugalPump_PU_Ic', // type: '', // }, // ]; export const pumpMonitorData = [ { title: '断路器状态', code: 'Starter_CBStatus', type: 'sign', }, { title: '合闸失败', code: 'Starter_CloseFail', type: 'warning', }, { title: 'A相电流(A)', code: 'Starter_Ia', type: '', }, { title: 'B相电流(A)', code: 'Starter_Ib', type: '', }, { title: 'C相电流(A)', code: 'Starter_Ic', type: '', }, { title: 'AB电压(V)', code: 'Starter_Uab', type: '', }, { title: '健康信号', code: 'Starter_Ready', type: 'sign', }, ]; export const waterPumpData = [ { title: '运行状态', code: 'WaterfloodPump_CBStatus', type: 'sign', }, { title: '启动准备', code: 'WaterfloodPump_Ready', type: 'sign', }, { title: '电压(V)', code: 'WaterfloodPump_SysVoltage', type: '', }, ]; export const dewateringPumpData = [ { title: '运行状态', code: 'DewateringPump_CBStatus', type: 'sign', }, { title: '启动准备', code: 'DewateringPump_Ready', type: 'sign', }, { title: '电压(V)', code: 'DewateringPump_SysVoltage', type: '', }, ]; export const valveCtrlType = [ { title: '进水阀', code: 'WaterInValve1', }, { title: '排水阀', code: 'WaterOutValve2', }, { title: '进气阀', code: 'AirInValve1', }, { title: '排气阀', code: 'AirOutValve2', }, ]; export const valveCtrl = [ { title: '开启', code: '_HMIOpen', }, { title: '关闭', code: '_HMIClose', }, { title: '停止', code: '_HMIStop', }, { title: '复位', code: '_Reset', }, ]; export const stateWarningHeader = ['设备名称', '开限位', '关限位', '开输出', '关输出']; export const stateHeader = ['设备名称', '是否健康', '开失败', '关失败', '控制方式']; export const valveWarningState = [ { title: '开限位', code: '_OpenLimit', defaultValue: '-', }, { title: '关限位', code: '_CloseLimit', defaultValue: '-', }, { title: '开输出', code: '_OnOutput', defaultValue: '-', }, { title: '关输出', code: '_OffOutput', defaultValue: '-', }, ]; export const valveState = [ { title: '是否健康', code: '_Healthy', defaultValue: '-', }, { title: '开失败', code: '_OpenFail', defaultValue: '-', }, { title: '关失败', code: '_CloseFail', defaultValue: '-', }, { title: '控制方式', code: '_CtrlMode', defaultValue: '-', }, ]; export const pumpCtrlType = [ { title: '瓦斯泵', code: 'CentrifugalPump', }, { title: '排水泵', code: 'DewateringPump', }, ]; export const publicPumpCtrlType = [ { title: '注水泵', code: 'WaterfloodPump', }, ]; export const PumpCtrlItems = [ { title: '启动', code: '_SwitchOn', }, { title: '停止', code: '_SwitchOff', }, { title: '短路测试', code: '_HMIShortTest', }, { title: '漏电测试', code: '_HMILeakageTest', }, ]; export const modelMonitor = [ { title: '泵站输入管道内工混流量(m³/min)', code: 'mixedTraffic', }, { title: '泵站内瓦斯(%CH₄)', code: 'gas2', }, { title: '泵站输入管道内标况流量(m³/min)', code: 'standardTraffic', }, { title: '泵站输入管道内瓦斯(%CH₄)', code: 'gas3', }, { title: '泵站输入管道内工混累计(m³)', code: 'totalGasDrainage', }, { title: '泵站管道输出瓦斯(%CH₄)', code: 'gas4', }, { title: '泵站输入管道内一氧化碳(ppm)', code: 'coVal', }, { title: '泵站管路出口30米处瓦斯(%CH₄)', code: 'gas1', }, { title: '泵站内温度(℃)', code: 'temp', }, { title: '泵站输入管道内温度(℃)', code: 'pipeTemp', }, ]; export const getModelMonitorTags = () => { const { sysOrgCode } = useGlobSetting(); // const sysOrgCode = 'sdmtjtcctrk'; if (sysOrgCode !== 'sdmtjtcctrk') { return [ { domId: 'jsf1', title: '进水阀1#', code: 'CentrifugalPump1_WaterInValve1_OpenLimit', type: 'sign', // value: '0', position: [-5.26, 0.28, 0.6], }, { domId: 'jsf2', title: '进水阀2#', code: 'CentrifugalPump2_WaterInValve1_OpenLimit', type: 'sign', // value: '0', position: [-8.75, 0.3, 0.6], }, { domId: 'csf1', title: '出水阀1#', code: 'CentrifugalPump1_WaterOutValve2_OpenLimit', type: 'sign', // value: '0', position: [-5.74, 0.35, 0.27], }, { domId: 'csf2', title: '出水阀2#', code: 'CentrifugalPump2_WaterOutValve2_OpenLimit', type: 'sign', // value: '0', position: [-9.42, 0.35, 0.3], }, { domId: 'jqf1', title: '进气阀1#', code: 'CentrifugalPump1_AirInValve1_OpenLimit', type: 'sign', // value: '0', position: [-4.41, 1.28, 0.03], }, { domId: 'jqf2', title: '进气阀2#', code: 'CentrifugalPump2_AirInValve1_OpenLimit', type: 'sign', // value: '0', position: [-7.7, 1.31, -0.14], }, { domId: 'cqf1', title: '出气阀1#', code: 'CentrifugalPump1_AirOutValve2_OpenLimit', type: 'sign', // value: '0', position: [-6.2, 1.55, 0.06], }, { domId: 'cqf2', title: '出气阀2#', code: 'CentrifugalPump2_AirOutValve2_OpenLimit', type: 'sign', // value: '0', position: [-9.58, 1.55, -0.13], }, ]; } else { return [ { domId: 'jsf1', title: '进水阀1#', code: 'CentrifugalPump1_WaterInValve1_OpenLimit', type: 'sign', // value: '0', position: [-5.26, 0.28, 0.6], }, { domId: 'jsf2', title: '进水阀2#', code: 'CentrifugalPump2_WaterInValve1_OpenLimit', type: 'sign', // value: '0', position: [-8.75, 0.3, 0.6], }, { domId: 'csf1', title: '出水阀1#', code: 'CentrifugalPump1_WaterOutValve2_OpenLimit', type: 'sign', // value: '0', position: [-5.74, 0.35, 0.27], }, { domId: 'csf2', title: '出水阀2#', code: 'CentrifugalPump2_WaterOutValve2_OpenLimit', type: 'sign', // value: '0', position: [-9.42, 0.35, 0.3], }, { domId: 'jqf1', title: '进气阀1#开度', code: 'CentrifugalPump1_AirInValve1_OpenLimit', type: 'value', // value: '0', position: [-4.41, 1.28, 0.03], }, { domId: 'jqf2', title: '进气阀2#开度', code: 'CentrifugalPump2_AirInValve1_OpenLimit', type: 'value', // value: '0', position: [-7.7, 1.31, -0.14], }, { domId: 'cqf1', title: '出气阀1#开度', code: 'CentrifugalPump1_AirOutValve2_OpenLimit', type: 'value', // value: '0', position: [-6.2, 1.55, 0.06], }, { domId: 'cqf2', title: '出气阀2#开度', code: 'CentrifugalPump2_AirOutValve2_OpenLimit', type: 'value', // value: '0', position: [-9.58, 1.55, -0.13], }, ]; } }; export function getComponent() { const { sysOrgCode } = useGlobSetting(); // const sysOrgCode = 'sdmtjtcctrk'; let gasPumpHome; switch (sysOrgCode) { case 'sdmtjtbetmk': // 布尔台 gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHome.vue')); return gasPumpHome; case 'sdmtjtcctrk': // 布尔台 gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHomeCC.vue')); return gasPumpHome; default: gasPumpHome = defineAsyncComponent(() => import('./components/gasPumpHome.vue')); return gasPumpHome; } } export async function getMonitorData(deviceType) { const { sysOrgCode } = useGlobSetting(); // const sysOrgCode = 'sdmtjtcctrk'; switch (sysOrgCode) { case 'sdmtjtcctmk': return await import('./gasPump.dataCc'); case 'sdmtjtcctrk': if (deviceType == 'pump_under') { return await import('./gasPump.dataCc2_1'); } else if (deviceType == 'pump_under_31') { return await import('./gasPump.dataCc2_2'); } default: //默认 if (deviceType == 'pump_over') { return await import('./gasPump.dataCc2_1'); } else if (deviceType == 'pump_under') { return await import('./gasPump.dataCc2_2'); } } } interface deviceChildType { title: string; key: string[]; childTitle: string[]; } interface propertyListType { title: string; type: string; code: string; } export interface devicePropertyType { type: string; title: string; stateHeader: []; children: deviceChildType[]; list: propertyListType[]; }