石墨仪设备 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
4.3 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <div class="header">
  3. <div class="header_logo">
  4. <img :src="logo" class="logo"/>
  5. <div>长春黄金研究院有限公司</div>
  6. </div>
  7. <div class="header_time">
  8. {{ currentTime }}
  9. </div>
  10. <div class="header_user">
  11. <img :src="AvatarSvg" width="20px" height="20px"/>
  12. <div class="user_name" @click="onShowMenu">Admin</div>
  13. <div class="user_opt" v-show="showUserMenu">
  14. <div class="updatePwd">修改密码</div>
  15. <div class="login_out">退出登录</div>
  16. </div>
  17. </div>
  18. </div>
  19. </template>
  20. <script lang="ts" setup>
  21. import logo from '@/assets/logo.svg'
  22. import AvatarSvg from '@/assets/avatar.svg'
  23. import { ref, onMounted } from 'vue'
  24. import {eventBus} from '@/eventBus'
  25. import { getFormattedDateTime } from '@/utils'
  26. const menuId = ref(0)
  27. const time = getFormattedDateTime()
  28. const showUserMenu = ref(false)
  29. const currentTime = ref(time)
  30. onMounted(()=>{
  31. //测试页面返回时,需要调整菜单
  32. // eventBus.on('menuId', (value:number)=>{
  33. // menuId.value = value
  34. // })
  35. })
  36. const onShowMenu = () => {
  37. showUserMenu.value = !showUserMenu.value;
  38. }
  39. </script>
  40. <style lang="scss" scoped>
  41. @use "@/assets/style/mixin.scss" as *;
  42. .header{
  43. display: flex;
  44. align-items: center;
  45. background: #e9e9e9;
  46. align-items: center;
  47. height: var(--headerHeight);
  48. .header_logo{
  49. display: flex;
  50. font-size: 1.125rem;
  51. align-items: center;
  52. width: 21.875rem;
  53. color: #8799AB;
  54. gap: 5px;
  55. padding-left: 1.5625rem;
  56. .logo{
  57. height:2.75rem;
  58. width:2.625rem;
  59. }
  60. }
  61. .header_time{
  62. width: 11.875rem;
  63. height: 2.5rem;
  64. font-size: .875rem;
  65. display: flex;
  66. align-items: center;
  67. margin-left: 54%;
  68. background: white;
  69. justify-content: center;
  70. border-radius: 10px;
  71. }
  72. .header_ins{
  73. display: flex;
  74. align-items: center;
  75. border-radius: 5px;
  76. width: 13.875rem;
  77. height: 2.5rem;
  78. background: #FFFFFF;
  79. }
  80. .header_container{
  81. margin-left: 3.125rem;
  82. display: flex;
  83. align-items: center;
  84. border-radius: 5px;
  85. width: 15.625rem;
  86. height: 2.5rem;
  87. background: #FFFFFF;
  88. .waste_status{
  89. padding:5px 5px;
  90. width: 75%;
  91. }
  92. .waste_detail{
  93. display: flex;
  94. justify-content: flex-end;
  95. width: 40%;
  96. }
  97. }
  98. .header_user{
  99. display: flex;
  100. align-items: center;
  101. justify-content: flex-end;
  102. gap: 5px;
  103. margin-left: .9375rem;
  104. }
  105. .user_name{
  106. font-size: 1rem;
  107. color: #393F46;
  108. }
  109. .user_opt{
  110. width: 12.25rem;
  111. height: 6.25rem;
  112. position:absolute;
  113. top:3rem;
  114. background: #ffffff;
  115. .updatePwd{
  116. color: #323233;
  117. font-size: 1.125rem;
  118. display: flex;
  119. justify-content: center;
  120. margin-top: 1.5rem;
  121. }
  122. .login_out{
  123. color: #323233;
  124. font-size: 1.125rem;
  125. display: flex;
  126. justify-content: center;
  127. margin-top: .5rem;
  128. }
  129. }
  130. }
  131. .circle {
  132. width: .9375rem;
  133. height: .9375rem;
  134. background-color: green;
  135. border-radius: 50%;
  136. margin-left: .3125rem;
  137. }
  138. :deep(.van-dropdown-menu__bar){
  139. background-color: #1871F8;
  140. border-radius: 5px;
  141. height: .1rem;
  142. width: 2.875rem;
  143. .van-ellipsis{
  144. color:white;
  145. }
  146. }
  147. :deep(.van-dropdown-item__content){
  148. width: 4.75rem;
  149. margin-left: 5.375rem;
  150. }
  151. .text_size{
  152. font-size:1rem;
  153. padding-right: 5px;
  154. }
  155. </style>