Browse Source

bug修复

dev-V1.10.0
wangmingyong@163.com 41 minutes ago
parent
commit
5098c3f5c5
  1. 27
      zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/registration.ts
  2. 2
      zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/statistics-complaint.ts
  3. 61
      zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/registration/indexList.vue
  4. 3
      zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/statistics_inspection_plan/index.vue

27
zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/registration.ts

@ -187,3 +187,30 @@ export const listUnionList = (unionNo: string | number): AxiosPromise<UnionRow[]
params: { unionNo } params: { unionNo }
}); });
}; };
/** 投诉详情 */
export interface RegistrationComplaintVo {
id?: number;
cid?: string;
rid?: string;
complaintTime?: string;
complaintType?: number;
complaintDepartment?: string;
complaintDepartmentId?: string;
enterpriseName?: string;
enterpriseNumber?: string;
enforceType?: number;
problemDescription?: string;
linkman?: string;
linkmanTel?: string;
enterpriseAddress?: string;
}
/** 根据执法记录ID查询投诉详情 */
export const getComplaintByRid = (rid: string | number): AxiosPromise<RegistrationComplaintVo> => {
return request({
url: `${BASE_URL}/complaintByRid`,
method: 'get',
params: { rid }
});
};

2
zdxt-web-client/zdxt-admin-plus-ui/src/api/efcode/report/statistics-complaint.ts

@ -113,7 +113,7 @@ export const getDetailList = (params: ComplaintQuery): AxiosPromise => {
/** 投诉举报详情(含处置进度) */ /** 投诉举报详情(含处置进度) */
export const getComplaintDetail = (id: number | string): AxiosPromise => { export const getComplaintDetail = (id: number | string): AxiosPromise => {
return request({ return request({
url: `${BASE_URL}/detail`, url: `${BASE_URL}/details`,
method: 'get', method: 'get',
params: { id } params: { id }
}); });

61
zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/registration/indexList.vue

@ -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>

3
zdxt-web-client/zdxt-admin-plus-ui/src/views/efcode/report/statistics_inspection_plan/index.vue

@ -215,7 +215,8 @@ const handlePreview = async (row: InspectionPlanDetailVo) => {
// 通过下载接口获取 blob 后用 blob URL 打开(支持跨域) // 通过下载接口获取 blob 后用 blob URL 打开(支持跨域)
try { try {
const res = await downloadAttachment(row.id); const res = await downloadAttachment(row.id);
const url = window.URL.createObjectURL(res as Blob); const blob = res instanceof Blob ? res : res.data;
const url = window.URL.createObjectURL(blob);
const win = window.open(url, '_blank'); const win = window.open(url, '_blank');
if (!win) { if (!win) {
ElMessage.warning('浏览器阻止了新窗口打开,请允许弹窗后重试'); ElMessage.warning('浏览器阻止了新窗口打开,请允许弹窗后重试');

Loading…
Cancel
Save