processList.vue 4.9 KB

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