processList.vue 4.5 KB

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