|
|
@ -16,8 +16,8 @@ const useInfo = userStore.getUserInfo
|
|
|
|
|
|
|
|
|
|
|
|
const aiDisabled = ref(false)
|
|
|
|
const aiDisabled = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
function handleSelect(key: string) {
|
|
|
|
function handleSelect(row) {
|
|
|
|
userStore.updateTenantId(key)
|
|
|
|
userStore.updateTenantId(row.key)
|
|
|
|
location.reload()
|
|
|
|
location.reload()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -55,6 +55,7 @@ onMounted(() => {
|
|
|
|
|
|
|
|
|
|
|
|
const showPopover = ref(false)
|
|
|
|
const showPopover = ref(false)
|
|
|
|
const popRef = ref(null)
|
|
|
|
const popRef = ref(null)
|
|
|
|
|
|
|
|
const changeFlag = ref(false)
|
|
|
|
|
|
|
|
|
|
|
|
const iconName = computed(() => {
|
|
|
|
const iconName = computed(() => {
|
|
|
|
return showPopover.value ? 'expand' : 'collapse'
|
|
|
|
return showPopover.value ? 'expand' : 'collapse'
|
|
|
@ -88,10 +89,8 @@ const options = computed(() => {
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<n-popover
|
|
|
|
<n-popover ref="popRef" style="border-radius: 10px" placement="bottom-end" raw :show-arrow="false" trigger="click"
|
|
|
|
ref="popRef" style="border-radius: 10px" placement="bottom-end" raw :show-arrow="false" trigger="click"
|
|
|
|
@update:show="handleUpdateShow">
|
|
|
|
@update:show="handleUpdateShow"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template #trigger>
|
|
|
|
<template #trigger>
|
|
|
|
<div class="setting">
|
|
|
|
<div class="setting">
|
|
|
|
<span>{{ useInfo.username }}</span>
|
|
|
|
<span>{{ useInfo.username }}</span>
|
|
|
@ -100,18 +99,16 @@ const options = computed(() => {
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<div class="container">
|
|
|
|
<div class="container">
|
|
|
|
<div class="header">
|
|
|
|
<div class="header">
|
|
|
|
<n-avatar :src="getImgUrl(useInfo.usericon)" round size="medium" />
|
|
|
|
<n-avatar :src="getImgUrl(useInfo.usericon)" round style="width:53px; height:53px" />
|
|
|
|
<div style="margin-left: 10px">
|
|
|
|
<div style="margin-left: 12px">
|
|
|
|
<span style="display: block; font-size: 20px">{{ useInfo.username }}</span>
|
|
|
|
<span style="display: block; font-size: 21px">{{ useInfo.username }}</span>
|
|
|
|
<span style="display: block; font-size: '20px'">{{ useInfo.departname }}</span>
|
|
|
|
<span style="display: block; font-size: 16px">{{ useInfo.departname }}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<n-dropdown placement="left-start" trigger="hover" :options="options" @select="handleSelect">
|
|
|
|
<div class="trigger">
|
|
|
|
<div class="trigger">
|
|
|
|
<span>{{ currentCompanyName }}</span>
|
|
|
|
<span>{{ currentCompanyName }}</span>
|
|
|
|
<span @click="changeFlag = !changeFlag" style="cursor: pointer;">icon</span>
|
|
|
|
<span>icon</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</n-dropdown>
|
|
|
|
|
|
|
|
<div class="item">
|
|
|
|
<div class="item">
|
|
|
|
<span>AI设置开关</span>
|
|
|
|
<span>AI设置开关</span>
|
|
|
|
<n-switch v-model:value="aiDisabled" />
|
|
|
|
<n-switch v-model:value="aiDisabled" />
|
|
|
@ -119,10 +116,15 @@ const options = computed(() => {
|
|
|
|
<div class="trigger">
|
|
|
|
<div class="trigger">
|
|
|
|
联系我们
|
|
|
|
联系我们
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<n-divider style="margin-top: 0px; margin-bottom: 10px" />
|
|
|
|
<n-divider style="margin-top: 0px; margin-bottom: 10px;padding: 0 22px;" />
|
|
|
|
<div class="trigger" @click="logOut">
|
|
|
|
<div class="trigger" @click="logOut">
|
|
|
|
退出登录
|
|
|
|
退出登录
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container" v-show="changeFlag" style="position: absolute;right:332px;width: 220px;padding:24px 0">
|
|
|
|
|
|
|
|
<div class="trigger" v-for="option in options" :key="option.key" @click="handleSelect(option)">
|
|
|
|
|
|
|
|
{{ option.label }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</n-popover>
|
|
|
|
</n-popover>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -140,26 +142,40 @@ const options = computed(() => {
|
|
|
|
border-radius: 10px;
|
|
|
|
border-radius: 10px;
|
|
|
|
justify-content: center;
|
|
|
|
justify-content: center;
|
|
|
|
background-color: #ffffff;
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
|
|
width: 320px;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
.header {
|
|
|
|
.header {
|
|
|
|
border-radius: 10px 10px 0px 0px;
|
|
|
|
border-radius: 10px 10px 0px 0px;
|
|
|
|
background-color: #7a92ff;
|
|
|
|
background: linear-gradient(122deg, #4867ff 5%, #a0b3ff 100%);
|
|
|
|
padding: 10px 20px;
|
|
|
|
padding: 10px 20px;
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
align-items: center;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
margin-bottom: 14px;
|
|
|
|
color: #ffffff;
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
|
|
height: 80px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.trigger,
|
|
|
|
.trigger,
|
|
|
|
.item {
|
|
|
|
.item {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-content: space-between;
|
|
|
|
padding: 10px 20px;
|
|
|
|
padding: 13px 20px;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
color: #333333;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.trigger:hover {
|
|
|
|
.trigger:hover {
|
|
|
|
background-color: #e8f2ff;
|
|
|
|
background-color: #e8f2ff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep(.n-dropdown-option) {
|
|
|
|
|
|
|
|
color: lime;
|
|
|
|
|
|
|
|
background: red;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep(.n-dropdown-option-body__label) {
|
|
|
|
|
|
|
|
color: lime;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|