| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ProDialog, ProTableV2, ProDialogTableWrapper } from '@bole-core/components'; |
| | | import { useTableLogList } from '@/hooks'; |
| | | import { ProDialog, ProTableV2, ProDialogTableWrapper, defineColumns } from '@bole-core/components'; |
| | | |
| | | defineOptions({ |
| | | name: 'OperateHistoryLogDialog', |
| | |
| | | type Props = { |
| | | modelValue: boolean; |
| | | relationId: string; |
| | | operateType?: number; |
| | | getList: (pageIndex?: number) => Promise<void>; |
| | | proTableProps: any; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | |
| | | () => props.modelValue, |
| | | async (visible, oldVisible) => { |
| | | if (!oldVisible && visible) { |
| | | await getList(); |
| | | state.loading = false; |
| | | await props.getList(); |
| | | } |
| | | } |
| | | ); |
| | | |
| | | function onDialogClose() { |
| | | state.loading = true; |
| | | } |
| | | const OperateHistoryTableColumns = defineColumns([ |
| | | { id: '1', enCode: 'createdUser', name: '操作人' }, |
| | | { id: '2', enCode: 'createdTime', name: '操作时间', width: 180 }, |
| | | { id: '3', enCode: 'operate', name: '操作' }, |
| | | { id: '4', enCode: 'content', name: '操作内容' }, |
| | | ]); |
| | | |
| | | const { getList, proTableProps, state, OperateHistoryTableColumns } = useTableLogList({ |
| | | relationId: toRef(props, 'relationId'), |
| | | operateType: toRef(props, 'operateType'), |
| | | }); |
| | | function onDialogClose() {} |
| | | </script> |