index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view >
  3. <view class="notbox">
  4. <meet-list :datalist="list" :wtdt="wtdt" :type='type' @getDetail="getDetail" @getTuiFn="getTuiFn"></meet-list>
  5. </view>
  6. <pop-up :type='ptype' :codeQr="codeQr" @getClose="getClose" @getupSubmit="getupSubmit" :qjlxlist="qjlxlist"></pop-up>
  7. <footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
  8. </view>
  9. </template>
  10. <script>
  11. import popUp from "@/work/components/popup/popup.vue"
  12. import footers from '@/components/footer/footer.vue'
  13. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  14. import {getMeetListFn,getzxActivityReplyFn,getupdateReplyFn} from "@/api/mine/meeting.js"
  15. import {getDictionaryFn} from "@/api/mine/register.js"
  16. import meetList from "@/work/components/meeting/list.vue"
  17. export default {
  18. components:{footers,meetList,popUp},
  19. data() {
  20. return {
  21. footlist:[
  22. {module:'home',title:'潜山政协',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png')},
  23. {module:'report',title:'履职报告',icon_checked:require('@/static/images/tabbar/report_.png'),icon_nochecked:require('@/static/images/tabbar/report.png')},
  24. {module:'notice',title:'会议通知',icon_checked:require('@/static/images/tabbar/notice_.png'),icon_nochecked:require('@/static/images/tabbar/notice.png')},
  25. {module:'mine',title:'个人中心',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
  26. ],
  27. color_checked :'222327',
  28. color_nochecked :'AAAAAA',
  29. footerindex:'notice',
  30. isfootflag:true,
  31. list:[],
  32. pageSize: 10,
  33. pageNum: 1,
  34. reachflag: true,
  35. wtdt:'',
  36. type:'hytz',
  37. ptype:'',
  38. codeQr:"",
  39. qjlxlist:[],
  40. userId:this.$store.state.user.userId,
  41. }
  42. },
  43. onUnload(){
  44. uni.$off('refreshlist')
  45. },
  46. onShow() {
  47. },
  48. onLoad() {
  49. this.getDataFn()
  50. this.init()
  51. uni.$on('refreshlist', (e) => {
  52. this.pageNum=1;
  53. this.list=[];
  54. this.reachflag=true;
  55. this.getDataFn()
  56. })
  57. },
  58. // 上拉触底加载更多触发事件
  59. onReachBottom() {
  60. if (this.reachflag) {
  61. this.pageNum++
  62. this.getDataFn()
  63. }
  64. },
  65. methods: {
  66. checkPermi, checkRole,
  67. getClose(){
  68. this.ptype=""
  69. },
  70. getDetail(data){
  71. var type=this.tabidx;
  72. this.$tab.navigateTo('/work/pages/meeting/details?id='+data+"&pt=hytz")
  73. },
  74. getTuiFn(ite){
  75. if(ite.type=='hyqd'){
  76. this.$tab.navigateTo('/work/pages/meeting/signin?id='+ite.id)
  77. }else{
  78. this.codeQr=ite.item.conferenceQr
  79. this.ptype=ite.type;
  80. this.id=ite.id
  81. }
  82. },
  83. init(){
  84. // 请假类型
  85. getDictionaryFn('leave').then(res=>{
  86. if(res.code==200&&res.data.length){
  87. this.qjlxlist = res.data.map(v => {
  88. return {
  89. text: v.dictLabel,
  90. value: v.dictValue
  91. }
  92. })
  93. this.aqjlxlist = res.data.map(v => {
  94. return {
  95. label: v.dictLabel,
  96. value: v.dictValue
  97. }
  98. })
  99. }
  100. })
  101. },
  102. getupSubmit(e){
  103. var that=this;
  104. var type=this.type;
  105. var params=JSON.parse(JSON.stringify(e))
  106. params.userId=this.userId;
  107. params.conferenceId=this.id;
  108. getupdateReplyFn(params).then(res=>{
  109. if(res.code==200){
  110. this.$toast("答复成功");
  111. setTimeout(function(){
  112. that.ptype='';
  113. that.pageNum=1;
  114. that.list=[];
  115. that.reachflag=true;
  116. that.getDataFn()
  117. },1200)
  118. }
  119. })
  120. },
  121. getDataFn(){
  122. var params={
  123. pageSize:this.pageSize,
  124. pageNum: this.pageNum,
  125. // visitType:3
  126. }
  127. params.userId=this.userId
  128. getMeetListFn(params).then(res=>{
  129. if(res.code==200){
  130. if (res.rows.length < this.pageSize) {
  131. this.reachflag = false
  132. this.wtdt = '到底了~';
  133. } else {
  134. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  135. if (num < res.total) {
  136. this.reachflag = true
  137. this.wtdt = '上拉加载更多'
  138. } else {
  139. this.reachflag = false
  140. this.wtdt = '到底了~';
  141. }
  142. }
  143. if (this.pageNum == 1) {
  144. this.list = res.rows;
  145. } else {
  146. this.list = this.list.concat(res.rows)
  147. }
  148. }else{
  149. this.$toast(res.msg)
  150. }
  151. })
  152. },
  153. }
  154. }
  155. </script>
  156. <style lang="scss" scoped>
  157. page {
  158. background-color: #f5f6f7;
  159. }
  160. .notbox{padding: 24rpx;}
  161. </style>