<template>
    <order-page ref="pageRef" :pageConfig="pageConfig" permissionKey="completed">
        <template #toolbar>
            <el-button type="success" plain class="ele-btn-icon" :icon="DownloadOutlined"
                v-permission="'recycleOrder:completed:export'" @click="exportData">
                导出订单明细
            </el-button>
        </template>

    </order-page>
</template>

<script setup>
import { ref, reactive } from 'vue';
import { DownloadOutlined } from '@/components/icons';
import OrderPage from '@/views/recycleOrder/components/order-page-all.vue';

defineOptions({ name: 'recycleOrderCompleted' });

/** 页面组件实例 */
const pageRef = ref(null);

const pageConfig = reactive({
    pageUrl: '/order/orderInfo/done/pageList',
    exportUrl: '/order/orderInfo/done/export',
    fileName: '已完成订单',
    cacheKey: 'recycleOrderCompletedTable'
});

//导出数据
function exportData() {
    pageRef.value?.exportData('已完成订单');
}
</script>
