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

权限过滤调整

上级 2837d928
......@@ -143,7 +143,7 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computedActiviedPanel(){
if(Environment.enablePermissionValid){
if(this.$store.getters['authresource/getEnablePermissionValid']){
if(Object.keys(this.authResourceObject).length >0){
let targetResult:Array<any> = [];
Object.keys(this.authResourceObject).forEach((item:any) =>{
......@@ -165,7 +165,7 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computedAuthorizedPanel(name:string){
if(!Environment.enablePermissionValid)
if(!this.$store.getters['authresource/getEnablePermissionValid'])
return true;
if(!this.authResourceObject[name])
return true;
......
......@@ -530,7 +530,7 @@ ${P.getLogicCode(singleFuncs,"LOGIC.vue").code}
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public handleMenusResource(inputMenus:Array<any>){
if(Environment.enablePermissionValid){
if(this.$store.getters['authresource/getEnablePermissionValid']){
this.computedEffectiveMenus(inputMenus);
this.computeParentMenus(inputMenus);
}
......
......@@ -724,22 +724,19 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
* @memberof MainTreeBase
*/
public computeNodeState(node: any) {
if(Environment.enablePermissionValid){
let targetData: any = this.transformData(node);
if(this.nodeModel && Object.keys(this.nodeModel).length > 0) {
Object.keys(this.nodeModel).forEach((name: any) => {
if(this.nodeModel[name] && this.nodeModel[name].uiservice && this.nodeModel[name].uiaction && this.nodeModel[name].uiaction.dataaccaction) {
this.nodeModel[name].isPower = true;
let uiservice: any = new UIService().getService(this.nodeModel[name].uiservice)
let tempUIAction:any = JSON.parse(JSON.stringify(this.nodeModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],uiservice);
this.nodeModel[name].uiaction.visabled = tempUIAction.visabled;
this.nodeModel[name].uiaction.disabled = tempUIAction.disabled;
this.nodeModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
let targetData: any = this.transformData(node);
if(this.nodeModel && Object.keys(this.nodeModel).length > 0) {
Object.keys(this.nodeModel).forEach((name: any) => {
if(this.nodeModel[name] && this.nodeModel[name].uiservice && this.nodeModel[name].uiaction && this.nodeModel[name].uiaction.dataaccaction) {
this.nodeModel[name].isPower = true;
let uiservice: any = new UIService().getService(this.nodeModel[name].uiservice)
let tempUIAction:any = JSON.parse(JSON.stringify(this.nodeModel[name].uiaction));
let result: any[] = ViewTool.calcActionItemAuthState(targetData,[tempUIAction],uiservice);
this.nodeModel[name].uiaction.visabled = tempUIAction.visabled;
this.nodeModel[name].uiaction.disabled = tempUIAction.disabled;
this.nodeModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
}
......
......@@ -739,20 +739,18 @@ import { Environment } from '@/environments/environment';
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public computeButtonState(data:any){
if(Environment.enablePermissionValid){
let targetData:any = this.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].detailType,"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.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
let targetData:any = this.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].detailType,"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.detailsModel[name].visible = tempUIAction.visabled;
this.detailsModel[name].disabled = tempUIAction.disabled;
this.detailsModel[name].isPower = result[0] === 1 ? true : false;
}
})
}
}
......
......@@ -547,10 +547,8 @@ import { Environment } from '@/environments/environment';
*/
public getActionState(data:any){
let tempActionModel:any = JSON.parse(JSON.stringify(this.ActionModel));
if(Environment.enablePermissionValid){
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
}
let targetData:any = this.transformData(data);
ViewTool.calcActionItemAuthState(targetData,tempActionModel,this.appUIService);
return tempActionModel;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册