From fe7d89da5244caabc3f0904a87a90259f4776a0a Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Sat, 18 Jan 2025 21:19:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E5=90=ACContext=E7=8A=B6=E6=80=81?= =?UTF-8?q?=EF=BC=8C=E5=86=B3=E5=AE=9A=E6=98=AF=E5=90=A6=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Index/History.vue | 15 +---------- src/pages/Index/Index.vue | 61 +++++++++++++++++++++++++++++++++------------ src/services/Login/login.ts | 4 +-- src/store/modules/device.ts | 21 ++++++++++++++++ src/websocket/socket.ts | 19 ++++++++++++++ 5 files changed, 88 insertions(+), 32 deletions(-) diff --git a/src/pages/Index/History.vue b/src/pages/Index/History.vue index 31ee328..463f037 100644 --- a/src/pages/Index/History.vue +++ b/src/pages/Index/History.vue @@ -145,7 +145,7 @@ import { exportRecordsToLIS, } from '../../services/Index/index' import HistoryMessage from './components/History/HistoryMessage.vue' -import type { ResultItem, TableItem } from '../../types/Index' +import type { TableItem } from '../../types/Index' import WarnSvg from '@/assets/Index/History/warn.svg' import PrintSvg from '@/assets/Index/History/print.svg' import ErrorSvg from '@/assets/Warn.svg' @@ -155,19 +155,6 @@ import { useSettingTestTubeStore } from '@/store' const settingTubeStore = useSettingTestTubeStore() -const showResult = (t: ResultItem) => { - if (t.status !== 'SUCCESS') { - return '错误' - } - const unit1 = t.resultConverters[0] - return ( - t.subProjName + - ' ' + - (t.result * unit1.A + unit1.B).toFixed(2) + - ' ' + - unit1.uintstr - ) -} // 添加表格引用 const historyTableRef = ref() diff --git a/src/pages/Index/Index.vue b/src/pages/Index/Index.vue index 681f872..5680cc7 100644 --- a/src/pages/Index/Index.vue +++ b/src/pages/Index/Index.vue @@ -78,12 +78,18 @@ - -
- -
{{ username || '未登录' }}
+ +
+ +
+ {{ + deviceStore.contextState.loginFlag + ? deviceStore.contextState.loginUser.account + : '未登录' + }}
-