From bcb1535d4d5d1725c3cbe2f4c1d19f155290745f Mon Sep 17 00:00:00 2001 From: stt Date: Wed, 3 Dec 2025 13:26:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=8E=86=E5=8F=AA=E6=9C=88=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cockpit/transientDetails/index.vue | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/src/components/cockpit/transientDetails/index.vue b/src/components/cockpit/transientDetails/index.vue index 618bd90..9f52e03 100644 --- a/src/components/cockpit/transientDetails/index.vue +++ b/src/components/cockpit/transientDetails/index.vue @@ -68,7 +68,8 @@ const prop = defineProps({ width: { type: [String, Number] }, height: { type: [String, Number] }, timeKey: { type: [String, Number] }, - timeValue: { type: Object } + timeValue: { type: Object }, + interval: { type: [String, Number] } }) const headerHeight = ref(57) @@ -119,9 +120,14 @@ const tableStore: any = new TableStore({ column: [], beforeSearchFun: () => { - if (!fullscreen.value && prop.timeValue && Array.isArray(prop.timeValue)) { - tableStore.table.params.searchBeginTime = prop.timeValue[0] - tableStore.table.params.searchEndTime = prop.timeValue[1] + if (!fullscreen.value) { + if (prop.interval == 3 && prop.timeValue && Array.isArray(prop.timeValue)) { + tableStore.table.params.searchBeginTime = prop.timeValue[0] + tableStore.table.params.searchEndTime = prop.timeValue[1] + } else { + tableStore.table.params.searchBeginTime = '2025-12-1' + tableStore.table.params.searchEndTime = '2025-12-31' + } } }, @@ -152,7 +158,13 @@ onMounted(() => { TableHeaderRef.value.setDatePicker([{ label: '月份', value: 3 }]) } if (fullscreen.value) { - TableHeaderRef.value.setInterval(3) + if (prop.interval == 3 && prop.timeValue && Array.isArray(prop.timeValue)) { + tableStore.table.params.searchBeginTime = prop.timeValue[0] || tableStore.table.params.searchBeginTime + tableStore.table.params.searchEndTime = prop.timeValue[1] || tableStore.table.params.searchEndTime + TableHeaderRef.value.setTimeInterval(prop.timeValue) + } else { + TableHeaderRef.value.setInterval(3) + } } tableStore.index() }) @@ -160,7 +172,16 @@ onMounted(() => { watch( () => prop.timeKey, val => { - tableStore.index() + // tableStore.index() + } +) + +watch( + () => prop.interval, + val => { + if (val == 3) { + tableStore.index() + } } ) watch( @@ -183,7 +204,7 @@ watch( ) // 电压暂降点击事件 -const descentClick = (item:any) => { +const descentClick = (item: any) => { transientListRef.value.open(item.name) }