| 1234567891011121314151617181920212223242526 |
- import { defineStore } from 'pinia';
- import type { PulseAnalysisModel } from '@/request/model';
- export const useVisitor = defineStore('visitor', () => {
- const patientId = ref<string>();
- const resultId = ref<string>();
- const reportId = ref<string>();
- const pulseReport = shallowRef<PulseAnalysisModel>();
- const $reset = () => {
- patientId.value = '';
- resultId.value = '';
- reportId.value = '';
- pulseReport.value = void 0;
- };
- function updatePulseReport(report: PulseAnalysisModel, patient?: string) {
- if (patientId.value?.toString() !== patient || !pulseReport.value?.results) {
- if (patient) patientId.value = patient;
- pulseReport.value = report;
- }
- }
- return { patientId, resultId, reportId, pulseReport, $reset, updatePulseReport };
- });
|