You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.1 KiB
53 lines
2.1 KiB
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
|
|
const BASE_URL = '/web/supervision/report/checkRegistration';
|
|
|
|
/** 通用查询参数(区域 / 领域共用) */
|
|
export interface CheckRegistrationQuery {
|
|
pageNum?: number;
|
|
pageSize?: number;
|
|
areaName?: string; // 各区域 — 所属区名称
|
|
fieldName?: string; // 各领域 — 所属领域名称(领域 tab 用)
|
|
year?: string;
|
|
month?: string;
|
|
}
|
|
|
|
/** 统计行(行政执法数 / 检查案件数 / 处罚案件数 / 强制数) */
|
|
export interface CheckRegistrationRow {
|
|
id: number | string;
|
|
dimensionName: string;
|
|
enforcementCount?: number | null;
|
|
inspectionCaseCount?: number | null;
|
|
penaltyCaseCount?: number | null;
|
|
coerciveCount?: number | null;
|
|
[key: string]: any;
|
|
}
|
|
|
|
/** 各区域统计列表 */
|
|
export const listAreaRegistration = (params: CheckRegistrationQuery): AxiosPromise<{ rows: CheckRegistrationRow[]; total: number }> => {
|
|
return request({ url: `${BASE_URL}/areaList`, method: 'get', params });
|
|
};
|
|
|
|
/** 各领域统计列表 */
|
|
export const listFieldRegistration = (params: CheckRegistrationQuery): AxiosPromise<{ rows: CheckRegistrationRow[]; total: number }> => {
|
|
return request({ url: `${BASE_URL}/domainList`, method: 'get', params });
|
|
};
|
|
|
|
/** 导出参数(各区域用 areaName,各领域用 lymc) */
|
|
export interface CheckRegistrationExportQuery {
|
|
areaName?: string; // 各区域 — 所属区名称
|
|
lymc?: string; // 各领域 — 所属领域名称
|
|
year?: string;
|
|
month?: string;
|
|
}
|
|
|
|
/** 各区域导出:web/supervision/report/checkRegistration/exportArea */
|
|
export const exportAreaRegistration = (params: CheckRegistrationExportQuery): AxiosPromise<Blob> => {
|
|
return request({ url: `${BASE_URL}/exportArea`, method: 'post', params, responseType: 'blob' });
|
|
};
|
|
|
|
/** 各领域导出:web/supervision/report/checkRegistration/exportDomain */
|
|
export const exportDomainRegistration = (params: CheckRegistrationExportQuery): AxiosPromise<Blob> => {
|
|
return request({ url: `${BASE_URL}/exportDomain`, method: 'post', params, responseType: 'blob' });
|
|
};
|
|
|