|
@@ -1,10 +1,11 @@
|
|
|
<script lang="ts" setup>
|
|
|
-import {computed, onMounted, onUnmounted, ref, watch} from 'vue'
|
|
|
-import {jumpPage} from '@/utils'
|
|
|
-import {useRoute, useRouter} from 'vue-router'
|
|
|
-import {formatd} from '@/utils/ruoyi'
|
|
|
-import {Setting} from "@/utils/tdInstruction";
|
|
|
-import {getWeather} from "@/api/weather";
|
|
|
+import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
|
+import { jumpPage } from '@/utils'
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
|
+import { formatd } from '@/utils/ruoyi'
|
|
|
+import { Setting } from '@/utils/tdInstruction'
|
|
|
+import { getWeather } from '@/api/weather'
|
|
|
+import { ArrowDown } from '@element-plus/icons-vue'
|
|
|
|
|
|
const route = useRoute()
|
|
|
const router = useRouter()
|
|
@@ -14,19 +15,54 @@ let navbarTitleImage = ref(new URL('@/assets/images/layout/header-title3.png', i
|
|
|
let menuLeftImage = ref(new URL('@/assets/images/layout/menu-left.png', import.meta.url).href)
|
|
|
let menuRightImage = ref(new URL('@/assets/images/layout/menu-right.png', import.meta.url).href)
|
|
|
const navbarBackgroundStyle = computed(() => {
|
|
|
- return {'background-image': `url(${navbarBackgroundImage})`}
|
|
|
+ return { 'background-image': `url(${navbarBackgroundImage})` }
|
|
|
})
|
|
|
const showMenu = computed(() => route.path !== '/index')
|
|
|
const leftMenu = computed(() => {
|
|
|
return [
|
|
|
- {name: '总 览', path: '/index', type: 'left', style: {}},
|
|
|
- {name: '态势感知', path: '/situational/' + route.params.stcd, type: 'left', style: {}}
|
|
|
+ { name: '总 览', path: '/index', type: 'left', style: {} },
|
|
|
+ { name: '态势感知', path: '/situational/' + route.params.stcd, type: 'left', style: {} }
|
|
|
]
|
|
|
})
|
|
|
const rightMenu = computed(() => {
|
|
|
return [
|
|
|
- {name: '智慧运维', path: '/intelloper/' + route.params.stcd, type: 'right', style: {}},
|
|
|
- {name: '业务管理', path: '/index', type: 'right', style: {}}
|
|
|
+ { name: '智慧运维', type: 'right', style: {},secMenu:[
|
|
|
+ {
|
|
|
+ name:"智慧运维",path:'/intelloper/' + route.params.stcd
|
|
|
+ },{
|
|
|
+ name:"设备清单",path:'/sw/' + route.params.stcd+"/shebei"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:"备品备件",path:'/sw/' + route.params.stcd+"/shebei"
|
|
|
+ },{
|
|
|
+ name:"维护任务",path:'/sw/' + route.params.stcd+"/shebei"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name:"运维记录",path:'/sw/' + route.params.stcd+"/jilu"
|
|
|
+ },{
|
|
|
+ name:"故障报警",path:'/sw/' + route.params.stcd+"/bj"
|
|
|
+ },{
|
|
|
+ name:"告警记录",path:'/sw/' + route.params.stcd+"/gj"
|
|
|
+ }] },
|
|
|
+ { name: '业务管理', path: '/index', type: 'right', style: {} ,secMenu:[{
|
|
|
+ name:"实时水位",path:'/sw/' + route.params.stcd+"/sw"
|
|
|
+ },{
|
|
|
+ name:"实时流量",path:'/sw/' + route.params.stcd+"/flow"
|
|
|
+ },{
|
|
|
+ name:"实时雨量",path:'/sw/' + route.params.stcd+"/flow"
|
|
|
+ },{
|
|
|
+ name:"实时水质",path:'/sw/' + route.params.stcd+"/flow"
|
|
|
+ },{
|
|
|
+ name:"多站水情对比分析",path:'/sw/' + route.params.stcd+"/dzll"
|
|
|
+ },{
|
|
|
+ name:"多站雨情对比分析",path:'/sw/' + route.params.stcd+"/dzll"
|
|
|
+ },{
|
|
|
+ name:"多站流量对比分析",path:'/sw/' + route.params.stcd+"/dzll"
|
|
|
+ },{
|
|
|
+ name:"多站水质对比分析",path:'/sw/' + route.params.stcd+"/dzll"
|
|
|
+ },{
|
|
|
+ name:"站点管理",path:""
|
|
|
+ }] }
|
|
|
]
|
|
|
})
|
|
|
|
|
@@ -54,7 +90,7 @@ function getDateTime() {
|
|
|
if (tm !== time.value.substring(0, 5)) {
|
|
|
tm = time.value.substring(0, 5)
|
|
|
// Setting.setTime(tm)
|
|
|
- Setting.setTime("10:00")
|
|
|
+ Setting.setTime('10:00')
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -91,7 +127,7 @@ onUnmounted(() => {
|
|
|
|
|
|
<template>
|
|
|
<div :style="navbarBackgroundStyle" class="navbar">
|
|
|
- <img :src="navbarTitleImage" alt="" @click="jumpPage('/')"/>
|
|
|
+ <img :src="navbarTitleImage" alt="" @click="jumpPage('/')" />
|
|
|
<div v-if="showMenu" class="menu-list">
|
|
|
<div class="left-menu-list">
|
|
|
<div v-for="item in leftMenu" :key="item.name"
|
|
@@ -102,8 +138,21 @@ onUnmounted(() => {
|
|
|
<div class="right-menu-list">
|
|
|
<div v-for="item in rightMenu" :key="item.name"
|
|
|
:style="{ 'background-image': `url(${item.type === 'left' ? menuLeftImage: menuRightImage})` }"
|
|
|
- class="menu-item"
|
|
|
- @click="jumpPage(item.path)" v-html="item.name"></div>
|
|
|
+ class="menu-item">
|
|
|
+ <el-dropdown>
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ {{ item.name }}
|
|
|
+ <el-icon class="el-icon--right">
|
|
|
+ <arrow-down />
|
|
|
+ </el-icon>
|
|
|
+ </span>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item v-for="i in item.secMenu" @click="jumpPage(i.path)">{{i.name}}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="weather-and-time">
|
|
@@ -156,7 +205,13 @@ onUnmounted(() => {
|
|
|
.right-menu-list {
|
|
|
margin-left: 16%;
|
|
|
}
|
|
|
-
|
|
|
+ .right-menu-list .el-dropdown-link {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 1.2rem;
|
|
|
+ }
|
|
|
+ :deep(.el-tooltip__trigger:focus-visible) {
|
|
|
+ outline: unset;
|
|
|
+ }
|
|
|
.menu-item {
|
|
|
width: 15rem;
|
|
|
height: 3rem;
|