powerCut.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view class="processWrapper ">
  3. <view style="height:196rpx"></view>
  4. <view class="ding">
  5. <!-- 筛选框start -->
  6. <view class="cu-bar search bg-gray filter-section">
  7. <view class="search-form round bg-white">
  8. <text class="cuIcon-search"></text>
  9. <input class="" type="text" placeholder="请输入站点名称" confirm-type="search"></input>
  10. </view>
  11. <view class="action">
  12. <button class="cu-btn bg-blue round" @click="searchSiteList">查询</button>
  13. </view>
  14. </view>
  15. <!-- 筛选框end -->
  16. <scroll-view scroll-x class="bg-white nav text-center">
  17. <view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav"
  18. :key="index" @tap="tabSelect" :data-id="index">
  19. <view v-if="TabCur==index" class="cu-tag badge">
  20. <block class="cu-tag badge">{{TabCur? unporcessList.length:porcessedList.length}} </block>
  21. </view>
  22. {{item}}
  23. </view>
  24. </scroll-view>
  25. </view>
  26. <block v-if="TabCur==0">
  27. <view>
  28. <view class="cu-list menu-avatar">
  29. <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
  30. <view class="cu-avatar lg" style="background-image:url(../../../static/unprocessIcon.png);">
  31. </view>
  32. <view class="content">
  33. <view class="pro-title">
  34. <view class="cut">{{item.title}}</view>
  35. </view>
  36. <view class="pro-date ">{{item.time}}</view>
  37. </view>
  38. <view class="action" style="z-index:99">
  39. <view class="unProcess" @tap="goUnprocessDetail(item.id)">未执行</view>
  40. </view>
  41. </view>
  42. <view class=" text-center margin-top" v-if="unporcessList.length === 0">暂无数据...</view>
  43. </view>
  44. </view>
  45. </block>
  46. <block v-if="TabCur==1">
  47. <view style=" height: calc(100vh - 400rpx);
  48. overflow: scroll;">
  49. <view class="cu-list menu-avatar ">
  50. <view class="cu-item" v-for="(item,index) in porcessedList" :key="index">
  51. <view class="cu-avatar lg" style="background-image:url(../../../static/processedIcon.png);">
  52. </view>
  53. <view class="content">
  54. <view class="pro-title">
  55. <view class="cut">{{item.title}}</view>
  56. </view>
  57. <view class="pro-date ">{{item.time}}</view>
  58. </view>
  59. <view class="action" style="z-index:99">
  60. <view class="processed" @tap="goProcessedDetail(item.id)">已执行</view>
  61. </view>
  62. </view>
  63. <view class="text-center margin-top" v-if="porcessedList.length === 0">暂无数据...</view>
  64. </view>
  65. </view>
  66. </block>
  67. <!-- 新增按钮start -->
  68. <view class="plus">
  69. <image src="../../../static/plus.png" style="width:125rpx;height:125rpx" @tap="goAddPage()"></image>
  70. </view>
  71. <!-- 新增按钮end -->
  72. </view>
  73. </template>
  74. <script>
  75. import json from '../../../data/json.js';
  76. export default {
  77. data() {
  78. return {
  79. unporcessList: json.inspectUnprocessList,
  80. porcessedList: json.inspectProcessedList,
  81. type: '0',
  82. modalName: null,
  83. listTouchStart: 0,
  84. listTouchDirection: null,
  85. CustomBar: this.CustomBar,
  86. TabCur: 0,
  87. tabNav: ['已执行', '未执行'],
  88. };
  89. },
  90. onLoad: function(option) {
  91. },
  92. onNavigationBarButtonTap(e) {
  93. console.log(e)
  94. uni.navigateTo({
  95. url: '/pages/export/export',
  96. success: res => {},
  97. fail: () => {},
  98. complete: () => {}
  99. });
  100. },
  101. methods: {
  102. tabSelect(e) {
  103. console.log(e.currentTarget);
  104. this.TabCur = e.currentTarget.dataset.id;
  105. this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
  106. },
  107. goAddPage(id) {
  108. uni.navigateTo({
  109. url: '/pages/eleControl/powerCut/powerCutAdd/powerCutAdd',
  110. success: res => {},
  111. fail: () => {},
  112. complete: () => {}
  113. });
  114. },
  115. }
  116. }
  117. </script>
  118. <style lang="scss">
  119. //已处理未处理消息个数样式
  120. .cu-list.menu-avatar .cu-item {
  121. height: 89px;
  122. }
  123. .nav .cu-item.cur {
  124. position: relative;
  125. border-bottom: 8rpx solid;
  126. }
  127. .cu-tag.badge {
  128. top: 14rpx;
  129. right: 96rpx;
  130. }
  131. .nav .cu-item {
  132. width: 50%;
  133. margin: 0;
  134. .text-blue,
  135. .line-blue,
  136. .lines-blue {
  137. color: #4274E7
  138. }
  139. }
  140. </style>