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

权限过滤调整

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