<template>
    <div>
        <el-divider content-position="left">项目审批详情</el-divider>
        <BasicTable @register="registerTable" />
    </div>
</template>
    
<script lang="ts" name="ApprovalDetails" setup>
//ts语法
import { defineProps } from 'vue';
import { BasicTable } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { approveStartProcessColumns } from "../../myWork/inComplete/inComplete.data";
import { queryProcessInfo } from '../../myWork/inComplete/inComplete.api';


let dataTo = defineProps(["processInstanceId","stage","projectid"])
//我的待办表格组件
const { tableContext } = useListPage({
  tableProps: {
    size: 'small',//紧凑型表格
    title: '流程审批情况',
    api: queryProcessInfo,
    columns: approveStartProcessColumns,
    showActionColumn: false,
    useSearchForm: false,
    beforeFetch(params) {
      if(dataTo.stage){
        params.stage = dataTo.stage
        params.projectid = dataTo.projectid
      }else{
        params.processInstanceId = dataTo.processInstanceId

      }
    },
  },
});
// 流程审批情况表格绑定注册
const [registerTable] = tableContext;

</script>
<style scoped></style>