
//生产基站载波数据，9个载波，载波编号1-9
export function genCarrierIdList() {
    let dataList = []
    let item = { "label": '请选择', value: 0 }
    dataList.push(item)

    for (let i = 1; i < 10; i++) {
        item = {}
        item.label = i.toString() + "号载波"
        item.value = i
        dataList.push(item)
    }

    return dataList
}

//生产基站时隙数据，4个时隙，时隙编号1-4
export function genTimeslotList() {
    let dataList = []
    let item = { "label": '请选择', value: 0 }
    dataList.push(item)

    for (let i = 1; i < 5; i++) {
        item = {}
        item.label = i.toString() + "号时隙"
        item.value = i
        dataList.push(item)
    }

    return dataList
}

//生产大楼编号数据，最多100幢大楼
export function genBuildIdList() {
    let dataList = []
    let item = { "label": '请选择', value: 0 }
    dataList.push(item)

    for (let i = 0; i < 100; i++) {
        item = {}
        item.label = (i + 1).toString() + "号大楼"
        item.value = (i + 1)
        dataList.push(item)
    }

    return dataList
}

//生产楼层编号数据，最多地下15层，地面100层
export function genLayerIdList() {
    let dataList = []
    let strText = ""
    let item = {}

    for (let i = -30; i < 301; i++) {
        item = {}
        if (i < 0) {
            let layerid = -1 * i
            strText = "负" + layerid.toString() + "层";
        } else if (i == 0) {
            strText = '请选择'
        } else {
            strText = i.toString() + "层";
        }

        item.label = strText
        item.value = i

        dataList.push(item)
    }

    return dataList
}

//生产分区编号数据，最多100个分区
export function genBlockIdList() {
    let dataList = []
    let item = { "label": '请选择', value: 0 }
    dataList.push(item)

    for (let i = 1; i < 101; i++) {
        item = {}
        item.label = i.toString() + "号分区"
        item.value = i
        dataList.push(item)
    }

    return dataList
}

//生产定位类型数据
export function genLocationTypeIdList() {
    let dataList = []
    let item = {}

    item = { "label": '一维定位', value: 1 }
    dataList.push(item)

    item = { "label": '二维定位', value: 2 }
    dataList.push(item)

    item = { "label": '融合定位', value: 3 }
    dataList.push(item)

    return dataList
}

//设备类型
export function genBtsTypeList() {
    let dataList = []
    let item = { "label": '请选择', value: 0 }
    dataList.push(item)

    item = { "label": '声波基站', value: 1 }
    dataList.push(item)

    item = { "label": '同步基站', value: 2 }
    dataList.push(item)

    item = { "label": '同步中继', value: 3 }
    dataList.push(item)

    return dataList
}

//设备状态
export function genBtsStatusList() {
    let dataList = []
    let item = { "label": '请选择', value: 0 }
    dataList.push(item)

    item = { "label": '离线', value: 1 }
    dataList.push(item)

    item = { "label": '在线', value: 2 }
    dataList.push(item)

    return dataList
}

//同步基站中心频率
export function genCenterFreqList() {
    let baseFreq = 402.250
    let centerFreq = 0
    let dataList = []

    for (let i = 0; i < 250; i++) {
        let item = {}
        centerFreq = baseFreq + 0.250 * i
        item.label = centerFreq.toFixed(3) + "mHz"
        item.value = i
        dataList.push(item)
    }

    return dataList
}

//同步发射功率
export function genSyncTxPowerList() {
    let dataList = []

    for (let i = -10; i < 21; i++) {
        let item = {}
        item.label = i.toString() + "dBm"
        item.value = i
        dataList.push(item)
    }

    return dataList
}

//DA增益
export function genDaGainList() {
    let tmpNumber = 0
    let dataList = []
    let item = { "label": '请选择', value: 0 }
    dataList.push(item)

    for (let i = 255; i > 128; i--) {
        item = {}
        tmpNumber = (i - 255) * 0.5
        item.label = tmpNumber.toString() + "dB"
        item.value = i
        dataList.push(item)
    }

    return dataList
}
