yangyin
2024-07-05 a8eec18144b57b95ca5b5295b86e8a793fe6391a
修改页面样式
已修改1个文件
22 ■■■■ 文件已修改
src/layout/component/sidebar/components/MenuList.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/component/sidebar/components/MenuList.vue
@@ -16,7 +16,8 @@
            <div class="user_head">
                <span
                    ><span
                        ><span class="user-head">{{ firstUserCharacter }}</span><span class="identifying"><!----></span></span
                        ><span class="user-head">{{ firstUserCharacter }}</span
                        ><span class="identifying"><!----></span></span
                    ><span class="user_name"> {{ userName }} </span></span
                ><span ref="toggleExitLoginBtnRef"
                    ><span
@@ -40,7 +41,7 @@
        <div class="login_box">
            <div class="sign_in">
                <i class="ywicon icon-guanbi closes" @click="handleClose"></i>
                <h1><span class="ml-[33px]">登录 ChatAI</span></h1>
                <h1><span class="ml-[33px]">登录 WI 水务</span></h1>
                <el-form ref="loginFormRef" :model="state.loginForm" :rules="loginRules" class="demo-ruleForm" size="large">
                    <el-form-item label="账号" prop="account">
                        <el-input v-model="state.loginForm.account" clearable />
@@ -62,20 +63,20 @@
import { computed, onMounted, reactive, ref, watchEffect } from 'vue';
import { PostLogin } from '/@/api/ai/user';
import router from '/@/router';
import emitter from '/@/utils/mitt';
import { accessSessionKey, userNameKey } from '/@/utils/request';
import { gotoRoute } from '/@/utils/route';
import { Local } from '/@/utils/storage';
import emitter from '/@/utils/mitt';
const loginFormRef = ref<FormInstance>(null);
const isLoginStatus = ref(!!Local.get(accessSessionKey));
const userName = ref('');
const firstUserCharacter =computed(()=>userName.value?.[0]?.toUpperCase());
watchEffect(()=>{
    if(!isLoginStatus.value)return;
    userName.value = Local.get(userNameKey)
})
const firstUserCharacter = computed(() => userName.value?.[0]?.toUpperCase());
watchEffect(() => {
    if (!isLoginStatus.value) return;
    userName.value = Local.get(userNameKey);
});
let state = reactive({
    asideTitleList: [
        {
@@ -132,7 +133,7 @@
        pass: state.loginForm.pwd,
    });
    Local.set(accessSessionKey, res.hswatersession);
    Local.set(userNameKey,state.loginForm.account);
    Local.set(userNameKey, state.loginForm.account);
    state.isShowLogin = false;
    isLoginStatus.value = true;
    window.location.reload();
@@ -149,7 +150,6 @@
    state.isShowExitLogin = false;
    isLoginStatus.value = false;
    Local.remove(accessSessionKey);
};
const toggleExitLoginBtnRef = ref<HTMLDivElement>(null);
@@ -161,7 +161,7 @@
onMounted(() => {
    emitter.on('openLoginDlg', () => {
        if(state.isShowLogin || isLoginStatus.value)return;
        if (state.isShowLogin || isLoginStatus.value) return;
        openLoginDlg();
    });