Analysis.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <view class="threeLine" @tap="openDrawer">
  5. <image src="../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-top: 18px;margin-left: 10px;"></image>
  6. </view>
  7. <view class="text">
  8. <view class="notice">
  9. <view class="icon cuIcon-notice text-white" v-if="badge != 0">
  10. <view class="cu-tag looknumber" style="margin-top: 10px;">
  11. <block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="textWindpowerstation">{{address}}</view>
  16. </view>
  17. <view class="plus" @tap="showModal" data-target="viewModal">+</view>
  18. </view>
  19. <!-- 抽屉组件 -->
  20. <div>
  21. <drawer ref="drawer"></drawer>
  22. </div>
  23. </view>
  24. </template>
  25. <script>
  26. import drawer from '../../components/drawer/threeLineDrawer.vue'
  27. export default {
  28. components: {
  29. "drawer": drawer
  30. },
  31. data:function(){
  32. return{
  33. badge: 22,
  34. drawerList:["状态监视","矩阵监视","风场监视","人员监视"],
  35. inconList:["form","favor","question","edit"]
  36. }
  37. },
  38. onHide() {
  39. this.$refs.drawer.closeDrawer();
  40. this.hideModal();
  41. },
  42. onShow(){
  43. this.windPowerStationId = uni.getStorageSync('windPowerStationId');
  44. this.address = this.getWindPowerStationNameToSessionStorage();
  45. },
  46. methods:{
  47. openDrawer:function(){
  48. this.$refs.drawer.openDrawer(250,this.drawerList,this.inconList);
  49. },
  50. closeDrawer:function(){
  51. this.drawerIsShow=false;
  52. },
  53. pushWindPowerStationNameToSessionStorage(windpowerstationName) {
  54. uni.setStorageSync('windpowerstationName', windpowerstationName);
  55. //sessionStorage.setItem('windpowerstationName', windpowerstationName);
  56. //alert("v"+ sessionStorage.getItem("windpowerstationName"));
  57. //this.common.goback('/pages/index/Index');
  58. },
  59. getWindPowerStationNameToSessionStorage() {
  60. uni.getStorageSync('windpowerstationName');
  61. return uni.getStorageSync('windpowerstationName');
  62. },
  63. showModal(e) {
  64. this.modalName = e.currentTarget.dataset.target;
  65. this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
  66. },
  67. hideModal() {
  68. this.modalName = null;
  69. this.$refs.plusDrawer.hideModal(this.modalName);
  70. },
  71. }
  72. };
  73. </script>
  74. <style>
  75. body {
  76. font-family:'方正兰亭细黑_GBK';
  77. font-size: 20px;
  78. color: silver;
  79. }
  80. @font-face {
  81. font-family:'方正兰亭细黑_GBK';
  82. src: url(../../static/方正兰亭细黑_GBK.TTF);
  83. }
  84. page {
  85. font-family:'方正兰亭细黑_GBK';
  86. overflow-x: hidden;
  87. }
  88. .top {
  89. width: 100%;
  90. height: 130upx;
  91. padding-top: 5upx;
  92. background-color: #1f1f1f;
  93. position: fixed;
  94. top: 0px;
  95. left: 0px;
  96. z-index: 100;
  97. }
  98. .threeLine {
  99. width: 50px;
  100. height: 45px;
  101. float: left;
  102. }
  103. .text {
  104. width: calc(100% - 100px);
  105. height: 45px;
  106. float: left;
  107. user-select: text;
  108. -webkit-user-select: text;
  109. -moz-user-select: text;
  110. -ms-user-select: text;
  111. color: silver;
  112. line-height: 45px;
  113. margin-top: 11px;
  114. font-size: 18px;
  115. }
  116. .notice {
  117. width: 50px;
  118. height: 45px;
  119. float: left;
  120. }
  121. .plus {
  122. width: 50px;
  123. height: 45px;
  124. float: right;
  125. color: white;
  126. font-size: 35px;
  127. line-height: 45px;
  128. text-align: center;
  129. margin-top: 11px;
  130. }
  131. .textWindpowerstation{
  132. width: 180px;
  133. height: 45px;
  134. float: left;
  135. text-align: center;
  136. margin-left: 18px;
  137. }
  138. </style>