zhengyiming
2025-02-10 958b79ed89b9e742540f714a80261d222c0fc09b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template>
  <LoadingLayout :loading="state.loading">
    <AppContainer>
      <ProTableV2 v-bind="proTableProps" :columns="column" :showOperationColumn="false">
      </ProTableV2>
    </AppContainer>
  </LoadingLayout>
</template>
 
<script setup lang="ts">
import { ProTableV2, LoadingLayout, AppContainer } from '@bole-core/components';
import { useAccess, useTableLogListByType } from '@/hooks';
import { OperateHistoryTypeEnum } from '@/constants';
 
defineOptions({
  name: 'LogListViewByType',
});
 
type Props = {
  operateHistoryType?: OperateHistoryTypeEnum;
};
 
const props = withDefaults(defineProps<Props>(), {});
 
const { column } = useAccess();
 
const route = useRoute();
const relationId = route.params.id as string;
 
onMounted(async () => {
  await getList();
  state.loading = false;
});
 
const { getList, proTableProps, state } = useTableLogListByType({
  relationId,
  operateHistoryType: toRef(props, 'operateHistoryType'),
});
</script>