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; }