qylist.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="listbox">
  3. <!-- 列表 -->
  4. <view class="plr18">
  5. <bus-list :datalist="list" :wtdt="wtdt" :type="type" @getDetail="getDetail"></bus-list>
  6. </view>
  7. <view class="scanbox flexcc" @click="getAddQy">
  8. <image :src="addqy"></image>添加企业</view>
  9. </view>
  10. </template>
  11. <script>
  12. import config from '@/config'
  13. const baseUrl = config.baseUrl
  14. import busList from "@/work/components/business/list.vue"
  15. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  16. export default{
  17. components:{busList},
  18. data(){
  19. return{
  20. secimg:require("@/static/images/home/hsearch.png"),
  21. upimg:require('@/work/static/images/sup.png'),
  22. resetimg:require('@/work/static/images/reset.png'),
  23. addqy:require('@/work/static/images/prove/addqya.png'),
  24. list:[{tit:'123'},{tit:'123'}],
  25. pageSize: 10,
  26. pageNum: 1,
  27. reachflag: true,
  28. wtdt:'',
  29. // limit:''
  30. type:'qylist',
  31. }
  32. },
  33. // 上拉触底加载更多触发事件
  34. onReachBottom() {
  35. // if (this.reachflag) {
  36. // this.pageNum++
  37. // this.getDataFn()
  38. // }
  39. },
  40. methods:{
  41. checkPermi, checkRole,
  42. getDetail(){
  43. this.$tab.navigateTo("/work/pages/prove/addqy?type=edit")
  44. },
  45. getAddQy(){
  46. this.$tab.navigateTo("/work/pages/prove/addqy?type=add")
  47. },
  48. getTabFn(val){
  49. this.tabval=val
  50. },
  51. bindDateChangea(e){
  52. var val=e.detail.value;
  53. this.sbsj=val;
  54. this.getrefreshData()
  55. },
  56. bindDateChangeb(e){
  57. var val=e.detail.value;
  58. this.shzt=this.shlist[val].label;
  59. this.shztid=this.shlist[val].value;
  60. this.getrefreshData()
  61. },
  62. getResetFn(){
  63. // 重置
  64. this.getrefreshData()
  65. },
  66. getrefreshData(){
  67. // this.pageNum=1;
  68. // this.list=[];
  69. // this.reachflag=true;
  70. // this.getDataFn()
  71. },
  72. getDataFn(){
  73. var params={
  74. pageSize:this.pageSize,
  75. pageNum: this.pageNum,
  76. }
  77. getCaseListFn(params).then(res=>{
  78. if(res.code==200){
  79. if (res.rows.length < this.pageSize) {
  80. this.reachflag = false
  81. this.wtdt = '到底了~';
  82. } else {
  83. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  84. if (num < res.total) {
  85. this.reachflag = true
  86. this.wtdt = ''
  87. } else {
  88. this.reachflag = false
  89. this.wtdt = '到底了~';
  90. }
  91. }
  92. if (this.pageNum == 1) {
  93. this.list = res.rows;
  94. } else {
  95. this.list = this.list.concat(res.rows)
  96. }
  97. }else{
  98. this.$toast(res.msg)
  99. }
  100. })
  101. },
  102. },
  103. }
  104. </script>
  105. <style lang="scss" scoped>
  106. .fixedt{position: fixed;left: 0;right: 0;top: 0;z-index: 2;}
  107. // .fixedt /deep/ uni-picker{flex: 1;}
  108. .checkbox{padding:16rpx 32rpx;background-color: #efefef;
  109. .chekt{display: flex;align-items: center;margin-right: 12rpx;height:88rpx;
  110. view{text-align: center;
  111. font-weight: bold;font-size: 26rpx;color: #374B61;width: 136rpx;word-break: break-all;text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;white-space: normal;}
  112. image{width: 16rpx;height: 12rpx;flex: 0 0 auto;margin-left: 4rpx;}
  113. }
  114. }
  115. .reset{width:56rpx; height: 88rpx;display: flex;align-items: center;justify-content: center;
  116. image{width: 26rpx;height: 30rpx;}
  117. }
  118. .topc{border-radius: 34rpx;height:68rpx;box-sizing: border-box;padding:0 28rpx;position: relative;flex:1;background-color:rgba(90, 135, 186, 0.2);width: 260rpx;
  119. flex:1;margin-left: 20rpx;
  120. input{font-weight: 500;font-size: 26rpx;color: #222327;}
  121. image{width: 30rpx;height: 30rpx;margin-right: 16rpx;flex: 0 0 auto;}
  122. }
  123. .listbox{padding-top: 24rpx;padding-bottom: 100rpx;}
  124. .scanbox{position: fixed;left: 0;right: 0;bottom: 0;height: 100rpx;
  125. background: #00A9F0;font-weight: bold;font-size: 30rpx;color: #FFFFFF;
  126. image{width: 30rpx;height: 30rpx;margin-right: 10rpx;}
  127. }
  128. </style>