From 09326b287e76b951696e1048cf38130ff8c9c17e Mon Sep 17 00:00:00 2001 From: stt Date: Tue, 25 Nov 2025 11:38:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=80=81=E4=BA=8B=E4=BB=B6=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E9=A1=B5=E9=9D=A2=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/cockpit/F47Curve/index.vue | 2 +- .../cockpit/transientDetails/index.vue | 127 +++++++++--------- 2 files changed, 67 insertions(+), 62 deletions(-) diff --git a/src/components/cockpit/F47Curve/index.vue b/src/components/cockpit/F47Curve/index.vue index e029702..c7d4c50 100644 --- a/src/components/cockpit/F47Curve/index.vue +++ b/src/components/cockpit/F47Curve/index.vue @@ -113,7 +113,7 @@ const tableStore: any = new TableStore({ data.gs = tableStore.table.data.length data.krr = gongData.pointI.length data.bkrr = gongData.pointIun.length - console.log(gongData,'789000') + // console.log(gongData,'789000') echartList.value = { title: { text: `F47曲线` diff --git a/src/components/cockpit/transientDetails/index.vue b/src/components/cockpit/transientDetails/index.vue index 8098ace..48aae92 100644 --- a/src/components/cockpit/transientDetails/index.vue +++ b/src/components/cockpit/transientDetails/index.vue @@ -18,24 +18,24 @@ effect="dark" placement="top" :hide-after="0" - v-if="list?.filter(item => item.time == data.day)[0]?.type || false" + v-if="hasEventData(data.day)" >
-
电压暂降:{{ item.type || '' }}
-
电压中断:{{ item.type1 || '' }}
-
电压暂升:{{ item.type2 || '' }}
+
电压暂降:{{ item.eventDown || 0 }}
+
电压中断:{{ item.eventOff || 0 }}
+
电压暂升:{{ item.eventUp || 0 }}
@@ -66,8 +66,12 @@ const prop = defineProps({ const headerHeight = ref(57) -const route = useRoute() -const timeCacheStore = useTimeCacheStore() +const hasEventData = (day: string) => { + const item = list.value?.find((item: any) => item.name == day); + if (!item) return false; + + return (item.eventDown || item.eventOff || item.eventUp) > 0; +} const selectChange = (showSelect: any, height: any, datePickerValue?: any) => { headerHeight.value = height @@ -95,53 +99,54 @@ dayjs.en.weekStart = 1 //设置日历的周起始日为星期一 const value = ref(new Date()) const transientListRef = ref() -const list = ref([ - { - time: '2025-10-01', - key: 81, - type: 1, - type1: 1, - type2: 1 - }, - { - time: '2025-10-31', - key: 81, - type: 1, - type1: 1, - type2: 1 - }, - { - time: '2025-10-08', - key: 20, - type: 1, - type1: 1, - type2: 1 - }, - { - time: '2025-10-16', - key: 20, - type: 1, - type1: 1, - type2: 1 - }, - { - time: '2025-10-23', - key: 20, - type: 1, - type1: 1, - type2: 1 - }, - { - time: '2025-10-04', - key: 0 - }, - { - time: '2025-10-05', - key: 0 - } -]) +const list = ref() +// const list = ref([ +// { +// time: '2025-10-01', +// key: 81, +// type: 1, +// type1: 1, +// type2: 1 +// }, +// { +// time: '2025-10-31', +// key: 81, +// type: 1, +// type1: 1, +// type2: 1 +// }, +// { +// time: '2025-10-08', +// key: 20, +// type: 1, +// type1: 1, +// type2: 1 +// }, +// { +// time: '2025-10-16', +// key: 20, +// type: 1, +// type1: 1, +// type2: 1 +// }, +// { +// time: '2025-10-23', +// key: 20, +// type: 1, +// type1: 1, +// type2: 1 +// }, +// { +// time: '2025-10-04', +// key: 0 +// }, +// { +// time: '2025-10-05', +// key: 0 +// } +// ]) const tableStore: any = new TableStore({ - url: '/user-boot/dept/deptTree', + url: '/cs-harmonic-boot/csevent/getEventDate', method: 'POST', showPage: false, @@ -154,16 +159,16 @@ const tableStore: any = new TableStore({ }, loadCallback: () => { - tableStore.table.data = [] + list.value = tableStore.table.data } }) const setBackground = (value: string) => { let data = [] - data = list.value?.filter(item => item.time == value) + data = list.value?.filter((item: any) => item.name == value) if (data && data?.length > 0) { - if (data[0].key > 0) { + if (data[0].eventDown > 0 || data[0].eventOff > 0 || data[0].eventUp > 0) { return '#Ff660090' } }