From 24050785690d3d6820bd32babd5944cc4a9bcd73 Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Fri, 26 Jul 2024 15:24:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=A2=A6=E5=A4=A9=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/option/mt/Mengtiandatapushback.js | 4 +- src/views/factory/mt/Mengtiandatapushback.vue | 53 +++++++++++++++++-- 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/src/option/mt/Mengtiandatapushback.js b/src/option/mt/Mengtiandatapushback.js index 55148666..4f13cbfd 100644 --- a/src/option/mt/Mengtiandatapushback.js +++ b/src/option/mt/Mengtiandatapushback.js @@ -124,7 +124,7 @@ export const columnList = [ { prop: 'createTime', label: '创建时间', - type: 2, + type: 1, values: '', width: '150', checkarr: [], @@ -136,7 +136,7 @@ export const columnList = [ { prop: 'updateTime', label: '更新时间', - type: 2, + type: 1, values: '', width: '150', checkarr: [], diff --git a/src/views/factory/mt/Mengtiandatapushback.vue b/src/views/factory/mt/Mengtiandatapushback.vue index dba0f4e2..28a00140 100644 --- a/src/views/factory/mt/Mengtiandatapushback.vue +++ b/src/views/factory/mt/Mengtiandatapushback.vue @@ -5,7 +5,34 @@ - + +
+ + + + + + +
+ 搜 索 @@ -102,6 +129,7 @@ import { downloadXls } from '@/utils/util'; import { useStore } from 'vuex'; import dayjs from 'dayjs'; import error from '@/error'; +const TopQuery = ref({}); const $router = useRouter(); //跳转 const $useStore = useStore(); //权限 const $route = useRoute(); //获取地址栏参数 @@ -222,6 +250,8 @@ const timesc = (index, row) => { if (!index) { delete details.query[row.prop]; } + processRowProperty(index, row, details); + onLoad(); }; /** 表格表头输入框搜索 */ @@ -240,7 +270,24 @@ const selectionChange = list => { }; // 网页顶部搜索按钮 const searchChange = () => { - details.search = false; //关闭搜索 + // 创建时间 + if (TopQuery.value.time1?.length) { + details.query.startCreateTime = dayjs(TopQuery.value.time1[1]).format('YYYY-MM-DD HH:mm:ss'); //创建时间开始 + details.query.endCreateTime = dayjs(TopQuery.value.time1[0]).format('YYYY-MM-DD HH:mm:ss'); //创建时间结束 + } else { + delete details.query.startCreateTime; + delete details.query.endCreateTime; + } + // 更新时间 + if (TopQuery.value.time2?.length) { + details.query.startUpdateTime = dayjs(TopQuery.value.time2[1]).format('YYYY-MM-DD HH:mm:ss'); //创建时间开始 + details.query.endUpdateTime = dayjs(TopQuery.value.time2[0]).format('YYYY-MM-DD HH:mm:ss'); //创建时间结束 + } else { + delete details.query.startUpdateTime; + delete details.query.endUpdateTime; + } + console.log(TopQuery.value, '日期'); + onLoad(); }; // 每页多少条 const sizeChange = val => { @@ -465,7 +512,7 @@ const searchReset = () => { .el-fr-d { width: 100%; display: flex; - justify-content: flex-end; + justify-content: space-between; .el-btn { margin-right: 0; } From bd3319bf6c2a4519e5db25c1c2d3012e4b2c3c5e Mon Sep 17 00:00:00 2001 From: xzg <4727863@qq.com> Date: Fri, 26 Jul 2024 15:37:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/factory/mt/Mengtiandatapushback.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/factory/mt/Mengtiandatapushback.vue b/src/views/factory/mt/Mengtiandatapushback.vue index 28a00140..fbbfaf27 100644 --- a/src/views/factory/mt/Mengtiandatapushback.vue +++ b/src/views/factory/mt/Mengtiandatapushback.vue @@ -272,16 +272,16 @@ const selectionChange = list => { const searchChange = () => { // 创建时间 if (TopQuery.value.time1?.length) { - details.query.startCreateTime = dayjs(TopQuery.value.time1[1]).format('YYYY-MM-DD HH:mm:ss'); //创建时间开始 - details.query.endCreateTime = dayjs(TopQuery.value.time1[0]).format('YYYY-MM-DD HH:mm:ss'); //创建时间结束 + details.query.startCreateTime = dayjs(TopQuery.value.time1[0]).format('YYYY-MM-DD HH:mm:ss'); //创建时间开始 + details.query.endCreateTime = dayjs(TopQuery.value.time1[1]).format('YYYY-MM-DD HH:mm:ss'); //创建时间结束 } else { delete details.query.startCreateTime; delete details.query.endCreateTime; } // 更新时间 if (TopQuery.value.time2?.length) { - details.query.startUpdateTime = dayjs(TopQuery.value.time2[1]).format('YYYY-MM-DD HH:mm:ss'); //创建时间开始 - details.query.endUpdateTime = dayjs(TopQuery.value.time2[0]).format('YYYY-MM-DD HH:mm:ss'); //创建时间结束 + details.query.startUpdateTime = dayjs(TopQuery.value.time2[0]).format('YYYY-MM-DD HH:mm:ss'); //创建时间开始 + details.query.endUpdateTime = dayjs(TopQuery.value.time2[1]).format('YYYY-MM-DD HH:mm:ss'); //创建时间结束 } else { delete details.query.startUpdateTime; delete details.query.endUpdateTime;