<template>
  <view class="p-3">
    <!-- 交付物名称 -->
    <view class="flex justify-between">
      <view class="relative">
        {{ deliverData ? deliverData.deliverName : '' }}审核状态
      </view>

      <!-- 折叠按钮 -->
      <u-icon name="arrow-right" @click="openDeliverHistory"></u-icon>
    </view>

    <!-- <checkFormModal :data="checkModal" @hide="checkModal.mode = 'HIDE'" @submit-end="$emit('check-success')" /> -->
  </view>
</template>

<script setup>
import { ref, reactive, inject, computed } from 'vue';
import { useStore } from 'vuex';
// import checkFormModal from './check-form-modal-second.vue';

const store = useStore();
const deliverData = inject('deliver');
const task = inject('task');
// defineEmits(['check-success']);
const domain = computed(() => store.state.domain);
const checkers = computed(() => store.state.role.members); // 审核人可选列表

// const checkModal = reactive({
//   mode: 'HIDE', // HIDE->隐藏 RESOLVE->通过 REJECT->驳回
//   deliverRecordId: () => (deliverData.value ? deliverData.value.deliverRecordId : ''), // 交付物记录id
// });

// 查看历史记录
function openDeliverHistory() {
  const { deliverId } = deliverData.value;
  uni.navigateTo({ url: `/pages/submitLog/submitLog?deliverId=${deliverId}&deliverData=${JSON.stringify(deliverData.value)}&task=${JSON.stringify(task)}&url=${domain.value}` });
}

// 跳转到审核记录页面
// function openMoreRecords() {
//   const { deliverRecordId } = deliverData.value;
//   uni.navigateTo({ url: `/pages/checkLog/checkLog?deliverRecordId=${deliverRecordId}` });
// }
</script>
