单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-07-28 7fd770011e638950ef61edab1a8da176f45da77b
src/store/bedsideAuxiliaryScreen.ts
@@ -1,7 +1,6 @@
import { defineStore } from "pinia";
import { ref } from "vue";
import dayjs from "dayjs";
import cache from "../utils/cache";
import { EventSourcePolyfill } from "event-source-polyfill";
import type { BedsideAuxiliaryScreen, SseMsgData } from "./type/bedsideAuxiliaryScreen.type";
import type { Task } from "./type/task.type";
@@ -11,12 +10,13 @@
  formatDeviceData,
} from "./type/bedsideAuxiliaryScreen.type";
import { ElMessage } from "element-plus/es";
import { Local } from "@/utils/storage";
export const useBedsideAuxiliaryScreenStore = defineStore(
  "bedsideAuxiliaryScreen",
  () => {
    /** 设备编号 */
    const deviceCode = ref<string>(cache.get("devcieCode") || "");
    const deviceCode = ref<string>(Local.get("devcieCode") || "");
    /** 设备信息数据 */
    const deviceData = ref<BedsideAuxiliaryScreen>(defaultDeviceData());
@@ -30,7 +30,7 @@
     */
    const setDeviceCode = (code: string) => {
      deviceCode.value = code;
      cache.set("devcieCode", code);
      Local.set("devcieCode", code);
    };
    /**