From 15768147d6d39bda22ee227a10ab86898c061d6d Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Wed, 8 Jan 2025 10:32:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E8=AF=95=E7=AE=A1=E6=9E=B6?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 + src/pages/Index/Regular/TestTube.vue | 262 ++++++------ .../Index/components/Consumables/BallGrid.vue | 1 - .../Index/components/TestTube/ProjectSetting.vue | 165 -------- .../Index/components/TestTube/TestTubeRack.vue | 466 ++------------------- src/pages/Index/components/TestTube/Tube.vue | 33 ++ src/pages/Index/components/TestTube/index.ts | 2 - src/pages/Index/components/index.ts | 1 - src/services/Index/Test-tube/test-tube.ts | 22 + src/types/Index/TestTube.ts | 2 +- 10 files changed, 234 insertions(+), 722 deletions(-) delete mode 100644 src/pages/Index/components/TestTube/ProjectSetting.vue create mode 100644 src/pages/Index/components/TestTube/Tube.vue delete mode 100644 src/pages/Index/components/TestTube/index.ts diff --git a/package.json b/package.json index d76327e..1845897 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "nanoid": "^5.0.7", "pinia": "^2.2.4", "pinia-plugin-persistedstate": "^4.1.2", + "ramda": "^0.30.1", "sass": "^1.79.5", "simple-keyboard": "^3.8.17", "simple-keyboard-layouts": "^3.4.41", @@ -30,6 +31,7 @@ "devDependencies": { "@types/mockjs": "^1.0.10", "@types/node": "^22.7.5", + "@types/ramda": "^0.30.2", "@types/vue": "^2.0.0", "@typescript-eslint/eslint-plugin": "^8.8.1", "@typescript-eslint/parser": "^8.8.1", diff --git a/src/pages/Index/Regular/TestTube.vue b/src/pages/Index/Regular/TestTube.vue index 74cf70d..013b3af 100644 --- a/src/pages/Index/Regular/TestTube.vue +++ b/src/pages/Index/Regular/TestTube.vue @@ -2,92 +2,139 @@
-
- +
+
-
- -
-
- Add Icon + +
+
+ Add Icon +
+
添加试管架
-
添加试管架
- - +
+
+

项目选择

+
    +
  • +
    + {{ proj.projName }} + {{ proj.num }} +
    +
  • +
+
+
+

血液类型

+
+ {{ type.name }} +
+
+
- - - diff --git a/src/pages/Index/components/TestTube/TestTubeRack.vue b/src/pages/Index/components/TestTube/TestTubeRack.vue index faa58de..5e3c85e 100644 --- a/src/pages/Index/components/TestTube/TestTubeRack.vue +++ b/src/pages/Index/components/TestTube/TestTubeRack.vue @@ -1,442 +1,68 @@ - - diff --git a/src/pages/Index/components/TestTube/Tube.vue b/src/pages/Index/components/TestTube/Tube.vue new file mode 100644 index 0000000..ca22b29 --- /dev/null +++ b/src/pages/Index/components/TestTube/Tube.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/src/pages/Index/components/TestTube/index.ts b/src/pages/Index/components/TestTube/index.ts deleted file mode 100644 index d07a931..0000000 --- a/src/pages/Index/components/TestTube/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as ProjectSetting } from './ProjectSetting.vue' -export { default as TestTubeRack } from './TestTubeRack.vue' diff --git a/src/pages/Index/components/index.ts b/src/pages/Index/components/index.ts index d38f900..1f76c73 100644 --- a/src/pages/Index/components/index.ts +++ b/src/pages/Index/components/index.ts @@ -3,6 +3,5 @@ export * from './Consumables' export * from './History' export * from './Setting' -export * from './TestTube' export * from './Setting' export * from './Running' diff --git a/src/services/Index/Test-tube/test-tube.ts b/src/services/Index/Test-tube/test-tube.ts index 86c84af..3e173ca 100644 --- a/src/services/Index/Test-tube/test-tube.ts +++ b/src/services/Index/Test-tube/test-tube.ts @@ -1,5 +1,27 @@ import apiClient from '../../../utils/axios' import type { TubeActivationStatus, TubeSetting } from '../../../types/Index' +/* +"data": [ + { + "key": "WHOLE_BLOOD", + "name": "全血" + }, + { + "key": "SERUM_OR_PLASMA", + "name": "血清或者血浆" + } +] +*/ +export const getBloodTypes = async () => { + try { + const res = await apiClient.post( + '/api/v1/app/appTubeSettingMgr/getBloodTypes', + ) + return res.data + } catch (error) { + console.log('获取已配置试管时出错:', error) + } +} //获取已经配置的试管信息 export const getTestTube = async () => { try { diff --git a/src/types/Index/TestTube.ts b/src/types/Index/TestTube.ts index 6d2806b..de13c45 100644 --- a/src/types/Index/TestTube.ts +++ b/src/types/Index/TestTube.ts @@ -22,7 +22,7 @@ export interface DataItem { active: boolean tubeSettings: TubeSetting[] lock: boolean - selectedSampleIds?: Array + // selectedSampleIds?: Array } export interface handleTube {