|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { Button, Card, Classes, Divider, InputGroup, Intent } from "@blueprintjs/core";
|
|
|
|
|
import { Button, Card, Checkbox, Classes, Divider, InputGroup, Intent } from "@blueprintjs/core";
|
|
|
|
|
import hotkeys from "hotkeys-js-ext";
|
|
|
|
|
import { action, observable } from "mobx";
|
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
@ -12,11 +12,11 @@ import { app } from "../../../ApplicationServices/Application";
|
|
|
|
|
import { arrayRemove } from "../../../Common/ArrayExt";
|
|
|
|
|
import { EBoardKeyList } from "../../../Common/BoardKeyList";
|
|
|
|
|
import { CheckObjectType, CheckoutValid } from "../../../Common/CheckoutVaildValue";
|
|
|
|
|
import { safeEval } from "../../../Common/eval";
|
|
|
|
|
import { FS } from "../../../Common/FileSystem";
|
|
|
|
|
import { KeyBoard } from "../../../Common/KeyEnum";
|
|
|
|
|
import { Log, LogType } from "../../../Common/Log";
|
|
|
|
|
import { FixedNotZero } from "../../../Common/Utils";
|
|
|
|
|
import { safeEval } from "../../../Common/eval";
|
|
|
|
|
import { CylinderHole } from "../../../DatabaseServices/3DSolid/CylinderHole";
|
|
|
|
|
import { CommandHistoryRecord } from "../../../DatabaseServices/CommandHistoryRecord";
|
|
|
|
|
import { CreateObjectData } from "../../../DatabaseServices/CreateObjectData";
|
|
|
|
@ -34,7 +34,7 @@ import { SelectSetBase } from "../../../Editor/SelectBase";
|
|
|
|
|
import { userConfig } from "../../../Editor/UserConfig";
|
|
|
|
|
import { equaln } from "../../../Geometry/GeUtils";
|
|
|
|
|
import { IHardwareType } from "../../../Production/Product";
|
|
|
|
|
import { TotalTabbarTitlesInfos, bbsEditorStore } from "../../Store/BBSEditorStore";
|
|
|
|
|
import { bbsEditorStore, TotalTabbarTitlesInfos } from "../../Store/BBSEditorStore";
|
|
|
|
|
import { EFindType } from "../../Store/BoardFindInterface";
|
|
|
|
|
import { ComposingType, FaceDirection, LinesType } from "../../Store/BoardInterface";
|
|
|
|
|
import { userConfigStore } from "../../Store/UserConfigStore";
|
|
|
|
@ -111,6 +111,9 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
|
@observable findSameTypeBrDataKey: string;
|
|
|
|
|
//是否多选/单选
|
|
|
|
|
@observable isCtrlDown: boolean = false;
|
|
|
|
|
|
|
|
|
|
@observable IsBbsCountChaidan: boolean = false;//是否统计非拆单板
|
|
|
|
|
|
|
|
|
|
processGroupMap: Map<string, ObjectId[]> = new Map();//板件加工组 按名分类 便于区分
|
|
|
|
|
|
|
|
|
|
rootElRef = React.createRef<HTMLDivElement>();
|
|
|
|
@ -138,12 +141,12 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
|
@action
|
|
|
|
|
UpdateDrillCount(brs?: (Board | IHardwareType)[])
|
|
|
|
|
{
|
|
|
|
|
const { drillCount, hardwareCount, sealCount, areaCount } = lookOverBoardInfosTool.GetCount(brs ?? this.props.boardList);
|
|
|
|
|
const { drillCount, hardwareCount, sealCount, areaCount } = lookOverBoardInfosTool.GetCount(brs ?? this.props.boardList, null, this.IsBbsCountChaidan);
|
|
|
|
|
|
|
|
|
|
this.drillCount = drillCount;
|
|
|
|
|
this.sealCount = sealCount;
|
|
|
|
|
this.hardwareCount = hardwareCount;
|
|
|
|
|
this.areaCount = areaCount;
|
|
|
|
|
this.areaCount = areaCount.filter((v) => v.count || v.count2 !== "0.00");
|
|
|
|
|
}
|
|
|
|
|
get BoardList(): Board[]
|
|
|
|
|
{
|
|
|
|
@ -304,16 +307,6 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
|
UpdateByRedoUndo(historyRec);
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (this.props.boardList.some((v) => v instanceof Board && !v.IsChaiDan))
|
|
|
|
|
{
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
message: "批量查看统计板不统计非拆单板的信息",
|
|
|
|
|
timeout: 3000,
|
|
|
|
|
intent: Intent.PRIMARY,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentWillUnmount()
|
|
|
|
|
{
|
|
|
|
@ -928,9 +921,10 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
|
str += `\t${thickness},${process[EBoardKeyList.Mat] || "[ 无 ]"},${process[EBoardKeyList.Color] || "[ 无 ]"},${process[EBoardKeyList.BrMat] || "[ 无 ]"},${d.count},${d.count2}\n`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const dataBr = this.IsBbsCountChaidan ? this.searchRes.dataBr : this.searchRes.dataBr.filter(v => v.IsChaiDan);
|
|
|
|
|
//总数统计
|
|
|
|
|
str += "\n总板数,总平方数\n";
|
|
|
|
|
str += `\t${this.searchRes.dataBr.filter(v => v.IsChaiDan).length},${FixedNotZero(this.CalcArea(), 2)}\n`;
|
|
|
|
|
str += `\t${dataBr.length},${FixedNotZero(this.CalcArea(), 2)}\n`;
|
|
|
|
|
FS.WriteFile(`${fileServer.currentFileInfo.name}批量查看板件属性.csv`, "\ufeff" + str);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -939,6 +933,7 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
|
|
|
|
|
|
render()
|
|
|
|
|
{
|
|
|
|
|
const dataBr = this.IsBbsCountChaidan ? this.searchRes.dataBr : this.searchRes.dataBr.filter(v => v.IsChaiDan);
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
className={Classes.DIALOG_CONTAINER}
|
|
|
|
@ -1009,9 +1004,19 @@ export class LookOverBoardInfosModal extends React.Component<LookOverBoardInfosM
|
|
|
|
|
</div>
|
|
|
|
|
<ModalFooter hasConfig={false}>
|
|
|
|
|
<label className={Classes.LABEL + " " + Classes.INLINE}>
|
|
|
|
|
<label>{`总计 ${this.searchRes.dataBr.filter(v => v.IsChaiDan).length} 块板, `}</label>
|
|
|
|
|
<label>{`总计 ${dataBr.length} 块板, `}</label>
|
|
|
|
|
<label>{`总计 ${this.CalcArea()}平方 `}</label>
|
|
|
|
|
</label>
|
|
|
|
|
{this.searchRes.dataBr.length > this.searchRes.dataBr.filter(v => v.IsChaiDan).length ?
|
|
|
|
|
<Checkbox
|
|
|
|
|
className={Classes.LABEL + " " + Classes.INLINE}
|
|
|
|
|
checked={this.IsBbsCountChaidan}
|
|
|
|
|
onChange={() => { this.IsBbsCountChaidan = !this.IsBbsCountChaidan; this.UpdateDrillCount(); }}
|
|
|
|
|
>
|
|
|
|
|
统计非拆单板
|
|
|
|
|
</Checkbox>
|
|
|
|
|
: null
|
|
|
|
|
}
|
|
|
|
|
<InputGroup className={"search"} type="search" placeholder="关键字查找..." dir="auto"
|
|
|
|
|
onChange={(e) =>
|
|
|
|
|
{
|
|
|
|
|