<template >
  <div class="panel panel-default auto repair-info-content">
    <div class="panel-body">
      <div class="panel panel-default well" v-for="row in model">
        <div class="bg-info">
          <div class="row form-group">
            <div class="col-xs-12 col-sm-12 col-md-12">
              <div class="row">
                <div class="col-xs-6 col-sm-6 col-md-6">
                  电话: {{row.f_user_phone}}
                </div>
                <div class="col-xs-6 col-sm-6 col-md-6">
                  安检状态: {{row.f_entry_status}}
                </div>
                <div class="col-xs-6 col-sm-6 col-md-6">
                  安检时间: {{row.f_offsite_time}}
                </div>
                <div class="col-xs-12 col-sm-12 col-md-12">
                  安检员: {{row.f_checker_name}}
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import {HttpResetClass} from 'vue-client'

  export default {
    title: '查询用户',
    data() {
      return {
        model: [],
        show: false,
        row: Object
      }
    },
    props: {
      user: {
        type: Object
      },
      f_userinfo_id: ''
    },
    methods: {
      getmodel() {
        let http = new HttpResetClass()
        http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
          data: {
            items: '*',
            tablename: 't_check_paper',
            condition: `f_userinfoid  = '${this.f_userinfo_id}'`,
            orderitem: 'f_offsite_time desc'
          }
        }).then((res) => {
          this.model = res.data
        })
      },
      back() {

      }
    },
    watch: {
      'user'(val) {
        if (this.user) {
          if (!(this.user.isNuN)) {
            this.model = []
            this.getmodel()
          }
        }
      },
      'f_userinfo_id'() {
        if (this.f_userinfo_id) {
          this.model = []
          this.getmodel()
        }
      }
    },
    ready() {
      this.getmodel()
    }
  }
</script>
<style>
  .app-botton {
    position: fixed;
    background: #87b2dd;
    color: #FFF;
    padding: 8px;
    text-align: center;
    font-size: 1.2em;
    z-index: 10;
    opacity: 0.5;
    bottom: 50px;
    margin-top: -10px;
    height: 40px;
  }
</style>
