提交 82a4e18e 编写于 作者: KK's avatar KK

无数据目标 按钮资源标识

上级 5d8a647e
...@@ -361,6 +361,7 @@ export default class MDViewEngineBase extends ViewEngine { ...@@ -361,6 +361,7 @@ export default class MDViewEngineBase extends ViewEngine {
} }
const state = args.length > 0 && !Object.is(args[0].srfkey, '') ? false : true; const state = args.length > 0 && !Object.is(args[0].srfkey, '') ? false : true;
this.calcToolbarItemState(state); this.calcToolbarItemState(state);
this.calcToolbarItemAuthState(null);
} }
/** /**
...@@ -374,6 +375,7 @@ export default class MDViewEngineBase extends ViewEngine { ...@@ -374,6 +375,7 @@ export default class MDViewEngineBase extends ViewEngine {
this.view.$emit('viewload', args); this.view.$emit('viewload', args);
} }
this.calcToolbarItemState(true); this.calcToolbarItemState(true);
this.calcToolbarItemAuthState(null);
} }
/** /**
......
...@@ -193,7 +193,7 @@ export default class ViewEngine { ...@@ -193,7 +193,7 @@ export default class ViewEngine {
return; return;
} }
const _item = _this.view[tool][key]; const _item = _this.view[tool][key];
if(_item && _item['dataaccaction'] && _this.view.appUIService && data && Object.keys(data).length >0){ if(_item && _item['dataaccaction'] && _this.view.appUIService){
let dataActionResult:any; let dataActionResult:any;
if (_item.uiaction && (Object.is(_item.uiaction.target, 'NONE'))){ if (_item.uiaction && (Object.is(_item.uiaction.target, 'NONE'))){
dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']); dataActionResult = _this.view.appUIService.getResourceOPPrivs(_item['dataaccaction']);
......
...@@ -31,4 +31,14 @@ export default class EntityUIActionBase extends UIActionBase { ...@@ -31,4 +31,14 @@ export default class EntityUIActionBase extends UIActionBase {
*/ */
public dataService:any; public dataService:any;
/**
* 获取资源标识是否有权限(无数据目标)
*
* @param tag 资源标识
* @memberof EntityUIActionBase
*/
public getResourceOPPrivs(tag:any){
return this.authService.getResourcePermission(this.authService.sysOPPrivsMap.get(tag))?1:0;
}
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册