<template>
  <div class="col-sm-12" >
    <div class="col-sm-6" style="overflow-y: scroll;width: 40%">
      <user-base-info :row="row"  @cancel-main="cancel"></user-base-info>
    </div>
  </div>
</template>

<script>
  import {HttpResetClass} from 'vue-client'
  import UserBaseInfo from './UserBaseInfo'
  // 导入IC卡相关查询界面
  // import ChangeMeterQueryUser from './ic_detail/ChangeMeterQueryUser'
  // import ChargeQueryUser from './ic_detail/ChargeQueryUser'
  // import ChargeRecordQueryUser from './ic_detail/ChargeRecordQuery'
  // import FillCardQueryUser from './ic_detail/FillCardQueryUser'
  // import FillGasQueryUser from './ic_detail/FillGasQueryUser'
  // import HandQueryUser from './ic_detail/HandQueryUser'
  // import OtherChargeQueryUser from './ic_detail/OtherChargeQueryUser'
  // import RecordQueryUser from './ic_detail/RecordQueryUser'
  // import TransferQueryUser from './ic_detail/TransferQueryUser'
  //
  // // 导入物联网相关查询
  // import QueryInstruct from './iot_detail/QueryInstruct'
  // import WatchCollection from './iot_detail/WatchCollection'
  // import WatchWarning from './iot_detail/WatchWarning'

  export default {
    title: '用户详细信息',
    props: ['f_userid'],
    components: {
      UserBaseInfo
    },
    data () {
      return {
        row: null,
        name: '收费查询'
      }
    },
    ready(){
      this.search()
    },
    methods: {
      async search () {
        let http = new HttpResetClass()

        let condition = `f_userid = '${this.f_userid}'`

        let getBaseInfo = await http.load('POST','rs/sql/iot_getUserBaseData',
          {data: {condition: condition}}, {resolveMsg: null, rejectMsg: '获取基本信息出错'})
        this.row = getBaseInfo.data[0]
      },

      cancel(val) {
        this.$emit('cancel-main', val)
      },

      butOper (val) {
        this.name = val
      }
    },
    watch: {
      'f_userid' () {
        this.search()
      }
    }
  }
</script>


