<template>
  <BasicModal v-bind="$attrs" @register="registerModal" title="文件详情" width="1200px" :showOkBtn="false">
    <el-divider content-position="left">{{ dataTo.taskName }}</el-divider>
    <div>
      <el-divider content-position="left">项目计划资料详情</el-divider>
      <PlanFileDetail :planinfoid="planinfoid" :stage="1" />
      <el-divider content-position="left">项目计划审批文件列表</el-divider>
      <PlanFileDetail :planinfoid="planinfoid" :stage="2" />
      <div v-if="dataTo.isfinish == 1">
        <ApprovalDetails :projectid="planinfoid" :stage="processName" />
      </div>
    </div>
  </BasicModal>
</template>
<script lang="ts" name="Detailpage" setup>
import { ref,defineProps, onMounted } from 'vue'
import { BasicModal, useModalInner } from '@/components/Modal';
import {getProcessName} from "./projectPlan.api"
import ApprovalDetails from "../../ProcessApprovalSubPage/component/ApprovalDetails.vue"
import PlanFileDetail from "@/views/ProcessApprovalSubPage/component/PlanFileDetail.vue";

const [registerModal, { closeModal }] = useModalInner(init);
let dataTo = defineProps(["planinfoid", "taskName", "isfinish"])
console.log("wwwwwwwwwwww", dataTo)
let processName = ref("")
onMounted(async () => {
  // processName.value =await getProcessName(dataTo.planinfoid)
})
async function init(data) {
  processName.value =await getProcessName({pid:data.planinfoid})
}


</script>
<style></style>
