<template>
  <div>
    <!-- 我是测试数据 -->
    <el-select v-model="position" placeholder="请选择">
    <el-option
      v-for="item in options"
      :label="options.ming_cheng"
      :key="item.key"
      :value="item.ming_cheng">
    </el-option>
    <!-- {{item.ming_cheng}} -->
  </el-select>
  </div>
</template>

<script>
import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'

export default {
  data(){
    return{
      position:'',
      options:[]
    }
  },
  created(){
   
  },
  mounted(){
    this.getData()
  },
  methods:{
    getData(){
      //罗湖设备登记     当前位置 cun_fang_di_dian_   位置去重
      //房间一览表 
      let sql1 = "select cun_fang_di_dian_  as ming_cheng from t_sbdj group by ming_cheng" 
      let sql2 = 'select fang_jian_ming_ha as ming_cheng from t_jjqfjb group by ming_cheng'
      Promise.all([
        curdPost('sql',sql1),
        curdPost('sql',sql2),
      ]).then(([res1,res2]) =>{
        let data1 = res1.variables.data
        let data2 = res2.variables.data
        this.options = data1.concat(data2)
        console.log('监控位置',data1,data2,this.data)

      })
    }
  }
  

}
</script>

<style lang="scss" scoped>

</style>