processList.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view class="processWrapper ">
  3. <view style="height:98rpx"></view>
  4. <view class="ding">
  5. <scroll-view scroll-x class="bg-white nav text-center">
  6. <view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav" :key="index" @tap="tabSelect"
  7. :data-id="index">
  8. <view v-if="TabCur==index" class="cu-tag badge">
  9. <block class="cu-tag badge">{{TabCur? unporcessList.length:porcessedList.length}} </block>
  10. </view>
  11. {{item}}
  12. </view>
  13. </scroll-view>
  14. </view>
  15. <block v-if="TabCur==0">
  16. <view class="processList">
  17. <view class="cu-list menu-avatar">
  18. <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
  19. <view class="cu-avatar lg" style="background-image:url(../../static/process-icon.png);"></view>
  20. <view class="content">
  21. <view class="pro-title">
  22. <view class="cut">{{item.title}}</view>
  23. </view>
  24. <view class="pro-des ">
  25. <view class="text-cut">
  26. {{item.des}}
  27. </view>
  28. </view>
  29. <view class="pro-date ">{{item.time}}</view>
  30. </view>
  31. <view class="action" style="z-index:99">
  32. <view class="unProcess" @tap="goUnprocessDetail(item.id)">未处理</view>
  33. </view>
  34. </view>
  35. <view class=" text-center margin-top" v-if="unporcessList.length === 0">暂无数据...</view>
  36. </view>
  37. </view>
  38. </block>
  39. <block v-if="TabCur==1">
  40. <view class="processList">
  41. <view class="cu-list menu-avatar " >
  42. <view class="cu-item" v-for="(item,index) in porcessedList" :key="index">
  43. <view class="cu-avatar lg" style="background-image:url(../../static/processed-icon.png);"></view>
  44. <view class="content">
  45. <view class="pro-title">
  46. <view class="cut">{{item.title}}</view>
  47. </view>
  48. <view class="pro-des ">
  49. <view class="text-cut">
  50. {{item.des}}
  51. </view>
  52. </view>
  53. <view class="pro-date ">{{item.time}}</view>
  54. </view>
  55. <view class="action" style="z-index:99">
  56. <view class="processed" @tap="goProcessedDetail(item.id)">已处理</view>
  57. </view>
  58. </view>
  59. <view class="text-center margin-top" v-if="porcessedList.length === 0">暂无数据...</view>
  60. </view>
  61. </view>
  62. </block>
  63. </view>
  64. </template>
  65. <script>
  66. import json from '../../../data/json.js';
  67. export default {
  68. data() {
  69. return {
  70. unporcessList: json.inspectUnprocessList,
  71. porcessedList: json.inspectProcessedList,
  72. type: '0',
  73. modalName: null,
  74. listTouchStart: 0,
  75. listTouchDirection: null,
  76. CustomBar: this.CustomBar,
  77. TabCur: 0,
  78. tabNav: ['未处理', '已处理'],
  79. };
  80. },
  81. onLoad: function(option) {
  82. },
  83. onNavigationBarButtonTap(e) {
  84. console.log(e)
  85. uni.navigateTo({
  86. url: '/pages/export/export',
  87. success: res => {},
  88. fail: () => {},
  89. complete: () => {}
  90. });
  91. },
  92. methods: {
  93. tabSelect(e) {
  94. console.log(e.currentTarget);
  95. this.TabCur = e.currentTarget.dataset.id;
  96. this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
  97. },
  98. // 页面跳转
  99. goUnprocessDetail(id) {
  100. uni.navigateTo({
  101. url: '/pages/inspectList/unprocessDetail/unprocessDetail',
  102. success: res => {},
  103. fail: () => {},
  104. complete: () => {}
  105. });
  106. },
  107. goProcessedDetail(id) {
  108. uni.navigateTo({
  109. url: '/pages/inspectList/processedDetail/processedDetail',
  110. success: res => {},
  111. fail: () => {},
  112. complete: () => {}
  113. });
  114. },
  115. // goVideoUnprocessDetail(id) {
  116. // uni.navigateTo({
  117. // url: '/pages/unprocessDetail/unprocessDetail?companyCode=' + this.companyCode + '&processingStatus=0&id=' + id +
  118. // '&type=2',
  119. // success: res => {},
  120. // fail: () => {},
  121. // complete: () => {}
  122. // });
  123. // },
  124. goVideoProcessedDetail(id) {
  125. uni.navigateTo({
  126. url: '/pages/processedDetail/processedDetail?companyCode=' + this.companyCode + '&processingStatus=' + this.processingStatus +
  127. '&id=' + id + '&type=2',
  128. success: res => {},
  129. fail: () => {},
  130. complete: () => {}
  131. });
  132. }
  133. }
  134. }
  135. </script>
  136. <style lang="scss">
  137. //已处理未处理消息个数样式
  138. .nav .cu-item.cur {
  139. position: relative;
  140. border-bottom: 8rpx solid;
  141. }
  142. .cu-tag.badge {
  143. top: 14rpx;
  144. right: 96rpx;
  145. }
  146. .nav .cu-item {
  147. width: 50%;
  148. margin: 0;
  149. .text-blue,
  150. .line-blue,
  151. .lines-blue {
  152. color: #4274E7
  153. }
  154. }
  155. </style>