<template>
  <BaseDialog
    width="900px"
    :isShow.sync="isCertDetailDialog"
    title="详情"
    @close="close"
    :appendToBody="true"
    :confirmStatus="false"
    :isShowFooter="false"
  >
    <div style="overflow-y: auto; max-height: 550px">
      <div class="content" v-for="(item, index) in tableSet" :key="index">
        <div v-if="item.title === '基本信息'">
          <div class="title" :style="{ 'margin-top': index === 0 ? '0' : '' }">
            {{ item.title }}
          </div>
          <detailList
            :column="3"
            :border="true"
            :listLabel="item.listLabel"
            :listData="listData"
          ></detailList>
        </div>
        <div v-if="item.title === '工作信息'">
          <div class="title">
            {{ item.title }}
          </div>
          <detailList
            :column="3"
            :border="true"
            :listLabel="item.listLabel"
            :listData="listData"
          ></detailList>
        </div>
        <div v-if="item.title === '身份证'">
          <div class="title">
            {{ item.title }}
          </div>
          <detailList
            :column="3"
            :border="true"
            :listLabel="item.listLabel"
            :listData="listData"
          ></detailList>
        </div>
        <div v-if="item.title === '教育背景'">
          <div v-for="(item2, index2) in listData.staffEduBgList" :key="index2">
            <div class="title">
              {{ item.title + (index2 + 1) }}
            </div>
            <detailList
              :column="3"
              :border="true"
              :listLabel="item.listLabel"
              :listData="item2"
            ></detailList>
          </div>
        </div>
        <div v-if="item.title === '紧急联系人'">
          <div
            v-for="(item3, index3) in listData.staffEmergencyContactList"
            :key="index3"
          >
            <div class="title">
              {{ item.title + (index3 + 1) }}
            </div>
            <detailList
              :column="3"
              :border="true"
              :listLabel="item.listLabel"
              :listData="item3"
            ></detailList>
          </div>
        </div>
        <div v-if="item.title === '银行信息'">
          <div
            v-for="(item4, index4) in listData.staffBankInfoList"
            :key="index4"
          >
            <div class="title">
              {{ item.title + (index4 + 1) }}
            </div>
            <detailList
              :column="3"
              :border="true"
              :listLabel="item.listLabel"
              :listData="item4"
            ></detailList>
          </div>
        </div>
        <div v-if="item.title === '合同档案'">
          <div
            v-for="(item5, index5) in listData.staffContractArchivesList"
            :key="index5"
          >
            <div class="title">
              {{ item.title + (index5 + 1) }}
            </div>
            <detailList
              :column="3"
              :border="true"
              :listLabel="item.listLabel"
              :listData="item5"
            ></detailList>
          </div>
        </div>
      </div>
    </div>
  </BaseDialog>
</template>
  
  <script>
import detailList from "@/views/companyManagement/component/detailList";
import { tableSet } from "./data.js";
export default {
  components: { detailList },
  data() {
    return {
      tableSet: tableSet(),
      isCertDetailDialog: false,
      listData: {},
    };
  },

  mounted() {
    console.log(tableSet(), "staffInfoList");
  },
  methods: {
    openBoxs(row) {
      this.isCertDetailDialog = true;
      this.listData = row;
      console.log(row);
    },
    close() {},
  },
};
</script>
  
<style lang="scss" scoped>
.content {
  .title {
    font-weight: bold;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    color: #000;
    margin: 15px 0;
  }
}
</style>
  