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.
Files changed (39) hide show
  1. package/.env.iot +1 -0
  2. package/.idea/af-vue2-client.iml +2 -3
  3. package/.idea/inspectionProfiles/Project_Default.xml +17 -0
  4. package/1yarn.lock +11850 -0
  5. package/logs/afgit.config.log +12 -0
  6. package/logs/afgit.config.log.2026-02-27 +7 -0
  7. package/logs/afgit.config_error.log +6 -0
  8. package/logs/afgit.config_error.log.2026-02-27 +3 -0
  9. package/package.json +1 -1
  10. package/pnpm-workspace.yaml +4 -0
  11. package/public/his/editor/mock/bind_data_with_images.html +78 -0
  12. package/public/his/editor/mock/blank.html +645 -0
  13. package/src/assets/img/80359c35a5465167cb25ff87bab49035d041a65558b35-YJOr3x.png +0 -0
  14. package/src/assets/img/hisLogo.png +0 -0
  15. package/src/assets/svg/unknown-icon.svg +3 -3
  16. package/src/base-client/components/common/AfMap/InfoWindowComponent.vue +141 -141
  17. package/src/base-client/components/common/AfMap/demo.vue +492 -492
  18. package/src/base-client/components/common/HIS/HButtons/HButtons.vue +89 -1
  19. package/src/base-client/components/common/HIS/HButtons/HButtonsSuffixDemo.vue +141 -0
  20. package/src/base-client/components/common/Upload/Upload.vue +2 -2
  21. package/src/base-client/components/common/XInspectionDetailDrawer/components/DeviceStatus.vue +1 -1
  22. package/src/base-client/components/his/XHisEditor/ImageReportDemo.vue +156 -0
  23. package/src/base-client/components/his/XHisEditor/XDocTree.vue +529 -529
  24. package/src/base-client/plugins/GetLoginInfoService.js +26 -1
  25. package/src/components/ImagePreview/ImagePreview.vue +323 -323
  26. package/src/constants/crypto.js +9 -1
  27. package/src/pages/login/Login.vue +107 -3
  28. package/src/router/async/router.map.js +6 -1
  29. package/src/services/user.js +7 -3
  30. package/src/utils/EncryptUtil.js +7 -2
  31. package/src/utils/login.js +29 -14
  32. package/src/utils/request.js +14 -3
  33. package/src/utils/util.js +27 -4
  34. package/vue.config.js +10 -0
  35. package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -7
  36. package/.idea/deployment.xml +0 -14
  37. package/.idea/encodings.xml +0 -6
  38. package/.idea/gradle.xml +0 -7
  39. 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
- await Promise.all([Vue.$appdata.load(), getViewDetails(Vue.$login.f.id)])
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,