index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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} 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. onShow() {
  44. },
  45. onLoad() {
  46. this.getDataFn()
  47. this.init()
  48. },
  49. methods: {
  50. checkPermi, checkRole,
  51. getClose(){
  52. this.ptype=""
  53. },
  54. getDetail(data){
  55. var type=this.tabidx;
  56. this.$tab.navigateTo('/work/pages/meeting/details?id='+data+"&pt="+type)
  57. },
  58. getTuiFn(ite){
  59. if(ite.type=='hyqd'){
  60. this.$tab.navigateTo('/work/pages/meeting/signin?id='+ite.id)
  61. }else{
  62. this.codeQr=ite.item.conferenceQr
  63. this.ptype=ite.type;
  64. this.id=ite.id
  65. }
  66. },
  67. init(){
  68. // 请假类型
  69. getDictionaryFn('leave').then(res=>{
  70. if(res.code==200&&res.data.length){
  71. this.qjlxlist = res.data.map(v => {
  72. return {
  73. text: v.dictLabel,
  74. value: v.dictValue
  75. }
  76. })
  77. this.aqjlxlist = res.data.map(v => {
  78. return {
  79. label: v.dictLabel,
  80. value: v.dictValue
  81. }
  82. })
  83. }
  84. })
  85. },
  86. getupSubmit(e){
  87. var that=this;
  88. var type=this.type;
  89. var params=JSON.parse(JSON.stringify(e))
  90. params.userId=this.userId;
  91. params.conferenceId=this.id;
  92. getupdateReplyFn(params).then(res=>{
  93. if(res.code==200){
  94. this.$toast("答复成功");
  95. setTimeout(function(){
  96. that.ptype='';
  97. that.pageNum=1;
  98. that.list=[];
  99. that.reachflag=true;
  100. that.getDataFn()
  101. },1200)
  102. }
  103. })
  104. },
  105. getDataFn(){
  106. var params={
  107. pageSize:this.pageSize,
  108. pageNum: this.pageNum,
  109. // visitType:3
  110. }
  111. params.userId=this.userId
  112. getMeetListFn(params).then(res=>{
  113. if(res.code==200){
  114. if (res.rows.length < this.pageSize) {
  115. this.reachflag = false
  116. this.wtdt = '到底了~';
  117. } else {
  118. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  119. if (num < res.total) {
  120. this.reachflag = true
  121. this.wtdt = '上拉加载更多'
  122. } else {
  123. this.reachflag = false
  124. this.wtdt = '到底了~';
  125. }
  126. }
  127. if (this.pageNum == 1) {
  128. this.list = res.rows;
  129. } else {
  130. this.list = this.list.concat(res.rows)
  131. }
  132. }else{
  133. this.$toast(res.msg)
  134. }
  135. })
  136. },
  137. }
  138. }
  139. </script>
  140. <style lang="scss" scoped>
  141. page {
  142. background-color: #f5f6f7;
  143. }
  144. .notbox{padding: 24rpx;}
  145. </style>