getMonitoringName.vue 965 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <div>
  3. <!-- 我是测试数据 -->
  4. <el-select v-model="position" placeholder="请选择设备名称">
  5. <el-option
  6. v-for="item in options"
  7. :label="options.ming_cheng"
  8. :key="item.key"
  9. :value="item.ming_cheng">
  10. </el-option>
  11. </el-select>
  12. </div>
  13. </template>
  14. <script>
  15. import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
  16. export default {
  17. data(){
  18. return{
  19. position:'',
  20. options:[]
  21. }
  22. },
  23. created(){
  24. },
  25. mounted(){
  26. this.getData()
  27. },
  28. methods:{
  29. getData(){
  30. //罗湖设备登记 当前位置 cun_fang_di_dian_ 位置去重
  31. //房间一览表
  32. let sql = "select she_bei_ming_cheng_ AS ming_cheng FROM t_sbdj GROUP BY ming_cheng"
  33. curdPost('sql',sql).then(res => {
  34. this.options = res.variables.data
  35. // console.log('设备名称',this.options)
  36. })
  37. }
  38. }
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. </style>