Browse Source

feat: 报告下载;

fox
Fox-33 1 week ago
parent
commit
8e9cdb3ed0
3 changed files with 63 additions and 0 deletions
  1. +3
    -0
      pages.json
  2. +26
    -0
      pages_order/report/export.vue
  3. +34
    -0
      pages_order/report/index.vue

+ 3
- 0
pages.json View File

@ -59,6 +59,9 @@
{ {
"path": "report/index" "path": "report/index"
}, },
{
"path": "report/export"
},
{ {
"path": "service/index" "path": "service/index"
}, },


+ 26
- 0
pages_order/report/export.vue View File

@ -0,0 +1,26 @@
<template>
<view class="">
<web-view :src="h5Url" @message="message"></web-view>
</view>
</template>
<script>
export default {
data(){
return{
batchNo: '',
h5Url: '',
imageData: '',
}
},
onLoad({ batchNo }) {
this.batchNo = batchNo
this.h5Url = `https://assessmenth5.augcl.com/#/?batchNo=${batchNo}&token=${uni.getStorageSync('token')}`
console.log('url', this.h5Url)
},
}
</script>
<style>
</style>

+ 34
- 0
pages_order/report/index.vue View File

@ -47,6 +47,10 @@
</view> </view>
</template> </template>
<view class="bottom">
<button class="btn" @click="onDownload">下载</button>
</view>
</view> </view>
</template> </template>
@ -61,12 +65,14 @@
}, },
data() { data() {
return { return {
batchNo: null,
detail: null, detail: null,
tableList: [], tableList: [],
} }
}, },
onLoad(arg) { onLoad(arg) {
const { batchNo } = arg const { batchNo } = arg
this.batchNo = batchNo
this.getData(batchNo) this.getData(batchNo)
}, },
methods: { methods: {
@ -125,6 +131,11 @@
} }
}, },
onDownload() {
uni.navigateTo({
url: `/pages_order/report/export?batchNo=${this.batchNo}`
})
},
}, },
} }
</script> </script>
@ -218,4 +229,27 @@
padding: 42rpx 127rpx 46rpx 127rpx; padding: 42rpx 127rpx 46rpx 127rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.bottom {
position: sticky;
left: 0;
bottom: 0;
width: 100%;
padding: 35rpx 56rpx;
padding-bottom: calc(env(safe-area-inset-bottom) + 35rpx);
background: #FFFFFF;
box-sizing: border-box;
.btn {
width: 100%;
padding: 29rpx 0;
font-size: 30rpx;
line-height: 1.5;
color: #FFFFFF;
background: #014FA2;
border-radius: 50rpx;
}
}
</style> </style>

Loading…
Cancel
Save