统计导出
This commit is contained in:
parent
13a79f9801
commit
154a0fd2b9
@ -26,6 +26,7 @@
|
|||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
<el-button @click="resetHandle">重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
|
<el-button icon="Download" type="warning" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -53,7 +54,7 @@ import { checkDeptRole } from '@/utils/permission'
|
|||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
const aotuSize = classCom.useAutoSize();
|
const aotuSize = classCom.useAutoSize();
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
pageSize: 50,
|
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>) => {
|
const formatDict = (v: string, arr: Array<any>) => {
|
||||||
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button type="primary" @click="handleQuery">查询</el-button>
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
<el-button @click="resetHandle">重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
|
<el-button icon="Download" type="warning" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -63,12 +64,12 @@ const queryParams = ref({
|
|||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
{ prop: 'SrcHospName', label: '就诊医院', align: 'center', visible: true, },
|
{ prop: 'srcHospName', label: '就诊医院', align: 'center', visible: true, },
|
||||||
{ prop: 'SrcOrderItemCode', label: '组合编码', align: 'center', visible: true, },
|
{ prop: 'srcOrderItemCode', label: '组合编码', align: 'center', visible: true, },
|
||||||
{ prop: 'SrcOrderItemName', label: '组合名称', align: 'center', visible: true, },
|
{ prop: 'srcOrderItemName', label: '组合名称', align: 'center', visible: true, },
|
||||||
{ prop: 'sl', label: '数量(份)', align: 'center', visible: true, },
|
{ prop: 'sl', label: '数量(份)', align: 'center', visible: true, },
|
||||||
{ prop: 'cost', 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({
|
const tableConfig = ref({
|
||||||
border: true, // 边框
|
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>) => {
|
const formatDict = (v: string, arr: Array<any>) => {
|
||||||
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
return arr.find((item: any) => item.dictCode == v)?.dictName || v;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user