const companyList = [
    {value:0,label:'广西'}  ,
    {value:1,label:'广州'}  ,
    {value:2,label:'石家庄'}  ,
    {value:3,label:'北京'}  ,
    {value:4,label:'贵州'}  ,
    {value:5,label:'昆明'}  ,
    {value:6,label:'武汉'}  ,
    {value:7,label:'新疆'}  ,
    {value:8,label:'郑州'}  ,
    {value:9,label:'内蒙古'}  ,
];

function getCompanyName(value){
    let arr = companyList.filter(v=>v.value === value);
    let title = '';
    if(arr.length > 0){title = arr[0].label}
    return title;
}

function getCompanyValueArray(){
    let arr = [];
    companyList.map(v=>{
        arr.push(v.value)
    })
    return arr;
}

module.exports = {
    companyList,
    getCompanyName,
    getCompanyValueArray
}
