zhengyiming
13 小时以前 d5dae013d54e1e74390669a88241f6b8d4c1ec18
src/components/Dialog/OperateHistoryLogDialog.vue
@@ -24,8 +24,7 @@
</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',
@@ -34,7 +33,8 @@
type Props = {
  modelValue: boolean;
  relationId: string;
  operateType?: number;
  getList: (pageIndex?: number) => Promise<void>;
  proTableProps: any;
};
const props = withDefaults(defineProps<Props>(), {
@@ -59,18 +59,17 @@
  () => 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>