chenyc
2022-07-08 dc7afd089a74edf6a9e50d0eb3e0607d09e72548
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { Session } from '@/utils/storage'
 
export const patientInfoStore =defineStore('patientInfo',()=>{
    const patientInfo=ref({
            id:0,
            code:'',
            name:'',
            patientAvatarIcon:'',
            deviceCode:'',
            hemoCode:'',
            pureWeight:''
 
       })// 初始值
    const viewNumber=ref(60)
    function setpatientInfo(patient:any){
        patientInfo.value=patient
        Session.set('patientInfo', patient)
    }
    function setViewNumber(num:any){
        viewNumber.value=num
    }
    return {patientInfo,setpatientInfo,viewNumber,setViewNumber}
})