xmyjitems.vue 4.7 KB

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