From 0735d82d487e7dee67fce633effef519ec343cc7 Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期五, 12 九月 2025 15:10:47 +0800
Subject: [PATCH] ID1766-外部引用资源安装到本地
---
src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue b/src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue
index 43c53fc..fe56ba9 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue
@@ -59,13 +59,24 @@
});
const isLoginng = computed(() => {
- return !!bedsideAuxiliaryScreenStore.token;
+ return !!bedsideAuxiliaryScreenStore.userInfo?.code;
});
const qrCodeData = computed(() => {
return {
deviceCode: bedsideAuxiliaryScreenStore.deviceCode,
+ deviceNo: bedsideAuxiliaryScreenStore.deviceData.devicdeNo,
};
+ });
+
+ const userInfo = computed(() => {
+ const userInfo = bedsideAuxiliaryScreenStore.userInfo;
+ if (!userInfo) return null;
+ return {
+ ...userInfo,
+ 床号: bedsideAuxiliaryScreenStore.deviceData.devicdeNo,
+ 设备编号: bedsideAuxiliaryScreenStore.deviceCode
+ }
});
const openDialog = () => {
@@ -77,13 +88,24 @@
};
const onLogout = () => {
+ if (state.loading) return ElMessage.warning('正在退出中...')
ElMessageBox.confirm("是否确认退出当前登录用户?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
- .then(() => {
- bedsideAuxiliaryScreenStore.logout();
+ .then(async() => {
+ state.loading = true
+ try {
+ await bedsideAuxiliaryScreenStore.logout(bedsideAuxiliaryScreenStore.deviceCode);
+ handleCancel();
+ ElMessage.success('退出登录成功')
+ handleCancel();
+ } catch (error) {
+ ElMessage.success('退出登录失败')
+ } finally {
+ state.loading = false;
+ }
ElMessage({
type: "success",
message: "退出成功!",
@@ -100,6 +122,7 @@
handleCancel,
openDialog,
onLogout,
+ userInfo,
};
},
};
--
Gitblit v1.8.0