<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: "BasicInformation",
  components: { TableDoubleView },
})
export default class BasicInformation extends Vue {

  keyValueDouble = {
    BIRTHDAY: '生日',
    Folk: '民族',
    CERTGOVERNMENT: '发证机关',
    COUNTRY: '国籍',
    STARTDATE: '生效日期',
    FINISHDATE: '失效日期'
  }
  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) => {
      NativeUI.closeWaiting();
      if (res.rc == '1') {
        this.dataBasic = res;
      } else {
        NativeUI.toast(res.msg);
      }
    });
  }
}
</script>

<style scoped>
.basic-information-table {
  width: 70%;
  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>
