|
|
@@ -8,6 +8,11 @@
|
|
|
<span class="table-meta-chip is-selected">已选 {{ selectedRowKeysRef.length }} 条</span>
|
|
|
</div>
|
|
|
<div class="table-toolbar__actions">
|
|
|
+ <a-button class="task-log-btn" type="default" @click="openTaskLog">
|
|
|
+ <Icon icon="i-ant-design:file-text-outlined" />
|
|
|
+ 查看日志
|
|
|
+ <span v-if="taskLogCount" class="task-log-btn__count">{{ taskLogCount }}</span>
|
|
|
+ </a-button>
|
|
|
<Popconfirm title="是否确认删除选中的导入记录?" @confirm="handleDeleteSelected()">
|
|
|
<a-button v-if="selectedRowKeysRef.length > 0" danger class="batch-delete-btn" type="default">
|
|
|
<Icon icon="i-ant-design:delete-outlined" color="error" /> 删除 ({{ selectedRowKeysRef.length }})
|
|
|
@@ -36,6 +41,13 @@
|
|
|
:initial-sheet-id="currentLogSheetId"
|
|
|
/>
|
|
|
|
|
|
+ <TaskLogModal
|
|
|
+ v-model:open="taskLogModalOpen"
|
|
|
+ :logs="taskLogMemory.logs"
|
|
|
+ :batch-id="taskLogMemory.batchId"
|
|
|
+ :updated-at="taskLogMemory.updatedAt"
|
|
|
+ />
|
|
|
+
|
|
|
<AiRejectModal
|
|
|
v-model:open="aiRejectOpen"
|
|
|
:job-id="aiRejectRecord?.aiJobId ?? null"
|
|
|
@@ -47,7 +59,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts" setup name="ViewsSysEmpUserList">
|
|
|
- import { h, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
|
+ import { computed, h, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
|
|
import type { PropType } from 'vue';
|
|
|
import { Popconfirm } from 'ant-design-vue';
|
|
|
import AnalysisPagination from '@/core/components/AnalysisPagination/src/AnalysisPagination.vue';
|
|
|
@@ -56,7 +68,7 @@
|
|
|
import { useDesign } from '@/core/hooks/web/useDesign';
|
|
|
import { useGo } from '@/core/hooks/web/usePage';
|
|
|
import { useMessage } from '@/core/hooks/web/useMessage';
|
|
|
- import { useEmitter } from '@/core/store/modules/case';
|
|
|
+ import { useEmitter, useUserStore } from '@/core/store/modules/case';
|
|
|
import { PageEnum } from '@/core/enums/pageEnum';
|
|
|
import type { FormProps } from '@/core/components/Form';
|
|
|
import type { FileInfo } from '@/types';
|
|
|
@@ -66,7 +78,13 @@
|
|
|
import componentSetting from '@/core/settings/componentSetting';
|
|
|
import CleanLogModal from './components/CleanLogModal.vue';
|
|
|
import AiRejectModal from './components/AiRejectModal.vue';
|
|
|
- import { resetImportProgressSession, setCleanFlowSource } from './importProgressSession';
|
|
|
+ import TaskLogModal from './components/TaskLogModal.vue';
|
|
|
+ import {
|
|
|
+ getTaskLogMemory,
|
|
|
+ resetImportProgressSession,
|
|
|
+ setCleanFlowSource,
|
|
|
+ type TaskLogMemory,
|
|
|
+ } from './importProgressSession';
|
|
|
|
|
|
const props = defineProps({
|
|
|
treeCodes: Array as PropType<string[]>,
|
|
|
@@ -80,6 +98,7 @@
|
|
|
const { prefixCls } = useDesign('case-import-list');
|
|
|
const go = useGo();
|
|
|
const emitter = useEmitter();
|
|
|
+ const userStore = useUserStore();
|
|
|
const { createMessage } = useMessage();
|
|
|
const CASE_DATA_REFRESH_EVENT = 'case-data:refresh';
|
|
|
const CASE_IMPORT_FILE_REFRESH_EVENT = 'case-import-file:refresh';
|
|
|
@@ -92,6 +111,15 @@
|
|
|
const logModalOpen = ref(false);
|
|
|
const currentLogFileInfos = ref<FileInfo[]>([]);
|
|
|
const currentLogSheetId = ref<string>('');
|
|
|
+ /** 最近一次清洗/治理任务日志(模块内存,不落存储) */
|
|
|
+ const taskLogModalOpen = ref(false);
|
|
|
+ const readTaskLogMemory = () => getTaskLogMemory(undefined, userStore.getCaseInfo?.id);
|
|
|
+ const taskLogMemory = ref<TaskLogMemory>(readTaskLogMemory());
|
|
|
+ const taskLogCount = computed(() => taskLogMemory.value.logs.length);
|
|
|
+ const openTaskLog = () => {
|
|
|
+ taskLogMemory.value = readTaskLogMemory();
|
|
|
+ taskLogModalOpen.value = true;
|
|
|
+ };
|
|
|
/** AI 清洗失败明细:按 sheet 最新 job 查 ai_clean_reject */
|
|
|
const aiRejectOpen = ref(false);
|
|
|
const aiRejectRecord = ref<Partial<FileInfo> | null>(null);
|
|
|
@@ -384,6 +412,7 @@
|
|
|
|
|
|
const handleImportListRefresh = () => {
|
|
|
hasLoadedOnActivate.value = true;
|
|
|
+ taskLogMemory.value = readTaskLogMemory();
|
|
|
syncTableLayout();
|
|
|
void reload();
|
|
|
};
|