From 1abbafcbe05c47b54281e526187a3f0e6480ea1f Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Tue, 21 Jan 2025 20:11:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Didcardbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Index/Index.vue | 15 ++++-- .../Index/components/Consumables/IdCardInfo.vue | 57 +++++++++++++++------- .../components/Consumables/MoveLiquidArea.vue | 11 ++--- .../Index/components/Consumables/Warn/InitWarn.vue | 6 +-- src/services/Index/idCard.ts | 11 +++++ src/store/modules/consumables.ts | 21 ++++++++ src/websocket/socket.ts | 14 ++++++ 7 files changed, 104 insertions(+), 31 deletions(-) diff --git a/src/pages/Index/Index.vue b/src/pages/Index/Index.vue index 2185a10..696155a 100644 --- a/src/pages/Index/Index.vue +++ b/src/pages/Index/Index.vue @@ -279,7 +279,7 @@ v-if="idCardInserted" :visible="idCardInserted" title="检测到id卡插入" - message="是否保存id卡信息" + :message="idCardMessage" cancelText="返回" icon="/src/assets/update-pin-icon.svg" confirmText="确认保存" @@ -389,6 +389,7 @@ const emergencyStore = useEmergencyStore() const shutdownMessage = ref('正在关机中…') const confirmInfo = ref({}) const confirmVisible = ref(false) +const idCardMessage = ref('是否保存id卡信息') const failMessage = ref({ title: '检测失败', @@ -463,19 +464,25 @@ const handleSocketClose = (num: number) => { } // 处理应用事件消息 +// const formatDate = (date: any) => new Date(date).toLocaleDateString() const handleAppEvent = (data: AppEventMessage['data']) => { console.log('🚀 ~ handleAppEvent ~ data:', data) if (data.typeName === 'AppPromptEvent') { eventReports.value.push(data) showEventReportDlg.value = true } else if (data.typeName === 'AppIDCardMountEvent') { - // let mock = reportText - // eventReports.value.push(mock) - // showEventReportDlg.value = true consumableStore.setIdCardInserted(true) + let projectInfo = data.projectInfo + consumableStore.setIdCardInfo(projectInfo) + //显示部分id卡信息。 项目名称,过期时间,批次号 idCardInserted.value = true + idCardMessage.value = `