|
|
|
@ -488,6 +488,12 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
|
{
|
|
|
|
|
title = "层板";
|
|
|
|
|
@observable m_Option: LayerBoardOption = Object.assign({}, DefaultLayerBoardConfig);
|
|
|
|
|
@observable grooveOption: IGrooveOption = {
|
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
};
|
|
|
|
|
@observable layerNailOption: LayerNailOption = Object.assign({}, DefaultNailOption);
|
|
|
|
|
uiLayerNailOption: IUiOption<LayerNailOption>;
|
|
|
|
|
constructor()
|
|
|
|
@ -513,6 +519,13 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.RoomName] = "主卧";
|
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.CabinetName] = "下柜";
|
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.BigHole] = FaceDirection.Back;
|
|
|
|
|
let grooveOption: IGrooveOption = {
|
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
};
|
|
|
|
|
Object.assign(this.grooveOption, grooveOption);
|
|
|
|
|
}
|
|
|
|
|
InitConfigs()
|
|
|
|
|
{
|
|
|
|
@ -527,6 +540,10 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
|
config.option.calcRightShrink = "1";
|
|
|
|
|
config.nailData.depth = 11;
|
|
|
|
|
config.nailData.isInBack = false;
|
|
|
|
|
config.grooveData.knifeRadius = "3";
|
|
|
|
|
config.grooveData.grooveAddWidth = "0";
|
|
|
|
|
config.grooveData.grooveAddLength = "0";
|
|
|
|
|
config.grooveData.grooveAddDepth = "0";
|
|
|
|
|
config.processData.drillType = DrillType.None;
|
|
|
|
|
config.processData.highDrill = Array(4).fill(DrillType.None);
|
|
|
|
|
configs["活动层板"] = config;
|
|
|
|
@ -537,6 +554,7 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
|
{
|
|
|
|
|
let newConfig = super.SaveConfig();
|
|
|
|
|
newConfig.nailData = toJS(this.layerNailOption);
|
|
|
|
|
newConfig.grooveData = toJS(this.grooveOption);
|
|
|
|
|
return newConfig;
|
|
|
|
|
}
|
|
|
|
|
UpdateOption(cof: IConfigOption<LayerBoardOption>)
|
|
|
|
@ -549,7 +567,7 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
|
cof.option.calcHeight = "W";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (cof.option.version < 2)
|
|
|
|
|
if (cof.option.version < 2)
|
|
|
|
|
{
|
|
|
|
|
cof.option.calcSpaceSize = cof.option.spaceSize.toString();
|
|
|
|
|
cof.option.calcLeftShrink = cof.option.leftShrink.toString();
|
|
|
|
@ -557,16 +575,34 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
|
cof.option.calcFrontShrink = cof.option.frontShrink.toString();
|
|
|
|
|
cof.option.version = 2;
|
|
|
|
|
}
|
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
|
if (cof.option.version < 3)
|
|
|
|
|
{
|
|
|
|
|
Object.assign(this.grooveOption, {
|
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
});
|
|
|
|
|
cof.option.version = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!cof.nailData)
|
|
|
|
|
cof.nailData = this.layerNailOption;
|
|
|
|
|
else
|
|
|
|
|
Object.assign(this.layerNailOption, cof.nailData);
|
|
|
|
|
if (this.uiLayerNailOption)
|
|
|
|
|
Object.assign(this.uiLayerNailOption, DataAdapter.ConvertUIData(this.layerNailOption));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!cof.grooveData)
|
|
|
|
|
{
|
|
|
|
|
cof.grooveData = this.grooveOption;
|
|
|
|
|
let newConfig = super.SaveConfig();
|
|
|
|
|
newConfig.grooveData = toJS(this.grooveOption);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
Object.assign(this.grooveOption, cof.grooveData);
|
|
|
|
|
|
|
|
|
|
if (this.uiLayerNailOption)
|
|
|
|
|
Object.assign(this.uiLayerNailOption, DataAdapter.ConvertUIData(this.layerNailOption));
|
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
|
}
|
|
|
|
|
HasInvailValue()
|
|
|
|
|
{
|
|
|
|
@ -579,9 +615,29 @@ export class VerticalBoardStore extends BoardStore<VerticalBoardOption>
|
|
|
|
|
title = "立板";
|
|
|
|
|
|
|
|
|
|
@observable m_Option: VerticalBoardOption = Object.assign({}, DefaultVerticalBoardConfig);
|
|
|
|
|
@observable grooveOption: IGrooveOption = {
|
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
};
|
|
|
|
|
SaveConfig()
|
|
|
|
|
{
|
|
|
|
|
let newConfig = super.SaveConfig();
|
|
|
|
|
newConfig.grooveData = toJS(this.grooveOption);
|
|
|
|
|
return newConfig;
|
|
|
|
|
}
|
|
|
|
|
InitOption()
|
|
|
|
|
{
|
|
|
|
|
Object.assign(this.m_Option, DefaultVerticalBoardConfig);
|
|
|
|
|
let grooveOption: IGrooveOption = {
|
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
};
|
|
|
|
|
Object.assign(this.grooveOption, grooveOption);
|
|
|
|
|
|
|
|
|
|
super.InitOption();
|
|
|
|
|
}
|
|
|
|
|
UpdateOption(cof: IConfigOption<VerticalBoardOption>)
|
|
|
|
@ -593,6 +649,26 @@ export class VerticalBoardStore extends BoardStore<VerticalBoardOption>
|
|
|
|
|
cof.option.calcBottomShrink = cof.option.bottomShrink.toString();
|
|
|
|
|
cof.option.version = 2;
|
|
|
|
|
}
|
|
|
|
|
if (cof.option.version < 3)
|
|
|
|
|
{
|
|
|
|
|
Object.assign(this.grooveOption, {
|
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
});
|
|
|
|
|
cof.option.version = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!cof.grooveData)
|
|
|
|
|
{
|
|
|
|
|
cof.grooveData = this.grooveOption;
|
|
|
|
|
let newConfig = super.SaveConfig();
|
|
|
|
|
newConfig.grooveData = toJS(this.grooveOption);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
Object.assign(this.grooveOption, cof.grooveData);
|
|
|
|
|
|
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|