vue2-client 1.22.39 → 1.22.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.iot +1 -0
- package/.idea/af-vue2-client.iml +2 -3
- package/.idea/inspectionProfiles/Project_Default.xml +17 -0
- package/1yarn.lock +11850 -0
- package/logs/afgit.config.log +12 -0
- package/logs/afgit.config.log.2026-02-27 +7 -0
- package/logs/afgit.config_error.log +6 -0
- package/logs/afgit.config_error.log.2026-02-27 +3 -0
- package/package.json +1 -1
- package/pnpm-workspace.yaml +4 -0
- package/public/his/editor/mock/bind_data_with_images.html +78 -0
- package/public/his/editor/mock/blank.html +645 -0
- package/src/assets/img/80359c35a5465167cb25ff87bab49035d041a65558b35-YJOr3x.png +0 -0
- package/src/assets/img/hisLogo.png +0 -0
- package/src/assets/svg/unknown-icon.svg +3 -3
- package/src/base-client/components/common/AfMap/InfoWindowComponent.vue +141 -141
- package/src/base-client/components/common/AfMap/demo.vue +492 -492
- package/src/base-client/components/common/HIS/HButtons/HButtons.vue +89 -1
- package/src/base-client/components/common/HIS/HButtons/HButtonsSuffixDemo.vue +141 -0
- package/src/base-client/components/common/Upload/Upload.vue +2 -2
- package/src/base-client/components/common/XInspectionDetailDrawer/components/DeviceStatus.vue +1 -1
- package/src/base-client/components/his/XHisEditor/ImageReportDemo.vue +156 -0
- package/src/base-client/components/his/XHisEditor/XDocTree.vue +529 -529
- package/src/base-client/plugins/GetLoginInfoService.js +26 -1
- package/src/components/ImagePreview/ImagePreview.vue +323 -323
- package/src/constants/crypto.js +9 -1
- package/src/pages/login/Login.vue +107 -3
- package/src/router/async/router.map.js +6 -1
- package/src/services/user.js +7 -3
- package/src/utils/EncryptUtil.js +7 -2
- package/src/utils/login.js +29 -14
- package/src/utils/request.js +14 -3
- package/src/utils/util.js +27 -4
- package/vue.config.js +10 -0
- package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -7
- package/.idea/deployment.xml +0 -14
- package/.idea/encodings.xml +0 -6
- package/.idea/gradle.xml +0 -7
- package/.idea/misc.xml +0 -6
|
@@ -68,6 +68,23 @@ async function getLic () {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* 从 userLogin 响应中解析界面权限(功能权限名称列表)。
|
|
73
|
+
* 后端可能直接返回 r、permissions 或 premiss;有则无需再请求 getViewDetails。
|
|
74
|
+
* 与 guards.js 中 v4LoginData.r || v4LoginData.permissions 的判断保持一致。
|
|
75
|
+
* @param {object} response userLogin 接口返回的用户对象
|
|
76
|
+
* @returns {string[]|null} 权限名称列表;字段不存在时返回 null
|
|
77
|
+
*/
|
|
78
|
+
function resolveViewPermissions(response) {
|
|
79
|
+
if (!response || typeof response !== 'object') return null
|
|
80
|
+
const raw = response.r ?? response.permissions ?? response.premiss
|
|
81
|
+
if (raw === undefined || raw === null) return null
|
|
82
|
+
if (!Array.isArray(raw)) return null
|
|
83
|
+
return raw
|
|
84
|
+
.map(item => (typeof item === 'string' ? item : item?.name))
|
|
85
|
+
.filter(Boolean)
|
|
86
|
+
}
|
|
87
|
+
|
|
71
88
|
/**
|
|
72
89
|
* 获取界面细节 (界面权限)
|
|
73
90
|
* @returns {Promise<void>}
|
|
@@ -135,7 +152,15 @@ function searchFun (fun, name) {
|
|
|
135
152
|
|
|
136
153
|
const loginGen = async function (response, jwt) {
|
|
137
154
|
Vue.$login.f = response
|
|
138
|
-
|
|
155
|
+
const viewPermissions = resolveViewPermissions(response)
|
|
156
|
+
if (viewPermissions !== null) {
|
|
157
|
+
// 响应已带界面权限,与 guards.js 中 r || permissions 逻辑一致
|
|
158
|
+
Vue.$login.r = viewPermissions
|
|
159
|
+
} else {
|
|
160
|
+
// 响应无权限字段时,回退到 SEARCH 查询功能权限
|
|
161
|
+
await getViewDetails(response.id)
|
|
162
|
+
}
|
|
163
|
+
await Promise.all([Vue.$appdata.load()])
|
|
139
164
|
const login = {
|
|
140
165
|
f: Vue.$login.f,
|
|
141
166
|
jwt: jwt || Vue.$login.f.id,
|