idea.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <view class="allpage">
  3. <view class="listtop pfixed">
  4. <tab-searchone @getSearch='getSearch'></tab-searchone>
  5. <hf-duban @bindDateChange="bindDateChange"></hf-duban>
  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="duban" @getDetail='goDetail' @getDel="getDel"></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 hfDuban from "@/components/timedata/hfduban.vue"
  20. import { getdbdList,getdbdDet} 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. isHf:'',
  40. }
  41. },
  42. components:{
  43. projectList,tabList,tabSearchone,hfDuban
  44. },
  45. onUnload(){
  46. uni.$off('refreshdatalist')
  47. },
  48. onLoad() {
  49. uni.$on('refreshdatalist',(e) => {
  50. this.reachflag=true;
  51. this.pageNum=1;
  52. this.list=[];
  53. this.getDataFn()
  54. })
  55. this.getDataFn()
  56. },
  57. // 审核意见 传2
  58. onReachBottom() {
  59. if (this.reachflag) {
  60. this.pageNum++
  61. this.getDataFn()
  62. }
  63. },
  64. methods:{
  65. bindDateChange(e){
  66. this.isHf=e;
  67. this.reachflag=true;
  68. this.pageNum=1;
  69. this.list=[];
  70. this.getDataFn()
  71. },
  72. getDel(e){
  73. var that=this;
  74. this.$modal.confirm('确定删除该条信息吗?').then(() => {
  75. getdbdDet(e).then(res=>{
  76. if(res.code==200){
  77. this.$toast('删除成功')
  78. setTimeout(function() {
  79. uni.$emit('refreshdatalist','duban');
  80. that.reachflag=true;
  81. that.pageNum=1;
  82. that.list=[];
  83. that.getDataFn()
  84. },1500);
  85. }else{
  86. this.$toast(res.msg)
  87. }
  88. })
  89. })
  90. },
  91. goCheck(data){
  92. this.tabidx=data;
  93. this.reachflag=true;
  94. this.pageNum=1;
  95. this.list=[];
  96. this.getDataFn()
  97. },
  98. goDetail(e){
  99. // this.$tab.navigateTo('/pages/work/cluedetails?id='+e.xmId)
  100. this.$tab.navigateTo('/pages/work/ideadetail?id='+e.id)
  101. },
  102. getDataFn(){
  103. var params={
  104. pageSize:this.pageSize,
  105. pageNum: this.pageNum,
  106. xmmc:this.name,
  107. deptId:this.deptId,
  108. isHf:this.isHf
  109. }
  110. getdbdList(params).then(res=>{
  111. if(res.code==200){
  112. if (res.rows.length < this.pageSize) {
  113. this.reachflag = false
  114. this.wtdt = '到底了~';
  115. } else {
  116. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  117. if (num < res.total) {
  118. this.reachflag = true
  119. this.wtdt = '上拉加载更多'
  120. } else {
  121. this.reachflag = false
  122. this.wtdt = '到底了~';
  123. }
  124. }
  125. if (this.pageNum == 1) {
  126. this.list = res.rows;
  127. } else {
  128. this.list = this.list.concat(res.rows)
  129. }
  130. }else{
  131. this.$toast(res.msg)
  132. }
  133. })
  134. },
  135. getSearch(e){
  136. this.name=e;
  137. this.reachflag=true;
  138. this.pageNum=1;
  139. this.list=[];
  140. this.getDataFn()
  141. },
  142. }
  143. }
  144. </script>
  145. <style lang="scss" scoped>
  146. .allpage{min-height: 100vh;background: #ffffff;padding-top:190rpx;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. .alllist{padding-top:10rpx ;}
  165. </style>