提交 79349d00 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新

上级 a976eb01
......@@ -102,25 +102,13 @@ import UIService from '@/uiservice/ui-service';
public appUIService:UIService = new UIService();
</#if>
/**
* 详情模型集合
*
* @type {*}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public detailsModel: any = {
<#list ctrl.getAllPSPanelItems() as panelItem>
${panelItem.name}: ${P.getPartCode(panelItem, 'ITEM_MODEL').code},
</#list>
};
/**
* 视图布局是否加载
*
* @public
* @memberof ${srfclassname('${ctrl.name}')}Base
*/
public isLayoutLoadding: boolean = true;
public isLayoutLoadding: boolean = false;
/**
* 视图布局数据
......@@ -410,15 +398,13 @@ import UIService from '@/uiservice/ui-service';
// 若为项布局面板,存在parentRef
if(this.parentRef){
let targetData:any = this.parentRef.transformData(data);
if(this.detailsModel && Object.keys(this.detailsModel).length >0){
Object.keys(this.detailsModel).forEach((name:any) =>{
if(this.detailsModel[name] && this.detailsModel[name].uiaction && this.detailsModel[name].uiaction.dataaccaction && Object.is(this.detailsModel[name].itemType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService?this.appUIService:null);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
if(this.layoutModelDetails && Object.keys(this.layoutModelDetails).length >0){
Object.keys(this.layoutModelDetails).forEach((name:any) =>{
if(this.layoutModelDetails[name] && this.layoutModelDetails[name].uiAction && this.layoutModelDetails[name].uiAction.dataAccaction && Object.is(this.layoutModelDetails[name].itemType,"BUTTON")){
let tempUIAction:any = JSON.parse(JSON.stringify(this.layoutModelDetails[name].uiAction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData, [tempUIAction], this.appUIService ? this.appUIService : null);
this.layoutModelDetails[name].visible = tempUIAction.visabled;
this.layoutModelDetails[name].disabled = tempUIAction.disabled;
}
})
}
......@@ -505,11 +491,12 @@ import UIService from '@/uiservice/ui-service';
if (!args || !args.name || Object.is(args.name, '') || !this.layoutData.hasOwnProperty(args.name)) {
return;
}
const {name,value} = args;
const { name, value } = args;
this.data[name] = value;
this.layoutData[name] = value;
this.layoutModelDetails[name].setData(value);
this.panelLogic(name);
this.panelEditItemChange(data, $event.name, $event.value);
this.panelEditItemChange(data, name, name);
}
/**
......@@ -532,7 +519,6 @@ import UIService from '@/uiservice/ui-service';
this.$emit('panelDataChange',{[modelitem.prop]: value});
}
}
}
/**
......@@ -542,7 +528,7 @@ import UIService from '@/uiservice/ui-service';
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public panelLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
public panelLogic(name: string): void {
<#if P.getPartCode(item,'PANEL_LOGIC').code?length gt 0>
${P.getPartCode(item,'PANEL_LOGIC').code}
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册