| | |
| | | <span class="font-medium text-white tracking-wide">{{ item.title }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="user_text" v-if="isLoginStatus"> |
| | | <div class="user_head"> |
| | | <span |
| | | ><span |
| | | ><span class="user-head">{{ firstUserCharacter }}</span |
| | | ><span class="identifying"><!----></span></span |
| | | ><span class="user_name"> {{ userName }} </span></span |
| | | ><span ref="toggleExitLoginBtnRef" |
| | | ><span |
| | | class="ywifont text-white" |
| | | :class="{ 'ywicon-fold': !state.isShowExitLogin, 'ywicon-unfold': state.isShowExitLogin }" |
| | | @click="toggleShowExitLogin" |
| | | ></span |
| | | ></span> |
| | | </div> |
| | | <div class="pop_up actived" v-show="state.isShowExitLogin"> |
| | | <el-popover placement="right" :width="200" trigger="hover" popper-class="set-theme"> |
| | | <template #reference> |
| | | <div class="exit"><i class="ywifont ywicon-yingyongzhongxin"></i> 界面主题</div> |
| | | </template> |
| | | <template #default> |
| | | <div class="px-0 m-0 relative"> |
| | | <div class="set-theme-content"> |
| | | <div |
| | | v-for="(theme, index) in THEME_LIST" |
| | | :key="index" |
| | | :style="{ backgroundColor: theme.bgColor }" |
| | | class="theme-item flex items-center justify-center text-[#fff] text-[12px] px-1 py-0" |
| | | @click="changeTheme(theme.themeCss)" |
| | | > |
| | | {{ theme.name }}主题 |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-popover> |
| | | <div class="exit" @click="informationClick"><i class="ywifont ywicon-wode"></i> 我的信息</div> |
| | | <div class="exit" @click="logoutClick"><i class="ywifont ywicon-tuichu"></i> 退出登录</div> |
| | | </div> |
| | | </div> |
| | | <div v-else class="user_login"> |
| | | <div class="set-login" @click="openLoginDlg"> |
| | | <span class="text-stone-100 font-medium text-center">登录 / 注册</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <UserInformation v-model="userInformationVisible" /> |
| | | </div> |
| | | </template> |
| | |
| | | import router from '/@/router'; |
| | | import { isLoginStatus, isSharePage, isShowLogin } from '/@/stores/chatRoom'; |
| | | import emitter from '/@/utils/mitt'; |
| | | import { accessSessionKey, userNameKey } from '/@/utils/request'; |
| | | import { accessSessionKey, userInfoKey } from '/@/utils/request'; |
| | | import { gotoRoute } from '/@/utils/route'; |
| | | import { Local, LoginInfo } from '/@/utils/storage'; |
| | | const userName = ref(''); |
| | |
| | | isLoginStatus.value = !!Local.get(accessSessionKey); |
| | | watchEffect(() => { |
| | | if (!isLoginStatus.value) return; |
| | | userName.value = Local.get(userNameKey); |
| | | userName.value = Local.get(userInfoKey)?.userName; |
| | | }); |
| | | let state = reactive({ |
| | | asideTitleList: [ |
| | | { |
| | | id: 4, |
| | | icon: '/static/images/wave/AsideIcon.png', |
| | | title: '关于WI 水务智能', |
| | | title: '关于WI水务智能', |
| | | routerName: 'AboutUs', |
| | | }, |
| | | ], |