diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 53d4ff2..f480f1f 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -60,8 +60,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 53d4ff2..f480f1f 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -60,8 +60,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 7d2fa0d..ed30aa2 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -53,8 +53,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 53d4ff2..f480f1f 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -60,8 +60,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 7d2fa0d..ed30aa2 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -53,8 +53,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/detail.vue b/src/views/home/operation/trajectory/detail.vue index e91c6e7..2c7313d 100644 --- a/src/views/home/operation/trajectory/detail.vue +++ b/src/views/home/operation/trajectory/detail.vue @@ -26,8 +26,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 53d4ff2..f480f1f 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -60,8 +60,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 7d2fa0d..ed30aa2 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -53,8 +53,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/detail.vue b/src/views/home/operation/trajectory/detail.vue index e91c6e7..2c7313d 100644 --- a/src/views/home/operation/trajectory/detail.vue +++ b/src/views/home/operation/trajectory/detail.vue @@ -26,8 +26,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index dc1a0aa..71d9919 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -47,8 +47,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -151,8 +151,8 @@ diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 53d4ff2..f480f1f 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -60,8 +60,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 7d2fa0d..ed30aa2 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -53,8 +53,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/detail.vue b/src/views/home/operation/trajectory/detail.vue index e91c6e7..2c7313d 100644 --- a/src/views/home/operation/trajectory/detail.vue +++ b/src/views/home/operation/trajectory/detail.vue @@ -26,8 +26,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index dc1a0aa..71d9919 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -47,8 +47,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -151,8 +151,8 @@ diff --git a/src/views/home/station/operation/index.vue b/src/views/home/station/operation/index.vue index 026e4d6..4f2c96c 100644 --- a/src/views/home/station/operation/index.vue +++ b/src/views/home/station/operation/index.vue @@ -49,8 +49,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 53d4ff2..f480f1f 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -60,8 +60,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 7d2fa0d..ed30aa2 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -53,8 +53,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/detail.vue b/src/views/home/operation/trajectory/detail.vue index e91c6e7..2c7313d 100644 --- a/src/views/home/operation/trajectory/detail.vue +++ b/src/views/home/operation/trajectory/detail.vue @@ -26,8 +26,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index dc1a0aa..71d9919 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -47,8 +47,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -151,8 +151,8 @@ diff --git a/src/views/home/station/operation/index.vue b/src/views/home/station/operation/index.vue index 026e4d6..4f2c96c 100644 --- a/src/views/home/station/operation/index.vue +++ b/src/views/home/station/operation/index.vue @@ -49,8 +49,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/system/notice/noteAdd.vue b/src/views/system/notice/noteAdd.vue index e9cce80..dc4e57e 100644 --- a/src/views/system/notice/noteAdd.vue +++ b/src/views/system/notice/noteAdd.vue @@ -86,7 +86,7 @@ if (!formEl) { return } await formEl.validate((valid, fields) => { if (valid) { - ruleForm.noticeTime = dayjs().format('YYYY-MM-DD HH:mm:ss') + ruleForm.noticeTime = dayjs().format('0') if (title.value === '新建') { addNoticeApi(ruleForm).then((res) => { if (res.code === 200) { diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 53d4ff2..f480f1f 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -60,8 +60,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 7d2fa0d..ed30aa2 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -53,8 +53,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/detail.vue b/src/views/home/operation/trajectory/detail.vue index e91c6e7..2c7313d 100644 --- a/src/views/home/operation/trajectory/detail.vue +++ b/src/views/home/operation/trajectory/detail.vue @@ -26,8 +26,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index dc1a0aa..71d9919 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -47,8 +47,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -151,8 +151,8 @@ diff --git a/src/views/home/station/operation/index.vue b/src/views/home/station/operation/index.vue index 026e4d6..4f2c96c 100644 --- a/src/views/home/station/operation/index.vue +++ b/src/views/home/station/operation/index.vue @@ -49,8 +49,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/system/notice/noteAdd.vue b/src/views/system/notice/noteAdd.vue index e9cce80..dc4e57e 100644 --- a/src/views/system/notice/noteAdd.vue +++ b/src/views/system/notice/noteAdd.vue @@ -86,7 +86,7 @@ if (!formEl) { return } await formEl.validate((valid, fields) => { if (valid) { - ruleForm.noticeTime = dayjs().format('YYYY-MM-DD HH:mm:ss') + ruleForm.noticeTime = dayjs().format('0') if (title.value === '新建') { addNoticeApi(ruleForm).then((res) => { if (res.code === 200) { diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index 60d55d6..117702a 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -26,8 +26,8 @@ }) // 查询参数 watch(() => noticeTime.value, (newVal) => { if (newVal) { - searchQuery.noticeStartTime = `${newVal[0]} 00:00:00` - searchQuery.noticeEndTime = `${newVal[1]} 23:59:59` + searchQuery.noticeStartTime = `${newVal[0]}` + searchQuery.noticeEndTime = `${newVal[1]}` } else { searchQuery.noticeStartTime = '' diff --git a/src/layouts/components/Header/index.vue b/src/layouts/components/Header/index.vue index b159b77..eb986fa 100644 --- a/src/layouts/components/Header/index.vue +++ b/src/layouts/components/Header/index.vue @@ -47,7 +47,7 @@ - + @@ -65,7 +65,7 @@ height: var(--g-header-height); color: var(--g-header-color); background-color: var(--g-header-bg); - background-image: linear-gradient(90deg, #0d76d4 30%, #0d76d4); + background-image: linear-gradient(90deg, rgb(0 30 66) 30%, #0d76d4); transition: background-color 0.3s, var(--el-transition-color); .header-container { diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue index 30038a2..d5eb809 100644 --- a/src/layouts/components/SidebarItem/index.vue +++ b/src/layouts/components/SidebarItem/index.vue @@ -137,19 +137,20 @@ + + diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index a7b717a..0e5a79a 100644 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -56,8 +56,8 @@ left: 0; top: 0; bottom: 0; - background-color: #0d76d4; - background-image: linear-gradient(180deg, #0d76d4, #0d76d4); + background-color: (0, 30, 66); + background-image: linear-gradient(180deg, rgb(0 30 66), rgb(0 30 66)); box-shadow: 10px 0 10px -10px var(--g-box-shadow-color); transition: background-color 0.3s, var(--el-transition-box-shadow), left 0.3s, width 0.3s; diff --git a/src/layouts/components/Topbar/index.vue b/src/layouts/components/Topbar/index.vue index e5dfb95..26f846a 100644 --- a/src/layouts/components/Topbar/index.vue +++ b/src/layouts/components/Topbar/index.vue @@ -3,6 +3,7 @@ import Tools from '../Tools/index.vue' import useSettingsStore from '@/store/modules/settings' import useMenuStore from '@/store/modules/menu' +import Setting from '@/views/setting.vue' const route = useRoute() const router = useRouter() const menuStore = useMenuStore() @@ -34,7 +35,9 @@ watch(() => menuStore.breadcrumbList, (newVal) => { if (newVal.length) { breadcrumbList.value = menuStore.breadcrumbList - console.log(breadcrumbList.value, 'breadcrumbList.value') + } + else { + breadcrumbList.value = [] } }, { deep: true, @@ -65,18 +68,19 @@ } // 面包屑跳转 const breadcrumbTo = (path: any) => { - router.push(path.path) + console.log(path, 'path') + router.push(path.fullPath) } // 关闭面包屑 const closePage = (path: any) => { menuStore.removeBreadcrumb(path) - if (routeInfo.value.path === path.path) { - router.push({ - path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', - // proxy.hasPerm('/dashboard') ? '/home/index' : '/' - // - }) - } + setTimeout(() => { + if (routeInfo.value.path === path.path) { + router.push({ + path: breadcrumbList.value.length ? breadcrumbList.value[0].path : '/home/index', + }) + } + }) } @@ -114,11 +118,11 @@ {{ item.meta.title }} - × + × @@ -177,6 +181,8 @@ &:hover { cursor: pointer; + background-color: #0d76d4 !important; + color: #fff; .icon { // padding-right: 14px; @@ -187,7 +193,7 @@ } .is-active { - background-color: #3466bd !important; + background-color: #0d76d4 !important; color: #fff; } } @@ -201,7 +207,7 @@ justify-content: space-between; height: var(--g-topbar-height); transition: width 0.3s, top 0.3s, transform 0.3s, background-color 0.3s, var(--el-transition-box-shadow); - background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); + // background-image: linear-gradient(90deg, #71b5ff 30%, #3d7eff); .topbar-container-inner { width: 100%; diff --git a/src/router/index.ts b/src/router/index.ts index ec0a598..e4760f5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -278,12 +278,12 @@ } document.documentElement.scrollTop = 0 // 加入面包屑 - if (!to.path.includes('detail')) { - // path - console.log(to, '加入面包屑') - const menuStore = useMenuStore() - menuStore.setBreadcrumb(to) - } + // if (!to.path.includes('detail')) { + // path + console.log(to, '加入面包屑') + const menuStore = useMenuStore() + menuStore.setBreadcrumb(to) + // } }) export default router diff --git a/src/router/modules/pc.ts b/src/router/modules/pc.ts index 97ced45..08d9723 100644 --- a/src/router/modules/pc.ts +++ b/src/router/modules/pc.ts @@ -103,7 +103,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/alarm/history', - auth: '/alarm/history', + auth: '/alarm/detail', }, }, { @@ -155,7 +155,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/well', - auth: '/well', + auth: '/well/detail', }, }, ], @@ -194,7 +194,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/station/monitor', - auth: '/station/monitor', + auth: '/station/detail', }, }, { @@ -267,12 +267,12 @@ component: () => import('@/views/home/pipeline/components/detail.vue'), name: 'PipelineMonitorDetail', meta: { - title: '管线监测', + title: '管线详情', icon: 'ep:key', sidebar: false, breadcrumb: false, activeMenu: '/pipeline', - auth: '/pipeline', + auth: '/pipeline/detail', }, }, ], @@ -364,7 +364,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/alarm', - auth: '/operation/alarm', + auth: '/operation/alarm/detail', }, }, { @@ -390,7 +390,7 @@ sidebar: false, breadcrumb: true, activeMenu: '/operation/history', - auth: '/operation/history', + auth: '/operation/alarm/detail', }, }, { @@ -481,7 +481,7 @@ sidebar: false, breadcrumb: false, activeMenu: '/device/manage', - auth: '/device/manage', + auth: '/device/manage/detail', }, }, // { diff --git a/src/store/modules/menu.ts b/src/store/modules/menu.ts index 9c1d96d..0cc544e 100644 --- a/src/store/modules/menu.ts +++ b/src/store/modules/menu.ts @@ -198,7 +198,7 @@ }, // 加入面包屑 setBreadcrumb(data: any) { - if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '找不到页面') { + if (this.breadcrumbList.every(item => item.path !== data.path) && data.meta.title !== '首页' && data.meta.title !== '登录' && data.meta.title !== '找不到页面') { this.breadcrumbList.unshift(data) if (this.breadcrumbList.length >= 15) { this.breadcrumbList.pop() @@ -207,14 +207,12 @@ }, // 移除面包屑 removeBreadcrumb(data: any) { - // console.log(data, this.breadcrumbList, '需要移除的数据') // 直接移除 + if (this.breadcrumbList.length === 1) { + this.breadcrumbList = [] + return + } this.breadcrumbList = this.breadcrumbList.filter((item: any) => item.path !== data.path) - // if (route.path === data.path) { - // router.push({ - // path: this.breadcrumbList.length ? this.breadcrumbList[0].path : '/home/index', - // }) - // } }, }, }, diff --git a/src/views/home/alarm/current/index.vue b/src/views/home/alarm/current/index.vue index db8cab8..3228156 100644 --- a/src/views/home/alarm/current/index.vue +++ b/src/views/home/alarm/current/index.vue @@ -67,8 +67,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -138,9 +138,9 @@ endTime: '', } if ($route.query.real) { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] - obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD') - obj.endTime = dayjs().format('YYYY-MM-DD') + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] + obj.begTime = dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss') + obj.endTime = dayjs().format('YYYY-MM-DD HH:mm:ss') } getCurrentAlarmListPage({ offset: 1, limit: 50, ...obj }).then((res) => { const data = res.data.rows.filter((item: any) => item.id === (row.id || row.alarmId)) @@ -366,8 +366,8 @@ diff --git a/src/views/home/alarm/history/index.vue b/src/views/home/alarm/history/index.vue index 5b32af8..cf788cf 100644 --- a/src/views/home/alarm/history/index.vue +++ b/src/views/home/alarm/history/index.vue @@ -78,8 +78,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -157,7 +157,7 @@ }) } onMounted(() => { - datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')] + datetimerange.value = [dayjs().subtract(7, 'day').format('YYYY-MM-DD HH:mm:ss'), dayjs().format('YYYY-MM-DD HH:mm:ss')] setTimeout(() => { fetchData() }) @@ -241,8 +241,8 @@ diff --git a/src/views/home/device/instruction/index.vue b/src/views/home/device/instruction/index.vue index 23ae01f..8def02a 100644 --- a/src/views/home/device/instruction/index.vue +++ b/src/views/home/device/instruction/index.vue @@ -56,8 +56,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.beginTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.beginTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 6bf2151..17d03cf 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -61,8 +61,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/history/index.vue b/src/views/home/operation/history/index.vue index 53d4ff2..f480f1f 100644 --- a/src/views/home/operation/history/index.vue +++ b/src/views/home/operation/history/index.vue @@ -60,8 +60,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/manufacturer/index.vue b/src/views/home/operation/manufacturer/index.vue index 7d2fa0d..ed30aa2 100644 --- a/src/views/home/operation/manufacturer/index.vue +++ b/src/views/home/operation/manufacturer/index.vue @@ -53,8 +53,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/detail.vue b/src/views/home/operation/trajectory/detail.vue index e91c6e7..2c7313d 100644 --- a/src/views/home/operation/trajectory/detail.vue +++ b/src/views/home/operation/trajectory/detail.vue @@ -26,8 +26,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/home/operation/trajectory/index.vue b/src/views/home/operation/trajectory/index.vue index dc1a0aa..71d9919 100644 --- a/src/views/home/operation/trajectory/index.vue +++ b/src/views/home/operation/trajectory/index.vue @@ -47,8 +47,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) @@ -151,8 +151,8 @@ diff --git a/src/views/home/station/operation/index.vue b/src/views/home/station/operation/index.vue index 026e4d6..4f2c96c 100644 --- a/src/views/home/station/operation/index.vue +++ b/src/views/home/station/operation/index.vue @@ -49,8 +49,8 @@ listQuery.value.endTime = '' if (Array.isArray(newVal)) { if (newVal.length) { - listQuery.value.begTime = `${newVal[0]} 00:00:00` - listQuery.value.endTime = `${newVal[1]} 23:59:59` + listQuery.value.begTime = `${newVal[0]}` + listQuery.value.endTime = `${newVal[1]}` } } }) diff --git a/src/views/system/notice/noteAdd.vue b/src/views/system/notice/noteAdd.vue index e9cce80..dc4e57e 100644 --- a/src/views/system/notice/noteAdd.vue +++ b/src/views/system/notice/noteAdd.vue @@ -86,7 +86,7 @@ if (!formEl) { return } await formEl.validate((valid, fields) => { if (valid) { - ruleForm.noticeTime = dayjs().format('YYYY-MM-DD HH:mm:ss') + ruleForm.noticeTime = dayjs().format('0') if (title.value === '新建') { addNoticeApi(ruleForm).then((res) => { if (res.code === 200) { diff --git a/src/views/system/notice/noteList.vue b/src/views/system/notice/noteList.vue index 60d55d6..117702a 100644 --- a/src/views/system/notice/noteList.vue +++ b/src/views/system/notice/noteList.vue @@ -26,8 +26,8 @@ }) // 查询参数 watch(() => noticeTime.value, (newVal) => { if (newVal) { - searchQuery.noticeStartTime = `${newVal[0]} 00:00:00` - searchQuery.noticeEndTime = `${newVal[1]} 23:59:59` + searchQuery.noticeStartTime = `${newVal[0]}` + searchQuery.noticeEndTime = `${newVal[1]}` } else { searchQuery.noticeStartTime = '' diff --git a/src/views/system/signature/autograph.vue b/src/views/system/signature/autograph.vue index e5a32c8..d084148 100644 --- a/src/views/system/signature/autograph.vue +++ b/src/views/system/signature/autograph.vue @@ -24,8 +24,8 @@ }) // 查询参数 watch(() => createTime.value, (newVal) => { if (newVal) { - searchQuery.createStartTime = `${newVal[0]} 00:00:00` - searchQuery.createEndTime = `${newVal[1]} 23:59:59` + searchQuery.createStartTime = `${newVal[0]}` + searchQuery.createEndTime = `${newVal[1]}` } else { searchQuery.createStartTime = ''