index.vue 4.2 KB

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