processList.vue 4.9 KB

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