@imedx/ics-imedx-core
Advanced tools
Comparing version 0.0.1-beta.23 to 0.0.1-beta.24
@@ -158,10 +158,19 @@ "use strict"; | ||
var patientPermission = Permission.patient[Permission.moduleId] || null; | ||
if (patientPermission && patientPermission[permissionId] !== undefined && patientPermission[permissionId] !== null && patientPermission['controlReason']) { | ||
return this.permissionReasons[patientPermission['controlReason'][permissionId]] || '未知原因'; | ||
if (patientPermission && | ||
patientPermission[permissionId] !== undefined && | ||
patientPermission[permissionId] !== null && | ||
patientPermission['controlReason']) { | ||
var reasonCode = patientPermission['controlReason'][permissionId]; | ||
return { code: reasonCode, name: this.permissionReasons[reasonCode] || '未知原因' }; | ||
} | ||
var userPermission = Permission.user[Permission.moduleId] || null; | ||
if (userPermission && userPermission[permissionId] !== undefined && userPermission[permissionId] !== null && userPermission['controlReason']) { | ||
return this.permissionReasons[userPermission['controlReason'][permissionId]] || '未知原因'; | ||
if (userPermission && | ||
userPermission[permissionId] !== undefined && | ||
userPermission[permissionId] !== null && | ||
userPermission['controlReason']) { | ||
var reasonCode = userPermission['controlReason'][permissionId]; | ||
return { code: reasonCode, name: this.permissionReasons[reasonCode] || '未知原因' }; | ||
// return this.permissionReasons[userPermission['controlReason'][permissionId]] || '未知原因' | ||
} | ||
return '未知原因'; | ||
return { code: 0, name: '未知原因' }; | ||
}; | ||
@@ -183,3 +192,3 @@ /** | ||
} | ||
}, | ||
} | ||
}); | ||
@@ -203,11 +212,11 @@ }; | ||
Permission.permissionReasons = { | ||
1: '转科患者授权无权限', | ||
2: '会诊患者授权无权限', | ||
3: '门诊有效期过期无权限', | ||
4: '出院患者授权无权限', | ||
5: '手术术中医嘱无权限', | ||
6: '联合诊疗患者授权无权限', | ||
7: '麻醉医嘱无权限', | ||
1: '转科', | ||
2: '会诊', | ||
3: '门诊', | ||
4: '出院', | ||
5: '手术', | ||
6: '联合诊疗', | ||
7: '麻醉', | ||
8: '无菜单权限', | ||
9: '无特殊权限(处方权)', | ||
9: '无特殊权限' | ||
}; | ||
@@ -214,0 +223,0 @@ return Permission; |
@@ -93,3 +93,6 @@ export default class Permission { | ||
*/ | ||
static getPermissionReason(permissionId: string): string; | ||
static getPermissionReason(permissionId: string): { | ||
code: number; | ||
name: string; | ||
}; | ||
/** | ||
@@ -96,0 +99,0 @@ * 指令安装 |
@@ -6,3 +6,3 @@ { | ||
"title": "iMedx", | ||
"version": "0.0.1-beta.23", | ||
"version": "0.0.1-beta.24", | ||
"description": "iMedx核心功能js封装", | ||
@@ -9,0 +9,0 @@ "author": "文贝", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1593342
2306