From 9836d6d9bde266c1e79333d505e1f218567e7ffe Mon Sep 17 00:00:00 2001 From: 月夜 <768242801@qq.com> Date: 星期一, 11 十一月 2024 15:10:24 +0800 Subject: [PATCH] 优化:字典缓存使用Map代替Array,更高效 --- src/components/Process/approvalRecord.vue | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/Process/approvalRecord.vue b/src/components/Process/approvalRecord.vue index 1610f27..bb4ed91 100644 --- a/src/components/Process/approvalRecord.vue +++ b/src/components/Process/approvalRecord.vue @@ -62,24 +62,22 @@ const loading = ref(false); const visible = ref(false); const historyList = ref<Array<any>>([]); -const deleteReason = ref<string>(''); const tabActiveName = ref('bpmn'); const bpmnViewRef = ref<BpmnView>(); //鍒濆鍖栨煡璇㈠鎵硅褰� -const init = async (instanceId: string) => { +const init = async (businessKey: string | number) => { visible.value = true; loading.value = true; tabActiveName.value = 'bpmn'; historyList.value = []; - processApi.getHistoryRecord(instanceId).then((resp) => { - historyList.value = resp.data.historyRecordList; - deleteReason.value = resp.data.deleteReason; + processApi.getHistoryRecord(businessKey).then((resp) => { + historyList.value = resp.data; loading.value = false; }); await nextTick(() => { - bpmnViewRef.value.init(instanceId); + bpmnViewRef.value.init(businessKey); }); }; -- Gitblit v1.9.3