<template> <view class="content"> <view class="top"> <view class="threeLine" @tap="openDrawer"> <image src="../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-top: 18px;margin-left: 10px;"></image> </view> <view class="text"> <view class="notice"> <view class="icon cuIcon-notice text-white" v-if="badge != 0"> <view class="cu-tag looknumber" style="margin-top: 10px;"> <block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block> </view> </view> </view> <view class="textWindpowerstation">{{address}}</view> </view> <view class="plus" @tap="showModal" data-target="viewModal">+</view> </view> <!-- 抽屉组件 --> <div> <drawer ref="drawer"></drawer> </div> </view> </template> <script> import drawer from '../../components/drawer/threeLineDrawer.vue' export default { components: { "drawer": drawer }, data:function(){ return{ badge: 22, drawerList:["状态监视","矩阵监视","风场监视","人员监视"], inconList:["form","favor","question","edit"] } }, onHide() { this.$refs.drawer.closeDrawer(); this.hideModal(); }, onShow(){ this.windPowerStationId = uni.getStorageSync('windPowerStationId'); this.address = this.getWindPowerStationNameToSessionStorage(); }, methods:{ openDrawer:function(){ this.$refs.drawer.openDrawer(250,this.drawerList,this.inconList); }, closeDrawer:function(){ this.drawerIsShow=false; }, pushWindPowerStationNameToSessionStorage(windpowerstationName) { uni.setStorageSync('windpowerstationName', windpowerstationName); //sessionStorage.setItem('windpowerstationName', windpowerstationName); //alert("v"+ sessionStorage.getItem("windpowerstationName")); //this.common.goback('/pages/index/Index'); }, getWindPowerStationNameToSessionStorage() { uni.getStorageSync('windpowerstationName'); return uni.getStorageSync('windpowerstationName'); }, showModal(e) { this.modalName = e.currentTarget.dataset.target; this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName); }, hideModal() { this.modalName = null; this.$refs.plusDrawer.hideModal(this.modalName); }, } }; </script> <style> body { font-family:'方正兰亭细黑_GBK'; font-size: 20px; color: silver; } @font-face { font-family:'方正兰亭细黑_GBK'; src: url(../../static/fzltxh.TTF); } page { font-family:'方正兰亭细黑_GBK'; overflow-x: hidden; } .top { width: 100%; height: 130upx; padding-top: 5upx; background-color: #1f1f1f; position: fixed; top: 0px; left: 0px; z-index: 100; } .threeLine { width: 50px; height: 45px; float: left; } .text { width: calc(100% - 100px); height: 45px; float: left; user-select: text; -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; color: silver; line-height: 45px; margin-top: 11px; font-size: 18px; } .notice { width: 50px; height: 45px; float: left; } .plus { width: 50px; height: 45px; float: right; color: white; font-size: 35px; line-height: 45px; text-align: center; margin-top: 11px; } .textWindpowerstation{ width: 180px; height: 45px; float: left; text-align: center; margin-left: 18px; } </style>