提交 18732b5b 编写于 作者: tony001's avatar tony001

调整面板界面行为逻辑

上级 bfdbed6b
...@@ -30,7 +30,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -30,7 +30,7 @@ import CodeListService from "@service/app/codelist-service";
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
getData() { getData() {
return this.data; return this.panelData;
} }
/** /**
...@@ -121,6 +121,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -121,6 +121,7 @@ import CodeListService from "@service/app/codelist-service";
public onInputDataChange(newVal: any, oldVal: any){ public onInputDataChange(newVal: any, oldVal: any){
if(newVal){ if(newVal){
this.computedUIData(newVal); this.computedUIData(newVal);
this.panelData = Util.deepCopy(newVal);
this.panelLogic({ name: '', newVal: null, oldVal: null }); this.panelLogic({ name: '', newVal: null, oldVal: null });
this.$forceUpdate(); this.$forceUpdate();
} }
...@@ -140,21 +141,6 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -140,21 +141,6 @@ import CodeListService from "@service/app/codelist-service";
} }
} }
/**
* 计算面板数据
*
* @memberof Mob
*/
public computeOutputData(){
let panelData:any = {};
if((this.dataModel.getDataItems instanceof Function) && this.dataModel.getDataItems().length >0){
this.dataModel.getDataItems().forEach((item:any) =>{
panelData[item.prop] = this.data[item.name];
})
}
this.panelData = Object.assign(JSON.parse(JSON.stringify(this.inputData)),panelData);
}
/** /**
* 界面行为 * 界面行为
* *
...@@ -163,8 +149,7 @@ import CodeListService from "@service/app/codelist-service"; ...@@ -163,8 +149,7 @@ import CodeListService from "@service/app/codelist-service";
* @param {*} $event * @param {*} $event
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public async uiAction(row: any, tag: any, $event: any) { public uiAction(row: any, tag: any, $event: any) {
await this.computeOutputData();
<#if ctrl.getPSAppViewLogics()??> <#if ctrl.getPSAppViewLogics()??>
<#list ctrl.getPSAppViewLogics() as logic> <#list ctrl.getPSAppViewLogics() as logic>
<#if logic.getPSAppViewUIAction().getPSUIAction()??> <#if logic.getPSAppViewUIAction().getPSUIAction()??>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册