|
|
@@ -7,8 +7,7 @@
|
|
|
</div>
|
|
|
<h1 class="system-title">沅陵县城市地下管网管控平台</h1>
|
|
|
<div class="header-right">
|
|
|
- <span class="welcome-text">欢迎,<span class="username">浏览账号</span></span>
|
|
|
- <button class="header-btn" @click="enterBackend">进入后台</button>
|
|
|
+ <span class="welcome-text">欢迎,<span class="username">{{ userStore.nickName || userStore.name }}</span></span>
|
|
|
<button class="header-btn" @click="logout">退出系统</button>
|
|
|
</div>
|
|
|
</header>
|
|
|
@@ -27,6 +26,7 @@
|
|
|
<div class="icon-wrapper">
|
|
|
<div class="icon-circle">
|
|
|
<i :class="item.iconClass" class="module-icon"></i>
|
|
|
+ <span v-if="item.iconClass === 'icon-permission'" class="module-name">{{ item.name }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -37,7 +37,6 @@
|
|
|
<script setup>
|
|
|
import { ref, reactive, computed, onMounted, onUnmounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-import { DEFAULT_BACKEND_HOME } from '@/router'
|
|
|
import useUserStore from '@/store/modules/user'
|
|
|
import usePermissionStore from '@/store/modules/permission'
|
|
|
import { ElMessageBox } from 'element-plus'
|
|
|
@@ -70,6 +69,7 @@ const modules = ref([])
|
|
|
const resolveModuleIcon = (route) => {
|
|
|
const identity = [route.name, route.path, route.meta?.title].filter(Boolean).join(' ').toLowerCase()
|
|
|
const iconMappings = [
|
|
|
+ { pattern: /权限管理|permissionmanagement/, iconClass: 'icon-permission' },
|
|
|
{ pattern: /生命线|lifecompany|citylifeline/, iconClass: 'icon-operation' },
|
|
|
{ pattern: /应急|指挥|dispatch/, iconClass: 'icon-sewage' },
|
|
|
{ pattern: /管网设施|pipenetwork/, iconClass: 'icon-bi' },
|
|
|
@@ -272,13 +272,6 @@ const loadDynamicModules = () => {
|
|
|
updateAllModuleStyles()
|
|
|
}
|
|
|
|
|
|
-// ==============================================
|
|
|
-// 进入后台
|
|
|
-// ==============================================
|
|
|
-const enterBackend = () => {
|
|
|
- router.push(DEFAULT_BACKEND_HOME)
|
|
|
-}
|
|
|
-
|
|
|
// ==============================================
|
|
|
// 退出系统(与 Navbar 保持一致)
|
|
|
// ==============================================
|
|
|
@@ -443,6 +436,7 @@ onUnmounted(() => {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
+ position: relative;
|
|
|
|
|
|
.module-icon {
|
|
|
width: 150px;
|
|
|
@@ -452,6 +446,12 @@ onUnmounted(() => {
|
|
|
background: url("../../assets/portal/smxyj.png") no-repeat center center;
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
+ &.icon-permission {
|
|
|
+ background: linear-gradient(180deg, #64efff 0%, #1595ff 100%);
|
|
|
+ filter: drop-shadow(0 0 10px rgba(38, 202, 255, 0.8));
|
|
|
+ mask: url("../../assets/icons/svg/lock.svg") no-repeat center 8px / 76px 76px;
|
|
|
+ -webkit-mask: url("../../assets/icons/svg/lock.svg") no-repeat center 8px / 76px 76px;
|
|
|
+ }
|
|
|
&.icon-sewage {
|
|
|
background: url("../../assets/portal/yjzh.png") no-repeat center center;
|
|
|
background-size: 100% 100%;
|
|
|
@@ -477,6 +477,21 @@ onUnmounted(() => {
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .module-name {
|
|
|
+ position: absolute;
|
|
|
+ top: 98px;
|
|
|
+ left: 50%;
|
|
|
+ width: 180px;
|
|
|
+ color: #80efff;
|
|
|
+ font-size: 17px;
|
|
|
+ font-weight: 600;
|
|
|
+ line-height: 24px;
|
|
|
+ text-align: center;
|
|
|
+ text-shadow: 0 0 8px rgba(31, 197, 255, 0.8);
|
|
|
+ transform: translateX(-50%);
|
|
|
+ white-space: nowrap;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|