非法采矿-新统计报表
parent
2354759404
commit
46136a4c75
|
|
@ -132,6 +132,8 @@ enum Api {
|
|||
GeoStyleBindLayer = '/api/GeoStyle/BindLayer',
|
||||
// 非法采矿-统计列表
|
||||
CaseOffenceMinerals = '/api/DroneCaseInfoMinerals/CaseOffenceMinerals',
|
||||
// 非法采矿-统计列表New
|
||||
CaseOffenceMineralsNew = '/api/DroneCaseInfoMinerals/CaseOffenceMineralsNew',
|
||||
}
|
||||
export const getPositionsTree = (params?: AccountParams) =>
|
||||
defHttp.get<AccountListGetResultModel>({ url: Api.PositionsTree, params });
|
||||
|
|
@ -495,4 +497,7 @@ export const GeoStylePage = (params) =>
|
|||
defHttp.get({ url: Api.GeoStylePage, params });
|
||||
// 非法采矿-统计列表
|
||||
export const CaseOffenceMinerals = (params: ReportParams) =>
|
||||
defHttp.get<StatisticalListGetResultModel>({ url: Api.CaseOffenceMinerals, params });
|
||||
defHttp.get<StatisticalListGetResultModel>({ url: Api.CaseOffenceMinerals, params });
|
||||
// 非法采矿-统计列表New
|
||||
export const CaseOffenceMineralsNew = (params: ReportParams) =>
|
||||
defHttp.get<StatisticalListGetResultModel>({ url: Api.CaseOffenceMineralsNew, params });
|
||||
|
|
@ -80,6 +80,92 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
];
|
||||
|
||||
// 无人机发现违法行为情况统计明细表-table
|
||||
export const columnsNew: BasicColumn[] = [
|
||||
{
|
||||
title: 'countyid',
|
||||
dataIndex: '县区id',
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
title: '县区',
|
||||
dataIndex: 'countyname',
|
||||
width: 100,
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: '下发线索总数(个)',
|
||||
dataIndex: 'xfwtzs',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '总数',
|
||||
children: [
|
||||
{
|
||||
title: '已完成(个)',
|
||||
dataIndex: 'ywc',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '未完成(个)',
|
||||
dataIndex: 'wwc',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '完成率(%)',
|
||||
dataIndex: 'wcl',
|
||||
width: 100,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '定性',
|
||||
children: [
|
||||
{
|
||||
title: '合法(个)',
|
||||
dataIndex: 'dxhf',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '违法(个)',
|
||||
dataIndex: 'dxwf',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '其他(个)',
|
||||
dataIndex: 'dxqt',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '未定性(个)',
|
||||
dataIndex: 'dxwdx',
|
||||
width: 100,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '分类',
|
||||
children: [
|
||||
{
|
||||
title: '非法开采(个)',
|
||||
dataIndex: 'flffkc',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '非法加工(个)',
|
||||
dataIndex: 'flffjg',
|
||||
width: 100,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '超期未报(个)',
|
||||
dataIndex: 'cqwb',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
|
||||
// 无人机发现违法行为情况统计明细表-搜索
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,14 +4,6 @@
|
|||
<template #toolbar>
|
||||
<PermissionBtn @btnEvent="buttonClick"></PermissionBtn>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<!-- 整改率 -->
|
||||
<template v-if="column.key === 'zgl'"> {{ record.zgl }}% </template>
|
||||
<!-- 驳回率 -->
|
||||
<template v-if="column.key === 'bhl'"> {{ record.bhl }}% </template>
|
||||
<!-- 上报率 -->
|
||||
<template v-if="column.key === 'sbl'"> {{ record.sbl }}% </template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -23,8 +15,8 @@
|
|||
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { CaseOffenceMinerals } from '@/api/demo/system';
|
||||
import { columns, searchFormSchema } from './index.data';
|
||||
import { CaseOffenceMineralsNew } from '@/api/demo/system';
|
||||
import { columnsNew, searchFormSchema } from './index.data';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from 'axios';
|
||||
|
|
@ -36,8 +28,8 @@
|
|||
// 页面表格
|
||||
const searchParams = ref();
|
||||
const [registerTable] = useTable({
|
||||
api: CaseOffenceMinerals,
|
||||
columns: columns,
|
||||
api: CaseOffenceMineralsNew,
|
||||
columns: columnsNew,
|
||||
// title: '无人机全域巡查图斑情况统计表',
|
||||
// titleHelpMessage: '合法、其他、非粮化、补办手续、拆除复耕均需市级审核通过才可判定为举证类型。',
|
||||
formConfig: {
|
||||
|
|
@ -100,7 +92,7 @@
|
|||
|
||||
switch (exportType) {
|
||||
case '':
|
||||
url = VITE_GLOB_API_URL + '/api/DroneCaseInfoMinerals/CaseOfMineralsToExcel';
|
||||
url = VITE_GLOB_API_URL + '/api/DroneCaseInfoMinerals/CaseOfMineralsToExcelNew';
|
||||
fileName = '汇总表 ' + afterTitle + '.xls';
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
import { BasicColumn, FormSchema } from '@/components/Table';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
// 无人机发现违法行为情况统计明细表-table
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: 'countyid',
|
||||
dataIndex: '县区id',
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
title: '县区',
|
||||
dataIndex: 'countyname',
|
||||
width: 100,
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: '下发问题总数',
|
||||
dataIndex: 'xfwtzs',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '合法',
|
||||
dataIndex: 'hf',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '其他',
|
||||
dataIndex: 'qt',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '违法',
|
||||
dataIndex: 'wf',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '已完成归档',
|
||||
dataIndex: 'ywcgd',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '未完成归档',
|
||||
dataIndex: 'wwcgd',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '未完成归档',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '违法采矿',
|
||||
dataIndex: 'wfck',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '违法加工',
|
||||
dataIndex: 'wfjg',
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '整改率',
|
||||
dataIndex: 'zgl',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '驳回率',
|
||||
dataIndex: 'bhl',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '上报率',
|
||||
dataIndex: 'sbl',
|
||||
fixed: 'right',
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
|
||||
// 无人机发现违法行为情况统计明细表-搜索
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: '[startTime, endTime]',
|
||||
label: '日期范围',
|
||||
component: 'RangePicker',
|
||||
colProps: { span: 8 },
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
defaultValue: [dayjs('2024-08-01', 'YYYY-MM-DD'), dayjs(dayjs().add(-1, 'day'), 'YYYY-MM-DD')]
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
<template>
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<PermissionBtn @btnEvent="buttonClick"></PermissionBtn>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<!-- 整改率 -->
|
||||
<template v-if="column.key === 'zgl'"> {{ record.zgl }}% </template>
|
||||
<!-- 驳回率 -->
|
||||
<template v-if="column.key === 'bhl'"> {{ record.bhl }}% </template>
|
||||
<!-- 上报率 -->
|
||||
<template v-if="column.key === 'sbl'"> {{ record.sbl }}% </template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, watch, createVNode, unref } from 'vue';
|
||||
import { useModal } from '@/components/Modal';
|
||||
import { BasicTable, useTable } from '@/components/Table';
|
||||
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { CaseOffenceMinerals } from '@/api/demo/system';
|
||||
import { columns, searchFormSchema } from './index.data';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from 'axios';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
|
||||
// 页面表格
|
||||
const searchParams = ref();
|
||||
const [registerTable] = useTable({
|
||||
api: CaseOffenceMinerals,
|
||||
columns: columns,
|
||||
// title: '无人机全域巡查图斑情况统计表',
|
||||
// titleHelpMessage: '合法、其他、非粮化、补办手续、拆除复耕均需市级审核通过才可判定为举证类型。',
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
showIndexColumn: false,
|
||||
striped: false,
|
||||
bordered: true,
|
||||
canResize: false,
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
pagination: false,
|
||||
beforeFetch: (data) => {
|
||||
// 接口请求前 参数处理
|
||||
console.log(data);
|
||||
// 默认时间
|
||||
if (Object.keys(data).length == 0) {
|
||||
var temp = {
|
||||
startTime: dayjs('2024-08-01').startOf('day').format('YYYY-MM-DD'),
|
||||
endTime: dayjs().endOf('day').add(-1, 'day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
};
|
||||
searchParams.value = temp;
|
||||
return temp;
|
||||
}
|
||||
// 起始时间和结束时间格式和精确值
|
||||
if (data.startTime && data.endTime) {
|
||||
var temp = {
|
||||
startTime: dayjs(data.startTime).startOf('day').format('YYYY-MM-DD'),
|
||||
endTime: dayjs(data.endTime).endOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
};
|
||||
searchParams.value = temp;
|
||||
return temp;
|
||||
}
|
||||
if (data.startTime === null || data.endTime === undefined) {
|
||||
searchParams.value = {};
|
||||
}
|
||||
},
|
||||
afterFetch: (res) => {},
|
||||
});
|
||||
|
||||
// 直接下载接口返回的二进制流
|
||||
function handleExport(exportType) {
|
||||
let url = '';
|
||||
let fileName = '';
|
||||
let params: any = {};
|
||||
let afterTitle = '';
|
||||
|
||||
if (
|
||||
dayjs(searchParams.value?.startTime).startOf('day').format('YYYY-MM-DD') ===
|
||||
dayjs(searchParams.value?.endTime).endOf('day').format('YYYY-MM-DD')
|
||||
) {
|
||||
afterTitle = dayjs(searchParams.value?.startTime).startOf('day').format('YYYY-MM-DD');
|
||||
} else {
|
||||
afterTitle =
|
||||
dayjs(searchParams.value?.startTime).startOf('day').format('YYYY-MM-DD') +
|
||||
'至' +
|
||||
dayjs(searchParams.value?.endTime).endOf('day').format('YYYY-MM-DD');
|
||||
}
|
||||
|
||||
switch (exportType) {
|
||||
case '':
|
||||
url = VITE_GLOB_API_URL + '/api/DroneCaseInfoMinerals/CaseOfMineralsToExcel';
|
||||
fileName = '汇总表 ' + afterTitle + '.xls';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
params = {
|
||||
startTime: dayjs(searchParams.value?.startTime).startOf('day').format('YYYY-MM-DD'),
|
||||
endTime: dayjs(searchParams.value?.endTime).endOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
};
|
||||
|
||||
axios({
|
||||
method: 'post',
|
||||
url: url,
|
||||
params: params,
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('X-Token'),
|
||||
},
|
||||
responseType: 'blob',
|
||||
}).then((res) => {
|
||||
const elink = document.createElement('a');
|
||||
elink.download = fileName;
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(res.data);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href);
|
||||
document.body.removeChild(elink);
|
||||
});
|
||||
}
|
||||
// 按键分类
|
||||
const buttonClick = async (type) => {
|
||||
switch (type) {
|
||||
case 'btnExport':
|
||||
handleExport('');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
#closeIconButton {
|
||||
width: 40px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
float: right;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.exportbutton {
|
||||
width: 510px;
|
||||
height: 60px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-container table {
|
||||
line-height: 1.1 !important;
|
||||
|
||||
.ant-table-row {
|
||||
td {
|
||||
padding-top: 8px !important;
|
||||
padding-bottom: 8px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue