From c8a15d56ae924c33bde1ee80af4658ac0a01a3c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E6=99=8B=E9=A3=9E?= <378266566@qq.com> Date: Tue, 23 Dec 2025 17:53:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:EXA=E5=8E=86=E5=8F=B2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E4=B8=8B=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/exa/config/HistoryModal.vue | 10 +++------- src/views/exa/exa.data.ts | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/views/exa/config/HistoryModal.vue b/src/views/exa/config/HistoryModal.vue index 69c9b2e..37f6a16 100644 --- a/src/views/exa/config/HistoryModal.vue +++ b/src/views/exa/config/HistoryModal.vue @@ -10,6 +10,7 @@ import { BasicModal, useModalInner } from '@/components/Modal' import { BasicForm, useForm } from '@/components/Form' import { getExaHistorys } from '@/api/alert/exa' +import {EXAHistoryReqVO} from "@/api/alert/warn"; const props = defineProps({ itemName: { @@ -65,14 +66,9 @@ const [registerHistoryModal, { setModalProps }] = useModalInner(async (data) => }) async function handleSubmitR() { - const serachFormData = getFieldsValue() + const exaHistoryReqVO = getFieldsValue() as EXAHistoryReqVO loading.value = true - const exaHistoryReqVO = { - startTime: serachFormData.startTime, - endTime: serachFormData.endTime, - itemName: props.itemName, - interval: 100, - } + exaHistoryReqVO.itemName = props.itemName historyData.value = await getExaHistorys(exaHistoryReqVO) loading.value = false diff --git a/src/views/exa/exa.data.ts b/src/views/exa/exa.data.ts index 0f70af0..ac2f938 100644 --- a/src/views/exa/exa.data.ts +++ b/src/views/exa/exa.data.ts @@ -127,4 +127,18 @@ export const formHistory: FormSchema[] = [ }, }, }, + { + label: '时间间隔', + field: 'interval', + component: 'Select', + defaultValue: 60, + labelWidth:100, + componentProps: { + options: [{ value: 60, label: '60秒' }, { value: 100, label: '100秒' }, { value: 300, label: '300秒' }], + }, + required: true, + colProps: { + span: 5, + }, + }, ] From 542f9a4777407579f4a61c3d217eb9a716059d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E6=99=8B=E9=A3=9E?= <378266566@qq.com> Date: Tue, 23 Dec 2025 19:26:02 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E9=9B=86=E4=B8=AD=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E9=97=B4=E9=9A=94=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/warn/alarm/TrendModal.vue | 4 +- src/views/warn/alarm/alarm.data.ts | 72 ++++++++++++++--------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/views/warn/alarm/TrendModal.vue b/src/views/warn/alarm/TrendModal.vue index 6410544..013a707 100644 --- a/src/views/warn/alarm/TrendModal.vue +++ b/src/views/warn/alarm/TrendModal.vue @@ -3,7 +3,7 @@ import { ref } from 'vue' import moment from 'moment' import { Card } from 'ant-design-vue' -import { formTrend } from './alarm.data' +import { formHistory } from '../../exa/exa.data' import HistoryLine from '../../exa/HistoryLine.vue' import { BasicModal, useModalInner } from '@/components/Modal' @@ -21,7 +21,7 @@ const loading = ref(true) const [registerForm, { getFieldsValue }] = useForm({ labelWidth: 100, // baseColProps: { span: 24 }, - schemas: formTrend, + schemas: formHistory, showResetButton: false, layout: 'horizontal', model: { time: [moment().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'), moment().format('YYYY-MM-DD HH:mm:ss')] }, diff --git a/src/views/warn/alarm/alarm.data.ts b/src/views/warn/alarm/alarm.data.ts index cc6c8f6..a5108c1 100644 --- a/src/views/warn/alarm/alarm.data.ts +++ b/src/views/warn/alarm/alarm.data.ts @@ -208,40 +208,40 @@ export const columns: BasicColumn[] = [ ] -export const formTrend: FormSchema[] = [ - { - label: '时间', - field: 'time', - show: true, - component: 'RangePicker', - componentProps: { - placeholder: ['开始时间', '结束时间'], - defaultValue: [moment().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'), moment().format('YYYY-MM-DD HH:mm:ss')], - valueFormat: 'YYYY-MM-DD HH:mm:ss', - showTime: { - defaultValue: [moment().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'), moment().format('YYYY-MM-DD HH:mm:ss')], - }, - onChange: (e: any) => { - console.log(e) - }, - colProps: { - span: 8, - }, - }, - }, - { - label: '时间间隔', - field: 'interval', - component: 'Select', - defaultValue: 60, - labelWidth:100, - componentProps: { - options: [{ value: 60, label: '60秒' }, { value: 100, label: '100秒' }, { value: 300, label: '300秒' }], - }, - required: true, - colProps: { - span: 5, - }, - }, -] +// export const formTrend: FormSchema[] = [ +// { +// label: '时间', +// field: 'time', +// show: true, +// component: 'RangePicker', +// componentProps: { +// placeholder: ['开始时间', '结束时间'], +// defaultValue: [moment().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'), moment().format('YYYY-MM-DD HH:mm:ss')], +// valueFormat: 'YYYY-MM-DD HH:mm:ss', +// showTime: { +// defaultValue: [moment().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss'), moment().format('YYYY-MM-DD HH:mm:ss')], +// }, +// onChange: (e: any) => { +// console.log(e) +// }, +// colProps: { +// span: 8, +// }, +// }, +// }, +// { +// label: '时间间隔', +// field: 'interval', +// component: 'Select', +// defaultValue: 60, +// labelWidth:100, +// componentProps: { +// options: [{ value: 60, label: '60秒' }, { value: 100, label: '100秒' }, { value: 300, label: '300秒' }], +// }, +// required: true, +// colProps: { +// span: 5, +// }, +// }, +// ]