四个统计报表导出及对接接口
parent
10b40fad94
commit
666e2e871f
|
|
@ -17,6 +17,9 @@ import { PermissionBtn } from '@/components/PermissionBtn/index';
|
|||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { columns, searchFormSchema } from './utils'
|
||||
import { GetReportStatistics } from '@/api/illegalconstruction/statistical'
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from "axios";
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPagination, setLoading }] =useTable({
|
||||
title: '违法处置台账',
|
||||
api: GetReportStatistics,
|
||||
|
|
@ -43,6 +46,23 @@ const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPaginatio
|
|||
const onBtnClicked = (domId) => {
|
||||
switch (domId) {
|
||||
case 'btnExport':
|
||||
axios({
|
||||
method: 'get',
|
||||
url: VITE_GLOB_API_URL + '/api/MiViolationReport/ExportViolationReportDetails',
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('X-Token'),
|
||||
},
|
||||
responseType: 'blob',
|
||||
}).then((res) => {
|
||||
const elink = document.createElement('a');
|
||||
elink.download = '违法处置台账' + new Date().getTime() + '.xls';
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(res.data);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href);
|
||||
document.body.removeChild(elink);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ import { PermissionBtn } from '@/components/PermissionBtn/index';
|
|||
import { BasicTable, useTable, TableAction } from '@/components/Table';
|
||||
import { columns, searchFormSchema } from './utils'
|
||||
import { LoadPunchRecordPage } from '@/api/illegalconstruction/statistical'
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from "axios";
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPagination, setLoading }] =useTable({
|
||||
title: '巡查台账清单',
|
||||
api: LoadPunchRecordPage,
|
||||
|
|
@ -38,6 +41,23 @@ const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPaginatio
|
|||
const onBtnClicked = (domId) => {
|
||||
switch (domId) {
|
||||
case 'btnExport':
|
||||
axios({
|
||||
method: 'get',
|
||||
url: VITE_GLOB_API_URL + '/api/MiViolationReport/ExportPunchRecordDetails',
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('X-Token'),
|
||||
},
|
||||
responseType: 'blob',
|
||||
}).then((res) => {
|
||||
const elink = document.createElement('a');
|
||||
elink.download = '巡查台账清单' + new Date().getTime() + '.xls';
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(res.data);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href);
|
||||
document.body.removeChild(elink);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ import { BasicTable, useTable, TableAction } from '@/components/Table';
|
|||
import { columns, searchFormSchema } from './utils'
|
||||
import ShowListModal from './ShowListModal/index.vue'
|
||||
import { GetPointPunchStatistics, getPointCountApi } from '@/api/illegalconstruction/statistical'
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from "axios";
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
const showListModal = ref(false)
|
||||
const showListModalTitle = ref('')
|
||||
const showListModalId = ref('')
|
||||
|
|
@ -60,6 +63,23 @@ const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPaginatio
|
|||
const onBtnClicked = (domId) => {
|
||||
switch (domId) {
|
||||
case 'btnExport':
|
||||
axios({
|
||||
method: 'get',
|
||||
url: VITE_GLOB_API_URL + '/api/MiViolationReport/ExportPointPunchStatistics',
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('X-Token'),
|
||||
},
|
||||
responseType: 'blob',
|
||||
}).then((res) => {
|
||||
const elink = document.createElement('a');
|
||||
elink.download = '巡查台账点位' + new Date().getTime() + '.xls';
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(res.data);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href);
|
||||
document.body.removeChild(elink);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ import { BasicTable, useTable, TableAction } from '@/components/Table';
|
|||
import { columns, searchFormSchema } from './utils'
|
||||
import Map from '@/components/illegalconstruction/Map.vue'
|
||||
import { GetPunchStatistics, getUserCountApi } from '@/api/illegalconstruction/statistical'
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from "axios";
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
|
||||
const mapVisible = ref(false);
|
||||
const mapRef = ref(null);
|
||||
|
|
@ -59,6 +62,23 @@ const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPaginatio
|
|||
const onBtnClicked = (domId) => {
|
||||
switch (domId) {
|
||||
case 'btnExport':
|
||||
axios({
|
||||
method: 'get',
|
||||
url: VITE_GLOB_API_URL + '/api/MiViolationReport/ExportPunchStatistics',
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('X-Token'),
|
||||
},
|
||||
responseType: 'blob',
|
||||
}).then((res) => {
|
||||
const elink = document.createElement('a');
|
||||
elink.download = '巡查台账人员' + new Date().getTime() + '.xls';
|
||||
elink.style.display = 'none';
|
||||
elink.href = URL.createObjectURL(res.data);
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
URL.revokeObjectURL(elink.href);
|
||||
document.body.removeChild(elink);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue