处理时间格式

This commit is contained in:
dragon
2024-08-30 18:50:20 +08:00
parent b362a25028
commit 9f2b89d0be
2 changed files with 6 additions and 4 deletions

View File

@@ -113,6 +113,7 @@
import { chargeAgentList, chargeAgentSum } from "@/api/relAgency/relAgency.js";
import TablePagination from "@/components/common/TablePagination";
import { formatDate, formatDateYMD } from "@/utils/relDate";
import { dateFormat } from "@/utils/system-helper";
// @ts-ignore
import { ElMessage } from "element-plus";
import { ref } from "vue";
@@ -176,8 +177,8 @@ export default {
this.tableLoading = true;
let { pageParams, searchForm } = this;
searchForm.startTime = formatDate(searchForm.startTime )
searchForm.endTime = formatDate(searchForm.endTime )
searchForm.startTime = dateFormat(searchForm.startTime,'yyyy-MM-dd hh:mm:ss');
searchForm.endTime = dateFormat(searchForm.endTime,'yyyy-MM-dd hh:mm:ss');
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {

View File

@@ -158,6 +158,7 @@ import {
} from "@/api/relAgency/relAgency.js";
import TablePagination from "@/components/common/TablePagination";
import { formatDate, formatDateYMD } from "@/utils/relDate";
import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus";
import { ElMessageBox } from 'element-plus'; // 正确引入 ElM
// 混入
@@ -225,8 +226,8 @@ export default {
this.tableLoading = true;
let { pageParams, searchForm } = this;
searchForm.startTime = formatDate(searchForm.startTime )
searchForm.endTime = formatDate(searchForm.endTime )
searchForm.startTime = dateFormat(searchForm.startTime,'yyyy-MM-dd hh:mm:ss');
searchForm.endTime = dateFormat(searchForm.endTime,'yyyy-MM-dd hh:mm:ss');
searchForm = JSON.parse(JSON.stringify(searchForm));
pageParams = JSON.parse(JSON.stringify(pageParams));
Object.keys(searchForm).forEach((item) => {