<template>
  <div class="container">
    <http-busy>
      <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xs-offset-0 col-sm-offset-0 col-md-offset-3 col-lg-offset-3 toppad" >
          <div class="panel panel-info">
            <div class="panel-heading">
              <h3 class="panel-title">安检员信息，请仔细核对</h3>
            </div>
            <div class="panel-body">
              <div class="row">
                <div class="col-md-3 col-lg-3 " align="center"> <img alt="照片" :src="imgsrc" class="img-circle img-responsive"> </div>
                <div class=" col-md-9 col-lg-9 ">
                  <table class="table">
                    <tbody>
                      <tr>
                        <td>姓名：</td>
                        <td>{{row.name}}</td>
                      </tr>
                      <tr>
                        <td>部门：</td>
                        <td>{{row.f_parentname}}</td>
                      </tr>
                      <tr>
                        <td>工号：</td>
                        <td>{{row.gonghao}}</td>
                      </tr>
                      <tr>
                        <td>联系电话：</td>
                        <td>{{row.f_fgsdianhua}}</td>
                      </tr>
                      <tr>
                        <td colspan="2" class="h4">温馨提示：请核对安检员照片和工号，如有疑问，请致电<span class="text-danger">96677</span>。</td>
                      </tr>
                    </tbody>
                  </table>
                  <button type="button" @click="goBack" class="btn btn-primary">返回</button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </http-busy>
    <div style="height:50px;"></div>
    </div>
</template>

<script>
import Vue from 'vue'

export default {
  title: '安检员信息',
  props: ['userid'],
  data() {
    return {
      row : {},
    }
  },
  computed: {
      imgsrc() {
        return Vue.staticUrl + 'db/file/' + this.userid
      }
  },
  methods: {
    goBack() {
      this.$back('test')
    },
  },
  ready() {
    this.$resetpost(Vue.url + 'sql/查找登录用户信息', {data:{userid: this.userid}}, {resolveMsg: null, rejectMsg: null}).then(
      (response) => {
        this.$set('row', response.data[0])
      }
    ).catch(
      (response) => {
        this.$set('row', response.statusText)
      }
    )
  },
}
</script>
