<template>
  <auth-wrap class="regmeeting-content-info-container" ref="authWrap">
    <template slot="content">
      <u-cell-group>
        <u-cell title="姓名" :label="meetingInfo.usrName">
        </u-cell>
      </u-cell-group>
      <u-cell-group>
        <u-cell title="单位名称" :label="meetingInfo.orgUnitName">
        </u-cell>
      </u-cell-group>
      <u-cell-group>
        <u-cell title="职务" :label="meetingInfo.uniLevel">
        </u-cell>
      </u-cell-group>
      <u-cell-group>
        <u-cell title="联系电话" :label="meetingInfo.tel">
        </u-cell>
      </u-cell-group>
      <u-cell-group>
        <u-cell title="邮箱" :label="meetingInfo.email">
        </u-cell>
      </u-cell-group>
      <u-cell-group>
        <u-cell title="是否参加现场调研">
          <view
              slot="label"
          >
            <u-tag
                plain size="mini"
                :text="SYS_YES_NO[meetingInfo.conferenceFlag].name"
                :type="meetingInfo.conferenceFlag == SYS_YES_NO['0'].value ? 'success' : 'warning'"
                shape="circle">
            </u-tag>
          </view>
        </u-cell>
      </u-cell-group>
      <u-cell-group v-if="meetingInfo.conferenceFlag == SYS_YES_NO['0'].value">
        <u-cell title="调研会场" :label="meetingInfo.usrName">
        </u-cell>
      </u-cell-group>
      <u-cell-group>
        <u-cell title="审核状态">
          <view
              slot="label"
          >
            <u-tag
                plain size="mini"
                :text="REVIEW_STATUS[meetingInfo.reviewState].name"
                :type="REVIEW_STATUS[meetingInfo.reviewState].tag"
                shape="circle">
            </u-tag>
          </view>
        </u-cell>
      </u-cell-group>
      <u-cell-group v-if="REVIEW_STATUS.noPass.value == meetingInfo.reviewState">
        <u-cell title="不通过原因" :label="meetingInfo.reviewMsg">
        </u-cell>
      </u-cell-group>
    </template>
  </auth-wrap>
</template>

<script>
import { fetchUsrMeetingInfo } from '@/common/api';
import { REVIEW_STATUS, SYS_YES_NO } from '@/common/EnumConst';
import AuthWrap from '@/components/AuthComp/index.vue';

export default {
  name: 'content',
  components: { AuthWrap },
  props: {},
  data() {
    return {
      SYS_YES_NO,
      REVIEW_STATUS,
      meetingInfo: {},
    };
  },
  created() {
  },
  onLoad(res) {
    // 登录返回之后的页面
    if (res) {
      this.queryParams = res;
    }
    this.getUsrMeetingInfo();
  },
  methods: {
    async getUsrMeetingInfo() {
      const { data } = await fetchUsrMeetingInfo();
      this.meetingInfo = data;
    },
  },
};
</script>
<style lang="scss" src="./index.scss" />;
