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.
157 lines
3.6 KiB
157 lines
3.6 KiB
import request from '@/utils/request';
|
|
import { AxiosPromise } from 'axios';
|
|
|
|
const BASE_URL = '/web/supervision/report/statistics-inspection-plan';
|
|
|
|
/** 查询参数 */
|
|
export interface InspectionPlanQuery {
|
|
pageNum?: number;
|
|
pageSize?: number;
|
|
/** 执法单位(模糊搜索) */
|
|
bureauDeptName?: string;
|
|
/** 局级部门ID(明细查询用) */
|
|
bureauDeptId?: string;
|
|
/** 时段类型:year/quarter/month/day */
|
|
dateSearch?: string;
|
|
/** 年 */
|
|
year?: string;
|
|
/** 报表搜索用季度 */
|
|
reportQuarter?: string;
|
|
/** 月 */
|
|
month?: string;
|
|
/** 自定义开始时间 */
|
|
beginTime?: string;
|
|
/** 自定义结束时间 */
|
|
endTime?: string;
|
|
/** 明细弹窗时的计划类型(year/quarter/month) */
|
|
reportTimeType?: string;
|
|
}
|
|
|
|
/** 概览VO */
|
|
export interface InspectionPlanOverviewVo {
|
|
total: number;
|
|
yearTotal: number;
|
|
quarterTotal: number;
|
|
monthTotal: number;
|
|
}
|
|
|
|
/** 分组统计VO */
|
|
export interface InspectionPlanGroupVo {
|
|
bureauDeptName: string;
|
|
bureauDeptId: string;
|
|
total: number;
|
|
yearTotal: number;
|
|
quarterTotal: number;
|
|
monthTotal: number;
|
|
}
|
|
|
|
/** 明细VO */
|
|
export interface InspectionPlanDetailVo {
|
|
id: string;
|
|
planName: string;
|
|
bureauDeptName: string;
|
|
enforcementArea: string;
|
|
enforcementTime: string;
|
|
/** 附件名称 */
|
|
attachment?: string;
|
|
/** 附件ID/路径,用于下载 */
|
|
attachmentId?: string | number;
|
|
/** 附件完整URL(直链预览用) */
|
|
attachmentUrl?: string;
|
|
}
|
|
|
|
/** 排行VO */
|
|
export interface InspectionPlanRankVo {
|
|
bureauDeptName: string;
|
|
total: number;
|
|
quarterTotal1?: number;
|
|
quarterTotal2?: number;
|
|
quarterTotal3?: number;
|
|
quarterTotal4?: number;
|
|
monthTotal1?: number;
|
|
monthTotal2?: number;
|
|
monthTotal3?: number;
|
|
monthTotal4?: number;
|
|
monthTotal5?: number;
|
|
monthTotal6?: number;
|
|
monthTotal7?: number;
|
|
monthTotal8?: number;
|
|
monthTotal9?: number;
|
|
monthTotal10?: number;
|
|
monthTotal11?: number;
|
|
monthTotal12?: number;
|
|
}
|
|
|
|
/** Tab1概览 */
|
|
export const getOverview = (params: InspectionPlanQuery): AxiosPromise => {
|
|
return request({
|
|
url: `${BASE_URL}/overview`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
};
|
|
|
|
/** Tab1分组列表 */
|
|
export const getGroupList = (params: InspectionPlanQuery): AxiosPromise => {
|
|
return request({
|
|
url: `${BASE_URL}/groupList`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
};
|
|
|
|
/** Tab1明细列表 */
|
|
export const getDetailList = (params: InspectionPlanQuery): AxiosPromise => {
|
|
return request({
|
|
url: `${BASE_URL}/detailList`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
};
|
|
|
|
/** Tab2-年度排行TOP10 */
|
|
export const getRankByYear = (params: InspectionPlanQuery): AxiosPromise => {
|
|
return request({
|
|
url: `${BASE_URL}/rankByYear`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
};
|
|
|
|
/** Tab2-季度排行TOP10 */
|
|
export const getRankByQuarter = (params: InspectionPlanQuery): AxiosPromise => {
|
|
return request({
|
|
url: `${BASE_URL}/rankByQuarter`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
};
|
|
|
|
/** Tab2-月度排行TOP10 */
|
|
export const getRankByMonth = (params: InspectionPlanQuery): AxiosPromise => {
|
|
return request({
|
|
url: `${BASE_URL}/rankByMonth`,
|
|
method: 'get',
|
|
params
|
|
});
|
|
};
|
|
|
|
/** Tab1导出 */
|
|
export const exportGroupList = (data: InspectionPlanQuery): AxiosPromise<Blob> => {
|
|
return request({
|
|
url: `${BASE_URL}/exportGroupList`,
|
|
method: 'post',
|
|
data,
|
|
responseType: 'blob'
|
|
});
|
|
};
|
|
|
|
/** 下载执法计划附件 */
|
|
export const downloadAttachment = (id: string): AxiosPromise<Blob> => {
|
|
return request({
|
|
url: `${BASE_URL}/downloadAttachment`,
|
|
method: 'get',
|
|
params: { id },
|
|
responseType: 'blob'
|
|
});
|
|
};
|
|
|