|
|
|
@ -5,7 +5,8 @@
|
|
|
|
* date:2023年3月19日 13:38:24
|
|
|
|
* date:2023年3月19日 13:38:24
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
ref
|
|
|
|
ref,
|
|
|
|
|
|
|
|
onMounted
|
|
|
|
} from 'vue'
|
|
|
|
} from 'vue'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
$image,
|
|
|
|
$image,
|
|
|
|
@ -15,7 +16,7 @@
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
onShow
|
|
|
|
onShow
|
|
|
|
} from '@dcloudio/uni-app'
|
|
|
|
} from '@dcloudio/uni-app'
|
|
|
|
|
|
|
|
import wx from 'weixin-js-sdk'
|
|
|
|
const props = defineProps({
|
|
|
|
const props = defineProps({
|
|
|
|
list: {
|
|
|
|
list: {
|
|
|
|
type: Object,
|
|
|
|
type: Object,
|
|
|
|
@ -28,10 +29,12 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
const popup=ref(null)
|
|
|
|
let url = ref('')
|
|
|
|
let url = ref('')
|
|
|
|
|
|
|
|
|
|
|
|
const ReportDown = async (id) => {
|
|
|
|
const ReportDown = async (id) => {
|
|
|
|
uni.showLoading({
|
|
|
|
uni.showLoading({
|
|
|
|
title: '正在下载,请打开弹窗拦截'
|
|
|
|
title: '正在查询报告...'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const response = await ReportDownAction({
|
|
|
|
const response = await ReportDownAction({
|
|
|
|
rid: props.list.info.id,
|
|
|
|
rid: props.list.info.id,
|
|
|
|
@ -41,7 +44,9 @@
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.hideLoading()
|
|
|
|
$response(response, () => {
|
|
|
|
$response(response, () => {
|
|
|
|
url.value = $image(response.data.url)
|
|
|
|
url.value = $image(response.data.url)
|
|
|
|
jianqieban(url.value)
|
|
|
|
|
|
|
|
|
|
|
|
popup.value.open()
|
|
|
|
|
|
|
|
// jianqieban(url.value)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const jianqieban = (url) => {
|
|
|
|
const jianqieban = (url) => {
|
|
|
|
@ -51,6 +56,7 @@
|
|
|
|
showToast: false,
|
|
|
|
showToast: false,
|
|
|
|
success: () => {
|
|
|
|
success: () => {
|
|
|
|
uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载")
|
|
|
|
uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载")
|
|
|
|
|
|
|
|
// tiao(url)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
fail: (e) => {
|
|
|
|
fail: (e) => {
|
|
|
|
console.log(e)
|
|
|
|
console.log(e)
|
|
|
|
@ -67,7 +73,9 @@
|
|
|
|
//data:"fdfdfdfs",
|
|
|
|
//data:"fdfdfdfs",
|
|
|
|
showToast: false,
|
|
|
|
showToast: false,
|
|
|
|
success: () => {
|
|
|
|
success: () => {
|
|
|
|
uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载")
|
|
|
|
|
|
|
|
|
|
|
|
uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载.")
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else if (res.cancel) {
|
|
|
|
} else if (res.cancel) {
|
|
|
|
@ -82,11 +90,53 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
let Env = ''
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
console.log(props.list)
|
|
|
|
|
|
|
|
if(props.list && props.list.list.length>0){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
uni.$lu.toast("暂无报告可下载")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Env = uni.getSystemInfoSync().platform
|
|
|
|
|
|
|
|
console.log(Env)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
const tiao = (url) => {
|
|
|
|
|
|
|
|
console.log(url)
|
|
|
|
|
|
|
|
wx.miniProgram.navigateTo({
|
|
|
|
|
|
|
|
url: '/pages/test/test?url=' + url
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const preview=()=>{
|
|
|
|
|
|
|
|
if(Env=='ios'){
|
|
|
|
|
|
|
|
//window.location.href = url.value
|
|
|
|
|
|
|
|
tiao(url.value)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(Env=='android'){
|
|
|
|
|
|
|
|
tiao(url.value)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<view>
|
|
|
|
|
|
|
|
<view>
|
|
|
|
|
|
|
|
<uni-popup ref="popup">
|
|
|
|
|
|
|
|
<view class="tan">
|
|
|
|
|
|
|
|
<view class="t_row" @click="preview">
|
|
|
|
|
|
|
|
<view class="t_logo"><uni-icons type="eye-filled" color="#42b983" size="60rpx"></uni-icons>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="t_title">报告预览</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="t_row" v-if="Env != 'android'" @click="jianqieban(url)">
|
|
|
|
|
|
|
|
<view class="t_logo"><uni-icons type="download-filled" color="#42b983" size="60rpx"></uni-icons>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="t_title">报告下载</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</uni-popup>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view class="report_list_wrapper">
|
|
|
|
<view class="report_list_wrapper">
|
|
|
|
|
|
|
|
<!-- <view @click="tiao()">测试</view> -->
|
|
|
|
<view @click="ReportDown(i['文件Id'])" class="report_item_wrapper" v-for="(i,k) in props.list.list" :key="k">
|
|
|
|
<view @click="ReportDown(i['文件Id'])" class="report_item_wrapper" v-for="(i,k) in props.list.list" :key="k">
|
|
|
|
<view class="report_item_icon_wrapper">
|
|
|
|
<view class="report_item_icon_wrapper">
|
|
|
|
<image :src="$image('/storage/assets/report/home/报告@2x.png')"></image>
|
|
|
|
<image :src="$image('/storage/assets/report/home/报告@2x.png')"></image>
|
|
|
|
@ -171,4 +221,26 @@
|
|
|
|
overflow-y: auto;
|
|
|
|
overflow-y: auto;
|
|
|
|
padding-bottom: 20rpx;
|
|
|
|
padding-bottom: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tan{
|
|
|
|
|
|
|
|
padding: 40rpx;
|
|
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
border-radius: 5rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.t_row{
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
|
|
|
border: 1px solid #88ebd6;
|
|
|
|
|
|
|
|
border-radius: 5rpx;
|
|
|
|
|
|
|
|
margin: 40rpx;
|
|
|
|
|
|
|
|
padding: 10rpx 60rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.t_logo{
|
|
|
|
|
|
|
|
color:#42b983;
|
|
|
|
|
|
|
|
margin-right: 20rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.t_title{
|
|
|
|
|
|
|
|
font-size: 33rpx;
|
|
|
|
|
|
|
|
color:#333;
|
|
|
|
|
|
|
|
margin-top: 8rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|