<template>
  <div :class="[$style.wrapHeight, $style.cover]">
    <div :class="$style.rowHeight">
      <a-card :class="$style.cardBox">
        <a-form layout="inline">
          <a-form-item label="组织机构:">
            <SdGroupPicker
              ref="dwRelSelect"
              v-model="mainSendUnit"
              :single="true"
              :read-only="false"
              style="width: 300px"
              @change="changeUnit"
            />
          </a-form-item>
          <a-form-item label="时间范围:">
            <a-date-picker style="width: 300px" />
          </a-form-item>
          <a-form-item>
            <a-button type="primary">
              搜索
            </a-button>
          </a-form-item>
        </a-form>
        <div :class="$style.marginTop">
          <a-table :columns="columns" :data-source="tableData" bordered>
            <a slot="auditReport" slot-scope="text">报告链接</a>
          </a-table>
        </div>
      </a-card>
    </div>
  </div>
</template>

<script>
import components from './_import-components/audit-cover-situation-import'
import SdGroupPicker from '@/common/components/sd-group-picker.vue'
export default {
  name: 'AuditCoverSituation',
  metaInfo: {
    title: 'AuditCoverSituation',
  },
  components: {
    ...components,
    SdGroupPicker,
  },
  data() {
    return {
      mainSendUnit: [],
      columns: [
        {
          title: '单位名称',
          dataIndex: 'name',
        },
        {
          title: '单位简称',
          dataIndex: 'shortName',
        },
        {
          title: '上次被审计时间',
          dataIndex: 'lastAuditTime',
        },
        {
          tilte: '被审计年度',
          dataIndex: 'auditYear',
        },
        {
          title: '原审计报告',
          dataIndex: 'auditReport',
          scopedSlots: { customRender: 'auditReport' },
        },
      ],
      tableData: [
        {
          name: 'xxxxxxx',
          shortName: 'xxxxxxx',
          lastAuditTime: 'xxxxxxx',
          auditYear: 'xxxxxxx',
          auditReport: 'xxxxxxx',
        },
        {
          name: 'xxxxxxx',
          shortName: 'xxxxxxx',
          lastAuditTime: 'xxxxxxx',
          auditYear: 'xxxxxxx',
          auditReport: 'xxxxxxx',
        },
      ],
    }
  },
  methods: {
    changeUnit() {},
  },
}
</script>

<style module lang="scss">
@use '@/common/design' as *;

.wrap-height {
  position: relative;
  height: 100%;

  .row-height {
    display: flex;
    flex: auto;
    gap: 10px;
    min-height: 100%;
  }
}

.cover {
  :global(.projectlist .ant-table-empty .ant-table-body) {
    overflow-x: hidden;
  }
  .card-box {
    width: 100%;
  }
  .margin-top {
    margin-top: 20px;
  }
}
</style>
