提交 73ec39c2 编写于 作者: Mosher's avatar Mosher

调整统一资源权限校验逻辑

上级 39e099a1
...@@ -187,17 +187,17 @@ export default class ViewEngine { ...@@ -187,17 +187,17 @@ export default class ViewEngine {
*/ */
public calcToolbarItemAuthState(data:any){ public calcToolbarItemAuthState(data:any){
const _this: any = this; const _this: any = this;
if(!_this.view.appUIService.isEnableDEMainState) if(!_this.view.appUIService)
return; return;
for (const key in _this.view.toolBarModels) { for (const key in _this.view.toolBarModels) {
if (!_this.view.toolBarModels.hasOwnProperty(key)) { if (!_this.view.toolBarModels.hasOwnProperty(key)) {
return; return;
} }
const _item = _this.view.toolBarModels[key]; const _item = _this.view.toolBarModels[key];
if(_item && _item['dataaccaction'] && _this.view.appUIService){ if(_item && _item['dataaccaction']){
let dataActionResult:any; let dataActionResult:any;
if (_item.uiaction && (Object.is(_item.uiaction.target, "NONE") || Object.is(_item.uiaction.target, ""))){ if (_item.uiaction && (Object.is(_item.uiaction.target, "NONE") || Object.is(_item.uiaction.target, ""))){
if(Object.is(_item.uiaction.target, "") && Object.is(_item.uiaction.tag, "Save")){ if(Object.is(_item.uiaction.target, "") && Object.is(_item.uiaction.tag, "Save") && _this.view.appUIService.isEnableDEMainState){
if(data && Object.keys(data).length >0){ if(data && Object.keys(data).length >0){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']]; dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
} }
...@@ -205,7 +205,7 @@ export default class ViewEngine { ...@@ -205,7 +205,7 @@ export default class ViewEngine {
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']); dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']);
} }
}else{ }else{
if(data && Object.keys(data).length >0){ if(data && Object.keys(data).length >0 && _this.view.appUIService.isEnableDEMainState){
dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']]; dataActionResult= _this.view.appUIService.getAllOPPrivs(data)[_item['dataaccaction']];
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册