Browse Source

feat (1.75.0 -> 1.75.1): 重构系统配置API响应结构,优化工作流配置处理并更新文档

- 在 options.ts 中重构 configResponse 数据结构,添加嵌套的 configs 数组
- 在 Workflow.tsx 中更新配置处理逻辑,适配新的API响应格式
- 更新 README.md 文档格式和部署命令

改动文件:
- CHANGELOG.md
- README.md
- package.json
- src/API/system/options.ts
- src/pages/system/SettingsModal/sections/Preferences/Workflow.tsx

# Conflicts:
#	README.md
szy 1 day ago
parent
commit
2d8d42b1a0
5 changed files with 32 additions and 31 deletions
  1. 14 0
      CHANGELOG.md
  2. 2 14
      README.md
  3. 1 1
      package.json
  4. 4 1
      src/API/system/options.ts
  5. 11 15
      src/pages/system/SettingsModal/sections/Preferences/Workflow.tsx

+ 14 - 0
CHANGELOG.md

@@ -2,6 +2,20 @@
 
 本项目的所有重要变更都将记录在此文件中.
 
+## [1.75.1] - 2026-01-20 10:20
+
+feat (1.75.0 -> 1.75.1): 重构系统配置API响应结构,优化工作流配置处理并更新文档
+
+- 在 options.ts 中重构 configResponse 数据结构,添加嵌套的 configs 数组
+- 在 Workflow.tsx 中更新配置处理逻辑,适配新的API响应格式
+- 更新 README.md 文档格式和部署命令
+
+改动文件:
+
+- README.md
+- src/API/system/options.ts
+- src/pages/system/SettingsModal/sections/Preferences/Workflow.tsx
+
 ## [1.75.0] - 2026-01-19 19:50
 
 feat (1.74.0 -> 1.75.0): 实现工作流设置表格拖拽排序功能,支持任务清单和历史清单的拖拽重新排序

+ 2 - 14
README.md

@@ -28,18 +28,6 @@
 
 根据部署环境选择对应的构建命令:
 
-### 浏览器环境(Web 服务器部署)
-
-适用于 Nginx 反向代理部署场景:
-
-```bash
-npm i
-npm run h5:browser
-```
-
-- API URL: 空字符串(由 Nginx 代理处理)
-- MQTT URL: `/mqtt`(相对路径)
-
 ### Electron 环境(桌面应用)
 
 适用于 Electron 桌面应用场景:
@@ -57,7 +45,7 @@ npm run h5:electron
 ## 构建android平台的应用包[Hybrid]
 
 - npm i
-- npm run h5_for_production
+- npm run build:h5
 - npm run build:android
 
 环境要求:
@@ -221,5 +209,5 @@ Monkey Test 会随机执行以下操作:
 # h5构建并部署到发布服务器
 
 ```
-npm run deploy:h5
+ nom run deploy:h5
 ```

+ 1 - 1
package.json

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

+ 4 - 1
src/API/system/options.ts

@@ -26,7 +26,10 @@ export interface configResponse {
   code: string;
   description: string;
   solution: string;
-  data: configItem[];
+  data: {
+    '@type': string;
+    configs: configItem[];
+  };
 }
 
 // 获取配置的可选项

+ 11 - 15
src/pages/system/SettingsModal/sections/Preferences/Workflow.tsx

@@ -218,11 +218,9 @@ const Workflow: React.FC = () => {
 
     // 创建配置映射
     const configMap: Record<string, string> = {};
-    if (res?.data) {
-      res.data.forEach((config) => {
-        configMap[config.uri] = config.config_value;
-      });
-    }
+    (res.data?.configs || []).forEach((config) => {
+      configMap[config.uri] = config.config_value;
+    });
 
     // 获取特殊配置项并解析
     const workListFieldsStr = configMap['Patient/WorkListFields'] || '[]';
@@ -233,16 +231,14 @@ const Workflow: React.FC = () => {
 
     // 过滤掉特殊配置项,只保留普通配置项用于表单
     const formFieldsConfigs = {};
-    if (res?.data) {
-      res.data.forEach((config) => {
-        if (
-          config.uri !== 'Patient/WorkListFields' &&
-          config.uri !== 'Patient/HistoryListFields'
-        ) {
-          formFieldsConfigs[config.uri] = config.config_value;
-        }
-      });
-    }
+    (res.data.configs || []).forEach((config) => {
+      if (
+        config.uri !== 'Patient/WorkListFields' &&
+        config.uri !== 'Patient/HistoryListFields'
+      ) {
+        formFieldsConfigs[config.uri] = config.config_value;
+      }
+    });
 
     form.setFieldsValue(formFieldsConfigs);
   };