wtitem.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view class="allpage">
  3. <view class="listtop pfixed">
  4. <tab-searchone @getSearch='getSearch'></tab-searchone>
  5. <time-year @bindDateChange="bindDateChange" :timedate="time"></time-year>
  6. <!-- <tab-list :tablist='tablist' :tabidx="tabidx" @getCheck="goCheck" :height='130'></tab-list> -->
  7. </view>
  8. <view class="zhanline"></view>
  9. <view class="alllist">
  10. <!-- l列表 -->
  11. <project-list :datalist="list" :wtdt="wtdt" type='wenti' @getDetail='goDetail'></project-list>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import projectList from "@/components/projectlist/list.vue"
  17. import tabList from "@/components/toptab/tab.vue"
  18. import tabSearchone from "@/components/toptab/searchone.vue"
  19. import timeYear from "@/components/timedata/timeyear.vue"
  20. import { getshyjwtList} from '@/api/work/clue.js'
  21. export default{
  22. data(){
  23. return{
  24. upimg:require("@/static/images/index/up.png"),
  25. tabidx:0,
  26. year:'',
  27. list:[],
  28. // tablist:[{tit:'全部',val:0,txt:300},{tit:'超期审核',val:1,txt:300},{tit:'严重滞后',val:2,txt:300}],
  29. pageSize: 10,
  30. pageNum: 1,
  31. reachflag:true,
  32. wtdt:'',
  33. year:'',
  34. beginTime:'',
  35. endTime:'',
  36. name:'',
  37. wtdt:'',
  38. deptId:this.$store.state.user.deptId,
  39. time:""
  40. }
  41. },
  42. components:{
  43. projectList,tabList,tabSearchone,timeYear
  44. },
  45. onUnload(){
  46. uni.$off('refreshdatalist')
  47. },
  48. onLoad(e) {
  49. uni.$on('refreshdatalist',(e) => {
  50. this.reachflag=true;
  51. this.pageNum=1;
  52. this.list=[];
  53. this.getDataFn();
  54. })
  55. var y='';
  56. if(e.time){
  57. y=e.time
  58. }else{
  59. let date = new Date();
  60. y = date.getFullYear();
  61. }
  62. this.beginTime=y+'0101';
  63. this.endTime=y+'1231';
  64. this.time=y;
  65. this.getDataFn()
  66. },
  67. // 审核意见 传2
  68. onReachBottom() {
  69. if (this.reachflag) {
  70. this.pageNum++
  71. this.getDataFn()
  72. }
  73. },
  74. methods:{
  75. bindDateChange(e){
  76. this.year=e;
  77. this.beginTime=e+'0101';
  78. this.endTime=e+'1231';
  79. this.reachflag=true;
  80. this.pageNum=1;
  81. this.list=[];
  82. this.getDataFn()
  83. },
  84. goCheck(data){
  85. this.tabidx=data;
  86. this.reachflag=true;
  87. this.pageNum=1;
  88. this.list=[];
  89. this.getDataFn()
  90. },
  91. goDetail(e){
  92. this.$tab.navigateTo('/pages/work/cluedetails?id='+e.id)
  93. },
  94. getDataFn(){
  95. var params={
  96. pageSize:this.pageSize,
  97. pageNum: this.pageNum,
  98. xmxsmc:this.name,
  99. shjg:2,
  100. deptId:this.deptId
  101. }
  102. params['params[beginTime]']=this.beginTime
  103. params['params[endTime]']=this.endTime
  104. getshyjwtList(params).then(res=>{
  105. if(res.code==200){
  106. if (res.rows.length < this.pageSize) {
  107. this.reachflag = false
  108. this.wtdt = '到底了~';
  109. } else {
  110. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  111. if (num < res.total) {
  112. this.reachflag = true
  113. this.wtdt = '上拉加载更多'
  114. } else {
  115. this.reachflag = false
  116. this.wtdt = '到底了~';
  117. }
  118. }
  119. if (this.pageNum == 1) {
  120. this.list = res.rows;
  121. } else {
  122. this.list = this.list.concat(res.rows)
  123. }
  124. }else{
  125. this.$toast(res.msg)
  126. }
  127. })
  128. },
  129. getSearch(e){
  130. this.name=e;
  131. this.reachflag=true;
  132. this.pageNum=1;
  133. this.list=[];
  134. this.getDataFn()
  135. },
  136. }
  137. }
  138. </script>
  139. <style lang="scss" scoped>
  140. .allpage{min-height: 100vh;background: #ffffff;padding-top:190rpx;box-sizing: border-box;}
  141. .listtopa{border: 6rpx solid #FD5001;border-radius: 36rpx;height:72rpx;box-sizing: border-box;padding:0 140rpx 0 32rpx ;position: relative;
  142. input{}
  143. image{width: 30rpx;height: 30rpx;margin-right: 24rpx;}
  144. .btn{background: #FA5F03;border-radius: 36rpx;width: 140rpx;position: absolute;right: -2rpx;top: -2rpx;bottom:-2rpx;}
  145. }
  146. .listtopb{
  147. .tit{flex: 1;height: 130rpx;display: flex;flex-direction: column;justify-content: center;position: relative;
  148. view{text-align: center;}
  149. .tits{color: #666666;}
  150. .txt{color: #aaaaaa;}
  151. &.act{
  152. &::after{content: '';width: 100rpx;height: 6rpx;background:#FE5706 ;position: absolute;left: 50%;margin-left: -50rpx;bottom: 0;}
  153. .tits{color: #343434;}
  154. .txt{color: #FE5706;}
  155. }
  156. }
  157. }
  158. .alllist{padding-top:10rpx ;}
  159. </style>