|
|
|
@ -1176,11 +1176,13 @@ export async function ReplaceTemplate(oldTemp: TemplateRecord, newTemp: Template
|
|
|
|
|
let positioning = oldTemp.Positioning;
|
|
|
|
|
// if (!(positioning instanceof PositioningTemporary && oldTemp.Parent && !oldTemp.Parent.IsErase))
|
|
|
|
|
newTemp.Positioning = positioning;
|
|
|
|
|
let en = oldTemp.AllEntitys[0];
|
|
|
|
|
|
|
|
|
|
GetEntityInfo(en, option); //获取实体信息
|
|
|
|
|
|
|
|
|
|
followAttribute(option, newTemp);//房名、柜名、板名跟随
|
|
|
|
|
if (option)
|
|
|
|
|
{
|
|
|
|
|
let en = oldTemp.AllEntitys[0];
|
|
|
|
|
GetEntityInfo(en, option); //获取实体信息
|
|
|
|
|
followAttribute(option, newTemp);//房名、柜名、板名跟随
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (oldTemp?.Parent?.Object)
|
|
|
|
|
{
|
|
|
|
@ -1301,7 +1303,7 @@ function IsEqualBH(parent: TemplateRecord, target: TemplateRecord): boolean
|
|
|
|
|
return bh2.value === bh1.value;//父节点已经计算出值
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function SetTemplatePositionAndSetParent(spaceParse: ISpaceParse, template: TemplateRecord, isAddDeepNode = true)
|
|
|
|
|
export async function SetTemplatePositionAndSetParent(spaceParse: ISpaceParse, template: TemplateRecord, isAddDeepNode = true, option?: IGetRoomInfo)
|
|
|
|
|
{
|
|
|
|
|
if (spaceParse instanceof ClampSpaceParse)
|
|
|
|
|
{
|
|
|
|
@ -1320,7 +1322,7 @@ export async function SetTemplatePositionAndSetParent(spaceParse: ISpaceParse, t
|
|
|
|
|
else if (spaceParse.VisualSpaceBox)
|
|
|
|
|
{
|
|
|
|
|
let vstemplate = spaceParse.VisualSpaceBox.Template.Object as TemplateVisualSpace;
|
|
|
|
|
ReplaceTemplate(vstemplate, template, true, false);
|
|
|
|
|
ReplaceTemplate(vstemplate, template, true, false, option);
|
|
|
|
|
DeleteTempate(vstemplate);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|