wujingjing
2024-12-03 45c2b1944d48f036a17029fd8d9fba649656cf8e
Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test
已修改2个文件
已添加1个文件
79 ■■■■■ 文件已修改
src/layout/component/sidebar/SidebarOther.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/component/sidebar/components/MenuList.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/component/sidebar/components/UserInformation.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/component/sidebar/SidebarOther.vue
@@ -32,7 +32,8 @@
                        <span class="use_name">{{ firstUserCharacter }}</span>
                    </div>
                    <div class="isShow_Profile" v-show="isShowExitLogin">
                        <div class="exit" @click="feedbackClick"><i class="ywifont ywicon-youxiang"></i> ç”¨æˆ·åé¦ˆ</div>
                        <div class="exit" @click="informationClick"><i class="ywifont ywicon-wode"></i> æˆ‘的信息</div>
                        <!-- <div class="exit" @click="feedbackClick"><i class="ywifont ywicon-youxiang"></i> ç”¨æˆ·åé¦ˆ</div> -->
                        <div class="exit" @click="logoutClick"><i class="ywifont ywicon-tuichu"></i> é€€å‡ºç™»å½•</div>
                    </div>
                </div>
@@ -128,6 +129,7 @@
                </div>
            </template>
        </el-dialog>
        <UserInformation v-model="userInformationVisible" />
    </div>
</template>
@@ -138,6 +140,7 @@
import QRCode from 'qrcodejs2-fixes';
import { computed, nextTick, onMounted, ref, watch, watchEffect } from 'vue';
import type { ChatRoomItem } from './components/types';
import UserInformation from './components/UserInformation.vue';
import { DeleteHistoryGroups, setHistoryGroupTitle } from '/@/api/ai/chat';
import { SERVE_URL } from '/@/constants';
import { useSearch } from '/@/hooks/useSearch';
@@ -152,6 +155,7 @@
    newChatRoomClick,
    selectFirstRoom,
} from '/@/stores/chatRoom';
import emitter from '/@/utils/mitt';
import { accessSessionKey, userNameKey } from '/@/utils/request';
import { gotoRoute } from '/@/utils/route';
@@ -256,6 +260,12 @@
};
//#endregion
//#region ====================== æˆ‘的信息 ======================
const userInformationVisible = ref(false);
const informationClick = () => {
    userInformationVisible.value = true;
};
//#endregion
//#region ====================== æ˜¾ç¤º/退出登录 ======================
//登录
const openLoginDlg = async () => {
@@ -342,7 +352,6 @@
});
onMounted(async () => {
    selectFirstRoom();
    emitter.on('openLoginDlg', () => {
        if (isShowLogin.value || isLoginStatus.value) return;
        openLoginDlg();
src/layout/component/sidebar/components/MenuList.vue
@@ -28,6 +28,7 @@
                ></span>
            </div>
            <div class="pop_up actived" v-show="state.isShowExitLogin">
                    <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>
@@ -36,6 +37,7 @@
                <span class="text-stone-100 font-medium text-center">登录 / æ³¨å†Œ</span>
            </div>
        </div>
        <UserInformation v-model="userInformationVisible" />
    </div>
</template>
@@ -47,6 +49,7 @@
import { accessSessionKey, userNameKey } from '/@/utils/request';
import { gotoRoute } from '/@/utils/route';
import { Local, LoginInfo } from '/@/utils/storage';
import UserInformation from './UserInformation.vue';
const userName = ref('');
const firstUserCharacter = computed(() => userName.value?.[0]?.toUpperCase());
isLoginStatus.value = !!Local.get(accessSessionKey);
@@ -122,7 +125,12 @@
        state.isShowExitLogin = false;
    }
};
//#region ====================== æˆ‘的信息 ======================
const userInformationVisible = ref(false);
const informationClick = () => {
    userInformationVisible.value = true;
};
//#endregion
onMounted(() => {
    emitter.on('openLoginDlg', () => {
        if (isShowLogin.value || isLoginStatus.value) return;
src/layout/component/sidebar/components/UserInformation.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
<template>
    <div class="flex flex-col">
        <el-dialog v-model="isShowInformation" title="我的信息" width="500" :before-close="handleCloseInformation">
            <el-form :model="userInformationInfo" ref="autoDialogFormRef" label-width="85">
                <el-row :gutter="20" class="form_Class">
                    <el-col :span="12" class="note">
                        <el-form-item label="用户ID" prop="name"> <el-input v-model="userInformationInfo.note" readonly></el-input> </el-form-item
                    ></el-col>
                    <el-col :span="12" class="mb20">
                        <el-form-item label="姓名" prop="real_name">
                            <el-input v-model="userInformationInfo.real_name" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12" class="mb20">
                        <el-form-item label="手机号" prop="phone">
                            <el-input v-model="userInformationInfo.phone" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12" class="mb20"
                        ><el-form-item label="性别" prop="sex"> <el-input v-model="userInformationInfo.sex" readonly></el-input> </el-form-item
                    ></el-col>
                    <el-col :span="24" class="mb20">
                        <el-form-item label="部门" prop="part"> <el-input v-model="userInformationInfo.part" readonly></el-input> </el-form-item
                    ></el-col>
                    <el-col :span="24" class="mb20">
                        <el-form-item label="邮箱" prop="email">
                            <el-input v-model="userInformationInfo.email" readonly />
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
        </el-dialog>
    </div>
</template>
<script setup lang="ts">
//#region ====================== æˆ‘的信息 ======================
import { onMounted, ref } from 'vue';
import { useUserInfo } from '/@/stores/userInfo';
const isShowInformation = defineModel({
    type: Boolean,
});
const userInformationInfo = ref({}) as any;
//关闭
const handleCloseInformation = () => {
    isShowInformation.value = false;
};
//#endregion
onMounted(async () => {
    const stores = useUserInfo();
    let userInfo = (await stores.getUserInfo()) as any;
    userInformationInfo.value = userInfo;
});
</script>
<style scoped lang="scss"></style>