<template>
  <div class="detail-base">
    <t-card title="基本信息" :bordered="false" class="info-block">
      <t-descriptions :column="4">
        <t-descriptions-item label="证件照">
          <div slot="content">
            <img :src="$store.state.user.apiUrl+info.photo_image" style="width: 100px;height: 100px">
          </div>
        </t-descriptions-item>
        <t-descriptions-item label="会员姓名" :content="info.nikename"></t-descriptions-item>
        <t-descriptions-item label="头衔" :content="info.position_name"></t-descriptions-item>
        <t-descriptions-item label="手机号" :content="info.phone"></t-descriptions-item>
        <t-descriptions-item label="性别">
          <div slot="content">
            {{info.gender==1?"男":"女"}}
          </div>
        </t-descriptions-item>
        <t-descriptions-item label="出生日期" :content="info.birth_time"></t-descriptions-item>
        <t-descriptions-item label="籍贯" :content="info.jiguan"></t-descriptions-item>
        <t-descriptions-item label="民族" :content="info.nation"></t-descriptions-item>
        <t-descriptions-item label="政治面貌" :content="info.political"></t-descriptions-item>
        <t-descriptions-item label="毕业院校" :content="info.institution"></t-descriptions-item>
        <t-descriptions-item label="学历" :content="info.education"></t-descriptions-item>
        <t-descriptions-item label="学位" :content="info.academic_degree"></t-descriptions-item>

      </t-descriptions>
    </t-card>
    <t-card title="个人信息" :bordered="false" class="info-block">
      <t-descriptions :column="2">
        <t-descriptions-item label="身份证正面照">
          <div slot="content">
            <t-image-viewer v-model="visible" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.cardz_image]">
              <template #trigger="{ open }">
                <div class="tdesign-demo-image-viewer__ui-image" @click="open">
                  <img alt="test" :src="$store.state.user.apiUrl+info.cardz_image" class="tdesign-demo-image-viewer__ui-image--img" />
                </div>
              </template>
            </t-image-viewer>
          </div>
        </t-descriptions-item>
        <t-descriptions-item label="身份证反面照">
          <div slot="content">
            <img :src="'http://192.168.3.130/'+info.cardf_image">
          </div>
        </t-descriptions-item>
        <t-descriptions-item label="身份证号码" :content="info.card_number"></t-descriptions-item>
        <t-descriptions-item label="工作单位" :content="info.work_unit"></t-descriptions-item>
        <t-descriptions-item label="单位职务" :content="info.unit_position"></t-descriptions-item>
        <t-descriptions-item label="微信号" :content="info.wx_number"></t-descriptions-item>
        <t-descriptions-item label="邮箱地址" :content="info.mailbox"></t-descriptions-item>
        <t-descriptions-item label="固定电话" :content="info.fixed_telephone"></t-descriptions-item>
        <t-descriptions-item label="其他社会职务" :content="info.other_social_positions"></t-descriptions-item>
        <t-descriptions-item label="其他联系人" :content="info.other_contacts"></t-descriptions-item>
        <t-descriptions-item label="主要成就以及获奖情况" :content="info.achievement_award"></t-descriptions-item>
      </t-descriptions>
    </t-card>
    <t-card title="企业信息" :bordered="false" class="info-block">
      <t-descriptions :column="2">
        <t-descriptions-item label="营业执照">
          <div slot="content">
            <t-image-viewer v-model="visible" :draggable="true" mode="modeless" :images="[$store.state.user.apiUrl+info.business_license_image]">
              <template #trigger="{ open }">
                <div class="tdesign-demo-image-viewer__ui-image" @click="open">
                  <img alt="test" :src="$store.state.user.apiUrl+info.business_license_image" class="tdesign-demo-image-viewer__ui-image--img" />
                </div>
              </template>
            </t-image-viewer>
          </div>
        </t-descriptions-item>
        <t-descriptions-item label="统一社会信用代码" :content="info.unified_code">
        </t-descriptions-item>
        <t-descriptions-item label="企业性质" :content="info.enterprise_nature"></t-descriptions-item>
        <t-descriptions-item label="企业网址" :content="info.enterprise_website "></t-descriptions-item>
        <t-descriptions-item label="是否上市">
          <div slot="content">
            {{info.if_list==1?"否":"是"}}
          </div>
        </t-descriptions-item>
        <t-descriptions-item label="企业注册地" :content="info.enterprise_location"></t-descriptions-item>
        <t-descriptions-item label="上年度营业额" :content="info.previous_revenue+'万'"></t-descriptions-item>
        <t-descriptions-item label="上年度纳税额" :content="info.previous_tax+'万'"></t-descriptions-item>
        <t-descriptions-item label="上年度净利润" :content="info.previous_profit+'万'"></t-descriptions-item>
        <t-descriptions-item label="上年度公益性捐赠支出" :content="info.previous_donation+'万'"></t-descriptions-item>
        <t-descriptions-item label="企业介绍" :content="info.enterprise_Introduction"></t-descriptions-item>
        <t-descriptions-item label="业务介绍" :content="info.introdiction"></t-descriptions-item>
        <t-descriptions-item label="企业所获荣誉以及专利" :content="info.enterorise_honor"></t-descriptions-item>
        <t-descriptions-item label="其他企业任职传况" :content="info.qitaqiyerenzhiqingkuang"></t-descriptions-item>

        <t-descriptions-item label="是否建立团组织">
          <div slot="content">
            {{info.if_organization==1?"否":"是"}}
          </div>
        </t-descriptions-item>
        <template v-if="info.if_organization==0">
          <t-descriptions-item label="团组织性质" :content="info.nature"></t-descriptions-item>
          <t-descriptions-item label="建团时间" :content="info.jiantuan_time"></t-descriptions-item>
          <t-descriptions-item label="建团人数" :content="info.jiantuan_number"></t-descriptions-item>
          <t-descriptions-item label="青年人数" :content="info.youth_number"></t-descriptions-item>
          <t-descriptions-item label="上级团组织" :content="info.superior_nature"></t-descriptions-item>
          <t-descriptions-item label="批复文件" :content="info.documents_file"></t-descriptions-item>
          <t-descriptions-item label="团委负责人信息" :content="info.tuanweifuzerenxinxi"></t-descriptions-item>
          <t-descriptions-item label="建团时间" :content="info.jiantuan_time"></t-descriptions-item>
        </template>

      </t-descriptions>
    </t-card>
  </div>
</template>
<script lang="ts">
export default {
  data() {
    return {
      visible:false,
      info:{},
      member_id:0,
    }
  },
  mounted() {
    this.member_id=this.$route.query.id;
    this.getInfo();
  },
  methods: {
    getInfo() {
      this.$request
        .post("/member/find",{member_id:this.member_id})
        .then( (res) => {
          console.log(res);
          this.info=res.data;
        })
        .catch((e) => {
          console.log(e);
        });
    },
    onSubmit(){
      this.getList();
    },
  }
}
</script>
<style scoped lang="less">
  .info-block{
    margin-bottom: 20px;
  }
</style>
