统计导出

This commit is contained in:
wuyy 2026-04-10 16:35:53 +08:00
parent 13a79f9801
commit 154a0fd2b9
2 changed files with 20 additions and 5 deletions

View File

@ -26,6 +26,7 @@
<el-col :span="4">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
<el-button icon="Download" type="warning" @click="handleExport">导出</el-button>
</el-col>
</el-row>
</el-form>
@ -53,7 +54,7 @@ import { checkDeptRole } from '@/utils/permission'
import useUserStore from '@/store/modules/user'
const aotuSize = classCom.useAutoSize();
const userStore = useUserStore()
const { proxy } = getCurrentInstance()
const queryParams = ref({
pageSize: 50,
@ -168,6 +169,12 @@ onMounted(() => {
})
})
const handleExport = () => {
proxy.download("/transitReport/exportSample", {
...queryParams.value,
}, `样本统计_${new Date().getTime()}.xlsx`)
}
const formatDict = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
};

View File

@ -26,6 +26,7 @@
<el-col :span="4">
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
<el-button icon="Download" type="warning" @click="handleExport">导出</el-button>
</el-col>
</el-row>
</el-form>
@ -63,12 +64,12 @@ const queryParams = ref({
const loading = ref(false)
const tableData = ref([])
const columns = ref([
{ prop: 'SrcHospName', label: '就诊医院', align: 'center', visible: true, },
{ prop: 'SrcOrderItemCode', label: '组合编码', align: 'center', visible: true, },
{ prop: 'SrcOrderItemName', label: '组合名称', align: 'center', visible: true, },
{ prop: 'srcHospName', label: '就诊医院', align: 'center', visible: true, },
{ prop: 'srcOrderItemCode', label: '组合编码', align: 'center', visible: true, },
{ prop: 'srcOrderItemName', label: '组合名称', align: 'center', visible: true, },
{ prop: 'sl', label: '数量(份)', align: 'center', visible: true, },
{ prop: 'cost', label: '费用', align: 'center', visible: true, },
{ prop: 'DstHospName', label: '检测医院', align: 'center', visible: true, },
{ prop: 'dstHospName', label: '检测医院', align: 'center', visible: true, },
])
const tableConfig = ref({
border: true, // 边框
@ -162,6 +163,13 @@ onMounted(() => {
})
})
const { proxy } = getCurrentInstance()
const handleExport = () => {
proxy.download("/transitReport/exportItem", {
...queryParams.value,
}, `费用统计_${new Date().getTime()}.xlsx`)
}
const formatDict = (v: string, arr: Array<any>) => {
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
};