| | |
| | | <template> |
| | | <div class="userinfo-container"> |
| | | <img :src="userInfo.用户头像" alt="" srcset="" class="user-avatar"> |
| | | <div class="user-text">当前账户:{{ userInfo.用户昵称 }}</div> |
| | | <!-- <img :src="userInfo.用户头像" alt="" srcset="" class="user-avatar"> --> |
| | | <div class="user-text">当前账户:{{ userInfo.userName }}</div> |
| | | <div class="user-text">床号:{{ userInfo.床号 }}</div> |
| | | <div class="user-text">设备号:{{ userInfo.设备编号 }}</div> |
| | | </div> |
| | |
| | | <script lang="ts"> |
| | | import { computed } from "vue"; |
| | | import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen"; |
| | | import { defaultUserInfo } from '@/store/type/user.type'; |
| | | |
| | | export default { |
| | | name: "UserInfo", |
| | |
| | | const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore(); |
| | | |
| | | const userInfo = computed(() => { |
| | | const userInfo = bedsideAuxiliaryScreenStore.userInfo || defaultUserInfo(); |
| | | const userInfo = bedsideAuxiliaryScreenStore.userInfo; |
| | | if (!userInfo) return null; |
| | | return { |
| | | ...userInfo, |
| | | 床号: bedsideAuxiliaryScreenStore.deviceData.devicdeNo, |