projectprogress.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <view class="probox inform">
  3. <view class="zhanline" ></view>
  4. <view class="steps" v-if="jzqklist.length">
  5. <view class="lssteplist" v-for="(ite,idx) in jzqklist" :key="idx">
  6. <view class="stepcir"></view>
  7. <view class="flex1">
  8. <view class="mb20">
  9. <view class="f16 c34 fw mb8 lh22">上报日期</view>
  10. <view class="f15 c6">{{ite.createTime}}</view>
  11. </view>
  12. <view class="mb20">
  13. <view class="f16 c34 fw mb8">对接情况</view>
  14. <view class="f15 c6">{{ite.jzqk}}</view>
  15. </view>
  16. <view v-if="ite.zsyzFjList&&ite.zsyzFjList.length">
  17. <view class="f16 c34 fw mb8">附件</view>
  18. <view class=" cldelistbf flex1" v-for="(zite,zidx) in ite.zsyzFjList" :key='zidx'>
  19. <view class="flext f16 c6">
  20. <view class="imgl"><image :src="wimg" ></image></view>
  21. <view>{{zite.fjName}}</view>
  22. </view>
  23. <view class="flexc f16 co28 flex0" @click="getDown(zite.path)">
  24. <image :src="downimg" class="imgr"></image>预览</view>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <no-data v-else></no-data>
  31. </view>
  32. </template>
  33. <script>
  34. import noData from "@/components/nodata/nodata.vue"
  35. import {getjzqklist} from "@/api/work/clue.js"
  36. import config from '@/config'
  37. const baseUrl = config.baseUrl
  38. export default{
  39. components:{
  40. noData
  41. },
  42. data(){
  43. return{
  44. wimg:require('@/static/images/index/wicon.png'),
  45. downimg:require('@/static/images/index/down.png'),
  46. xmId:'',
  47. xmbh:'',
  48. pageSize: 10,
  49. pageNum: 1,
  50. reachflag:true,
  51. deptId:this.$store.state.user.deptId,
  52. jzqklist:[],
  53. }
  54. },
  55. onLoad(e) {
  56. this.xmId=e.id;
  57. this.xmbh=e.xmbh;
  58. this.getDataFn()
  59. },
  60. onReachBottom() {
  61. if (this.reachflag) {
  62. this.pageNum++
  63. this.getDataFn()
  64. }
  65. },
  66. methods:{
  67. getDataFn(){
  68. var params={
  69. xmId:this.xmId,
  70. xmbh:this.xmbh,
  71. pageSize:this.pageSize,
  72. pageNum: this.pageNum,
  73. }
  74. getjzqklist(params).then(res=>{
  75. if(res.code==200){
  76. if (res.rows.length < this.pageSize) {
  77. this.reachflag = false
  78. this.wtdt = '到底了~';
  79. } else {
  80. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  81. if (num < res.total) {
  82. this.reachflag = true
  83. this.wtdt = '上拉加载更多'
  84. } else {
  85. this.reachflag = false
  86. this.wtdt = '到底了~';
  87. }
  88. }
  89. if (this.pageNum == 1) {
  90. this.jzqklist = res.rows;
  91. } else {
  92. this.jzqklist = this.jzqklist.concat(res.rows)
  93. }
  94. }else{
  95. this.$toast(res.msg)
  96. }
  97. })
  98. },
  99. getDown(e){
  100. uni.showLoading({
  101. title: '加载中'
  102. });
  103. var url=baseUrl+e;
  104. uni.downloadFile({
  105. url: url,//文件的下载路径
  106. success(result) {
  107. uni.hideLoading()
  108. var filePath = result.tempFilePath;
  109. uni.openDocument({
  110. filePath: filePath,
  111. showMenu: true,
  112. success: function (res) {
  113. console.log('打开文档成功');
  114. }
  115. });
  116. },
  117. fail(res) {uni.hideLoading()}
  118. })
  119. },
  120. }
  121. }
  122. </script>
  123. <style scoped lang="scss">
  124. </style>