Browse Source

fix:EXA历史增加时间下拉框

pull/88/head
肖晋飞 3 weeks ago
parent
commit
c8a15d56ae
  1. 10
      src/views/exa/config/HistoryModal.vue
  2. 14
      src/views/exa/exa.data.ts

10
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

14
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,
},
},
]

Loading…
Cancel
Save