| src/router/index.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/store/bedsideAuxiliaryScreen.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/store/type/bedsideAuxiliaryScreen.type.ts | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/mobile/bedsideAuxiliaryScreen/components/SettingDeviceDialog.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/router/index.ts
@@ -18,7 +18,7 @@ { path: '/test2', name: 'test2', component: deviceWindows2, component: bedsideAuxiliaryScreen, }, { path: '/test', 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); }; /** src/store/type/bedsideAuxiliaryScreen.type.ts
@@ -1,5 +1,5 @@ import { tryConvertToInt, deepClone } from "@/utils/utils"; import cache from "@/utils/cache"; import { Local } from "@/utils/storage"; export interface IotInfo { 属性历史列表: any[]; 床号: string; @@ -402,7 +402,7 @@ }; export const defaultDeviceData = (): BedsideAuxiliaryScreen => { const pageType = cache.get("devcieCode") const pageType = Local.get("devcieCode") ? EPageType.LOADING : EPatForm.OUTPATIENT_SERVICE; return { src/views/mobile/bedsideAuxiliaryScreen/components/SettingDeviceDialog.vue
@@ -54,7 +54,7 @@ <template #footer> <div class="my-button cancel" @click="handleCancel">取消</div> <div class="my-button confirm" @click="handleConfirm">确认</div> <div class="my-button refresh" @click="handleRefresh">刷新</div> <div class="my-button refresh" @click="handleRefresh">检查更新</div> </template> </el-dialog> </div> @@ -137,14 +137,15 @@ const handleConfirm = () => { bedsideAuxiliaryScreenStore.setDeviceCode(devcieCode.value + ""); handleRefresh(); bedsideAuxiliaryScreenStore.refresh( `${import.meta.env.VITE_SSE_BASE_URL}${devcieCode.value}` ); handleCancel(); }; const handleRefresh = () => { bedsideAuxiliaryScreenStore.refresh( `${import.meta.env.VITE_SSE_BASE_URL}${devcieCode.value}` ); window.location.reload(); ElMessage.success('已更新至最新版本') }; defineExpose({