123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <view class="layout">
- <Navbar></Navbar>
- <view class="appMain">
- <!-- <template v-if="routName.pathName"></template> -->
- <index v-if="routName=='首页'"></index>
- <powerchange v-if="routName=='换电监控'"></powerchange>
- <equipment v-if="routName=='设备监控'"></equipment>
- <service v-if="routName=='服务记录'"></service>
- <alarm v-if="routName=='故障告警'"></alarm>
- <basic v-if="routName=='基础数据'"></basic>
- </view>
- </view>
- </template>
- <script>
- import powerchange from '@/pages/power-changer/index'
- import equipment from '@/pages/equipment-monitoring/index'
- import service from '@/pages/service-recode/index'
- import alarm from '@/pages/fault-alarm/index'
- import basic from '@/pages/basic-data/index'
- import index from '@/pages/index/index'
- export default {
- components:{
- index,powerchange,equipment,service,alarm,basic
- },
- data() {
- return {
-
- }
- },
- onShow(){
-
- },
- computed:{
- routName(){
- return this.$store.state.currentpage
- }
- },
- onLoad() {
- // console.log(this.$store.state)
- this.$store.commit("UPDATEPAGE",'首页')
- this.$storage.setJson("pageName",'首页')
- },
- methods: {
-
- }
- }
- </script>
- <style lang="scss" scoped>
- .layout{
- display: flex;
- width: 100%;
- padding:0px 20px;
- box-sizing: border-box;
- justify-content: space-between;
- .appMain{
- flex: 1;
- height: 100vh;
- padding: 20px;
- padding-right: 0px;
- box-sizing: border-box;
- }
- }
- </style>
|