Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua
commit
d5ae41ae08
|
|
@ -120,7 +120,9 @@ enum Api {
|
|||
// 任务查询
|
||||
AchievementManageListTask = '/api/AchievementManage/ListTask',
|
||||
// 任务查询个体
|
||||
AchievementManageListDroneShpImageexif = '/api/AchievementManage/ListDroneShpImageexif'
|
||||
AchievementManageListDroneShpImageexif = '/api/AchievementManage/ListDroneShpImageexif',
|
||||
// 非法采矿-统计列表
|
||||
CaseOffenceMinerals = '/api/DroneCaseInfoMinerals/CaseOffenceMinerals',
|
||||
}
|
||||
export const getPositionsTree = (params?: AccountParams) =>
|
||||
defHttp.get<AccountListGetResultModel>({ url: Api.PositionsTree, params });
|
||||
|
|
@ -402,7 +404,7 @@ export function LoadCaseInfoListForUpdate(params) {
|
|||
params,
|
||||
});
|
||||
}
|
||||
export function LoadCaseInfoById(params:{id: string}) {
|
||||
export function LoadCaseInfoById(params: { id: string }) {
|
||||
return defHttp.get({
|
||||
url: Api.LoadCaseInfoById,
|
||||
params,
|
||||
|
|
@ -414,7 +416,7 @@ export function UpdateCaseInfo(data) {
|
|||
data,
|
||||
});
|
||||
}
|
||||
export function LoadCaseHistoryInfoList(params:{key: string}) {
|
||||
export function LoadCaseHistoryInfoList(params: { key: string }) {
|
||||
return defHttp.get({
|
||||
url: Api.LoadCaseHistoryInfoList,
|
||||
params,
|
||||
|
|
@ -439,10 +441,10 @@ export const ShpGeoLayerDelete = (params) =>
|
|||
defHttp.post({ url: Api.ShpGeoLayerDelete + '/' + params.id });
|
||||
// geo解析shp文件
|
||||
export const ShpGeoLayerParseShpInfo = (params) =>
|
||||
defHttp.post({ url: Api.ShpGeoLayerParseShpInfo + "?srid=" + params.srid + "&tableName=" + params.tableName + "&zipFilePath=" + params.zipFilePath });
|
||||
defHttp.post({ url: Api.ShpGeoLayerParseShpInfo + "?srid=" + params.srid + "&tableName=" + params.tableName + "&zipFilePath=" + params.zipFilePath });
|
||||
// 获取地图中心点
|
||||
export const getGeomData = (params) =>
|
||||
defHttp.get({ url: Api.getGeomData + "?tableName=" + params.dataTable});
|
||||
defHttp.get({ url: Api.getGeomData + "?tableName=" + params.dataTable });
|
||||
|
||||
// 影像管理
|
||||
// 更新tiff影像
|
||||
|
|
@ -471,3 +473,6 @@ export const AchievementManageListTask = (params) =>
|
|||
// 任务查询个体
|
||||
export const AchievementManageListDroneShpImageexif = (params) =>
|
||||
defHttp.get({ url: Api.AchievementManageListDroneShpImageexif, params });
|
||||
// 非法采矿-统计列表
|
||||
export const CaseOffenceMinerals = (params: ReportParams) =>
|
||||
defHttp.get<StatisticalListGetResultModel>({ url: Api.CaseOffenceMinerals, params });
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
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,
|
||||
},
|
||||
];
|
||||
|
||||
// 无人机发现违法行为情况统计明细表-搜索
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: '[startTime, endTime]',
|
||||
label: '日期范围',
|
||||
component: 'RangePicker',
|
||||
colProps: { span: 8 },
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
defaultValue: [dayjs(dayjs().add(-1, 'day'), 'YYYY-MM-DD'), dayjs(dayjs().add(-1, 'day'), 'YYYY-MM-DD')]
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
<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>
|
||||
</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) => {
|
||||
// 接口请求前 参数处理
|
||||
// 默认展示昨天的
|
||||
var temp = {
|
||||
startTime: data.startTime
|
||||
? dayjs(data.startTime).startOf('day').format('YYYY-MM-DD')
|
||||
: dayjs().startOf('day').add(-1, 'day').format('YYYY-MM-DD'),
|
||||
endTime: data.endTime
|
||||
? dayjs(data.endTime).endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
: dayjs().endOf('day').add(-1, 'day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
};
|
||||
searchParams.value = temp;
|
||||
return temp;
|
||||
},
|
||||
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