From b56aa544ede791d7e4cfe5dcb16fa8a30ba2d09e Mon Sep 17 00:00:00 2001 From: nanasikeai Date: Fri, 11 Oct 2024 17:47:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=80=90=E7=AD=96=E7=95=A5=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E3=80=91=E7=AD=96=E7=95=A5=E9=85=8D=E7=BD=AE=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=AE=9E=E6=97=B6=E4=B8=8E=E9=9D=9E=E5=AE=9E=E6=97=B6?= =?UTF-8?q?=E9=93=BE=E8=B7=AF=20--story=3D119522802?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/strategy-manage/language/en.js | 4 + .../src/views/strategy-manage/language/zh.js | 4 + .../step1/components/aiops/index.vue | 114 +++++++++++------- 3 files changed, 81 insertions(+), 41 deletions(-) diff --git a/src/frontend/src/views/strategy-manage/language/en.js b/src/frontend/src/views/strategy-manage/language/en.js index 7c825d4..18dd34e 100644 --- a/src/frontend/src/views/strategy-manage/language/en.js +++ b/src/frontend/src/views/strategy-manage/language/en.js @@ -213,5 +213,9 @@ export default { '在单据页,鼠标移入label,即可显示字段说明': 'On the ticket page, move the mouse into the label to display the field description', 请输入风险单名称: 'Please enter the name of the risk order', 请选择通知组: 'Please select a notification group', + 调度方式: 'Scheduling method', + 固定周期调度: 'Periodic scheduling', + 实时调度: 'Real-time scheduling', + 策略实时运行: 'Strategies run in real time', }, }; diff --git a/src/frontend/src/views/strategy-manage/language/zh.js b/src/frontend/src/views/strategy-manage/language/zh.js index 8334a0b..6b7fc80 100644 --- a/src/frontend/src/views/strategy-manage/language/zh.js +++ b/src/frontend/src/views/strategy-manage/language/zh.js @@ -220,5 +220,9 @@ export default { '在单据页,鼠标移入label,即可显示字段说明': '在单据页,鼠标移入label,即可显示字段说明', 请输入风险单名称: '请输入风险单名称', 请选择通知组: '请选择通知组', + 调度方式: '调度方式', + 固定周期调度: '固定周期调度', + 实时调度: '实时调度', + 策略实时运行: '策略实时运行', }, }; diff --git a/src/frontend/src/views/strategy-manage/strategy-create/components/step1/components/aiops/index.vue b/src/frontend/src/views/strategy-manage/strategy-create/components/step1/components/aiops/index.vue index cd3277e..19e1047 100644 --- a/src/frontend/src/views/strategy-manage/strategy-create/components/step1/components/aiops/index.vue +++ b/src/frontend/src/views/strategy-manage/strategy-create/components/step1/components/aiops/index.vue @@ -73,51 +73,71 @@
- - {{ t('调度周期') }} - -
- - - - - - - - -
+ + + + {{ t('固定周期调度') }} + + + + {{ t('实时调度') }} + + + + +
@@ -280,6 +300,18 @@ if (!isInit) return; emits('updateDataSource', dataSource); }; + const handleSourceTypeChange = (type: string) => { + if (type === 'stream_source') { + formData.value.configs.aiops_config = { + count_freq: '', + schedule_period: 'hour', + }; + } + emits('updateAiopsConfig', formData.value.configs.data_source.source_type !== 'stream_source' + ? formData.value.configs.aiops_config + : undefined); + emits('updateDataSource', formData.value.configs.data_source); + }; watch(() => props.controlDetail, (data) => { if (data && data.input_config) {