diff --git a/src/App.vue b/src/App.vue index d9d9738..a961037 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,6 +25,14 @@ +
@@ -68,7 +76,34 @@ import {getData} from './api/index.js' { name:'B1', }, - ] + ], + menuBtn: [ + { + name: "首页", + icon: require("./assets/images/shouYe.png"), + }, + { + name: "智慧法庭", + icon: require("./assets/images/faTing.png"), + }, + { + name: "智慧节能", + icon: require("./assets/images/jieNeng.png"), + }, + { + name: "智慧安防", + icon: require("./assets/images/anFang.png"), + }, + { + name: "智慧运维", + icon: require("./assets/images/yunWei.png"), + }, + { + name: "告警管理", + icon: require("./assets/images/gaoJing.png"), + }, + ], + menuAc:0, //菜单点击 } }, created() { @@ -76,14 +111,12 @@ import {getData} from './api/index.js' this.fun(); }, mounted() { - + this.menuChange(0) let week = new Date(this.$moment().format("YYYY-MM-DD")).getDay() this.week = this.weekList[week] window.setInterval(()=>{ this.time = this.$moment().format("YYYY-MM-DD HH:mm:ss") - },1000) - - + },100) const that = this; window.onresize = () => { return (() => { @@ -98,6 +131,41 @@ import {getData} from './api/index.js' }, methods:{ + //菜单选中 + //菜单选中 + menuChange(index){ + this.menuAc = index + this.menuBtn.forEach((item,index) => { + if (index == 0) { + item.icon = require("./assets/images/shouYe.png") + }else if (index == 1) { + item.icon = require("./assets/images/faTing.png") + }else if (index == 2) { + item.icon = require("./assets/images/jieNeng.png") + }else if (index == 3) { + item.icon = require("./assets/images/anFang.png") + }else if (index == 4) { + item.icon = require("./assets/images/yunWei.png") + }else if (index == 5) { + item.icon = require("./assets/images/gaoJing.png") + } + }); + if (index == 0) { + this.menuBtn[index].icon = require("./assets/images/shouYeAc.png") + this.$router.push('/') + }else if (index == 1) { + this.menuBtn[index].icon = require("./assets/images/faTingAc.png") + this.$router.push('court') + }else if (index == 2) { + this.menuBtn[index].icon = require("./assets/images/jieNengAc.png") + }else if (index == 3) { + this.menuBtn[index].icon = require("./assets/images/anFangAc.png") + }else if (index == 4) { + this.menuBtn[index].icon = require("./assets/images/yunWeiAc.png") + }else if (index == 5) { + this.menuBtn[index].icon = require("./assets/images/gaoJingAc.png") + } + }, //选中楼层 floorChange(index){ this.floorAct = index @@ -216,6 +284,44 @@ import {getData} from './api/index.js' } } } + .menu { + width: 100%; + height: 12%; + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: url("./assets/images/bottomKuang.png") no-repeat; + background-size: 100% 100%; + display: flex; + justify-content: center; + .menuList { + width: 40%; + height: 100%; + display: flex; + flex-wrap: nowrap; + align-items: center; + justify-content: center; + .menuBtn { + width: 15%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-evenly; + color: white; + } + .menuAc{ + color: rgb(0,229,189); + width: 15%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-evenly; + } + } + } .content { height: calc(100% - 15%); width: 100%; diff --git a/src/assets/images/orangeHouse.png b/src/assets/images/orangeHouse.png new file mode 100644 index 0000000..a6c5feb Binary files /dev/null and b/src/assets/images/orangeHouse.png differ diff --git a/src/router.js b/src/router.js index 928516b..78a8fea 100644 --- a/src/router.js +++ b/src/router.js @@ -24,5 +24,10 @@ export default new Router({ name: 'index', component: () => import ('./views/index.vue'), }, + { + path: '/court', + name: 'court', + component: () => import ('./views/court.vue'), + }, ] }) diff --git a/src/views/court.vue b/src/views/court.vue new file mode 100644 index 0000000..e8e0ea2 --- /dev/null +++ b/src/views/court.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/src/views/index.vue b/src/views/index.vue index 8f45266..62a03c1 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -102,14 +102,6 @@ -
- -
运维管理
@@ -301,37 +293,9 @@ export default { icon: require("../assets/images/camera.png"), }, ], //摄像 - menuBtn: [ - { - name: "首页", - icon: require("../assets/images/shouYe.png"), - }, - { - name: "智慧法庭", - icon: require("../assets/images/faTing.png"), - }, - { - name: "智慧节能", - icon: require("../assets/images/jieNeng.png"), - }, - { - name: "智慧安防", - icon: require("../assets/images/anFang.png"), - }, - { - name: "智慧运维", - icon: require("../assets/images/yunWei.png"), - }, - { - name: "告警管理", - icon: require("../assets/images/gaoJing.png"), - }, - ], - menuAc:0, //菜单点击 }; }, mounted() { - this.menuChange(0) this.warningOne(); this.warningTwo(); this.maintenanceLeft(); @@ -339,38 +303,6 @@ export default { this.energyEcharts(); }, methods: { - //菜单选中 - menuChange(index){ - this.menuAc = index - this.menuBtn.forEach((item,index) => { - if (index == 0) { - item.icon = require("../assets/images/shouYe.png") - }else if (index == 1) { - item.icon = require("../assets/images/faTing.png") - }else if (index == 2) { - item.icon = require("../assets/images/jieNeng.png") - }else if (index == 3) { - item.icon = require("../assets/images/anFang.png") - }else if (index == 4) { - item.icon = require("../assets/images/yunWei.png") - }else if (index == 5) { - item.icon = require("../assets/images/gaoJing.png") - } - }); - if (index == 0) { - this.menuBtn[index].icon = require("../assets/images/shouYeAc.png") - }else if (index == 1) { - this.menuBtn[index].icon = require("../assets/images/faTingAc.png") - }else if (index == 2) { - this.menuBtn[index].icon = require("../assets/images/jieNengAc.png") - }else if (index == 3) { - this.menuBtn[index].icon = require("../assets/images/anFangAc.png") - }else if (index == 4) { - this.menuBtn[index].icon = require("../assets/images/yunWeiAc.png") - }else if (index == 5) { - this.menuBtn[index].icon = require("../assets/images/gaoJingAc.png") - } - }, //报警选中 warnSelect(index) { this.warnBtnAc = index; @@ -1193,44 +1125,6 @@ export default { } } } - .middle { - width: 100%; - height: 12%; - position: absolute; - bottom: 0; - left: 0; - right: 0; - background: url("../assets/images/bottomKuang.png") no-repeat; - background-size: 100% 100%; - display: flex; - justify-content: center; - .menuList { - width: 40%; - height: 100%; - display: flex; - flex-wrap: nowrap; - align-items: center; - justify-content: center; - .menuBtn { - width: 15%; - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-evenly; - color: white; - } - .menuAc{ - color: rgb(0,229,189); - width: 15%; - height: 100%; - display: flex; - flex-direction: column; - align-items: center; - justify-content: space-evenly; - } - } - } .right { width: 25.5%; height: 95%;