From 3d9babd9d3c48fb3613cccda3af3f9ae2332be84 Mon Sep 17 00:00:00 2001 From: ChenX Date: Wed, 10 Jan 2024 18:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96:=E6=B7=BB=E5=8A=A0=E5=9B=BE?= =?UTF-8?q?=E7=BA=B8=E5=AF=BC=E5=87=BA=E8=BF=9B=E5=BA=A6=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/Erp/ErpCommands.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Add-on/Erp/ErpCommands.ts b/src/Add-on/Erp/ErpCommands.ts index 26c533791..582b70297 100644 --- a/src/Add-on/Erp/ErpCommands.ts +++ b/src/Add-on/Erp/ErpCommands.ts @@ -1,4 +1,5 @@ import { Intent } from "@blueprintjs/core"; +import { runInAction } from "mobx"; import { app } from "../../ApplicationServices/Application"; import { CheckInterfereTool } from "../../Common/InterfereUtil"; import { Sleep } from "../../Common/Sleep"; @@ -25,6 +26,7 @@ import { AppConfirm } from "../../UI/Components/Common/Confirm"; import { ModalPosition } from "../../UI/Components/Modal/ModalInterface"; import { AppToaster } from "../../UI/Components/Toaster"; import { BoardStore } from "../../UI/Store/BoardStore"; +import { DownPanelStore } from "../../UI/Store/DownPanelStore"; import { InterferenceCheck } from "../CheckHoles"; import { CollsionModal } from "../DrawDrilling/CollisionModal"; import { Purge } from "../Purge"; @@ -589,13 +591,22 @@ async function getBoxFiles(entitys: Entity[]): data: CADFiler; }[] = []; - for (const g of groupList) + let process = DownPanelStore.GetInstance(); + process.StartProgress("导出图纸..."); + for (let i = 0; i < groupList.length; i++) { + let g = groupList[i]; const data = getGroupFiles(g.value.map(t => t.entity)); boxFileList.push({ roomName: g.keyList[0], boxName: g.keyList[1], data }); + runInAction(() => + { + process.progress = (i) / groupList.length; + process.progressName = `导出图纸 ${i}/${groupList.length}`; + }); await Sleep(0); } + process.EndProgress(); return boxFileList; }