ArchiveAllLog.vue 982 B

12345678910111213141516171819202122232425262728293031323334
  1. <script setup lang="ts">
  2. import { getAllLog } from "@/api/archive/archive-api";
  3. const props = defineProps<{ patNo: string; times: number }>();
  4. const data = ref([]);
  5. onMounted(async () => {
  6. data.value = await getAllLog(props.patNo, props.times);
  7. });
  8. </script>
  9. <template>
  10. <VxeTable
  11. :data="data"
  12. height="100%"
  13. :scroll-y="{ enabled: true, gt: 0 }"
  14. border
  15. :column-config="{ resizable: true }"
  16. show-overflow
  17. >
  18. <vxe-column field="[0]" title="日期" width="150"></vxe-column>
  19. <vxe-column field="[1]" title="级别" width="80">
  20. <template #default="{ row }">
  21. <span :class="`archive__log-span-${row[1]}`">{{ row[1] }}</span>
  22. </template>
  23. </vxe-column>
  24. <vxe-column field="[2]" title="操作人" width="120"></vxe-column>
  25. <vxe-column field="[3]" title="任务名" width="80"></vxe-column>
  26. <vxe-column field="[4]" title="日志信息" fixed="right"></vxe-column>
  27. </VxeTable>
  28. </template>
  29. <style lang="scss"></style>