receiveCasuallyPat.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <!-- 收到随手拍 -->
  2. <template>
  3. <view id="receiveCasuallyPat">
  4. <view class="top-button-box">
  5. <view :class="tabIndex==0?'view-color-a':'view-color-b'" @click="tabClick(0)">待处理</view>
  6. <view :class="tabIndex==1?'view-color-a':'view-color-b'" @click="tabClick(1)">已处理</view>
  7. </view>
  8. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  9. <view class="for-info-box" v-for="(item,index) in infoList" :key="index" @click="goCasuallyPatInfo(item)">
  10. <view class="title-box">
  11. <view>{{item.subName}}</view>
  12. <view>{{item.createTimeStr}}</view>
  13. </view>
  14. <view class="text-box">{{item.describe}}</view>
  15. </view>
  16. <view class="get-null-box" v-if="!infoList[0]">暂无数据</view>
  17. </scroll-view>
  18. </view>
  19. </template>
  20. <script>
  21. import { getAppList ,photonoteList} from '@/api/index.js'
  22. export default {
  23. data() {
  24. return {
  25. tabIndex:0,
  26. infoList:[],
  27. //列表请求参数
  28. getData:{
  29. page:1,
  30. pageSize:20,
  31. getType:true,
  32. nullDataType:true,
  33. }
  34. }
  35. },
  36. onLoad() {
  37. },
  38. onShow(){
  39. this.clearData();
  40. this.getList();
  41. },
  42. methods: {
  43. tabClick(type){
  44. if(this.tabIndex != type){
  45. this.tabIndex = type;
  46. this.infoList = [];
  47. this.getData.page = 1;
  48. this.getData.getType = true;
  49. this.getData.nullDataType = true;
  50. this.getList();
  51. }
  52. },
  53. //清除
  54. clearData(){
  55. this.infoList = [];
  56. this.getData.page = 1;
  57. this.getData.getType = true;
  58. this.getData.nullDataType = true;
  59. },
  60. //去详情页
  61. goCasuallyPatInfo(item){
  62. if(item.handleStatus == 0){
  63. }
  64. uni.navigateTo({
  65. url: '/pages_manage/workbench/receiveCasuallyPat/casuallyPatInfo?item='+encodeURIComponent(JSON.stringify(item))
  66. });
  67. },
  68. //滚动事件
  69. scrollGet(){
  70. console.log("股东了");
  71. if(this.getData.getType){
  72. this.getData.page += 1;
  73. this.getList();
  74. }
  75. },
  76. //获取列表数据
  77. async getList(){
  78. let self = this;
  79. let obj = {
  80. pageNum:this.getData.page,
  81. pageSize:this.getData.pageSize,
  82. handleStatus:this.tabIndex
  83. }
  84. const {data} = await getAppList(obj)
  85. if(data.code==200){
  86. if(self.page==1){
  87. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  88. self.infoList = data.rows;
  89. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  90. self.infoList = data.rows;
  91. self.getData.getType = false;
  92. self.getData.nullDataType = true;
  93. }else{
  94. self.getData.getType = false;
  95. self.getData.nullDataType = true;
  96. }
  97. }else{
  98. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  99. self.infoList = self.infoList.concat(data.rows)
  100. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  101. self.infoList = self.infoList.concat(data.rows);
  102. self.getData.getType = false;
  103. self.getData.nullDataType = true;
  104. }else{
  105. self.getData.getType = false;
  106. self.getData.nullDataType = true;
  107. }
  108. }
  109. }
  110. },
  111. }
  112. }
  113. </script>
  114. <style lang="stylus" scoped>
  115. #receiveCasuallyPat{
  116. height:100%;
  117. width:100%;
  118. display flex
  119. flex-direction column
  120. .top-button-box{
  121. margin:20rpx 125rpx;
  122. display flex
  123. view{
  124. width:250rpx;
  125. line-height:80rpx;
  126. text-align center;
  127. font-size:28rpx;
  128. }
  129. view:nth-child(1){
  130. border-top-left-radius :40rpx;
  131. border-bottom-left-radius:40rpx;
  132. }
  133. view:nth-child(2){
  134. border-top-right-radius :40rpx;
  135. border-bottom-right-radius:40rpx;
  136. }
  137. .view-color-a{
  138. background #0183FA;
  139. color:#fff;
  140. }
  141. .view-color-b{
  142. background #e6e6e6;
  143. color:#999;
  144. }
  145. }
  146. .info-max-box{
  147. flex:1;
  148. overflow: scroll
  149. padding-bottom:20rpx;
  150. border-radius 20rpx
  151. .for-info-box:nth-child(1){
  152. .title-box{
  153. border:none;
  154. }
  155. border-top-left-radius 20rpx
  156. border-top-right-radius 20rpx
  157. }
  158. .for-info-box:last-child{
  159. border-bottom-left-radius 20rpx
  160. border-bottom-right-radius 20rpx
  161. }
  162. .for-info-box{
  163. background #fff
  164. margin:0 20rpx;
  165. .title-box{
  166. padding-top:12rpx;
  167. border-top:1rpx solid #e0e0e0;
  168. display flex
  169. margin 0 20rpx
  170. view{
  171. font-size:28rpx;
  172. line-height:60rpx;
  173. }
  174. view:nth-child(1){
  175. flex:1;
  176. }
  177. view:nth-child(2){
  178. font-size:24rpx;
  179. color:#999999;
  180. text-align right
  181. }
  182. }
  183. .text-box{
  184. margin 0 20rpx
  185. font-size:24rpx;
  186. line-height:40rpx;
  187. color:#666;
  188. padding-bottom:20rpx;
  189. }
  190. }
  191. .get-null-box{
  192. height:100rpx;
  193. line-height:100rpx;
  194. color:#999;
  195. text-align center
  196. }
  197. }
  198. }
  199. </style>