!1836 优化:根据板件名修改属性全选封边,全选排钻按钮与单选按钮关联

pull/1843/MERGE
黄诗津 3 years ago committed by ChenX
parent c8d553ed2a
commit 27a35e83c8

@ -60,6 +60,10 @@ export class UpdateBoardInfoModal extends React.Component<IUpdateBoardInfoModalP
this.event();
this.event = null;
}
private handleIsSelectAll = () =>
{
this.props.store.CheckIsSelectAll();
};
public render()
{
@ -208,6 +212,7 @@ export class UpdateBoardInfoModal extends React.Component<IUpdateBoardInfoModalP
<SealDrillCom
store={store}
selectOptions={selectOptions}
onChange={() => this.handleIsSelectAll()}
/>
</div>
<div style={{ width: 265 }}>

@ -1,9 +1,11 @@
import { action, observable, toJS } from "mobx";
import { EBoardKeyList } from "../../Common/BoardKeyList";
import { CheckObjectType, CheckoutValid } from "../../Common/CheckoutVaildValue";
import { DefaultUpdateInfoOption } from "../../Editor/DefaultConfig";
import { userConfig } from "../../Editor/UserConfig";
import { IUpdateBoardInfosOption } from "../Components/Board/UpdateBoardInfointerface";
import { IConfigOption } from "../Components/Board/UserConfig";
import { DRILL_KEYS } from "./BoardFindInterface";
import { DrillType, FaceDirection, LinesType } from "./BoardInterface";
import { BoardStore } from "./BoardStore";
@ -91,6 +93,7 @@ export class UpdateBoardInfosStore extends BoardStore
this.currentBoardName = name;
if (this.UIOption)
Object.assign(this.UIOption, this.m_Option);
this.CheckIsSelectAll();
}
SaveConfig()
{
@ -137,6 +140,12 @@ export class UpdateBoardInfosStore extends BoardStore
{
return CheckoutValid.HasInvailValue(this.UIOption, CheckObjectType.BF);
}
CheckIsSelectAll()
{
this.isSelectAllSealed = [EBoardKeyList.UpSealed, EBoardKeyList.DownSealed,
EBoardKeyList.RightSealed, EBoardKeyList.LeftSealed].every(k => this.m_Option.condition[k]);
this.isSelectAllDrill = DRILL_KEYS.every(k => this.m_Option.condition[k]);
}
}
export const updateBoardInfoStore = new UpdateBoardInfosStore();

Loading…
Cancel
Save