<template>
  <div>
    <div class="dialog-h-content scroll-h">

      <div v-if="initLoading"
           class="m-row">
        <div class="m-info">
          <div class="info-prop">
            <span class="info-title-2">所属网格：</span>
            <span>{{ fmData.gridName }}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">所属房屋：</span>
            <span>{{ fmData.allName?fmData.allName:'--' }}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">姓名：</span>
            <span>{{ fmData.name}}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">手机号：</span>
            <span>{{ fmData.mobile?fmData.mobile:'--'}}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">证件号：</span>
            <span>{{ fmData.idCard?fmData.idCard:'--'}}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">性别：</span>
            <span>{{fmData.genderName?fmData.genderName:'--' }}</span>
          </div>

          <div class="info-prop">
            <span class="info-title-2">年龄：</span>
            <span>{{ fmData.age?fmData.age:'--' }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">迁入日期：</span>
            <span>{{ fmData.inTime?fmData.inTime:'--' }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">迁入原因：</span>
            <span>{{ fmData.inReason?fmData.inReason:'--' }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">来源地：</span>
            <span>{{ fmData.sourceAddress?fmData.sourceAddress:'--' }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">详细地址：</span>
            <span>{{ fmData.address? fmData.address:'--'}}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">迁移证号码：</span>
            <span>{{ fmData.moveNumber?fmData.moveNumber:'--' }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">户主姓名：</span>
            <span>{{ fmData.householderName? fmData.householderName:'--'  }}</span>
          </div>
          <div class="info-prop">
            <span class="info-title-2">与户主关系：</span>
            <span>{{ fmData.householderRelationName? fmData.householderRelationName:'--' }}</span>
          </div>

        </div>
      </div>

    </div>

  </div>
</template>

<script>
import { requestPost } from "@/js/dai/request";

export default {
  data () {
    return {
      initLoading: false,
      fmData: {},

    }
  },
  components: {},
  computed: {

  },
  props: {},
  watch: {},

  async mounted () {
    console.log('mounted-----我执行了')

  },

  methods: {

    async initForm (id) {

      await this.getDatail(id)

      this.initLoading = true

    },
    async getDatail (moveInId) {
      let url = '/epmetuser/icMoveIn/detail'

      const params = {
        moveInId: moveInId || ''
      }
      const { data, code, msg } = await requestPost(url, params)
      if (code === 0) {
        this.fmData = { ...data }


      } else this.$message.error(msg)
    },


  }
}
</script>

<style lang="scss" scoped >
@import "@/assets/scss/modules/management/detail-main.scss";
</style>

