优化:避免拆单导出图纸时崩溃

pull/2536/MERGE
ChenX 9 months ago
parent 215e45b3be
commit 545b49b7ba

@ -1,6 +1,7 @@
import { Intent } from "@blueprintjs/core";
import { app } from "../../ApplicationServices/Application";
import { CheckInterfereTool } from "../../Common/InterfereUtil";
import { Sleep } from "../../Common/Sleep";
import { DuplicateRecordCloning } from "../../Common/Status";
import { StoreageKeys } from "../../Common/StoreageKeys";
import { Hole } from "../../DatabaseServices/3DSolid/Hole";
@ -306,7 +307,7 @@ async function ExecChaiDan(chaiDanRoute: ErpRoutes)
return;
}
//获取柜体的图纸文件
const boxFileList = getBoxFiles(selction.selectEntityList);
const boxFileList = await getBoxFiles(selction.selectEntityList);
app.Editor.ModalManage.RenderModal(ErpView,
{
erpRoute: routeInfo,
@ -566,12 +567,12 @@ function checkBoxSize(blockList: OrderDataBlock[]): { result: boolean, warnMsg:
}
//获取房间柜体分组Entitys图纸
function getBoxFiles(entitys: Entity[]):
{
roomName: string,
boxName: string,//柜名
async function getBoxFiles(entitys: Entity[]):
Promise<{
roomName: string; boxName: string; //柜名
//柜名
data: CADFiler;
}[]
}[]>
{
const list = entitys.map(t =>
{
@ -592,6 +593,8 @@ function getBoxFiles(entitys: Entity[]):
{
const data = getGroupFiles(g.value.map(t => t.entity));
boxFileList.push({ roomName: g.keyList[0], boxName: g.keyList[1], data });
await Sleep(0);
}
return boxFileList;

Loading…
Cancel
Save