|
|
@ -1,10 +1,8 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { ref, reactive, onMounted, onUnmounted, computed, nextTick, watch } from 'vue'; |
|
|
import { ref, reactive, onMounted, onUnmounted, computed, nextTick, watch } from 'vue'; |
|
|
import { ElMessage } from 'element-plus'; |
|
|
import { ElMessage } from 'element-plus'; |
|
|
import { |
|
|
import { getStatistics, getRegistrationList, exportRegistrationList, listUnionList, getComplaintByRid } from '@/api/efcode/report/registration'; |
|
|
getStatistics, getRegistrationList, exportRegistrationList, listUnionList |
|
|
import type { RegistrationReportQuery, RegistrationStatisticsVo, UnionRow, RegistrationComplaintVo } from '@/api/efcode/report/registration'; |
|
|
} from '@/api/efcode/report/registration'; |
|
|
|
|
|
import type { RegistrationReportQuery, RegistrationStatisticsVo, UnionRow } from '@/api/efcode/report/registration'; |
|
|
|
|
|
import { getDicts } from '@/api/system/dict/data'; |
|
|
import { getDicts } from '@/api/system/dict/data'; |
|
|
|
|
|
|
|
|
// 查询参数 |
|
|
// 查询参数 |
|
|
@ -112,6 +110,7 @@ const selectAllFields = () => { |
|
|
const lawEnforceCategoryOptions = ref<any[]>([]); |
|
|
const lawEnforceCategoryOptions = ref<any[]>([]); |
|
|
const checkCategoryOptions = ref<any[]>([]); |
|
|
const checkCategoryOptions = ref<any[]>([]); |
|
|
const noScanReasonOptions = ref<any[]>([]); |
|
|
const noScanReasonOptions = ref<any[]>([]); |
|
|
|
|
|
const complaintCaseTypeOptions = ref<any[]>([]); |
|
|
const addressTypeOptions = ref<any[]>([]); |
|
|
const addressTypeOptions = ref<any[]>([]); |
|
|
const streetOptions = ref<any[]>([]); |
|
|
const streetOptions = ref<any[]>([]); |
|
|
|
|
|
|
|
|
@ -158,16 +157,18 @@ const calcTableHeight = () => { |
|
|
/** 加载字典 */ |
|
|
/** 加载字典 */ |
|
|
const loadDicts = async () => { |
|
|
const loadDicts = async () => { |
|
|
try { |
|
|
try { |
|
|
const [res1, res2, res3, res4] = await Promise.all([ |
|
|
const [res1, res2, res3, res4, res5] = await Promise.all([ |
|
|
getDicts('law_enforce_category'), |
|
|
getDicts('law_enforce_category'), |
|
|
getDicts('check_category'), |
|
|
getDicts('check_category'), |
|
|
getDicts('no-scan-reason'), |
|
|
getDicts('no-scan-reason'), |
|
|
getDicts('address_type') |
|
|
getDicts('address_type'), |
|
|
|
|
|
getDicts('caseType') |
|
|
]); |
|
|
]); |
|
|
lawEnforceCategoryOptions.value = res1.data || []; |
|
|
lawEnforceCategoryOptions.value = res1.data || []; |
|
|
checkCategoryOptions.value = res2.data || []; |
|
|
checkCategoryOptions.value = res2.data || []; |
|
|
noScanReasonOptions.value = res3.data || []; |
|
|
noScanReasonOptions.value = res3.data || []; |
|
|
addressTypeOptions.value = res4.data || []; |
|
|
addressTypeOptions.value = res4.data || []; |
|
|
|
|
|
complaintCaseTypeOptions.value = res5.data || []; |
|
|
} catch (e) { |
|
|
} catch (e) { |
|
|
console.error('加载字典失败', e); |
|
|
console.error('加载字典失败', e); |
|
|
} |
|
|
} |
|
|
@ -413,6 +414,31 @@ const handleUnionClick = async (row: any) => { |
|
|
unionLoading.value = false; |
|
|
unionLoading.value = false; |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// ======================== 投诉详情弹窗 ======================== |
|
|
|
|
|
const complaintDialogVisible = ref(false); |
|
|
|
|
|
const complaintLoading = ref(false); |
|
|
|
|
|
const complaintDetail = ref<RegistrationComplaintVo | null>(null); |
|
|
|
|
|
|
|
|
|
|
|
const getComplaintTypeText = (value?: number) => { |
|
|
|
|
|
const matched = complaintCaseTypeOptions.value.find((item: any) => String(item.dictValue) === String(value)); |
|
|
|
|
|
return matched?.dictLabel || value || '-'; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleComplaintClick = async (row: any) => { |
|
|
|
|
|
if (!row.id) return; |
|
|
|
|
|
complaintDetail.value = null; |
|
|
|
|
|
complaintDialogVisible.value = true; |
|
|
|
|
|
complaintLoading.value = true; |
|
|
|
|
|
try { |
|
|
|
|
|
const res = await getComplaintByRid(row.id); |
|
|
|
|
|
complaintDetail.value = res.data || null; |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
ElMessage.error('获取投诉详情失败'); |
|
|
|
|
|
} finally { |
|
|
|
|
|
complaintLoading.value = false; |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
@ -609,7 +635,7 @@ const handleUnionClick = async (row: any) => { |
|
|
<el-table-column v-if="isFieldVisible('otherReasons')" label="其他原因描述" prop="otherReasons" align="center" min-width="150" show-overflow-tooltip /> |
|
|
<el-table-column v-if="isFieldVisible('otherReasons')" label="其他原因描述" prop="otherReasons" align="center" min-width="150" show-overflow-tooltip /> |
|
|
<el-table-column v-if="isFieldVisible('isComplaint')" label="是否投诉" width="90" align="center"> |
|
|
<el-table-column v-if="isFieldVisible('isComplaint')" label="是否投诉" width="90" align="center"> |
|
|
<template #default="{ row }"> |
|
|
<template #default="{ row }"> |
|
|
<el-tag v-if="row.isComplaint === 1" type="danger" size="small">是</el-tag> |
|
|
<el-tag v-if="row.isComplaint === 1" type="danger" size="small" class="clickable" @click.stop="handleComplaintClick(row)">是</el-tag> |
|
|
<span v-else>否</span> |
|
|
<span v-else>否</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -680,6 +706,27 @@ const handleUnionClick = async (row: any) => { |
|
|
</el-table> |
|
|
</el-table> |
|
|
<div v-if="unionRows.length" class="union-total">共 {{ unionRows.length }} 条记录</div> |
|
|
<div v-if="unionRows.length" class="union-total">共 {{ unionRows.length }} 条记录</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 投诉详情弹窗 --> |
|
|
|
|
|
<el-dialog v-model="complaintDialogVisible" title="投诉详情" width="680px" append-to-body destroy-on-close> |
|
|
|
|
|
<div v-loading="complaintLoading"> |
|
|
|
|
|
<el-descriptions v-if="complaintDetail" :column="1" border> |
|
|
|
|
|
<el-descriptions-item label="投诉时间">{{ complaintDetail.complaintTime || '-' }}</el-descriptions-item> |
|
|
|
|
|
<el-descriptions-item label="投诉类型">{{ getComplaintTypeText(complaintDetail.enforceType) }}</el-descriptions-item> |
|
|
|
|
|
<el-descriptions-item label="被投诉部门">{{ complaintDetail.complaintDepartment || '-' }}</el-descriptions-item> |
|
|
|
|
|
<el-descriptions-item label="企业名称">{{ complaintDetail.enterpriseName || '-' }}</el-descriptions-item> |
|
|
|
|
|
<el-descriptions-item label="企业纳税识别号">{{ complaintDetail.enterpriseNumber || '-' }}</el-descriptions-item> |
|
|
|
|
|
<el-descriptions-item label="问题描述">{{ complaintDetail.problemDescription || '-' }}</el-descriptions-item> |
|
|
|
|
|
<el-descriptions-item label="联系人">{{ complaintDetail.linkman || '-' }}</el-descriptions-item> |
|
|
|
|
|
<el-descriptions-item label="联系方式">{{ complaintDetail.linkmanTel || '-' }}</el-descriptions-item> |
|
|
|
|
|
<el-descriptions-item label="涉事地址">{{ complaintDetail.enterpriseAddress || '-' }}</el-descriptions-item> |
|
|
|
|
|
</el-descriptions> |
|
|
|
|
|
<el-empty v-else-if="!complaintLoading" description="暂无投诉详情" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
<template #footer> |
|
|
|
|
|
<el-button @click="complaintDialogVisible = false">关闭</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
|