const headers = {
    "modbus-tcp": [{
            InfoPointName: "*slave_id",
            InfoPointCode: "SlaveId",
            InputMode: "B1",
            Visible: true,
            FirstTag: ""
        },
        {
            InfoPointName: "*registers_address ",
            InfoPointCode: "RegistersAddress",
            InputMode: "B1",
            Visible: true,
            FirstTag: ""
        },
        {
            InfoPointName: "*registers_quality",
            InfoPointCode: "RegistersQuality",
            InputMode: "B1",
            Visible: true,
            FirstTag: ""
        },
        {
            InfoPointName: "*convert_type",
            InfoPointCode: "ConvertType",
            InputMode: "select",
            DataSource: [{
                    Code: "1",
                    Name: "位"
                },
                {
                    Code: "2",
                    Name: "单字"
                }, {
                    Code: "3",
                    Name: "双字"
                }, {
                    Code: "4",
                    Name: "四字"
                }
            ],
            Visible: true,
            FirstTag: ""
        },
        {
            InfoPointName: "翻转规则",
            InfoPointCode: "RevertRule",
            InputMode: "B1",
            Visible: true,
            FirstTag: ""
        }
    ],
    "bacnet-ip": [{
            InfoPointName: "*device_id",
            InfoPointCode: "DeviceId",
            InputMode: "B1",
            Visible: true,
            FirstTag: ""
        },
        {
            InfoPointName: "*instance_number",
            InfoPointCode: "InstanceNumber",
            InputMode: "B1",
            Visible: true,
            FirstTag: ""
        },
        {
            InfoPointName: "*data_type",
            InfoPointCode: "DataType",
            DataSource: [{
                    Code: "analogInput",
                    Name: "analogInput"
                },
                {
                    Code: "analogOutput",
                    Name: "analogOutput"
                },
                {
                    Code: "analogValue",
                    Name: "analogValue"
                },
                {
                    Code: "binaryInput",
                    Name: "binaryInput"
                },
                {
                    Code: "binaryOutput",
                    Name: "binaryOutput"
                },
                {
                    Code: "binaryValue",
                    Name: "binaryValue"
                },
                {
                    Code: "multiStateInput",
                    Name: "multiStateInput"
                },
                {
                    Code: "multiStateOutput",
                    Name: "multiStateOutput"
                },
                {
                    Code: "multiStateValue",
                    Name: "multiStateValue"
                }
            ],
            InputMode: "select",
            Visible: true,
            FirstTag: ""
        }
    ],
    "opc": [{
        InfoPointName: "*item",
        InfoPointCode: "Item",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    }],
    "knx": [{
        InfoPointName: "*group_address",
        InfoPointCode: "GroupAddress",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    }],
    "mqtt": [{
        InfoPointName: "*topic",
        InfoPointCode: "Topic",
        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: "*routing_key ",
            InfoPointCode: "RoutingKey",
            InputMode: "B1",
            Visible: true,
            FirstTag: ""
        }
    ],
    "common": [{
        InfoPointName: "*地址详情",
        InfoPointCode: "JoinedInfo",
        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: "DataType",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "仪表ID",
        InfoPointCode: "Meter",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "功能ID",
        InfoPointCode: "Func",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "整合ID",
        InfoPointCode: "Meterfunc",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "*获取方式",
        InfoPointCode: "Method",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "读写",
        InfoPointCode: "ReadWrite",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "位置标签",
        InfoPointCode: "LocationFlag",
        InputMode: "myOwn",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "备注",
        InfoPointCode: "Remarks",
        InputMode: "B1",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "原始数值",
        InfoPointCode: "pointValue",
        InputMode: "X",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "采集时间",
        InfoPointCode: "pointDate",
        InputMode: "X",
        Visible: true,
        FirstTag: ""
    },
    {
        InfoPointName: "启用",
        InfoPointCode: "Used",
        InputMode: "switchBtn",
        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