index.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <view >
  3. <view class="notbox">
  4. <meet-list :datalist="list" :wtdt="wtdt" :type='ptype' @getDetail="getDetail" ></meet-list>
  5. </view>
  6. <footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
  7. </view>
  8. </template>
  9. <script>
  10. import footers from '@/components/footer/footer.vue'
  11. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  12. import {getMeetListFn} from "@/api/mine/meeting.js"
  13. import meetList from "@/work/components/meeting/list.vue"
  14. export default {
  15. components:{footers,meetList},
  16. data() {
  17. return {
  18. footlist:[
  19. {module:'home',title:'潜山政协',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png')},
  20. {module:'report',title:'履职报告',icon_checked:require('@/static/images/tabbar/report_.png'),icon_nochecked:require('@/static/images/tabbar/report.png')},
  21. {module:'notice',title:'会议通知',icon_checked:require('@/static/images/tabbar/notice_.png'),icon_nochecked:require('@/static/images/tabbar/notice.png')},
  22. {module:'mine',title:'个人中心',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
  23. ],
  24. color_checked :'222327',
  25. color_nochecked :'AAAAAA',
  26. footerindex:'notice',
  27. isfootflag:true,
  28. list:[],
  29. pageSize: 10,
  30. pageNum: 1,
  31. reachflag: true,
  32. wtdt:'',
  33. ptype:'hytz',
  34. userId:this.$store.state.user.userId,
  35. }
  36. },
  37. onShow() {
  38. },
  39. onLoad() {
  40. this.getDataFn()
  41. },
  42. methods: {
  43. checkPermi, checkRole,
  44. getDataFn(){
  45. var params={
  46. pageSize:this.pageSize,
  47. pageNum: this.pageNum,
  48. // visitType:3
  49. }
  50. // params.userId=this.userId
  51. getMeetListFn(params).then(res=>{
  52. if(res.code==200){
  53. if (res.rows.length < this.pageSize) {
  54. this.reachflag = false
  55. this.wtdt = '到底了~';
  56. } else {
  57. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  58. if (num < res.total) {
  59. this.reachflag = true
  60. this.wtdt = '上拉加载更多'
  61. } else {
  62. this.reachflag = false
  63. this.wtdt = '到底了~';
  64. }
  65. }
  66. if (this.pageNum == 1) {
  67. this.list = res.rows;
  68. } else {
  69. this.list = this.list.concat(res.rows)
  70. }
  71. }else{
  72. this.$toast(res.msg)
  73. }
  74. })
  75. },
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. page {
  81. background-color: #f5f6f7;
  82. }
  83. .notbox{padding: 24rpx;}
  84. </style>