index.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <ele-page flex-table>
  3. <common-table
  4. ref="pageRef"
  5. :pageConfig="pageConfig"
  6. :columns="columns"
  7. :tools="false"
  8. >
  9. <template #toolbar>
  10. <div class="flex mb-6">
  11. <pieChart class="flex-1"></pieChart>
  12. <rank-list></rank-list>
  13. </div>
  14. </template>
  15. </common-table>
  16. </ele-page>
  17. </template>
  18. <script setup>
  19. import { ref, reactive } from 'vue';
  20. import CommonTable from '@/components/CommonPage/CommonTable.vue';
  21. import pieChart from '@/views/optimization/orderAnalysis/components/pie-chart.vue';
  22. import rankList from '@/views/optimization/orderAnalysis/components/rank-list.vue';
  23. import { useDictData } from '@/utils/use-dict-data';
  24. defineOptions({ name: 'orderCancelAnalysis' });
  25. /** 表格列配置 */
  26. const columns = ref([
  27. { label: '订单编号', prop: 'orderCode', align: 'center' },
  28. { label: '用户UID', prop: 'uid', align: 'center' },
  29. { label: '取消原因', prop: 'cancelReason', align: 'center', minWidth: 200 },
  30. { label: '取消时间', prop: 'createTime', align: 'center' }
  31. ]);
  32. /** 页面组件实例 */
  33. const pageRef = ref(null);
  34. const pageConfig = reactive({
  35. pageUrl: '/baseinfo/godown/pagelist',
  36. exportUrl: '/baseinfo/godown/export',
  37. fileName: '订单取消分析',
  38. cacheKey: 'orderCancelAnalysisTable'
  39. });
  40. //刷新表格
  41. function reload(where) {
  42. pageRef.value?.reload(where);
  43. }
  44. </script>