center.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <view class="allpage">
  3. <view class="listtop pfixed">
  4. <tab-searchone @getSearch='getSearch' :name="name"></tab-searchone>
  5. <time-year @bindDateChange="bindDateChange" ></time-year>
  6. </view>
  7. <view class="zhanline"></view>
  8. <view class="alllist">
  9. <!-- l列表 -->
  10. <project-list :datalist="list" :wtdt='wtdt' @getDetail='goDetail'></project-list>
  11. </view>
  12. <!-- 弹窗 -->
  13. <view class="bgbox" @click="getClose" v-if="titflag"></view>
  14. <!-- 弹窗 -->
  15. <view class="fixedbox" v-if="titflag">
  16. <image :src="closeimg" class="choseimg" @click="getClose"></image>
  17. <view class="top">温馨提示</view>
  18. <view class="boxs">
  19. <view class="c34 f16 fw">引荐单位可在此模块查看/操作项目信息及项目进展情况。</view>
  20. </view>
  21. <view class="fixedbtn" @click="getClose">我知道了</view>
  22. </view>
  23. <footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
  24. </view>
  25. </template>
  26. <script>
  27. import projectList from "@/components/projectlist/list.vue"
  28. import tabSearchone from "@/components/toptab/searchone.vue"
  29. import timeYear from "@/components/timedata/timeyear.vue"
  30. import { getsbbzblistYz} from '@/api/work/clue.js'
  31. import footers from '@/components/footer/footer.vue'
  32. export default{
  33. data(){
  34. return{
  35. pageSize: 10,
  36. pageNum: 1,
  37. reachflag:true,
  38. itemslist:[],
  39. wtdt:'',
  40. tabidx:0,
  41. date:'',
  42. list:[],
  43. year:'',
  44. beginTime:'',
  45. endTime:'',
  46. name:'',
  47. census:'',
  48. deptId:this.$store.state.user.deptId,
  49. closeimg:require('@/static/images/close.png'),
  50. titflag:true,
  51. footlist:[
  52. {module:'home',title:'首页',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png')},
  53. {module:'center',title:'引荐项目',icon_checked:require('@/static/images/tabbar/cen_.png'),icon_nochecked:require('@/static/images/tabbar/cen.png')},
  54. {module:'mine',title:'我的',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
  55. ],
  56. footerindex:'center',
  57. showfooter: 0,
  58. isfootflag:true,
  59. color_checked :'343434',
  60. color_nochecked :'666666',
  61. }
  62. },
  63. components:{
  64. projectList,tabSearchone,timeYear,footers
  65. },
  66. onUnload(){
  67. uni.$off('refreshdatalist')
  68. },
  69. onLoad(e) {
  70. if(e.xmmc){
  71. this.name=e.xmmc;
  72. }
  73. let date = new Date();
  74. let y = date.getFullYear();
  75. this.beginTime=y+'0101';
  76. this.endTime=y+'1231';
  77. this.getDataFn();
  78. uni.$on('refreshdatalist',(e) => {
  79. this.reachflag=true;
  80. this.pageNum=1;
  81. this.list=[];
  82. this.getDataFn();
  83. })
  84. },
  85. onReachBottom() {
  86. if (this.reachflag) {
  87. this.pageNum++
  88. this.getDataFn()
  89. }
  90. },
  91. methods:{
  92. getClose(){
  93. this.titflag=false
  94. },
  95. getDataFn(){
  96. var params={
  97. pageSize:this.pageSize,
  98. pageNum: this.pageNum,
  99. xmxsmc:this.name,
  100. deptId:this.$store.state.user.deptId
  101. }
  102. params['params[beginTime]']=this.beginTime
  103. params['params[endTime]']=this.endTime
  104. getsbbzblistYz(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. bindDateChange(e){
  137. this.year=e;
  138. this.beginTime=e+'0101';
  139. this.endTime=e+'1231';
  140. this.reachflag=true;
  141. this.pageNum=1;
  142. this.list=[];
  143. this.getDataFn()
  144. },
  145. goDetail(e){
  146. this.$tab.navigateTo('/pages/work/yinpages/cluedetails?id='+e.id)
  147. // this.$tab.navigateTo('/pages/work/cluedetails?id='+e+"&tabidx="+this.tabidx)
  148. }
  149. }
  150. }
  151. </script>
  152. <style lang="scss" scoped>
  153. .allpage{min-height: 100vh;background: #ffffff;padding:190rpx 0 0rpx;box-sizing: border-box;}
  154. .listtopa{border: 6rpx solid #FD5001;border-radius: 36rpx;height:72rpx;box-sizing: border-box;padding:0 140rpx 0 32rpx ;position: relative;
  155. input{}
  156. image{width: 30rpx;height: 30rpx;margin-right: 24rpx;}
  157. .btn{background: #FA5F03;border-radius: 36rpx;width: 140rpx;position: absolute;right: -2rpx;top: -2rpx;bottom:-2rpx;}
  158. }
  159. .listtopb{
  160. .tit{flex: 1;height: 130rpx;display: flex;flex-direction: column;justify-content: center;position: relative;
  161. view{text-align: center;}
  162. .tits{color: #666666;}
  163. .txt{color: #aaaaaa;}
  164. &.act{
  165. &::after{content: '';width: 100rpx;height: 6rpx;background:#FE5706 ;position: absolute;left: 50%;margin-left: -50rpx;bottom: 0;}
  166. .tits{color: #343434;}
  167. .txt{color: #FE5706;}
  168. }
  169. }
  170. }
  171. .alllist{padding-top:10rpx ;}
  172. // 操作按钮
  173. .cluebtn{
  174. display: flex;align-items: center;justify-content: center;font-weight: bold;font-size: 32rpx;color: #ffff;height: 100rpx;position: fixed;left: 0;right: 0;bottom: 0;z-index: 3;
  175. &.btn1{background-color: #1FB9F7;flex: 1;}
  176. &.btn2{background-color:#FF6400;flex: 1;}
  177. }
  178. .fixedbox{
  179. height: 480rpx;box-sizing: border-box;
  180. .boxs{padding: 90rpx 0 70rpx;}
  181. .fixedbtn{width:100%;height: 80rpx;background: #FF6400;
  182. border-radius: 10rpx;display: flex;align-items: center;justify-content: center;font-size: 32rpx;font-weight: bold;color: #FFFFFF;
  183. &.btn1{background-color: #20ACCF;margin-bottom: 36rpx;}
  184. }
  185. }
  186. </style>