wtitems.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="allpage">
  3. <view class="listtop pfixed">
  4. <tab-searchone @getSearch='getSearch' :name="name"></tab-searchone>
  5. <tab-list :tablist='tablist' :tabidx="tabidx" @getCheck="goCheck" :height='90'></tab-list>
  6. <time-year @bindDateChange="bindDateChange" ></time-year>
  7. </view>
  8. <view class="zhanline"></view>
  9. <view class="alllist">
  10. <!-- l列表 -->
  11. <zdproject-list :datalist="list" :wtdt='wtdt' @getDetail='goDetail' @getjdDetail="getjdDetail"></zdproject-list>
  12. </view>
  13. <!-- <view style="height: 100rpx;"></view>
  14. <view class="zdcount_btn" @click="getAddReport">新增申报</view> -->
  15. </view>
  16. </template>
  17. <script>
  18. import zdprojectList from "@/components/projectlist/zdlist.vue"
  19. import tabList from "@/components/toptab/tab.vue"
  20. import tabSearchone from "@/components/toptab/searchone.vue"
  21. import timeYear from "@/components/timedata/timeyear.vue"
  22. import {getxmsbListFn} from '@/api/zdwork/clue.js'
  23. export default{
  24. data(){
  25. return{
  26. pageSize: 10,
  27. pageNum: 1,
  28. reachflag:true,
  29. itemslist:[],
  30. wtdt:'',
  31. tabidx:0,
  32. date:'',
  33. list:[],
  34. // ,limt:'projectV2:sbbzb:list'
  35. tablist:[{tit:'全部',val:0},{tit:'未达到',val:1,limt:'fgw:xmsb:list'},{tit:'未填写',val:2},{tit:'其他',val:3}],
  36. year:'',
  37. beginTime:'',
  38. endTime:'',
  39. name:'',
  40. census:'',
  41. deptId:this.$store.state.user.deptId,
  42. wtType:''
  43. }
  44. },
  45. components:{
  46. zdprojectList,tabList,tabSearchone,timeYear
  47. },
  48. onUnload(){
  49. uni.$off('refreshdatalistzd')
  50. },
  51. onLoad(e) {
  52. this.getDataFn();
  53. uni.$on('refreshdatalistzd',(e) => {
  54. // this.$emit('refreshdatacensuszd')
  55. this.reachflag=true;
  56. this.pageNum=1;
  57. this.list=[];
  58. this.getDataFn();
  59. })
  60. },
  61. onReachBottom() {
  62. if (this.reachflag) {
  63. this.pageNum++
  64. this.getDataFn()
  65. }
  66. },
  67. methods:{
  68. getAddReport(){
  69. this.$tab.navigateTo('/pages/zdpages/work/addreport')
  70. },
  71. getDataFn(){
  72. var params={
  73. pageSize:this.pageSize,
  74. pageNum: this.pageNum,
  75. xmmc:this.name,
  76. isWt:'Y',
  77. }
  78. params['params[beginTime]']=this.beginTime;
  79. params['params[endTime]']=this.endTime;
  80. if(this.tabidx==0){//全部
  81. }else if(this.tabidx==1){//未达到
  82. params.wtType='1'
  83. }else if(this.tabidx==2){//未填写
  84. params.wtType='2'
  85. }else if(this.tabidx==3){//其他
  86. params.wtType='3'
  87. }
  88. getxmsbListFn(params).then(res=>{
  89. if(res.code==200){
  90. if (res.rows.length < this.pageSize) {
  91. this.reachflag = false
  92. this.wtdt = '到底了~';
  93. } else {
  94. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  95. if (num < res.total) {
  96. this.reachflag = true
  97. this.wtdt = '上拉加载更多'
  98. } else {
  99. this.reachflag = false
  100. this.wtdt = '到底了~';
  101. }
  102. }
  103. if (this.pageNum == 1) {
  104. this.list = res.rows;
  105. } else {
  106. this.list = this.list.concat(res.rows)
  107. }
  108. }else{
  109. this.$toast(res.msg)
  110. }
  111. })
  112. },
  113. getSearch(e){
  114. this.name=e;
  115. this.reachflag=true;
  116. this.pageNum=1;
  117. this.list=[];
  118. this.getDataFn();
  119. },
  120. bindDateChange(e){
  121. this.year=e;
  122. this.beginTime=e+'0101';
  123. this.endTime=e+'1231';
  124. this.reachflag=true;
  125. this.pageNum=1;
  126. this.list=[];
  127. this.getDataFn()
  128. },
  129. goCheck(data){
  130. this.tabidx=data;
  131. this.reachflag=true;
  132. this.pageNum=1;
  133. this.list=[];
  134. this.getDataFn()
  135. },
  136. goDetail(e){
  137. this.$tab.navigateTo('/pages/zdpages/work/zdcluedetails?id='+e.id)
  138. },
  139. getjdDetail(e){
  140. this.$tab.navigateTo('/pages/zdpages/work/zdcluedetails?id='+e.id+'&tabidx='+e.tabidx)
  141. }
  142. }
  143. }
  144. </script>
  145. <style lang="scss" scoped>
  146. .allpage{min-height: 100vh;background: #ffffff;padding-top:280rpx;box-sizing: border-box;}
  147. .listtopa{border: 6rpx solid #FD5001;border-radius: 36rpx;height:72rpx;box-sizing: border-box;padding:0 140rpx 0 32rpx ;position: relative;
  148. input{}
  149. image{width: 30rpx;height: 30rpx;margin-right: 24rpx;}
  150. .btn{background: #FA5F03;border-radius: 36rpx;width: 140rpx;position: absolute;right: -2rpx;top: -2rpx;bottom:-2rpx;}
  151. }
  152. .listtopb{
  153. .tit{flex: 1;height: 130rpx;display: flex;flex-direction: column;justify-content: center;position: relative;
  154. view{text-align: center;}
  155. .tits{color: #666666;}
  156. .txt{color: #aaaaaa;}
  157. &.act{
  158. &::after{content: '';width: 100rpx;height: 6rpx;background:#FE5706 ;position: absolute;left: 50%;margin-left: -50rpx;bottom: 0;}
  159. .tits{color: #343434;}
  160. .txt{color: #FE5706;}
  161. }
  162. }
  163. }
  164. .zdcount_btn{position: fixed;left: 0;right: 0;bottom: 0;z-index: 4;width: 100%;height: 100rpx;font-size: 32rpx;color: #ffffff;font-weight: 500;
  165. background: #FE5706;display: flex;align-items: center;justify-content: center;
  166. // image{width: 34rpx;height: 34rpx;margin-right: 16rpx;}
  167. }
  168. </style>