统计明细的五个导出
parent
240d2b5de7
commit
6b4318dbed
|
|
@ -440,18 +440,18 @@
|
|||
|
||||
/* 滚动条轨道 */
|
||||
::-webkit-scrollbar-track {
|
||||
background: #f1f1f1;
|
||||
background: transparent;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/* 滚动条滑块 */
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #888;
|
||||
background: transparent;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/* 当鼠标悬停在滚动条滑块上时的样式 */
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: #555;
|
||||
background: #c7c7c7;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ export const useUserStore = defineStore({
|
|||
}
|
||||
}
|
||||
this.setToken(undefined);
|
||||
this.setSubject(undefined);
|
||||
this.setSubject(undefined, undefined, '');
|
||||
this.setSessionTimeout(false);
|
||||
this.setUserInfo(null);
|
||||
goLogin && router.push(PageEnum.BASE_LOGIN);
|
||||
|
|
|
|||
|
|
@ -16,63 +16,59 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
{
|
||||
title: '下发图斑',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'xftbzs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'xfgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '新增建设用地',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '合法',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'hfzs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '面积',
|
||||
dataIndex: 'hfmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'hfgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '违法',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'wfzs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '面积',
|
||||
dataIndex: 'wfmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'wfgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -80,26 +76,24 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
{
|
||||
title: '非新增建设用地',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '其他',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'qtzs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '面积',
|
||||
dataIndex: 'qtmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'qtgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -107,26 +101,24 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
{
|
||||
title: '农业项目耕地',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '非粮化',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'flhzs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '面积',
|
||||
dataIndex: 'flhmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'flhgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -134,47 +126,44 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
{
|
||||
title: '整改情况',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '补办手续',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'bbsxzs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '面积',
|
||||
dataIndex: 'bbsxmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'bbsxgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '拆除',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'cczs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '面积',
|
||||
dataIndex: 'ccmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'ccgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -186,11 +175,10 @@ export const columns: BasicColumn[] = [
|
|||
children: [
|
||||
{
|
||||
title: '不占耕地图斑',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -198,37 +186,34 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
{
|
||||
title: '新增违法占用耕地情况计算',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '核实后新增违法耕地',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'hshxzwfgdzs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'hshxzwfgdgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '整改后剩余违法耕地',
|
||||
width: 200,
|
||||
children: [
|
||||
{
|
||||
title: '宗数',
|
||||
dataIndex: 'zghsywfgdzs',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '耕地面积',
|
||||
dataIndex: 'zghsywfgdgdmj',
|
||||
width: 200,
|
||||
width: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-select v-model:value="exportType_mingxi" style="width: 300px">
|
||||
<a-select-option value="1">无人机发现违法行为情况统计明细表</a-select-option>
|
||||
<a-select-option value="2">土地卫片新增违法占用耕地情况统计表</a-select-option>
|
||||
<a-select-option value="3">无人机发现违法行为情况统计表</a-select-option>
|
||||
</a-select>
|
||||
<PermissionBtn @btnEvent="buttonClick"></PermissionBtn>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
|
|
@ -95,38 +100,47 @@
|
|||
<a @click="handlePreViewData(column, record, 7)">{{ record.ccgdmj }}</a>
|
||||
</template>
|
||||
|
||||
<!--
|
||||
新增违法占用耕地情况计算·核实后新增违法耕地·宗数
|
||||
<!-- 新增违法占用耕地情况计算·核实后新增违法耕地·宗数 -->
|
||||
<template v-if="column.key === 'hshxzwfgdzs' && record.countyname != '总计'">
|
||||
<a @click="handlePreViewData(column, record)">{{ record.hshxzwfgdzs }}</a>
|
||||
<a @click="handlePreViewData(column, record, 8)">{{ record.hshxzwfgdzs }}</a>
|
||||
</template>
|
||||
新增违法占用耕地情况计算·核实后新增违法耕地·耕地面积
|
||||
<!-- 新增违法占用耕地情况计算·核实后新增违法耕地·耕地面积 -->
|
||||
<template v-if="column.key === 'hshxzwfgdgdmj' && record.countyname != '总计'">
|
||||
<a @click="handlePreViewData(column, record)">{{ record.hshxzwfgdgdmj }}</a>
|
||||
<a @click="handlePreViewData(column, record, 8)">{{ record.hshxzwfgdgdmj }}</a>
|
||||
</template>
|
||||
新增违法占用耕地情况计算·整改后剩余违法耕地·宗数
|
||||
<!-- 新增违法占用耕地情况计算·整改后剩余违法耕地·宗数 -->
|
||||
<template v-if="column.key === 'zghsywfgdzs' && record.countyname != '总计'">
|
||||
<a @click="handlePreViewData(column, record)">{{ record.zghsywfgdzs }}</a>
|
||||
<a @click="handlePreViewData(column, record, 9)">{{ record.zghsywfgdzs }}</a>
|
||||
</template>
|
||||
新增违法占用耕地情况计算·整改后剩余违法耕地·耕地面积
|
||||
<!-- 新增违法占用耕地情况计算·整改后剩余违法耕地·耕地面积 -->
|
||||
<template v-if="column.key === 'zghsywfgdgdmj' && record.countyname != '总计'">
|
||||
<a @click="handlePreViewData(column, record)">{{ record.zghsywfgdgdmj }}</a>
|
||||
<a @click="handlePreViewData(column, record, 9)">{{ record.zghsywfgdgdmj }}</a>
|
||||
</template>
|
||||
-->
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
||||
<a-modal
|
||||
v-model:open="showRecordList"
|
||||
width="1710px"
|
||||
:footer="null"
|
||||
style="top: 50px; left: 105px"
|
||||
@ok="handleOk"
|
||||
>
|
||||
<template #closeIcon>
|
||||
<CloudDownloadOutlined id="closeIconButton" @click="exportList()" />
|
||||
<MinusOutlined id="closeIconButton" @click="handleCloseRecordList()" />
|
||||
<CloseOutlined id="closeIconButton" @click="handleCloseAllRecordList()" />
|
||||
<MinusOutlined id="closeIconButton" @click="handleCloseRecordList()" />
|
||||
<!-- <CloudDownloadOutlined id="closeIconButton" @click="exportList()" /> -->
|
||||
</template>
|
||||
<template #footer>
|
||||
<a-select v-model:value="exportType_chuantou" style="width: 120px">
|
||||
<a-select-option value="1">案件信息</a-select-option>
|
||||
<a-select-option value="2">图斑信息</a-select-option>
|
||||
</a-select>
|
||||
<a-button type="primary" @click="exportList">
|
||||
<template #icon>
|
||||
<CloudDownloadOutlined />
|
||||
</template>
|
||||
导出
|
||||
</a-button>
|
||||
</template>
|
||||
<a-tabs
|
||||
v-model:activeKey="activeKey"
|
||||
|
|
@ -156,7 +170,7 @@
|
|||
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
||||
import { PageWrapper } from '@/components/Page';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { getCaseOffence, postCaseOffenceToExcel } from '@/api/demo/system';
|
||||
import { getCaseOffence } from '@/api/demo/system';
|
||||
import { columns, searchFormSchema } from './index.data';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
import { RecordList } from './page';
|
||||
|
|
@ -184,7 +198,7 @@
|
|||
bordered: true,
|
||||
canResize: false,
|
||||
useSearchForm: true,
|
||||
// showTableSetting: true,
|
||||
showTableSetting: true,
|
||||
pagination: false,
|
||||
size: 'small',
|
||||
handleSearchInfoFn(info) {
|
||||
|
|
@ -258,8 +272,11 @@
|
|||
case 7:
|
||||
tabItem.label = '整改情况·拆除';
|
||||
break;
|
||||
default:
|
||||
tabItem.label = column.title;
|
||||
case 8:
|
||||
tabItem.label = '核实后新增违法耕地';
|
||||
break;
|
||||
case 9:
|
||||
tabItem.label = '整改后剩余违法耕地';
|
||||
break;
|
||||
}
|
||||
tablist.push(tabItem);
|
||||
|
|
@ -270,6 +287,7 @@
|
|||
// 标签页面的搜索条件
|
||||
currentListQuery.listQuery = searchForm;
|
||||
}
|
||||
// 编辑标签页
|
||||
function onEdit(targetKey: string) {
|
||||
tablist.splice(parseInt(targetKey), 1);
|
||||
if (tablist.length == 0) {
|
||||
|
|
@ -282,38 +300,91 @@
|
|||
}
|
||||
currentListQuery.listQuery = tablist[activeKey.value].listQuery;
|
||||
}
|
||||
// 修改标签页
|
||||
function handleTabChange(e) {
|
||||
currentListQuery.listQuery = tablist[e].listQuery;
|
||||
}
|
||||
function exportList() {
|
||||
createMessage.success('接口待对接!');
|
||||
}
|
||||
|
||||
// 穿透显示的明细表缩小
|
||||
function handleCloseRecordList() {
|
||||
showRecordList.value = false;
|
||||
}
|
||||
// 穿透显示的明细表关闭
|
||||
function handleCloseAllRecordList() {
|
||||
for (let i = 0; i < tablist.length; i++) {
|
||||
tablist.pop();
|
||||
}
|
||||
showRecordList.value = false;
|
||||
}
|
||||
// 穿透显示的明细表导出
|
||||
function exportList() {
|
||||
handleExport(currentListQuery.listQuery, 'chuantou');
|
||||
}
|
||||
|
||||
// 导出种类
|
||||
const exportType_mingxi = ref('1');
|
||||
const exportType_chuantou = ref('1');
|
||||
|
||||
// 直接下载接口返回的二进制流
|
||||
function handleExport() {
|
||||
let params = {
|
||||
startTime: dayjs(searchParams.value?.startTime).startOf('month').format('YYYY-MM-DD'),
|
||||
endTime: dayjs(searchParams.value?.endTime).endOf('month').format('YYYY-MM-DD'),
|
||||
};
|
||||
function handleExport(params, exportType) {
|
||||
delete params.limit;
|
||||
delete params.page;
|
||||
|
||||
let url = '';
|
||||
let fileName = '';
|
||||
if (exportType == 'mingxi') {
|
||||
switch (exportType_mingxi.value) {
|
||||
case '1':
|
||||
// 无人机发现违法行为情况统计明细表
|
||||
url = VITE_GLOB_API_URL + '/api/DroneCaseInfoSingle/CaseOffenceToExcel';
|
||||
fileName = '无人机发现违法行为情况统计明细表' + new Date().getTime() + '.xls';
|
||||
break;
|
||||
case '2':
|
||||
// 土地卫片新增违法占用耕地情况统计表
|
||||
url = VITE_GLOB_API_URL + '/api/DroneCaseInfoSingle/CaseOffenceSimpleToExcel';
|
||||
fileName = '土地卫片新增违法占用耕地情况统计表' + new Date().getTime() + '.xls';
|
||||
break;
|
||||
case '3':
|
||||
// 无人机发现违法行为情况统计表
|
||||
url = VITE_GLOB_API_URL + '/api/DroneCaseInfoSingle/CaseOffenceToExcel2';
|
||||
fileName = '无人机发现违法行为情况统计表' + new Date().getTime() + '.xls';
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (exportType == 'chuantou') {
|
||||
switch (exportType_chuantou.value) {
|
||||
case '1':
|
||||
// 穿透-导出案件明细execl
|
||||
url = VITE_GLOB_API_URL + '/api/DroneCaseInfoSingle/ExprotCaseListByType';
|
||||
fileName =
|
||||
'案件信息 ' +
|
||||
tablist[activeKey.value].countyname +
|
||||
'_' +
|
||||
tablist[activeKey.value].label +
|
||||
'.xls';
|
||||
break;
|
||||
case '2':
|
||||
// 穿透-导出案件明细shp
|
||||
url = VITE_GLOB_API_URL + '/api/DroneCaseInfoSingle/ExportShapefile';
|
||||
fileName =
|
||||
'图斑信息 ' +
|
||||
tablist[activeKey.value].countyname +
|
||||
'_' +
|
||||
tablist[activeKey.value].label +
|
||||
'.shp';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
axios({
|
||||
method: 'post',
|
||||
url: VITE_GLOB_API_URL + '/api/DroneCaseInfoSingle/CaseOffenceToExcel',
|
||||
url: url,
|
||||
params: params,
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('X-Token'),
|
||||
},
|
||||
responseType: 'blob',
|
||||
}).then((res) => {
|
||||
let fileName = '无人机发现违法行为情况统计明细表' + new Date().getTime() + '.xls';
|
||||
const elink = document.createElement('a');
|
||||
elink.download = fileName;
|
||||
elink.style.display = 'none';
|
||||
|
|
@ -328,7 +399,11 @@
|
|||
const buttonClick = async (type) => {
|
||||
switch (type) {
|
||||
case 'btnExport':
|
||||
handleExport();
|
||||
let params = {
|
||||
startTime: dayjs(searchParams.value?.startTime).startOf('month').format('YYYY-MM-DD'),
|
||||
endTime: dayjs(searchParams.value?.endTime).endOf('month').format('YYYY-MM-DD'),
|
||||
};
|
||||
handleExport(params, 'mingxi');
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
|
@ -338,7 +413,7 @@
|
|||
width: 30px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
float: left;
|
||||
float: right;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,6 +157,18 @@ export const searchFormSchema: FormSchema[] = [
|
|||
},
|
||||
colProps: { span: 4 },
|
||||
},
|
||||
{
|
||||
field: 'measureName',
|
||||
label: '整改措施',
|
||||
component: 'Select',
|
||||
colProps: { span: 4 },
|
||||
componentProps: {
|
||||
options: [
|
||||
{ label: '拆除复耕', value: '拆除复耕' },
|
||||
{ label: '补办手续', value: '补办手续' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'countyid',
|
||||
label: '区县',
|
||||
|
|
|
|||
|
|
@ -1,80 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<Space>
|
||||
<a-button type="primary" @click="openUploadModal" preIcon="carbon:cloud-upload">
|
||||
{{ t('component.upload.upload') }}
|
||||
</a-button>
|
||||
<Tooltip placement="bottom" v-if="showPreview">
|
||||
<template #title>
|
||||
{{ t('component.upload.uploaded') }}
|
||||
<template v-if="fileList.length">
|
||||
{{ fileList.length }}
|
||||
</template>
|
||||
</template>
|
||||
</Tooltip>
|
||||
</Space>
|
||||
<UploadModal
|
||||
v-bind="bindValue"
|
||||
:previewFileList="fileList"
|
||||
:fileListOpenDrag="fileListOpenDrag"
|
||||
:fileListDragOptions="fileListDragOptions"
|
||||
@register="registerUploadModal"
|
||||
@change="handleChange"
|
||||
@delete="handleDelete"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, watch, unref, computed, useAttrs } from 'vue';
|
||||
import { Recordable } from '@vben/types';
|
||||
import { Tooltip, Space } from 'ant-design-vue';
|
||||
import { useModal } from '@/components/Modal';
|
||||
import { uploadContainerProps } from '@/components/Upload/src/props';
|
||||
import { omit } from 'lodash-es';
|
||||
import { useI18n } from '@/hooks/web/useI18n';
|
||||
import { isArray } from '@/utils/is';
|
||||
import UploadModal from '@/components/Upload/src/components/UploadModal.vue';
|
||||
|
||||
defineOptions({ name: 'BasicUpload' });
|
||||
|
||||
const props = defineProps(uploadContainerProps);
|
||||
|
||||
const emit = defineEmits(['change', 'delete', 'preview-delete', 'update:value']);
|
||||
|
||||
const attrs = useAttrs();
|
||||
const { t } = useI18n();
|
||||
// 上传modal
|
||||
const [registerUploadModal, { openModal: openUploadModal }] = useModal();
|
||||
|
||||
const fileList = ref<string[]>([]);
|
||||
|
||||
const showPreview = computed(() => {
|
||||
const { emptyHidePreview } = props;
|
||||
if (!emptyHidePreview) return true;
|
||||
return emptyHidePreview ? fileList.value.length > 0 : true;
|
||||
});
|
||||
|
||||
const bindValue = computed(() => {
|
||||
const value = { ...attrs, ...props };
|
||||
return omit(value, 'onChange');
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
(value = []) => {
|
||||
fileList.value = isArray(value) ? value : [];
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
|
||||
// 上传modal保存操作
|
||||
function handleChange(urls: string[]) {
|
||||
fileList.value = [...unref(fileList), ...(urls || [])];
|
||||
emit('update:value', fileList.value);
|
||||
emit('change', fileList.value);
|
||||
}
|
||||
|
||||
function handleDelete(record: Recordable<any>) {
|
||||
emit('delete', record);
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in New Issue