Compare commits

..

No commits in common. "8a6350f10207a334da82e856c7aefac882e3625a" and "74fbc27a3dd58c1de0e50d2ef9406f47c9f911eb" have entirely different histories.

2 changed files with 11 additions and 37 deletions

View File

@ -158,10 +158,6 @@ export const PatientApi = {
getData : async (params: any) => {
return await request.get({ url: `/inspect/patient/getworkload?dates=${params.dates[0]}&dates=${params.dates[1]}` })
},
//导出工作量统计excel
exportData : async (params: any) => {
return await request.download({ url: `/inspect/patient/export-statistics-excel?dates=${params.dates[0]}&dates=${params.dates[1]}` })
},
//更新患者补充信息
updatePatientSupplement: async (medicalSn: string,idCard: string) => {
return await request.get({ url: `/inspect/patient/updatePatientSupplement?medicalSn=` + medicalSn + `&idCard=` + idCard})

View File

@ -20,14 +20,10 @@
/>
<el-button type="primary" @click="getList" style="margin-left: 20px;">
<Icon icon="ep:search" class="mr-5px" /> 查询
</el-button>
</el-button>
<el-button type="primary" @click="printData" style="margin-left: 20px;">
<Icon icon="ep:printer" class="mr-5px" /> 打印
</el-button>
<el-button type="primary" @click="exportExcel" style="margin-left: 20px;"
:loading="exportLoading">
<Icon icon="ep:search" class="mr-5px" /> 导出excel
</el-button>
</el-form-item>
</el-row>
</ContentWrap>
@ -61,10 +57,7 @@ import {formatDate} from "@/utils/formatTime";
import workload from './workload';
import { hiprint } from "vue-plugin-hiprint";
import { newHiprintPrintTemplate, preparePrintData } from './printHelper';
import download from "@/utils/download";
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const time = ref() //
const data = ref([
{orgname: '北京', districtname:'A村',oldmanflag:1 ,htnflag :2 ,diaflag:1, smiflag:1 ,pulflag:1 ,sum : 6},
@ -219,21 +212,6 @@ const dataProcessing = (data) => {
return value;
}
const exportLoading = ref(false) //
const exportExcel =async () => {
//
await message.exportConfirm()
//
try {
exportLoading.value = true
const data =await PatientApi.exportData({dates:time.value})
download.excel(data, '统计.xls')
}catch (e) {
}finally {
exportLoading.value = false
}
}
/**
* 打印数据
*/
@ -244,14 +222,14 @@ const printData = () => {
template: workload,
settingContainer: "#workloadPrintElementOptionSetting",
});
//
const printData = preparePrintData(data1.value, time.value);
console.log('打印数据:', printData); //
//
const options = {
leftOffset: 0,
const options = {
leftOffset: 0,
topOffset: 0,
paperType: 'A4',
enableColumnsMerge: true,
@ -268,7 +246,7 @@ const printData = () => {
noRepeatPrint: false,
disableHeaderRepeat: false
};
//
const ext = {
callback: () => {
@ -306,7 +284,7 @@ const printData = () => {
td[rowspan="0"] {
display: none;
}
/* 强制隐藏除第一页外的标题 */
.hiprint-printPanel:not(:first-of-type) [data-options*='"title":"体检工作量统计表"'] {
display: none !important;
@ -316,7 +294,7 @@ const printData = () => {
position: absolute !important;
z-index: -1 !important;
}
/* 隐藏除第一页外的表头 */
.hiprint-printPanel:not(:first-of-type) .hiprint-table-header-row {
display: none !important;
@ -325,10 +303,10 @@ const printData = () => {
</style>`;
},
};
//
hiprintTemplate.print(printData, options, ext);
console.log('打印成功');
} catch (error) {
console.error('打印失败:', error);