const headers = { "modbus-tcp": [{ InfoPointName: "从站地址", InfoPointCode: "SlaveID", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "寄存器地址(16位)", InfoPointCode: "Address", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "寄存器个数", InfoPointCode: "Quantity", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "位(单双字节)", InfoPointCode: "Convtype", InputMode: "B1", DataSource: [{ Code: "单字", Name: "单字" }, { Code: "双字", Name: "双字" } ], Visible: true, FirstTag: "" }, { InfoPointName: "翻转规则", InfoPointCode: "ReverseRule", InputMode: "B1", Visible: true, FirstTag: "" } ], "bacnet-ip": [{ InfoPointName: "设备标识", InfoPointCode: "DeviceID", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "实例功能号", InfoPointCode: "InstanceNumber", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "数据类型", InfoPointCode: "Type", DataSource: [{ Code: "analogInput", Name: "analogInput" }, { Code: "analogOutput", Name: "analogOutput" } ], InputMode: "B1", Visible: true, FirstTag: "" } ], "opc": [{ InfoPointName: "点位编码(统一标识)", InfoPointCode: "Item", InputMode: "B1", Visible: true, FirstTag: "" }], "knx": [{ InfoPointName: "组地址", InfoPointCode: "GroupAddress", InputMode: "B1", Visible: true, FirstTag: "" }], "mqtt": [{ InfoPointName: "deviceId", InfoPointCode: "DeviceId", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "item", InfoPointCode: "Item", InputMode: "B1", Visible: true, FirstTag: "" } ], "amqp": [{ InfoPointName: "Exchange", InfoPointCode: "Exchange", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "type", InfoPointCode: "Type", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "Routingkey", InfoPointCode: "RoutingKey", InputMode: "B1", Visible: true, FirstTag: "" } ] } let common = [{ InfoPointName: "原始点位描述", InfoPointCode: "Description", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "值/单位说明", InfoPointCode: "ValueDescription", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "位置标签", InfoPointCode: "LocationFlag", InputMode: "myOwn", Visible: true, FirstTag: "" }, { InfoPointName: "备注", InfoPointCode: "Remarks", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "原始数值", InfoPointCode: "", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "采集时间", InfoPointCode: "", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "使用", InfoPointCode: "Used", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "设备类型关键字", InfoPointCode: "KeyEquipmentType", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "设备参数关键字", InfoPointCode: "KeyEquipmentParameter", InputMode: "B1", Visible: true, FirstTag: "" }, { InfoPointName: "设备标识", InfoPointCode: "EquipmentMark", InputMode: "B1", Visible: true, FirstTag: "" } ] /** * * @param {数据源类型} type * * @returns headersArr */ function getHeaderSetting(type) { return headers[type].concat(common) } export default getHeaderSetting