|
|
@ -4,30 +4,16 @@ import type { TestTubeRack } from '../../types/Index' |
|
|
|
export const useTestTubeStore = defineStore( |
|
|
|
'testTube', |
|
|
|
() => { |
|
|
|
// 目前它用于传参。 跳转至「编辑用户ID信息」页面时,做数据转储
|
|
|
|
const tubeRack = ref<TestTubeRack>({} as TestTubeRack) |
|
|
|
const bloodTypes = ref<{ key: string; name: string }[]>([]) |
|
|
|
// const projectSettings = ref<Record<string, string>>({})
|
|
|
|
|
|
|
|
const setTubeRack = (rack: TestTubeRack) => { |
|
|
|
tubeRack.value = rack |
|
|
|
} |
|
|
|
const setBloodTypes = (types: { key: string; name: string }[]) => { |
|
|
|
bloodTypes.value = types |
|
|
|
} |
|
|
|
// 设置指定试管架的项目设置
|
|
|
|
// const setProjectSetting = (uuid: string, setting: string) => {
|
|
|
|
// projectSettings.value[uuid] = setting
|
|
|
|
// }
|
|
|
|
// 获取指定试管架的项目设置,默认返回 '自动'
|
|
|
|
// const getProjectSetting = (uuid: string): string => {
|
|
|
|
// return projectSettings.value[uuid] || '自动'
|
|
|
|
// }
|
|
|
|
|
|
|
|
// const bloodTypes = ref([])
|
|
|
|
return { |
|
|
|
tubeRack, |
|
|
|
setTubeRack, |
|
|
|
bloodTypes, |
|
|
|
setBloodTypes, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|