|
|
@ -6,6 +6,7 @@ import { |
|
|
listLawEnforcerDomain, |
|
|
listLawEnforcerDomain, |
|
|
listLawEnforcerDomainDetails, |
|
|
listLawEnforcerDomainDetails, |
|
|
exportLawEnforcerDomain, |
|
|
exportLawEnforcerDomain, |
|
|
|
|
|
exportLawEnforcerDomainDetails, |
|
|
type EnforcerRow, |
|
|
type EnforcerRow, |
|
|
type LawEnforcerDetailRow |
|
|
type LawEnforcerDetailRow |
|
|
} from '@/api/efcode/report/law-enforcer'; |
|
|
} from '@/api/efcode/report/law-enforcer'; |
|
|
@ -247,6 +248,34 @@ const handleDetailPageChange = (page: number) => { |
|
|
getDetailList(); |
|
|
getDetailList(); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const detailExporting = ref(false); |
|
|
|
|
|
|
|
|
|
|
|
/** 详情导出 */ |
|
|
|
|
|
const handleDetailExport = async () => { |
|
|
|
|
|
if (!detailEnforcer.value?.lawEnforcerId) return; |
|
|
|
|
|
detailExporting.value = true; |
|
|
|
|
|
try { |
|
|
|
|
|
const res = await exportLawEnforcerDomainDetails({ |
|
|
|
|
|
lawEnforcerId: detailEnforcer.value.lawEnforcerId, |
|
|
|
|
|
domainName: detailDomainName.value, |
|
|
|
|
|
...buildTimeParams() |
|
|
|
|
|
}); |
|
|
|
|
|
const blob = new Blob([res as any], { |
|
|
|
|
|
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' |
|
|
|
|
|
}); |
|
|
|
|
|
const url = window.URL.createObjectURL(blob); |
|
|
|
|
|
const link = document.createElement('a'); |
|
|
|
|
|
link.href = url; |
|
|
|
|
|
link.download = `执法详情-${detailEnforcer.value.lawEnforcer || ''}.xlsx`; |
|
|
|
|
|
link.click(); |
|
|
|
|
|
window.URL.revokeObjectURL(url); |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
ElMessage.error('导出失败'); |
|
|
|
|
|
} finally { |
|
|
|
|
|
detailExporting.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
loadAreaDict(); |
|
|
loadAreaDict(); |
|
|
loadFieldDict(); |
|
|
loadFieldDict(); |
|
|
@ -329,7 +358,7 @@ onMounted(() => { |
|
|
<el-table-column label="序号" width="90" align="center" type="index" :index="indexMethod" /> |
|
|
<el-table-column label="序号" width="90" align="center" type="index" :index="indexMethod" /> |
|
|
<el-table-column prop="lawEnforcer" label="执法人员" min-width="160" align="center" /> |
|
|
<el-table-column prop="lawEnforcer" label="执法人员" min-width="160" align="center" /> |
|
|
<el-table-column prop="zfcs" label="执法次数" width="140" align="center" sortable="custom" :default-sort="{ prop: 'zfcs', order: 'descending' }" /> |
|
|
<el-table-column prop="zfcs" label="执法次数" width="140" align="center" sortable="custom" :default-sort="{ prop: 'zfcs', order: 'descending' }" /> |
|
|
<el-table-column prop="bureauDeptName" label="所属领域" min-width="260" align="center" show-overflow-tooltip /> |
|
|
<el-table-column prop="domainName" label="所属领域" min-width="260" align="center" show-overflow-tooltip /> |
|
|
<el-table-column label="操作" width="90" align="center" fixed="right"> |
|
|
<el-table-column label="操作" width="90" align="center" fixed="right"> |
|
|
<template #default="{ row }"> |
|
|
<template #default="{ row }"> |
|
|
<el-button type="primary" link size="small" @click="handleDetail(row)">详情</el-button> |
|
|
<el-button type="primary" link size="small" @click="handleDetail(row)">详情</el-button> |
|
|
@ -353,6 +382,10 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
<!-- ==================== 执法详情弹窗 ==================== --> |
|
|
<!-- ==================== 执法详情弹窗 ==================== --> |
|
|
<el-dialog v-model="detailDialogVisible" width="1100px" title="执法详情" append-to-body top="5vh" destroy-on-close> |
|
|
<el-dialog v-model="detailDialogVisible" width="1100px" title="执法详情" append-to-body top="5vh" destroy-on-close> |
|
|
|
|
|
<div class="detail-toolbar"> |
|
|
|
|
|
<el-button type="primary" :loading="detailExporting" @click="handleDetailExport">导出</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<el-table v-loading="detailLoading" :data="detailTableData" border stripe style="width: 100%" max-height="55vh"> |
|
|
<el-table v-loading="detailLoading" :data="detailTableData" border stripe style="width: 100%" max-height="55vh"> |
|
|
<el-table-column label="序号" type="index" :index="detailIndexMethod" width="80" align="center" /> |
|
|
<el-table-column label="序号" type="index" :index="detailIndexMethod" width="80" align="center" /> |
|
|
<el-table-column label="执法单位" prop="bureauDeptName" min-width="220" align="center" show-overflow-tooltip /> |
|
|
<el-table-column label="执法单位" prop="bureauDeptName" min-width="220" align="center" show-overflow-tooltip /> |
|
|
@ -445,4 +478,10 @@ onMounted(() => { |
|
|
margin-top: 16px; |
|
|
margin-top: 16px; |
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.detail-toolbar { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: flex-end; |
|
|
|
|
|
margin-bottom: 12px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|