单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-09-04 0db50921e776525ac6d35fe50e64c605b6be1374
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
  <div class="userinfo-container">
    <img :src="userInfo.用户头像" alt="" srcset="" class="user-avatar">
    <div class="user-text">当前账户:{{ userInfo.用户昵称 }}</div>
    <div class="user-text">床号:{{ userInfo.床号 }}</div>
    <div class="user-text">设备号:{{ userInfo.设备编号 }}</div>
  </div>
</template>
 
<script lang="ts">
import { computed } from "vue";
import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen";
import { defaultUserInfo } from '@/store/type/user.type';
 
export default {
  name: "UserInfo",
  setup() {
    const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore();
 
    const userInfo = computed(() => {
      const userInfo = bedsideAuxiliaryScreenStore.userInfo || defaultUserInfo();
      return {
        ...userInfo,
        床号: bedsideAuxiliaryScreenStore.deviceData.devicdeNo,
        设备编号: bedsideAuxiliaryScreenStore.deviceCode
      }
    });
 
    return {
        userInfo
    };
  },
};
</script>
 
<style lang="less" scoped>
.userinfo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    .user-avatar {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        overflow: hidden;
        margin-bottom: 5px;
    }
    .user-text {
        font-size: 5px;
        color: #000;
        margin-bottom: 4px;
    }
}
</style>