提交 2b398c48 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 cc0d3611
...@@ -361,13 +361,10 @@ import UIService from '@/uiservice/ui-service'; ...@@ -361,13 +361,10 @@ import UIService from '@/uiservice/ui-service';
* *
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
@Watch('inputData', { deep: true } ) @Watch('inputData', { deep: true, immediate: true } )
public onInputDataChange(newVal: any, oldVal: any){ public onInputDataChange(newVal: any, oldVal: any){
if(newVal){ if(newVal){
this.computedUIData(newVal); this.computedUIData(newVal);
this.layoutData = Util.deepCopy(newVal);
this.computeButtonState(newVal);
this.panelLogic('');
} }
} }
...@@ -388,7 +385,6 @@ import UIService from '@/uiservice/ui-service'; ...@@ -388,7 +385,6 @@ import UIService from '@/uiservice/ui-service';
public afterMounted () { public afterMounted () {
const _this: any = this; const _this: any = this;
_this.initLayout().then((result: any) => { _this.initLayout().then((result: any) => {
_this.onInputDataChange(this.inputData);
_this.isLayoutLoadding = false; _this.isLayoutLoadding = false;
}); });
} }
...@@ -402,7 +398,7 @@ import UIService from '@/uiservice/ui-service'; ...@@ -402,7 +398,7 @@ import UIService from '@/uiservice/ui-service';
public computedUIData(newVal:any){ public computedUIData(newVal:any){
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){ if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
this.dataModel.getDataItems().forEach((item:any) =>{ this.dataModel.getDataItems().forEach((item:any) =>{
this.data[item.name] = newVal[item.prop]; this.data[item.prop] = newVal[item.prop];
}) })
} }
} }
...@@ -492,7 +488,6 @@ import UIService from '@/uiservice/ui-service'; ...@@ -492,7 +488,6 @@ import UIService from '@/uiservice/ui-service';
return; return;
} }
const { name, value } = args; const { name, value } = args;
this.data[name] = value;
this.layoutData[name] = value; this.layoutData[name] = value;
this.layoutModelDetails[name].setData(value); this.layoutModelDetails[name].setData(value);
this.panelLogic(name, index); this.panelLogic(name, index);
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
<@compress single_line=true><app-preset-text <@compress single_line=true><app-preset-text
name="${panelDetail.getName()}" name="${panelDetail.getName()}"
<#if isMultiData == true >:index="slotProps.data.index"</#if> <#if isMultiData == true >:index="slotProps.data.index"</#if>
:value=<#if isMultiData == true >"layoutData[`<#if panelDetail.getViewFieldName?? && panelDetail.getViewFieldName() != "">${panelDetail.getViewFieldName()}<#else>${panelDetail.getName()}</#if>_<#noparse>${slotProps.data.index}</#noparse>`]"<#else>"layoutData.<#if panelDetail.getViewFieldName?? && panelDetail.getViewFieldName() != "">${panelDetail.getViewFieldName()}<#else>${panelDetail.getName()}</#if>"</#if> :value=<#if isMultiData == true >"layoutData[`${panelDetail.getName()}_<#noparse>${slotProps.data.index}</#noparse>`]"<#else>"layoutData.${panelDetail.getName()}"</#if> /></@compress>
:layoutModelDetails="layoutModelDetails"/></@compress> :layoutModelDetails="layoutModelDetails"/></@compress>
<#elseif panelDetail.getPSEditor?? && panelDetail.getPSEditor()?? && panelDetail.getPSEditor().getPredefinedType?? && panelDetail.getPSEditor().getPredefinedType()?? && panelDetail.getPSEditor().getPredefinedType() == "FIELD_SWITCH"> <#elseif panelDetail.getPSEditor?? && panelDetail.getPSEditor()?? && panelDetail.getPSEditor().getPredefinedType?? && panelDetail.getPSEditor().getPredefinedType()?? && panelDetail.getPSEditor().getPredefinedType() == "FIELD_SWITCH">
<@compress single_line=true><app-preset-switch <@compress single_line=true><app-preset-switch
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册