diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 658573c..1a63904 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -1,10 +1,47 @@ @@ -12,49 +49,68 @@ export default { data() { return { - routeItem: [ + activeIndex: "/home", + items: [ { - path: "/home", - name: "首页", + index: "/home", + title: "首页", }, { - path: "/report", - name: "状态报表", + index: "/report", + title: "状态报表", }, { - path: "/log", - name: "日志列表", + index: "/log", + title: "日志列表", }, { - path: "/upgradation", - name: "上传APK/OTA", + index: "/upgradation", + title: "上传APK/OTA", }, - // { - // path: "/upgradationOta", - // name: "上传Ota", - // }, { - path: "/activity", - name: "活动列表", + index: "/activity", + title: "活动列表", }, { - path: "/msgAuth", - name: "短信授权", + index: "/msgAuth", + title: "短信授权", }, + { - path: "/picReport", - name: "装置图片报表", + index: "/aaa", + title: "运维报表", + subs: [ + { + index: "/picReport", + title: "在线率报表", + }, + { + index: "/historyReport", + title: "运维历史数据", + }, + ], }, - // { - // path: "/deviceConfig", - // name: "设备配置", - // }, ], }; }, - watch: {}, - methods: {}, - created() {}, + watch: { + $route() { + this.setCurrentRoute(); + }, + }, + created() { + this.setCurrentRoute(); + }, + methods: { + setCurrentRoute() { + console.log(this.$route.path); + this.$nextTick(() => { + this.activeIndex = this.$route.path; // 通过他就可以监听到当前路由状态并激活当前菜单 + console.log(this.activeIndex); + localStorage.setItem("menuActive", this.activeIndex); + }); + }, + }, }; @@ -64,38 +120,137 @@ export default { // margin: 0 auto; display: flex; align-items: center; - .menuBoxUl { - flex: 1; - display: flex; - align-items: center; - justify-content: space-around; - .menuItem { - list-style: none; - display: flex; - height: 40px; - justify-content: center; - align-items: center; - cursor: pointer; + .el-menu--horizontal { + background: #169e8c; + + .el-menu-item { + height: 56px; + line-height: 56px; + } + .el-submenu .el-submenu__title { + height: 56px; + line-height: 56px; + } + .el-submenu__title { + padding: 0 10px; + .iconfont { + margin-right: 5px; + } + } + .el-dropdown-menu__item, + .el-menu-item, + .el-submenu__title { font-size: 14px; - margin-right: 32px; - a { - color: #fff; - //background: #e8f5f4; - height: 40px; - line-height: 40px; - padding: 0 12px; - background-size: 100% 100%; - background-repeat: no-repeat; - overflow: hidden; - border-radius: 8px; - &:hover { - background: #128071; - } + } + .el-menu-item i { + color: #666; + } + .el-menu-item.is-active { + i { + color: #169e8c; } - .router-link-active { - background: #128071; + } + .el-submenu.is-active .el-submenu__title > i { + &:first-child { + color: #333; } } } + .el-menu { + background: #169e8c; + + i { + color: #fff !important; + } + .el-menu-item { + color: #fff; + } + .el-submenu .el-submenu__title { + color: #fff; + } + .el-menu-item:not(.is-disabled):focus, + .el-menu-item:not(.is-disabled):hover { + color: #fff; + background-color: #128071; + border-bottom: 2px solid #128071; + i { + color: #fff !important; + } + } + .el-submenu:focus .el-submenu__title, + .el-submenu:hover .el-submenu__title { + color: #fff !important; + background-color: #128071; + border-bottom: 2px solid #128071; + i { + color: #fff !important; + } + } + } + .el-menu--horizontal > .el-menu-item.is-active { + border-bottom: 2px solid #128071 !important; + color: #fff !important; + background-color: #128071 !important; + i { + color: #fff !important; + } + } + .el-submenu.is-active { + .el-submenu__title { + border-bottom: 2px solid #128071 !important; + color: #fff !important; + background-color: #128071; + i { + color: #fff !important; + } + } + } + .gallery-thumbs .swiper-slide-active { + border: 3px solid #169e8c !important; + } + .tags-li.active { + border: 1px solid #169e8c; + background-color: #169e8c; + } + .el-menu-item [class^="iconfont"] { + margin-right: 5px; + width: 24px; + text-align: center; + font-size: 18px; + vertical-align: middle; + } + // .menuBoxUl { + // flex: 1; + // display: flex; + // align-items: center; + // justify-content: space-around; + // .menuItem { + // list-style: none; + // display: flex; + // height: 40px; + // justify-content: center; + // align-items: center; + // cursor: pointer; + // font-size: 14px; + // margin-right: 32px; + // a { + // color: #fff; + // //background: #e8f5f4; + // height: 40px; + // line-height: 40px; + // padding: 0 12px; + // background-size: 100% 100%; + // background-repeat: no-repeat; + // overflow: hidden; + // border-radius: 8px; + // &:hover { + // background: #128071; + // } + // } + // .router-link-active { + // background: #128071; + // } + // } + // } } diff --git a/src/router/index.js b/src/router/index.js index d7e7a63..b63e8c4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -93,19 +93,28 @@ const routes = [ component: () => import("../views/picReport/index.vue"), name: "picReport", meta: { - title: "装置图片报表", + title: "在线率报表", keepAlive: true, }, }, { - path: "/userlist", - component: () => import("../views/userList/index.vue"), - name: "userList", + path: "/historyReport", + component: () => import("../views/historyReport/index.vue"), + name: "historyReport", meta: { - title: "用户列表", + title: "运维历史数据", keepAlive: true, }, }, + // { + // path: "/userlist", + // component: () => import("../views/userList/index.vue"), + // name: "userList", + // meta: { + // title: "用户列表", + // keepAlive: true, + // }, + // }, ], }, ]; diff --git a/src/views/historyReport/components/rowMsgDialog.vue b/src/views/historyReport/components/rowMsgDialog.vue new file mode 100644 index 0000000..9211880 --- /dev/null +++ b/src/views/historyReport/components/rowMsgDialog.vue @@ -0,0 +1,341 @@ + + + diff --git a/src/views/historyReport/components/tableMain.vue b/src/views/historyReport/components/tableMain.vue new file mode 100644 index 0000000..4084896 --- /dev/null +++ b/src/views/historyReport/components/tableMain.vue @@ -0,0 +1,2052 @@ + + + + diff --git a/src/views/historyReport/index.vue b/src/views/historyReport/index.vue new file mode 100644 index 0000000..861e9c9 --- /dev/null +++ b/src/views/historyReport/index.vue @@ -0,0 +1,830 @@ + + + diff --git a/src/views/picReport/components/selectLine.vue b/src/views/picReport/components/selectLine.vue index a0a8b61..5d68547 100644 --- a/src/views/picReport/components/selectLine.vue +++ b/src/views/picReport/components/selectLine.vue @@ -1,17 +1,19 @@ -