<template>
  <form novalidate class="form-horizontal  span auto compatible" style="width: 100%;margin: auto" v-if="showUser">

    <div class="auto">
      <table class="table table-striped table-bordered" style="margin-bottom: 6px">
        <thead>
        <tr>
          <th colspan="6" style="text-align: center">用户基本信息</th>
        </tr>
        </thead>
        <tbody>
        <tr>
          <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户编号:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ userinfo.f_userinfo_code }}</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户名称:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ userinfo.f_user_name }}</td>
        </tr>
        <tr>
          <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">证件号码:</td>
          <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;width: 83%">{{ userinfo.f_idnumber }}</td>
        </tr>
        <tr>
          <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户电话:</td>
          <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px;width: 83%">{{ userinfo.f_user_phone }}</td>
        </tr>
        <tr>
          <td style="text-align: center;border: #E9E9E9 solid 1px;width: 17%">用户类型:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px;width: 33%">{{ userinfo.f_check_type }}</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">区 / 县:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_slice_area }}</td>
        </tr>
        <tr>
          <td style="text-align: center;border: #E9E9E9 solid 1px">街 道:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_street }}</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">楼 号:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_building }}</td>
        </tr>
        <tr>
          <td style="text-align: center;border: #E9E9E9 solid 1px">单 元:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_unit }}</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">楼 层:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_floor }}</td>
        </tr>
        <tr>
          <td style="text-align: center;border: #E9E9E9 solid 1px">门 牌 号 :</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_room }}</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">用户性质:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_userproperties }}</td>
        </tr>
        <tr>
          <td style="text-align: center;border: #E9E9E9 solid 1px">备注信息:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_comments }}</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">小区名称:</td>
          <td style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_residential_area }}</td>
        </tr>
        <tr>
          <td colspan="1" style="text-align: center;border: #E9E9E9 solid 1px">详细住址:</td>
          <td colspan="3" style="text-align: center;border: #E9E9E9 solid 1px">{{ userinfo.f_address }}</td>
        </tr>
        </tbody>
      </table>
    </div>
  </form>
</template>

<script>
  import Vue from 'vue'
  import * as Util from '../../Util'
  import RadioGroup from 'vue-client/src/vue-strap/src/radioGroup'
  import Radio from 'vue-client/src/vue-strap/src/radioBtn'

  export default {
    title: '用户基本信息',
    data() {
      return {
        parentData: this.$parent.data,
        userinfo:this.$parent.data,
        model: {
          f_user_name: '',
          f_userinfo_code: '',
          f_area: '',
          f_address: '',
          f_user_phone: '',
          f_check_type:'',
          f_idnumber:'',
          f_street: '',
          f_building: '',
          f_unit: '',
          f_floor: '',
          f_room: '',
          f_residential_area: '',
          f_comments:'',
          f_userproperties:''
        },
        user_properties:this.$appdata.getParam('安检用户性质'),
        // user_properties:[
        //   {label: '平房', value: '平房'},
        //   {label: '多层', value: '多层'}
        // ],
        showUser: true,
        showInfo: false,
        /*user: {f_userinfo_id: this.$parent.$parent.data.f_userinfoid},*/
        // room_style : this.$appdata.getParam('民用房屋结构'),
        // heating_style : this.$appdata.getParam('供暖方式')
        // room_style: [
        //   {label: '平房', value: '平房'},
        //   {label: '多层', value: '多层'},
        //   {label: '小高层', value: '小高层'},
        //   {label: '别墅', value: '别墅'},
        //   {label: '独院', value: '独院'}
        // ],
        heating_style: [
          {label: '热力公司集中供暖', value: '热力公司集中供暖'},
          {label: '小区集中供暖', value: '小区集中供暖'},
          {label: '客户自行供暖', value: '客户自行供暖'},
          {label: '其他供暖', value: '其他供暖'}
        ],
        // room_style : [
        //   {label: '地上', value: '地上'},
        //   {label: '半地下', value: '半地下'},
        //   {label: '地下', value: '地下'},
        //   {label: '楼顶', value: '楼顶'}
        // ],
        noncivil_style : [
          {label: '餐饮用户', value: '餐饮用户'},
          {label: '公福用户', value: '公福用户'},
          {label: '锅炉用户', value: '锅炉用户'},
          {label: '工业用户', value: '工业用户'}
        ],
        userproperties:''
      }
    },
    ready() {

      //tag
      if(Vue.config.safecheck != undefined) {
        if (Vue.config.safecheck.ApproveConfig != undefined) {
          if (Vue.config.safecheck.ApproveConfig.userproperties != undefined) {
            this.userproperties = Vue.config.safecheck.ApproveConfig.userproperties
          }else{
            this.userproperties = false
          }
        }
      }
      Object.assign(this.model, this.model, this.userinfo)
    },

    methods: {
    }
  }
</script>
<style scoped>
.table-striped thead tr th {
  background-color: rgb(223, 237, 251);
  padding: 10px;
  border-left: solid 0px #dae4f2;
  border-top: solid 1px #dae4f2;
  border-right: none;
  border-bottom: none;
  text-align: center;
  color: black;
}
</style>
