巡查台账-人员和点位添加筛选条件巡查日期
parent
0a52e2742a
commit
d12b8a8a9f
|
|
@ -32,12 +32,13 @@ import ShowListModal from './ShowListModal/index.vue'
|
|||
import { GetPointPunchStatistics, getPointCountApi } from '@/api/illegalconstruction/statistical'
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from "axios";
|
||||
import dayjs from "dayjs";
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
const showListModal = ref(false)
|
||||
const showListModalTitle = ref('')
|
||||
const showListModalId = ref('')
|
||||
const showListModalType = ref('')
|
||||
const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPagination, setLoading }] =useTable({
|
||||
const [registerTable, { getForm }] =useTable({
|
||||
title: '巡查台账-点位',
|
||||
api: GetPointPunchStatistics,
|
||||
columns,
|
||||
|
|
@ -53,6 +54,18 @@ const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPaginatio
|
|||
handleSearchInfoFn(info) {
|
||||
return info;
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
let result = {
|
||||
...params,
|
||||
};
|
||||
if(params.begindate){
|
||||
result.begindate = dayjs(params.begindate).startOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
if(params.enddate){
|
||||
result.enddate = dayjs(params.enddate).endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
return result;
|
||||
},
|
||||
// actionColumn: {
|
||||
// width: 80,
|
||||
// title: '操作',
|
||||
|
|
@ -63,9 +76,18 @@ const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPaginatio
|
|||
const onBtnClicked = (domId) => {
|
||||
switch (domId) {
|
||||
case 'btnExport':
|
||||
const form = getForm();
|
||||
const params = form.getFieldsValue();
|
||||
if(params.begindate){
|
||||
params.begindate = dayjs(params.begindate).startOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
if(params.enddate){
|
||||
params.enddate = dayjs(params.enddate).endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
axios({
|
||||
method: 'get',
|
||||
url: VITE_GLOB_API_URL + '/api/MiViolationReport/ExportPointPunchStatistics',
|
||||
params,
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('X-Token'),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -39,14 +39,14 @@ export const searchFormSchema = [
|
|||
// component: 'Input',
|
||||
// colProps: { span: 4 },
|
||||
// },
|
||||
// {
|
||||
// field: '[begindate, enddate]',
|
||||
// label: '巡查时间',
|
||||
// component: 'RangePicker',
|
||||
// colProps: { span: 5 },
|
||||
// componentProps: {
|
||||
// format: 'YYYY-MM-DD',
|
||||
// placeholder: ['开始日期', '结束日期'],
|
||||
// },
|
||||
// },
|
||||
{
|
||||
field: '[begindate, enddate]',
|
||||
label: '巡查日期',
|
||||
component: 'RangePicker',
|
||||
colProps: { span: 5 },
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
@ -31,12 +31,13 @@ import Map from '@/components/illegalconstruction/Map.vue'
|
|||
import { GetPunchStatistics, getUserCountApi } from '@/api/illegalconstruction/statistical'
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from "axios";
|
||||
import dayjs from "dayjs";
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
|
||||
const mapVisible = ref(false);
|
||||
const mapRef = ref(null);
|
||||
const modalData = ref([]);
|
||||
const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPagination, setLoading }] =useTable({
|
||||
const [registerTable, { getForm }] =useTable({
|
||||
title: '巡查台账-人员',
|
||||
api: GetPunchStatistics,
|
||||
columns,
|
||||
|
|
@ -52,6 +53,19 @@ const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPaginatio
|
|||
handleSearchInfoFn(info) {
|
||||
return info;
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
let result = {
|
||||
...params,
|
||||
};
|
||||
if(params.begindate){
|
||||
result.begindate = dayjs(params.begindate).startOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
if(params.enddate){
|
||||
result.enddate = dayjs(params.enddate).endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
// actionColumn: {
|
||||
// width: 80,
|
||||
// title: '操作',
|
||||
|
|
@ -62,9 +76,18 @@ const [registerTable, { setTableData, reload, clearSelectedRowKeys, setPaginatio
|
|||
const onBtnClicked = (domId) => {
|
||||
switch (domId) {
|
||||
case 'btnExport':
|
||||
const form = getForm();
|
||||
const params = form.getFieldsValue();
|
||||
if(params.begindate){
|
||||
params.begindate = dayjs(params.begindate).startOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
if(params.enddate){
|
||||
params.enddate = dayjs(params.enddate).endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
axios({
|
||||
method: 'get',
|
||||
url: VITE_GLOB_API_URL + '/api/MiViolationReport/ExportPunchStatistics',
|
||||
params,
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem('X-Token'),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,14 +31,14 @@ export const searchFormSchema = [
|
|||
// component: 'Input',
|
||||
// colProps: { span: 4 },
|
||||
// },
|
||||
// {
|
||||
// field: '[begindate, enddate]',
|
||||
// label: '巡查时间',
|
||||
// component: 'RangePicker',
|
||||
// colProps: { span: 5 },
|
||||
// componentProps: {
|
||||
// format: 'YYYY-MM-DD',
|
||||
// placeholder: ['开始日期', '结束日期'],
|
||||
// },
|
||||
// },
|
||||
{
|
||||
field: '[begindate, enddate]',
|
||||
label: '巡查日期',
|
||||
component: 'RangePicker',
|
||||
colProps: { span: 5 },
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
placeholder: ['开始日期', '结束日期'],
|
||||
},
|
||||
},
|
||||
]
|
||||
Loading…
Reference in New Issue