A8000
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

36 lines
1.1 KiB

import { defineStore } from 'pinia'
import { ref } from 'vue'
import type { TestTubeRack } from '../../types/Index'
export const useTestTubeStore = defineStore(
'testTube',
() => {
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,
}
},
{
persist: true,
},
)