HomeHeader.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <div class="home-header">
  3. <div class="left">
  4. <div class="sys-icon" @click="linkToHome">
  5. <div class="iconfont icon-a-zu11198"></div>
  6. <div class="title">{{ subTitle }}</div>
  7. </div>
  8. </div>
  9. <div class="right user-panel" v-if="syUser['Name']">
  10. {{syUser['Name']}}
  11. </div>
  12. </div>
  13. </template>
  14. <script setup>
  15. import UserAvatar from '@/views/components/UserNewAvatar.vue';
  16. import { linkToHome } from '@/utils/external-links';
  17. import { useUserStore } from '@/stores';
  18. import { computed } from 'vue';
  19. const store = useUserStore();
  20. console.log("store---------------------------------")
  21. console.log(store.user)
  22. const syUser = computed(() => store.user.syUser);
  23. const systemTitle = ref(AppGlobalConfig.system.name)
  24. const props = defineProps({
  25. subTitle: {
  26. type: String,
  27. default: ''
  28. }
  29. })
  30. </script>
  31. <style scoped lang="scss">
  32. .home-header {
  33. width: 100%;
  34. height: 60px;
  35. background: #002A7F;
  36. cursor: pointer;
  37. padding: 0 40px 0 40px;
  38. display: flex;
  39. justify-content: space-between;
  40. .left {
  41. height: 100%;
  42. display: flex;
  43. justify-content: flex-start;
  44. align-items: center;
  45. .sys-icon {
  46. margin-right: 6px;
  47. display: flex;
  48. align-items: center;
  49. >.iconfont {
  50. color: #FFF;
  51. font-size: 36px;
  52. }
  53. >.title {
  54. font-family: AlimamaShuHeiTi-Bold;
  55. font-size: 25px;
  56. margin-left: 10px;
  57. color: #fff;
  58. }
  59. }
  60. >.sub_title {
  61. color: #fff;
  62. position: relative;
  63. padding-left: 20px;
  64. font-size: 22px;
  65. font-weight: bolder;
  66. &::before {
  67. position: absolute;
  68. width: 15px;
  69. height: 1px;
  70. left: 0px;
  71. top: 0px;
  72. bottom: 0px;
  73. margin: auto;
  74. content: "";
  75. display: block;
  76. background: #E5E6E6;
  77. }
  78. }
  79. }
  80. .right {
  81. height: 100%;
  82. width: 180px;
  83. color: #fff;
  84. overflow: hidden;
  85. display: flex;
  86. align-items: center;
  87. justify-content: flex-end;
  88. }
  89. }
  90. </style>