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

调整权限服务

上级 e04a6ff4
......@@ -2,6 +2,7 @@
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
import AuthService from '../auth-service';
import ${srfclassname('${item.getCodeName()}')}UIService from '@/uiservice/${srffilepath2(item.getCodeName())}/${srffilepath2(item.getCodeName())}-ui-service';
/**
* ${de.getLogicName()}权限服务对象基类
......@@ -12,6 +13,13 @@ import AuthService from '../auth-service';
*/
export default class ${srfclassname('${item.getCodeName()}')}AuthServiceBase extends AuthService {
/**
* 所依赖UI服务
*
* @memberof ${srfclassname('${item.getCodeName()}')}AuthServiceBase
*/
public ${item.getCodeName()?lower_case}UIService:any;
/**
* Creates an instance of ${srfclassname('${item.getCodeName()}')}AuthServiceBase.
*
......@@ -20,17 +28,23 @@ export default class ${srfclassname('${item.getCodeName()}')}AuthServiceBase ext
*/
constructor(opts: any = {}) {
super(opts);
this.${item.getCodeName()?lower_case}UIService = new ${srfclassname('${item.getCodeName()}')}UIService(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {string} name 实体名称
* @returns {Promise<any>}
* @param {*} data 传入数据
* @returns {any}
* @memberof ${srfclassname('${item.getCodeName()}')}AuthServiceBase
*/
public async getOPPrivs(data:any):Promise<any>{
return null;
public getOPPrivs(data:any):any{
let mainSateOPPrivs:any = this.${item.getCodeName()?lower_case}UIService.getDEMainStateOPPrivs(data);
let curDefaultOPPrivs:any = JSON.parse(JSON.stringify(this.defaultOPPrivs));
if(mainSateOPPrivs){
Object.assign(curDefaultOPPrivs,mainSateOPPrivs);
}
return curDefaultOPPrivs;
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册