Files
apt-nl/src/pages/shells/index/index.vue

146 lines
3.2 KiB
Vue
Raw Normal View History

2023-05-05 18:11:56 +08:00
<template>
<div class="index-container">
<div class="header-container">
<div class="title-container">
<span class="company-logo"></span>
</div>
<div class="horizontal-menu-container">
2023-05-08 15:39:30 +08:00
<el-menu :default-active="activeIndex" mode="horizontal" @select="handleSelect">
<el-menu-item :index="menu.index" v-for="menu in menus" :key="menu.index">{{menu.label}}</el-menu-item>
2023-05-05 18:11:56 +08:00
</el-menu>
</div>
2023-05-08 15:39:30 +08:00
<div class="state-container">
2023-05-05 18:11:56 +08:00
<div class="state-item">运行</div>
<div class="state-line"></div>
<div class="state-item">自动</div>
<div class="state-line"></div>
<div class="state-item">中文<i class="icon_dropdown"></i></div>
2023-05-08 15:39:30 +08:00
</div>
<div class="user-container">
2023-05-05 18:11:56 +08:00
<div class="elec-qty-wrap">
<div class="elec-qty"></div>
</div>
<div class="elec-txt">90%</div>
<div class="iconfont icon_admin"></div>
<div class="elec-txt">admin</div>
2023-05-08 15:39:30 +08:00
</div>
<div class="time-container">
<jxTime></jxTime>
2023-05-05 18:11:56 +08:00
</div>
</div>
2023-05-08 15:39:30 +08:00
<router-view></router-view>
2023-05-05 18:11:56 +08:00
</div>
</template>
<script>
2023-05-08 15:39:30 +08:00
import jxTime from '@components/time.vue'
2023-05-05 18:11:56 +08:00
export default {
2023-05-05 18:45:49 +08:00
components: {
2023-05-08 15:39:30 +08:00
jxTime
2023-05-05 18:45:49 +08:00
},
2023-05-05 18:11:56 +08:00
data () {
return {
2023-05-08 15:39:30 +08:00
activeIndex: this.$store.getters.defaultActive,
2023-05-05 18:11:56 +08:00
menus: [{
label: '首页',
index: '1',
2023-05-08 15:39:30 +08:00
router: '/homehome'
2023-05-05 18:11:56 +08:00
}, {
label: '任务管理',
index: '2',
2023-05-09 15:57:38 +08:00
router: '/CarryPoint'
2023-05-05 18:11:56 +08:00
}, {
label: '故障管理',
index: '3',
2023-05-11 18:39:53 +08:00
router: '/ErrorDeal'
2023-05-05 18:11:56 +08:00
}, {
label: '车辆信息',
index: '4',
2023-05-08 15:39:30 +08:00
router: '/vehiclestatus'
2023-05-05 18:11:56 +08:00
}, {
label: '示教',
index: '5',
2023-05-08 15:39:30 +08:00
router: '/teach'
2023-05-05 18:11:56 +08:00
}, {
label: '地图',
index: '6',
router: ''
}, {
label: '开发者',
index: '7',
router: ''
}]
}
2023-05-08 15:39:30 +08:00
},
methods: {
handleSelect (key) {
this.activeIndex = key
this.$store.dispatch('getDefaultActive', key)
this.$router.push({
path: this.menus[Number(key) - 1].router
})
}
2023-05-05 18:11:56 +08:00
}
}
</script>
<style lang="stylus" scoped>
@import '~@style/mixin'
.index-container
2023-05-08 15:39:30 +08:00
_wh(100%, 100%)
2023-05-05 18:11:56 +08:00
.header-container
2023-05-05 18:45:49 +08:00
_fj()
_wh(100%, 61px)
padding 0 10px
border-bottom 2px solid #f1f1f1
2023-05-05 18:11:56 +08:00
.title-container
2023-05-05 18:45:49 +08:00
_fj(center)
_wh(130px, 61px)
2023-05-05 18:11:56 +08:00
.company-logo
display block
2023-05-05 18:45:49 +08:00
_wh(100%, 100%)
2023-05-08 15:39:30 +08:00
background url(../../../images/aio/logo_1.png) left center / 100% auto no-repeat
2023-05-05 18:11:56 +08:00
.horizontal-menu-container
height 61px
>>>.el-menu-item
2023-05-08 15:39:30 +08:00
padding 0 7px
.state-container
_fj()
2023-05-05 18:11:56 +08:00
.user-container
_fj()
2023-05-08 15:39:30 +08:00
.time-container
_fj()
2023-05-05 18:11:56 +08:00
.state-item
border 1px solid #54C0B3
border-radius 4px
_font(15px,25px,#54C0B3,,center)
padding 0 7px
.state-line
_wh(2px,20px)
opacity 0.3
background #8991A6
2023-05-08 15:39:30 +08:00
margin 0 10px
2023-05-05 18:11:56 +08:00
.elec-qty-wrap
position relative
width 15px
2023-05-08 15:39:30 +08:00
height 25px
2023-05-05 18:11:56 +08:00
border 1px solid #dddddd
2023-05-08 15:39:30 +08:00
margin-right 2px
2023-05-05 18:11:56 +08:00
.elec-qty
position absolute
width 100%
height 90%
left 0
bottom 0
background-color #54C0B3
// background-color #fa6400
.elec-txt
_font(15px, 25px, #909399,,left)
2023-05-08 15:39:30 +08:00
margin-right 10px
2023-05-05 18:11:56 +08:00
.icon_admin
2023-05-08 15:39:30 +08:00
_font(20px, 25px, #54C0B3,,left)
margin-right 2px
>>>.el-menu
border-right none
2023-05-05 18:11:56 +08:00
</style>