speaklist.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view>
  3. <!-- 列表 -->
  4. <view class="mbox">
  5. <meet-list :datalist="list" :wtdt="wtdt" :fylxlist='fylxlist' :type='tabidx' @getDetail="getDetail" @getReadFn="getReadFn" @getTuiFn="getTuiFn"></meet-list>
  6. </view>
  7. <!-- 弹窗 -->
  8. <pop-up :type='ptype' @getClose="getClose" @getupSubmit="getupSubmit" :qjlxlist="qjlxlist"></pop-up>
  9. </view>
  10. </template>
  11. <script>
  12. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  13. import {getSpeakListFn} from "@/api/mine/meeting.js"
  14. import popUp from "@/work/components/popup/popup.vue"
  15. import meetList from "@/work/components/meeting/list.vue"
  16. import {getDictionaryFn} from "@/api/mine/register.js"
  17. export default{
  18. components:{meetList,popUp},
  19. data(){
  20. return{
  21. searchimg: require("@/work/static/images/search.png"),
  22. ccicoimg:require("@/work/static/images/ccico.png"),
  23. lbicoimg:require("@/work/static/images/lbico.png"),
  24. backimg:require("@/work/static/images/back.png"),
  25. upimg:require("@/work/static/images/up.png"),
  26. backgroundColor:"#1D64E2",
  27. tabidx:'wdfy',
  28. nvaHeight:44,
  29. talbList:[{},],
  30. taztList:[{label:'是',value:'0'},{label:'否',value:'1'}],
  31. talbidx:'',
  32. datainfo:{
  33. talb:'',
  34. },
  35. ptype:'',//弹窗类型
  36. list:[],
  37. pageSize: 10,
  38. pageNum: 1,
  39. reachflag: true,
  40. wtdt:'',
  41. qjlxlist:[],
  42. fylxlist:[],
  43. userId:this.$store.state.user.userId,
  44. id:'',
  45. title:'',//关键词
  46. }
  47. },
  48. onUnload(){
  49. uni.$off('refreshlist')
  50. },
  51. onLoad(e) {
  52. this.id=e.id;
  53. this.getDataFn()
  54. this.init()
  55. uni.$on('refreshlist', (e) => {
  56. this.getDataFn()
  57. })
  58. },
  59. mounted() {
  60. },
  61. methods:{
  62. checkPermi, checkRole,
  63. init(){
  64. // 发言类型
  65. getDictionaryFn('speak_type').then(res=>{
  66. if(res.code==200&&res.data.length){
  67. this.fylxlist = res.data.map(v => {
  68. return {
  69. label: v.dictLabel,
  70. value: v.dictValue
  71. }
  72. })
  73. }
  74. })
  75. },
  76. getClose(){
  77. this.ptype=""
  78. },
  79. getupSubmit(e){
  80. var that=this;
  81. var type=this.type;
  82. var params=JSON.parse(JSON.stringify(e))
  83. params.conferenceId=this.id;
  84. params.userId=this.userId;
  85. getupdateReplyFn(params).then(res=>{
  86. if(res.code==200){
  87. this.$toast("答复成功");
  88. setTimeout(function(){
  89. that.ptype='';
  90. that.pageNum=1;
  91. that.list=[];
  92. that.reachflag=true;
  93. that.getDataFn()
  94. },1200)
  95. }
  96. })
  97. },
  98. getDataFn(){
  99. var params={
  100. pageSize:this.pageSize,
  101. pageNum: this.pageNum,
  102. conferenceId:this.id
  103. }
  104. getSpeakListFn(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. }
  130. }
  131. </script>
  132. <style scoped lang="scss">
  133. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background-color: $com-cd3;
  134. .topl{width: 60rpx;height: 60rpx;display: flex;align-items: center;justify-content: center;
  135. image{width: 40rpx;height: 30rpx;}
  136. }
  137. .topr{display: flex;align-items: center;
  138. image{width: 26rpx;height: 26rpx;margin-right: 12rpx;}
  139. view{font-weight: 500;font-size: 26rpx;color: #FFFFFF;}
  140. }
  141. .tablists{
  142. overflow: auto;flex-wrap: nowrap;
  143. view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;position: relative;flex: 1 0 auto;padding: 22rpx 24rpx;margin-right: 6rpx;box-sizing: border-box;text-align: center;
  144. &:last-child{margin-right: 0;}
  145. &.act{font-size: 30rpx;
  146. &::after{content: '';width: 62rpx;height: 10rpx;background: #FFFFFF;border-radius: 4rpx;left: 50%;margin-left: -31rpx;bottom: 0rpx;position: absolute;}
  147. }
  148. }
  149. }
  150. .lbtab{height: 114rpx;background: #FFFFFF;border-radius: 30rpx;padding-left: 24rpx;position: absolute;left:24rpx;right: 24rpx;bottom: -58rpx;
  151. .limg{width: 40rpx;height: 34rpx;margin-right: 10rpx;flex:0 0 auto;}
  152. .lbtabs{overflow: auto;flex-wrap: nowrap;
  153. .lbtabp{display: flex;align-items: center;flex: 0 0 auto;margin-right: 24rpx;}
  154. .upimg{width: 18rpx;height: 10rpx;}
  155. }
  156. }
  157. }
  158. .mbox{padding:2rpx 24rpx 28rpx;}
  159. .lbtabs /deep/ picker{padding: 0 18rpx;}
  160. </style>