|
|
|
|
@ -0,0 +1,174 @@
|
|
|
|
|
<script setup>
|
|
|
|
|
/**
|
|
|
|
|
* name:
|
|
|
|
|
* user:sa0ChunLuyu
|
|
|
|
|
* date:2023年3月19日 13:38:24
|
|
|
|
|
*/
|
|
|
|
|
import {
|
|
|
|
|
ref
|
|
|
|
|
} from 'vue'
|
|
|
|
|
import {
|
|
|
|
|
$image,
|
|
|
|
|
ReportDownAction,
|
|
|
|
|
$response
|
|
|
|
|
} from '@/api'
|
|
|
|
|
import {
|
|
|
|
|
onShow
|
|
|
|
|
} from '@dcloudio/uni-app'
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
list: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: {
|
|
|
|
|
info: {
|
|
|
|
|
id: '',
|
|
|
|
|
password: ''
|
|
|
|
|
},
|
|
|
|
|
list: []
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
let url = ref('')
|
|
|
|
|
const ReportDown = async (id) => {
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '正在下载,请打开弹窗拦截'
|
|
|
|
|
})
|
|
|
|
|
const response = await ReportDownAction({
|
|
|
|
|
rid: props.list.info.id,
|
|
|
|
|
password: props.list.info.password,
|
|
|
|
|
id,
|
|
|
|
|
})
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
url.value = $image(response.data.url)
|
|
|
|
|
jianqieban(url.value)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const jianqieban = (url) => {
|
|
|
|
|
uni.setClipboardData({
|
|
|
|
|
data: url,
|
|
|
|
|
//data:"fdfdfdfs",
|
|
|
|
|
showToast: false,
|
|
|
|
|
success: () => {
|
|
|
|
|
uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载")
|
|
|
|
|
},
|
|
|
|
|
fail: (e) => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: '提示',
|
|
|
|
|
showCancel: false,
|
|
|
|
|
confirmText: '确定',
|
|
|
|
|
content: '请点击确定',
|
|
|
|
|
success: function(res) {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
console.log('用户点击确定');
|
|
|
|
|
uni.setClipboardData({
|
|
|
|
|
data: url,
|
|
|
|
|
//data:"fdfdfdfs",
|
|
|
|
|
showToast: false,
|
|
|
|
|
success: () => {
|
|
|
|
|
uni.$lu.toast("链接已复制到剪切板,请前往浏览器下载")
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
console.log('用户点击取消');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
complete: (e) => {
|
|
|
|
|
console.log(e)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
|
|
|
|
|
<view class="report_list_wrapper">
|
|
|
|
|
<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">
|
|
|
|
|
<image :src="$image('/storage/assets/report/home/报告@2x.png')"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="report_item_content_wrapper">
|
|
|
|
|
<view class="report_item_content_title_wrapper">{{ i['报告名称'] }}</view>
|
|
|
|
|
<view class="report_item_content_desc_wrapper">{{ i['报告类型'] }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="report_item_right_wrapper">
|
|
|
|
|
<image :src="$image('/storage/assets/report/home/右箭头@2x.png')"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<style scoped>
|
|
|
|
|
.report_item_right_wrapper image {
|
|
|
|
|
width: 15rpx;
|
|
|
|
|
height: 26rpx;
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report_item_right_wrapper {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 15rpx;
|
|
|
|
|
height: 26rpx;
|
|
|
|
|
right: 20rpx;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report_item_content_desc_wrapper {
|
|
|
|
|
font-size: 22rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #939898;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
margin-top: 18rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report_item_content_title_wrapper {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #222222;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report_item_content_wrapper {
|
|
|
|
|
margin-left: 35rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report_item_icon_wrapper image {
|
|
|
|
|
width: 45rpx;
|
|
|
|
|
height: 50rpx;
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report_item_icon_wrapper {
|
|
|
|
|
width: 45rpx;
|
|
|
|
|
height: 50rpx;
|
|
|
|
|
margin-left: 21rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report_item_wrapper {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 710rpx;
|
|
|
|
|
height: 130rpx;
|
|
|
|
|
background: #F3FAFA;
|
|
|
|
|
box-shadow: 0px 1rpx 0px 0px rgba(22, 197, 169, 0.2);
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin: 20rpx auto 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.report_list_wrapper {
|
|
|
|
|
position: absolute;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
padding-bottom: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
</style>
|