<template>
  <a-collapse
    v-if="repairTransferList && repairTransferList.length > 0"
    v-model="activeKey"
    expand-icon-position="right"
    class="collapse-header-divide"
  >
    <a-collapse-panel key="a" :header="$t('TRANSFER_RECORD')">
      <div
        v-for="(item, index) in repairTransferList"
        :key="index"
        class="repair_order_box mb-2"
      >
        <a-descriptions class="repair_order_item">
          <!--转单人员-->
          <a-descriptions-item :label="`${$t('TRANSFER_ORDER_PERSONNEL')}`">{{
            item.transferOutUser
          }}</a-descriptions-item>
          <!--接单人员-->
          <a-descriptions-item :label="`${$t('ORDER_RECEIVE_PERSONNEL')}`">{{
            item.planAcceptUser
          }}</a-descriptions-item>
          <!--转单时间-->
          <a-descriptions-item
            :label="`${$t('EPMS_TRANSFER_ORDER')}${$t('TIME')}`"
            >{{ item.transferOutTime }}</a-descriptions-item
          >
          <!--转单原因-->
          <a-descriptions-item
            v-if="item.transferOutReason"
            :label="`${$t('TRANSFER_ORDER_REASON')}`"
          >
            {{ item.transferOutReason }}
          </a-descriptions-item>
        </a-descriptions>
      </div>
    </a-collapse-panel>
  </a-collapse>
</template>

<script>
export default {
  name: "TransferOrderCard",
  props: {
    repairTransferList: {
      type: Array,
      default: () => [],
    },
    errorLevelList: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      activeKey: "a",
    };
  },
  computed: {},
  mounted() {},
  methods: {
    formatData(data, status) {
      const result = data.find((item) => item.value === status.toString());
      return result ? result.label : "";
    },
  },
};
</script>
<style lang="less" scoped>
@import "@/assets/css/fault_repair.less";
</style>
