<script lang="ts" setup>
import { onMounted } from 'vue'

const props = defineProps({
  data: {
    type: Object as PropType<any>,
    required: true,
  },
  taskTableData: {
    type: Array,
    default: () => [[]],
  },
})
onMounted(() => {
  console.log(props.data)
  console.log(props.taskTableData, 'taskTableData')
})
</script>

<template>
  <div class="wrap">
    <div class="info-header">
      <div class="left_box">
        <div class="title">
          审查记录信息
        </div>
      </div>
    </div>
    <div class="content">
      <n-timeline>
        <n-timeline-item color="#507AFD">
          <template #default>
            <div class="time">
              完成时间：2023-10-20 13:00:01
            </div>
          </template>
        </n-timeline-item>
        <n-timeline-item color="#507AFD">
          <template #default>
            <div class="card">
              <n-collapse arrow-placement="right">
                <template #header-extra>
                  审批结果：不合格
                </template>
                <n-collapse-item title="收起" name="1">
                  <div class="item">
                    <div class="header">
                      <SvgIcon class="icon" name="approve" size="16" />
                      <div class="title">
                        一级审批
                      </div>
                    </div>
                    <div class="col-content">
                      <div class="col-item">
                        <div class="label label1">
                          <div class="point" />审批时间：2022-12-10 12:00:09
                        </div>
                        <div class="label label2">
                          审批人：张三天
                        </div>
                        <div class="label label3">
                          审批结果：通过
                        </div>
                        <div class="label">
                          备注：--
                        </div>
                      </div>
                    </div>
                  </div>
                </n-collapse-item>
              </n-collapse>
            </div>
          </template>
        </n-timeline-item>
      </n-timeline>
    </div>
  </div>
</template>

<style lang="less" scoped>
  .info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    .left_box {
      display: flex;
      align-items: center;
      .title {
        display: flex;
        align-items: center;
        font-size: 16px;
        font-family: PingFang SC, PingFang SC-Medium;
        font-weight: Medium;
        text-align: left;
        color: #333333;
        line-height: 22px;

        &:before {
          content: "";
          width: 4px;
          height: 18px;
          background: #507afd;
          border-radius: 3px;
          display: inline-block;
          margin-right: 10px;
        }
      }
    }
  }

  .card{
    background: #f9fafc;
    padding: 16px;
  }

  .point{
    width: 4px;
    height: 4px;
    background: #999999;
    border-radius: 50%;
    margin-right: 6px;
  }

  .header{
    display: flex;
    align-items: center;
    margin-bottom: 12px;

    .icon{
      margin-right: 10px;
    }
  }

  .col-item{
    display: flex;
    align-items: center;
    padding-left: 26px;

    .label{
      display: flex;
      align-items: center;
      font-size: 14px;
      font-family: PingFang SC, PingFang SC-Regular;
      font-weight: Regular;
      text-align: center;
      color: #666666;
    }

    .label1{
      width: 305px;
    }
    .label2{
      width: 194px;
    }
    .label3{
      width: 208px;
    }
  }
</style>
