|
|
@ -22,6 +22,12 @@ import { ClosingStripOption, StripType } from "./OptionInterface/ClosingStripOpt
|
|
|
|
import { AnyObject, BehindBoardOption, BoardConfigOption, IBaseOption, IDrawBoardAutoCutOption, IGrooveOption, IHightDrillOption, IUiOption, LayerBoardOption, LayerNailOption, SideBoardOption, SingleBoardOption, TBBoardOption, VerticalBoardOption } from "./OptionInterface/IOptionInterface";
|
|
|
|
import { AnyObject, BehindBoardOption, BoardConfigOption, IBaseOption, IDrawBoardAutoCutOption, IGrooveOption, IHightDrillOption, IUiOption, LayerBoardOption, LayerNailOption, SideBoardOption, SingleBoardOption, TBBoardOption, VerticalBoardOption } from "./OptionInterface/IOptionInterface";
|
|
|
|
import { BehindHeightPositon } from "./OptionInterface/OptionEnum";
|
|
|
|
import { BehindHeightPositon } from "./OptionInterface/OptionEnum";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const NewDefaultGrooveDate: IGrooveOption = {
|
|
|
|
|
|
|
|
exprGrooveAddLength: "0",
|
|
|
|
|
|
|
|
exprGrooveAddWidth: "0",
|
|
|
|
|
|
|
|
exprGrooveAddDepth: "0",
|
|
|
|
|
|
|
|
exprKnifeRadius: "3",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export interface IConfigStore
|
|
|
|
export interface IConfigStore
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -402,12 +408,7 @@ export class BehindBoardStore extends BoardStore<BehindBoardOption>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title = "背板";
|
|
|
|
title = "背板";
|
|
|
|
@observable m_Option: BehindBoardOption = Object.assign({}, DefaultBehindBoardConfig);
|
|
|
|
@observable m_Option: BehindBoardOption = Object.assign({}, DefaultBehindBoardConfig);
|
|
|
|
@observable grooveOption: IGrooveOption = {
|
|
|
|
@observable grooveOption: IGrooveOption = NewDefaultGrooveDate;
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
private m_UiGrooveOption: IUiOption<IGrooveOption>;
|
|
|
|
private m_UiGrooveOption: IUiOption<IGrooveOption>;
|
|
|
|
constructor()
|
|
|
|
constructor()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -426,9 +427,13 @@ export class BehindBoardStore extends BoardStore<BehindBoardOption>
|
|
|
|
InitOption()
|
|
|
|
InitOption()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Object.assign(this.m_Option, DefaultBehindBoardConfig);
|
|
|
|
Object.assign(this.m_Option, DefaultBehindBoardConfig);
|
|
|
|
super.InitOption();
|
|
|
|
Object.assign(this.grooveOption, NewDefaultGrooveDate);
|
|
|
|
|
|
|
|
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super.InitOption();
|
|
|
|
|
|
|
|
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.RoomName] = "主卧";
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.RoomName] = "主卧";
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.CabinetName] = "下柜";
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.CabinetName] = "下柜";
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.BigHole] = FaceDirection.Back;
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.BigHole] = FaceDirection.Back;
|
|
|
@ -449,12 +454,36 @@ export class BehindBoardStore extends BoardStore<BehindBoardOption>
|
|
|
|
cof.option.calcMoveDist = cof.option.moveDist.toString();
|
|
|
|
cof.option.calcMoveDist = cof.option.moveDist.toString();
|
|
|
|
cof.option.version = 2;
|
|
|
|
cof.option.version = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, cof.grooveData);
|
|
|
|
if (cof.option.version < 3)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
cof.option.exprCount = cof.option.count.toString();
|
|
|
|
|
|
|
|
cof.option.exprThickness = cof.option.thickness.toString();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!cof.grooveData)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//如果没有初始化grooveOption
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, NewDefaultGrooveDate);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//读取版本3 的grooveOption 非表达式字段
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, {
|
|
|
|
|
|
|
|
exprGrooveAddLength: cof.grooveData.grooveAddLength,
|
|
|
|
|
|
|
|
exprGrooveAddWidth: cof.grooveData.grooveAddWidth,
|
|
|
|
|
|
|
|
exprGrooveAddDepth: cof.grooveData.grooveAddDepth,
|
|
|
|
|
|
|
|
exprKnifeRadius: cof.grooveData.knifeRadius
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cof.option.version = 3;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, cof.grooveData);
|
|
|
|
|
|
|
|
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(cof.grooveData));
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HasInvailValue()
|
|
|
|
HasInvailValue()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -482,14 +511,14 @@ export class BehindBoardStore extends BoardStore<BehindBoardOption>
|
|
|
|
cloneConfig.option.boardRelative = BrRelativePos.Back;
|
|
|
|
cloneConfig.option.boardRelative = BrRelativePos.Back;
|
|
|
|
cloneConfig.option.calcSpaceSize = "18";
|
|
|
|
cloneConfig.option.calcSpaceSize = "18";
|
|
|
|
cloneConfig.option.spaceSize = 18;
|
|
|
|
cloneConfig.option.spaceSize = 18;
|
|
|
|
cloneConfig.option.thickness = 9;
|
|
|
|
cloneConfig.option.exprThickness = "9";
|
|
|
|
cloneConfig.option.topExt = 5;
|
|
|
|
cloneConfig.option.topExt = 5;
|
|
|
|
cloneConfig.option.bottomExt = 5;
|
|
|
|
cloneConfig.option.bottomExt = 5;
|
|
|
|
cloneConfig.option.leftExt = 5;
|
|
|
|
cloneConfig.option.leftExt = 5;
|
|
|
|
cloneConfig.option.rightExt = 5;
|
|
|
|
cloneConfig.option.rightExt = 5;
|
|
|
|
cloneConfig.grooveData.grooveAddLength = "6";
|
|
|
|
cloneConfig.grooveData.exprGrooveAddLength = "6";
|
|
|
|
cloneConfig.grooveData.grooveAddWidth = "1";
|
|
|
|
cloneConfig.grooveData.exprGrooveAddWidth = "1";
|
|
|
|
cloneConfig.grooveData.grooveAddDepth = "1";
|
|
|
|
cloneConfig.grooveData.exprGrooveAddDepth = "1";
|
|
|
|
cloneConfig.processData.drillType = DrillType.None;
|
|
|
|
cloneConfig.processData.drillType = DrillType.None;
|
|
|
|
cloneConfig.processData.highDrill = Array(4).fill(DrillType.None);
|
|
|
|
cloneConfig.processData.highDrill = Array(4).fill(DrillType.None);
|
|
|
|
cloneConfig.processData.frontDrill = false;
|
|
|
|
cloneConfig.processData.frontDrill = false;
|
|
|
@ -501,7 +530,7 @@ export class BehindBoardStore extends BoardStore<BehindBoardOption>
|
|
|
|
cloneConfig.autoCutOption.isAutoCut = true;
|
|
|
|
cloneConfig.autoCutOption.isAutoCut = true;
|
|
|
|
|
|
|
|
|
|
|
|
configs["5厘薄背板"] = cloneConfig = cloneBehindData(cloneConfig);
|
|
|
|
configs["5厘薄背板"] = cloneConfig = cloneBehindData(cloneConfig);
|
|
|
|
cloneConfig.option.thickness = 5;
|
|
|
|
cloneConfig.option.exprThickness = "5";
|
|
|
|
cloneConfig.autoCutOption.isAutoCut = true;
|
|
|
|
cloneConfig.autoCutOption.isAutoCut = true;
|
|
|
|
cloneConfig.processData.highDrill = Array(4).fill(DrillType.None);
|
|
|
|
cloneConfig.processData.highDrill = Array(4).fill(DrillType.None);
|
|
|
|
|
|
|
|
|
|
|
@ -543,12 +572,7 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title = "层板";
|
|
|
|
title = "层板";
|
|
|
|
@observable m_Option: LayerBoardOption = Object.assign({}, DefaultLayerBoardConfig);
|
|
|
|
@observable m_Option: LayerBoardOption = Object.assign({}, DefaultLayerBoardConfig);
|
|
|
|
@observable grooveOption: IGrooveOption = {
|
|
|
|
@observable grooveOption: IGrooveOption = NewDefaultGrooveDate;
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
@observable layerNailOption: LayerNailOption = Object.assign({}, DefaultNailOption);
|
|
|
|
@observable layerNailOption: LayerNailOption = Object.assign({}, DefaultNailOption);
|
|
|
|
uiLayerNailOption: IUiOption<LayerNailOption>;
|
|
|
|
uiLayerNailOption: IUiOption<LayerNailOption>;
|
|
|
|
private m_UiGrooveOption: IUiOption<IGrooveOption>;
|
|
|
|
private m_UiGrooveOption: IUiOption<IGrooveOption>;
|
|
|
@ -574,22 +598,19 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
InitOption()
|
|
|
|
InitOption()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Object.assign(this.m_Option, DefaultLayerBoardConfig);
|
|
|
|
Object.assign(this.m_Option, DefaultLayerBoardConfig);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, NewDefaultGrooveDate);
|
|
|
|
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
|
|
|
|
|
|
|
|
Object.assign(this.layerNailOption, DefaultNailOption);
|
|
|
|
Object.assign(this.layerNailOption, DefaultNailOption);
|
|
|
|
super.InitOption();
|
|
|
|
|
|
|
|
if (this.uiLayerNailOption)
|
|
|
|
if (this.uiLayerNailOption)
|
|
|
|
Object.assign(this.uiLayerNailOption, DataAdapter.ConvertUIData(this.layerNailOption));
|
|
|
|
Object.assign(this.uiLayerNailOption, DataAdapter.ConvertUIData(this.layerNailOption));
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
super.InitOption();
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.RoomName] = "主卧";
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.RoomName] = "主卧";
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.CabinetName] = "下柜";
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.CabinetName] = "下柜";
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.BigHole] = FaceDirection.Back;
|
|
|
|
this.m_BoardProcessOption[EBoardKeyList.BigHole] = FaceDirection.Back;
|
|
|
|
let grooveOption: IGrooveOption = {
|
|
|
|
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, grooveOption);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
InitConfigs()
|
|
|
|
InitConfigs()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -604,10 +625,10 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
config.option.calcRightShrink = "1";
|
|
|
|
config.option.calcRightShrink = "1";
|
|
|
|
config.nailData.depth = 11;
|
|
|
|
config.nailData.depth = 11;
|
|
|
|
config.nailData.isInBack = false;
|
|
|
|
config.nailData.isInBack = false;
|
|
|
|
config.grooveData.knifeRadius = "3";
|
|
|
|
config.grooveData.exprKnifeRadius = "3";
|
|
|
|
config.grooveData.grooveAddWidth = "0";
|
|
|
|
config.grooveData.exprGrooveAddWidth = "0";
|
|
|
|
config.grooveData.grooveAddLength = "0";
|
|
|
|
config.grooveData.exprGrooveAddLength = "0";
|
|
|
|
config.grooveData.grooveAddDepth = "0";
|
|
|
|
config.grooveData.exprGrooveAddDepth = "0";
|
|
|
|
config.processData.drillType = DrillType.None;
|
|
|
|
config.processData.drillType = DrillType.None;
|
|
|
|
config.processData.highDrill = Array(4).fill(DrillType.None);
|
|
|
|
config.processData.highDrill = Array(4).fill(DrillType.None);
|
|
|
|
configs["活动层板"] = config;
|
|
|
|
configs["活动层板"] = config;
|
|
|
@ -627,9 +648,7 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cof.option.version = 1;
|
|
|
|
cof.option.version = 1;
|
|
|
|
if (cof.option.calcHeight === "L")
|
|
|
|
if (cof.option.calcHeight === "L")
|
|
|
|
{
|
|
|
|
|
|
|
|
cof.option.calcHeight = "W";
|
|
|
|
cof.option.calcHeight = "W";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (cof.option.version < 2)
|
|
|
|
if (cof.option.version < 2)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -639,37 +658,51 @@ export class LayerBoardStore extends BoardStore<LayerBoardOption>
|
|
|
|
cof.option.calcFrontShrink = cof.option.frontShrink.toString();
|
|
|
|
cof.option.calcFrontShrink = cof.option.frontShrink.toString();
|
|
|
|
cof.option.version = 2;
|
|
|
|
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.nailData)
|
|
|
|
// cof.option.version 这里的3版本 是处理cof.grooveData
|
|
|
|
cof.nailData = this.layerNailOption;
|
|
|
|
//下面对cof.grooveData更新所以跳过删除代码
|
|
|
|
else
|
|
|
|
|
|
|
|
Object.assign(this.layerNailOption, cof.nailData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!cof.grooveData)
|
|
|
|
if (cof.option.version < 4)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cof.grooveData = this.grooveOption;
|
|
|
|
cof.option.exprCount = cof.option.count.toString();
|
|
|
|
let newConfig = super.SaveConfig();
|
|
|
|
cof.option.exprThickness = cof.option.thickness.toString();
|
|
|
|
newConfig.grooveData = toJS(this.grooveOption);
|
|
|
|
|
|
|
|
|
|
|
|
if (!cof.grooveData)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//如果没有初始化grooveOption
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, NewDefaultGrooveDate);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//读取版本3 的grooveOption 非表达式字段
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, {
|
|
|
|
|
|
|
|
exprGrooveAddLength: cof.grooveData.grooveAddLength,
|
|
|
|
|
|
|
|
exprGrooveAddWidth: cof.grooveData.grooveAddWidth,
|
|
|
|
|
|
|
|
exprGrooveAddDepth: cof.grooveData.grooveAddDepth,
|
|
|
|
|
|
|
|
exprKnifeRadius: cof.grooveData.knifeRadius
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cof.option.version = 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
Object.assign(this.grooveOption, cof.grooveData);
|
|
|
|
Object.assign(this.grooveOption, cof.grooveData);
|
|
|
|
|
|
|
|
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(cof.grooveData));
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//层板钉数据
|
|
|
|
|
|
|
|
if (!cof.nailData)
|
|
|
|
|
|
|
|
cof.nailData = this.layerNailOption;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Object.assign(this.layerNailOption, cof.nailData);
|
|
|
|
|
|
|
|
//层板顶UI数据
|
|
|
|
if (this.uiLayerNailOption)
|
|
|
|
if (this.uiLayerNailOption)
|
|
|
|
Object.assign(this.uiLayerNailOption, DataAdapter.ConvertUIData(this.layerNailOption));
|
|
|
|
Object.assign(this.uiLayerNailOption, DataAdapter.ConvertUIData(this.layerNailOption));
|
|
|
|
|
|
|
|
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HasInvailValue()
|
|
|
|
HasInvailValue()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return super.HasInvailValue() || CheckoutValid.HasInvailValue(this.uiLayerNailOption, CheckObjectType.BR) || CheckoutValid.HasInvailValue(this.m_UiGrooveOption, CheckObjectType.BR);;
|
|
|
|
return super.HasInvailValue() || CheckoutValid.HasInvailValue(this.uiLayerNailOption, CheckObjectType.BR) || CheckoutValid.HasInvailValue(this.m_UiGrooveOption, CheckObjectType.BR);;
|
|
|
@ -681,12 +714,7 @@ export class VerticalBoardStore extends BoardStore<VerticalBoardOption>
|
|
|
|
title = "立板";
|
|
|
|
title = "立板";
|
|
|
|
|
|
|
|
|
|
|
|
@observable m_Option: VerticalBoardOption = Object.assign({}, DefaultVerticalBoardConfig);
|
|
|
|
@observable m_Option: VerticalBoardOption = Object.assign({}, DefaultVerticalBoardConfig);
|
|
|
|
@observable grooveOption: IGrooveOption = {
|
|
|
|
@observable grooveOption: IGrooveOption = NewDefaultGrooveDate;
|
|
|
|
grooveAddLength: "0",
|
|
|
|
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
private m_UiGrooveOption: IUiOption<IGrooveOption>;
|
|
|
|
private m_UiGrooveOption: IUiOption<IGrooveOption>;
|
|
|
|
get UiGrooveOption(): IUiOption<IGrooveOption>
|
|
|
|
get UiGrooveOption(): IUiOption<IGrooveOption>
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -703,50 +731,55 @@ export class VerticalBoardStore extends BoardStore<VerticalBoardOption>
|
|
|
|
InitOption()
|
|
|
|
InitOption()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Object.assign(this.m_Option, DefaultVerticalBoardConfig);
|
|
|
|
Object.assign(this.m_Option, DefaultVerticalBoardConfig);
|
|
|
|
let grooveOption: IGrooveOption = {
|
|
|
|
|
|
|
|
grooveAddLength: "0",
|
|
|
|
let grooveOption: IGrooveOption = NewDefaultGrooveDate;
|
|
|
|
grooveAddWidth: "0",
|
|
|
|
|
|
|
|
grooveAddDepth: "0",
|
|
|
|
|
|
|
|
knifeRadius: "3",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, grooveOption);
|
|
|
|
Object.assign(this.grooveOption, grooveOption);
|
|
|
|
super.InitOption();
|
|
|
|
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super.InitOption();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
UpdateOption(cof: IConfigOption<VerticalBoardOption>)
|
|
|
|
UpdateOption(cof: IConfigOption<VerticalBoardOption>)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (cof.option.version < 2)
|
|
|
|
if (cof.option.version < 2)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cof.option.calcSpaceSize = cof.option.spaceSize.toString();
|
|
|
|
|
|
|
|
cof.option.calcFrontShrink = cof.option.frontShrink.toString();
|
|
|
|
cof.option.calcFrontShrink = cof.option.frontShrink.toString();
|
|
|
|
cof.option.calcBottomShrink = cof.option.bottomShrink.toString();
|
|
|
|
cof.option.calcBottomShrink = cof.option.bottomShrink.toString();
|
|
|
|
cof.option.version = 2;
|
|
|
|
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.option.version 这里的3版本 是处理cof.grooveData
|
|
|
|
|
|
|
|
//下面对cof.grooveData更新所以跳过删除代码
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (cof.option.version < 4)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cof.grooveData = this.grooveOption;
|
|
|
|
cof.option.exprCount = cof.option.count.toString();
|
|
|
|
let newConfig = super.SaveConfig();
|
|
|
|
cof.option.exprThickness = cof.option.thickness.toString();
|
|
|
|
newConfig.grooveData = toJS(this.grooveOption);
|
|
|
|
|
|
|
|
|
|
|
|
if (!cof.grooveData)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//如果没有初始化grooveOption
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, NewDefaultGrooveDate);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//读取版本3 的grooveOption 非表达式字段
|
|
|
|
|
|
|
|
Object.assign(this.grooveOption, {
|
|
|
|
|
|
|
|
exprGrooveAddLength: cof.grooveData.grooveAddLength,
|
|
|
|
|
|
|
|
exprGrooveAddWidth: cof.grooveData.grooveAddWidth,
|
|
|
|
|
|
|
|
exprGrooveAddDepth: cof.grooveData.grooveAddDepth,
|
|
|
|
|
|
|
|
exprKnifeRadius: cof.grooveData.knifeRadius,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cof.option.version = 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
Object.assign(this.grooveOption, cof.grooveData);
|
|
|
|
Object.assign(this.grooveOption, cof.grooveData);
|
|
|
|
|
|
|
|
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
if (this.m_UiGrooveOption)
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(cof.grooveData));
|
|
|
|
Object.assign(this.m_UiGrooveOption, DataAdapter.ConvertUIData(this.grooveOption));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super.UpdateOption(cof);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HasInvailValue()
|
|
|
|
HasInvailValue()
|
|
|
|
{
|
|
|
|
{
|
|
|
|