Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
c3f00f37
提交
c3f00f37
编写于
7月 06, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加权限服务
上级
74b49c90
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
20 行增加
和
10 行删除
+20
-10
%DE_PKGPATH%-auth-service-base.ts.ftl
...ervice/%DE_PKGPATH%/%DE_PKGPATH%-auth-service-base.ts.ftl
+11
-0
%DE_PKGPATH%-auth-service.ts.ftl
...authservice/%DE_PKGPATH%/%DE_PKGPATH%-auth-service.ts.ftl
+0
-1
auth-service-register.ts.ftl
APP/src/authservice/auth-service-register.ts.ftl
+9
-9
未找到文件。
APP/src/authservice/%DE_PKGPATH%/%DE_PKGPATH%-auth-service-base.ts.ftl
浏览文件 @
c3f00f37
...
...
@@ -22,4 +22,15 @@ export default class ${srfclassname('${item.getCodeName()}')}AuthServiceBase ext
super(opts);
}
/**
* 根据当前数据获取实体操作标识
*
* @param {string} name 实体名称
* @returns {Promise<any>}
* @memberof ${srfclassname('${item.getCodeName()}')}AuthServiceBase
*/
public async getOPPrivs(data:any):Promise<any>{
return null;
}
}
\ No newline at end of file
APP/src/authservice/%DE_PKGPATH%/%DE_PKGPATH%-auth-service.ts.ftl
浏览文件 @
c3f00f37
<#ibiztemplate>
TARGET=PSAPPDATAENTITY
</#ibiztemplate>
import { Http,Util } from '@/utils';
import ${srfclassname('${item.getCodeName()}')}AuthServiceBase from './${srffilepath2(item.getCodeName())}-auth-service-base';
...
...
APP/src/authservice/auth-service-register.ts.ftl
浏览文件 @
c3f00f37
...
...
@@ -2,7 +2,7 @@
TARGET=PSSYSAPP
</#ibiztemplate>
/**
* 实体
数据
服务注册中心
* 实体
权限
服务注册中心
*
* @export
* @class AuthServiceRegister
...
...
@@ -10,7 +10,7 @@ TARGET=PSSYSAPP
export class AuthServiceRegister {
/**
* 所有实体
数据
服务Map
* 所有实体
权限
服务Map
*
* @protected
* @type {*}
...
...
@@ -19,7 +19,7 @@ export class AuthServiceRegister {
protected allAuthService: Map<string, () => Promise<any>> = new Map();
/**
* 已加载实体
数据
服务Map缓存
* 已加载实体
权限
服务Map缓存
*
* @protected
* @type {Map<string, any>}
...
...
@@ -44,13 +44,13 @@ export class AuthServiceRegister {
protected init(): void {
<#if app.getAllPSAppDataEntities()??>
<#list app.getAllPSAppDataEntities() as curAppEntity>
this.allAuthService.set('${curAppEntity.getCodeName()?lower_case}', () => import('@/
service/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}
-service'));
this.allAuthService.set('${curAppEntity.getCodeName()?lower_case}', () => import('@/
authservice/${srffilepath2(curAppEntity.getCodeName())}/${srffilepath2(curAppEntity.getCodeName())}-auth
-service'));
</#list>
</#if>
}
/**
* 加载实体
数据
服务
* 加载实体
权限
服务
*
* @protected
* @param {string} serviceName
...
...
@@ -65,7 +65,7 @@ export class AuthServiceRegister {
}
/**
* 获取应用实体
数据
服务
* 获取应用实体
权限
服务
*
* @param {string} name
* @returns {Promise<any>}
...
...
@@ -75,9 +75,9 @@ export class AuthServiceRegister {
if (this.serviceCache.has(name)) {
return this.serviceCache.get(name);
}
const
entity
Service: any = await this.loadService(name);
if (
entityService && entity
Service.default) {
const instance: any = new
entity
Service.default();
const
auth
Service: any = await this.loadService(name);
if (
authService && auth
Service.default) {
const instance: any = new
auth
Service.default();
this.serviceCache.set(name, instance);
return instance;
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录