<template>
  <div>
    <table-double-view :keyValue="keyValueDouble" :data="dataBasic"></table-double-view>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import TableDoubleView from '@/public/TableDoubleView.vue';
import { NativeUI } from "@/public/ts/NativeUI";
import nettyApi from "@/constants/api/ms-netty/netty.api.ts";
import IF from "@/public/factory/InterFaceFactory";
/**
 * @Description 详细信息
 * @Author JiangTao
 * @Date 2021-11-10 下午 04:28
 */
@Component({
  name: "DetailedInformation",
  components: { TableDoubleView },
})
export default class DetailedInformation extends Vue {

  keyValueDouble = {
    EDUEXPERIENCE: '最高学历',
    EDUDEGREE: '最高学位',
    MARRIAGE: '婚姻状态',
    POPULATION: '家庭人口(人)',
    ISFARMER: '是否农户',
    HAVECHILDREN: '有无子女',
    HOUSEHOLD: '供养人口(人)',
    ISLOACTIAL: '是否本地户籍',
    CITYSTARTDATE: '本城市居住起始日期',
    CECUSREGISTERTYPE: '户籍性质',
    HABITATIONSTATUS: '居住状况',
    NATIVEPLACE: '户籍地址',
    FAMILYADD: '常住地址',
    MOBILETELEPHONEn: '手机号码',
    FAMILYTEL: '住址电话',
    EMAILADD: '电子邮件'
  }
  dataBasic = {}
  mounted() {
    this.selectPersonInfo();
  }
  // 查询个人详细信息
  selectPersonInfo() {
    const param = {
      CUSTOMERID: this.$route.query.CUSTOMERID,
      tc: nettyApi.TRADE_CODE.selectPersonInfoDetail
    };
    NativeUI.showWaiting('正在查询...');
    return IF.transferDataInter(nettyApi.commonRq, param).then((res: any) => {
      console.log(res);
      NativeUI.closeWaiting();
      if (res.rc == '1') {
        this.dataBasic = res;
        (this.dataBasic as any).POPULATION = Number(res.POPULATION);
        (this.dataBasic as any).HOUSEHOLD = Number(res.HOUSEHOLD);
        (this.dataBasic as any).MOBILETELEPHONEn = this.$route.query.tel;
      } else {
        NativeUI.toast(res.msg);
      }
    });
  }
}
</script>

<style scoped>
.basic-information-table {
  width: 100%;
  margin: 0 auto;
}
table tr td {
  font-family: "Arial Normal", "Arial";
  font-size: 16px;
  color: #333333;
  padding: 1% 1%;
}
.basic-information-table tr > td:nth-child(1),
.basic-information-table tr > td:nth-child(3) {
  text-align: right;
  color: #999999;
}
</style>