Просмотр исходного кода

fix: 修复人体部位服务端名称格式问题

- 将上肢和下肢服务端名称从下划线分隔改为空格分隔
- Human_UPPER_LIMB  Human_UPPER LIMB
- Human_LOWER_LIMB  Human_LOWER LIMB
- 确保前后端数据交互时名称格式一致性

改动文件:
- src/components/HumanBody.tsx
- CHANGELOG.md
- package.json
- package-lock.json
dengdx 3 недель назад
Родитель
Сommit
da8f74a792
5 измененных файлов с 38 добавлено и 10 удалено
  1. 29 1
      CHANGELOG.md
  2. 3 3
      config/dev.ts
  3. 2 2
      package-lock.json
  4. 1 1
      package.json
  5. 3 3
      src/components/HumanBody.tsx

+ 29 - 1
CHANGELOG.md

@@ -2,6 +2,34 @@
 
 本项目的所有重要变更都将记录在此文件中。
 
+## [1.12.5] - 2025-12-18 13:47
+
+### 修复 (Fixed)
+- **人体部位服务端名称格式修复** ([src/components/HumanBody.tsx](src/components/HumanBody.tsx))
+  - 修复人体部位服务端名称格式,将下划线分隔改为空格分隔
+  - 上肢(左/右):`Human_UPPER_LIMB` → `Human_UPPER LIMB`
+  - 下肢(左/右):`Human_LOWER_LIMB` → `Human_LOWER LIMB`
+  - 确保前后端数据交互时名称格式一致性
+  - 提升代码可读性和系统兼容性
+
+**核心改进:**
+- 数据规范化:统一服务端名称格式,使用空格而非下划线分隔
+- 系统兼容性:确保前后端通信时名称格式正确匹配
+- 可读性提升:空格分隔更符合自然语言习惯
+
+**技术实现:**
+- 修改 bodyParts 配置对象中的 serverName 属性
+- 影响左右上肢和左右下肢共3处修改
+- 保持其他部位名称格式不变
+
+**改动文件:**
+- src/components/HumanBody.tsx
+- CHANGELOG.md
+- package.json (版本更新: 1.12.4 -> 1.12.5)
+- package-lock.json
+
+---
+
 ## [1.12.4] - 2025-12-18 13:06
 
 ### 修复 (Fixed)
@@ -433,7 +461,7 @@
 
 **技术实现:**
 - 使用 `getIpPort()` 获取当前服务器地址
-- 正则表达式 `/(https?:\\/\\/[^\\/]+)/` 匹配 URL 中的服务器部分
+- 正则表达式 `/(https?:\/\/[^\/]+)/` 匹配 URL 中的服务器部分
 - 更新 metadata.referencedImageId 和 metadata.referencedImageURI
 - 在 renderAnnotations 中调用 updateAnnotationUrls 处理每个注释
 

+ 3 - 3
config/dev.ts

@@ -12,7 +12,7 @@ export default {
     stats: true,
   },
   defineConstants: {
-    MQTT_BROKER_URL_FROM_WEBPACK: '"ws://192.168.110.245:8083/mqtt"',
+    MQTT_BROKER_URL_FROM_WEBPACK: '"ws://192.168.110.13:8083/mqtt"',
   },
   mini: {},
   h5: {
@@ -21,14 +21,14 @@ export default {
     devServer: {
       proxy: {
         '/dr': {
-          target: 'http://192.168.110.245:6001', // 你的后端服务地址
+          target: 'http://192.168.110.13:6001', // 你的后端服务地址
           changeOrigin: true, // 允许跨域
           // pathRewrite: {
           //   '^/dr/api': '' // 可选,用于重写路径
           // }
         },
         '/mqtt': {
-          target: 'ws://192.168.110.245:8083', // MQTT WebSocket 服务地址
+          target: 'ws://192.168.110.13:8083', // MQTT WebSocket 服务地址
           changeOrigin: true,
           ws: true, // 启用 WebSocket 代理
           // pathRewrite: {

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "zsis",
-  "version": "1.11.6",
+  "version": "1.12.3",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "zsis",
-      "version": "1.11.6",
+      "version": "1.12.3",
       "dependencies": {
         "@babel/runtime": "^7.24.4",
         "@cornerstonejs/core": "^3.28.0",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "zsis",
-  "version": "1.12.4",
+  "version": "1.12.5",
   "private": true,
   "description": "医学成像系统",
   "main": "main.js",

+ 3 - 3
src/components/HumanBody.tsx

@@ -103,7 +103,7 @@ const bodyParts = {
       height: '280px',
       zIndex: 1,
     },
-    serverName: 'Human_UPPER_LIMB', //服务端认识的名字
+    serverName: 'Human_UPPER LIMB', //服务端认识的名字
   },
   UpperLimb_Right: {
     normal: UpperLimb_Right,
@@ -127,7 +127,7 @@ const bodyParts = {
       height: '337px',
       zIndex: 1,
     },
-    serverName: 'Human_LOWER_LIMB', //服务端认识的名字
+    serverName: 'Human_LOWER LIMB', //服务端认识的名字
   },
   LowerLimb_Right: {
     normal: LowerLimb_Right,
@@ -139,7 +139,7 @@ const bodyParts = {
       height: '337px',
       zIndex: 1,
     },
-    serverName: 'Human_LOWER_LIMB', //服务端认识的名字
+    serverName: 'Human_LOWER LIMB', //服务端认识的名字
   },
 };