lditems.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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='130'></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 type='leader' :datalist="list" :wtdt='wtdt' @getDetail='goDetail'></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 {getxmlistzdldpsFn} 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,txt:0},{tit:'申报库',val:1,txt:0,limt:'fgw:xmsb:list'},{tit:'项目库',val:2,txt:0}],
  36. year:'',
  37. beginTime:'',
  38. endTime:'',
  39. name:'',
  40. census:'',
  41. deptId:this.$store.state.user.deptId,
  42. }
  43. },
  44. components:{
  45. zdprojectList,tabList,tabSearchone,timeYear
  46. },
  47. onUnload(){
  48. uni.$off('refreshdatalistzd')
  49. },
  50. onLoad(e) {
  51. this.getDataFn();
  52. uni.$on('refreshdatalistzd',(e) => {
  53. this.reachflag=true;
  54. this.pageNum=1;
  55. this.list=[];
  56. this.getDataFn();
  57. })
  58. },
  59. onReachBottom() {
  60. if (this.reachflag) {
  61. this.pageNum++
  62. this.getDataFn()
  63. }
  64. },
  65. methods:{
  66. getAddReport(){
  67. this.$tab.navigateTo('/pages/zdpages/work/addreport')
  68. },
  69. getDataFn(){
  70. var params={
  71. pageSize:this.pageSize,
  72. pageNum: this.pageNum,
  73. xmmc:this.name,
  74. }
  75. params['params[beginTime]']=this.beginTime
  76. params['params[endTime]']=this.endTime
  77. getxmlistzdldpsFn(params).then(res=>{
  78. if(res.code==200){
  79. if (res.rows.length < this.pageSize) {
  80. this.reachflag = false
  81. this.wtdt = '到底了~';
  82. } else {
  83. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  84. if (num < res.total) {
  85. this.reachflag = true
  86. this.wtdt = '上拉加载更多'
  87. } else {
  88. this.reachflag = false
  89. this.wtdt = '到底了~';
  90. }
  91. }
  92. if (this.pageNum == 1) {
  93. this.list = res.rows;
  94. } else {
  95. this.list = this.list.concat(res.rows)
  96. }
  97. }else{
  98. this.$toast(res.msg)
  99. }
  100. })
  101. },
  102. getSearch(e){
  103. this.name=e;
  104. this.reachflag=true;
  105. this.pageNum=1;
  106. this.list=[];
  107. this.getDataFn();
  108. },
  109. bindDateChange(e){
  110. this.year=e;
  111. this.beginTime=e+'0101';
  112. this.endTime=e+'1231';
  113. this.reachflag=true;
  114. this.pageNum=1;
  115. this.list=[];
  116. this.getDataFn()
  117. },
  118. goCheck(data){
  119. this.tabidx=data;
  120. this.reachflag=true;
  121. this.pageNum=1;
  122. this.list=[];
  123. this.getDataFn()
  124. },
  125. goDetail(e){
  126. this.$tab.navigateTo('/pages/zdpages/work/zdcluedetails?id='+e.id)
  127. }
  128. }
  129. }
  130. </script>
  131. <style lang="scss" scoped>
  132. .allpage{min-height: 100vh;background: #ffffff;padding-top:190rpx;box-sizing: border-box;}
  133. .listtopa{border: 6rpx solid #FD5001;border-radius: 36rpx;height:72rpx;box-sizing: border-box;padding:0 140rpx 0 32rpx ;position: relative;
  134. input{}
  135. image{width: 30rpx;height: 30rpx;margin-right: 24rpx;}
  136. .btn{background: #FA5F03;border-radius: 36rpx;width: 140rpx;position: absolute;right: -2rpx;top: -2rpx;bottom:-2rpx;}
  137. }
  138. .listtopb{
  139. .tit{flex: 1;height: 130rpx;display: flex;flex-direction: column;justify-content: center;position: relative;
  140. view{text-align: center;}
  141. .tits{color: #666666;}
  142. .txt{color: #aaaaaa;}
  143. &.act{
  144. &::after{content: '';width: 100rpx;height: 6rpx;background:#FE5706 ;position: absolute;left: 50%;margin-left: -50rpx;bottom: 0;}
  145. .tits{color: #343434;}
  146. .txt{color: #FE5706;}
  147. }
  148. }
  149. }
  150. .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;
  151. background: #FE5706;display: flex;align-items: center;justify-content: center;
  152. // image{width: 34rpx;height: 34rpx;margin-right: 16rpx;}
  153. }
  154. </style>