|
|
|
|
@ -18,7 +18,7 @@
|
|
|
|
|
onShow
|
|
|
|
|
} from '@dcloudio/uni-app'
|
|
|
|
|
import Empty from '../../../components/Empty.vue';
|
|
|
|
|
let tishi=ref('')
|
|
|
|
|
let tishi = ref('')
|
|
|
|
|
const $props = defineProps({
|
|
|
|
|
id_number: {
|
|
|
|
|
type: String,
|
|
|
|
|
@ -29,18 +29,21 @@
|
|
|
|
|
default: ''
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
let date_start = ref('');
|
|
|
|
|
let date_end = ref('')
|
|
|
|
|
const ReportList = async () => {
|
|
|
|
|
uni.showLoading({
|
|
|
|
|
title: '加载中'
|
|
|
|
|
});
|
|
|
|
|
const response = await ReportListAction({
|
|
|
|
|
id_number: $props.id_number
|
|
|
|
|
id_number: $props.id_number,
|
|
|
|
|
daterange:[date_start.value,date_end.value]
|
|
|
|
|
})
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
$response(response, () => {
|
|
|
|
|
report_list.value = response.data.list
|
|
|
|
|
if(report_list.value.length===0){
|
|
|
|
|
tishi.value='暂无报告'
|
|
|
|
|
if (report_list.value.length === 0) {
|
|
|
|
|
tishi.value = '暂无报告'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
@ -64,10 +67,38 @@
|
|
|
|
|
report_status.value = response.data.info.open === 1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const StartDateChange = (e) => {
|
|
|
|
|
date_start.value = e.detail.value
|
|
|
|
|
ReportList()
|
|
|
|
|
}
|
|
|
|
|
const EndDateChange = (e) => {
|
|
|
|
|
date_end.value = e.detail.value
|
|
|
|
|
ReportList()
|
|
|
|
|
}
|
|
|
|
|
const formatDate=(date)=> {
|
|
|
|
|
const year = date.getFullYear();
|
|
|
|
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
|
|
|
const day = date.getDate().toString().padStart(2, '0');
|
|
|
|
|
return `${year}-${month}-${day}`;
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
const currentDate = new Date();
|
|
|
|
|
const oneYearAgo = new Date();
|
|
|
|
|
oneYearAgo.setFullYear(currentDate.getFullYear() - 1);
|
|
|
|
|
|
|
|
|
|
const formatDateString = (date) => {
|
|
|
|
|
const year = date.getFullYear();
|
|
|
|
|
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
|
|
|
const day = String(date.getDate()).padStart(2, "0");
|
|
|
|
|
return `${year}-${month}-${day}`;
|
|
|
|
|
};
|
|
|
|
|
date_start.value=formatDateString(oneYearAgo)
|
|
|
|
|
date_end.value=formatDateString(currentDate)
|
|
|
|
|
ReportList()
|
|
|
|
|
HospitalExtraReportStatus()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
@ -90,7 +121,23 @@
|
|
|
|
|
<text class="tip_title_wrapper">温馨提示:</text>
|
|
|
|
|
<text class="tip_text_wrapper">如电子报告与纸质报告不相符,请以纸质版报告为准</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="report_list.length>0" class="report_list_wrapper" :style="{top : !!report_status ? '222rpx' : '85rpx'}">
|
|
|
|
|
<view style="background-color: #fff ;padding: 0rpx 10rpx; display: flex; justify-content: space-around; font-size: 26rpx;color: #666;" >
|
|
|
|
|
<view style="display: flex;align-items: center;">
|
|
|
|
|
<view>开始:</view>
|
|
|
|
|
<picker mode="date" :value="date_start" @change="StartDateChange"
|
|
|
|
|
style="border: 1px solid #ccc;border-radius: 12rpx;">
|
|
|
|
|
<view class="uni-input">{{date_start}}</view>
|
|
|
|
|
</picker>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="display: flex;align-items: center;">
|
|
|
|
|
<view>结束:</view>
|
|
|
|
|
<picker mode="date" :value="date_end" @change="EndDateChange" style="border: 1px solid #ccc;border-radius: 12rpx;">
|
|
|
|
|
<view class="uni-input">{{date_end}}</view>
|
|
|
|
|
</picker>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="report_list.length>0" class="report_list_wrapper"
|
|
|
|
|
:style="{top : !!report_status ? '222rpx' : '145rpx'}">
|
|
|
|
|
<view @click="toReport(i.id)" class="report_item_wrapper" v-for="(i,k) in report_list" :key="k">
|
|
|
|
|
<view class="report_item_icon_wrapper">
|
|
|
|
|
<image :src="$image('/storage/assets/report/home/报告@2x.png')"></image>
|
|
|
|
|
@ -101,7 +148,7 @@
|
|
|
|
|
<view class="report_item_content_desc_wrapper">{{ i.desc }}</view>
|
|
|
|
|
<view class="report_item_content_desc_wrapper" style="color: #7accaa;">{{ i.tj_type }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="report_item_right_wrapper">
|
|
|
|
|
<image :src="$image('/storage/assets/report/home/右箭头@2x.png')"></image>
|
|
|
|
|
@ -111,7 +158,7 @@
|
|
|
|
|
<view v-else style="margin-top: 20%; font-size: 28rpx; color: #666; text-align: center;">
|
|
|
|
|
<view v-if="tishi!==''" style="display: flex;align-items: center;width: 100%; justify-content: center;">
|
|
|
|
|
<Empty title="暂无报告" style="width: 30%;"></Empty>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -245,4 +292,12 @@
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep.uni-input{
|
|
|
|
|
width: 160rpx;
|
|
|
|
|
height:30rpx !important;
|
|
|
|
|
line-height:30rpx !important;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|