提交 1d02d325 编写于 作者: tony001's avatar tony001

解决表单动态隐藏和权限控制冲突问题

上级 03958ae3
......@@ -562,6 +562,7 @@ import schema from 'async-validator';
}
</#if>
this.setFormEnableCond(data);
this.computeButtonState(data);
this.fillForm(data,action);
<#if ctrl.getControlType() == 'FORM'>
this.oldData = {};
......@@ -741,10 +742,12 @@ import schema from 'async-validator';
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].detailType,"BUTTON")){
this.detailsModel[name].isPower = true;
let tempUIAction:any = JSON.parse(JSON.stringify(this.detailsModel[name].uiaction));
ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],this.appUIService);
this.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
......@@ -1044,7 +1047,6 @@ import schema from 'async-validator';
const data = response.data;
this.onFormLoad(data,'load');
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
......@@ -1095,7 +1097,6 @@ import schema from 'async-validator';
</#list>
data.${appde.getCodeName()?lower_case} = null;
this.$emit('load', data);
this.computeButtonState(data);
this.$nextTick(() => {
this.formState.next({ type: 'load', data: data });
});
......@@ -1153,7 +1154,6 @@ import schema from 'async-validator';
const data = response.data;
this.onFormLoad(data,'autoSave');
this.$emit('save', data);
this.computeButtonState(data);
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
......@@ -1240,7 +1240,6 @@ import schema from 'async-validator';
const data = response.data;
this.onFormLoad(data,'save');
this.$emit('save', data);
this.computeButtonState(data);
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册