feat(sj_1.0.0): 优化间隔时间展示
This commit is contained in:
parent
452f70103c
commit
d678b5acaa
@ -123,3 +123,33 @@ export const routeKeyRecord: Record<Api.RetryScene.RouteKey, App.I18n.I18nKey> =
|
||||
4: 'page.retryScene.routeKeyItem.round'
|
||||
};
|
||||
export const routeKeyRecordOptions = transformRecordToNumberOption(routeKeyRecord, true);
|
||||
|
||||
/** 延迟等级 */
|
||||
export const DelayLevel: Record<number, string> = {
|
||||
1: '10s',
|
||||
2: '15s',
|
||||
3: '30s',
|
||||
4: '35s',
|
||||
5: '40s',
|
||||
6: '50s',
|
||||
7: '1m',
|
||||
8: '2m',
|
||||
9: '4m',
|
||||
10: '6m',
|
||||
11: '8m',
|
||||
12: '10m',
|
||||
13: '20m',
|
||||
14: '40m',
|
||||
15: '1h',
|
||||
16: '2h',
|
||||
17: '3h',
|
||||
18: '4h',
|
||||
19: '5h',
|
||||
20: '6h',
|
||||
21: '7h',
|
||||
22: '8h',
|
||||
23: '9h',
|
||||
24: '10h',
|
||||
25: '11h',
|
||||
26: '12h'
|
||||
};
|
||||
|
2
src/typings/components.d.ts
vendored
2
src/typings/components.d.ts
vendored
@ -42,6 +42,8 @@ declare module 'vue' {
|
||||
NCard: typeof import('naive-ui')['NCard']
|
||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||
NCheckboxGroup: typeof import('naive-ui')['NCheckboxGroup']
|
||||
NCollapse: typeof import('naive-ui')['NCollapse']
|
||||
NCollapseItem: typeof import('naive-ui')['NCollapseItem']
|
||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||
NDataTable: typeof import('naive-ui')['NDataTable']
|
||||
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||
|
@ -5,7 +5,12 @@ import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
||||
import OperateDrawer from '@/components/common/operate-drawer.vue';
|
||||
import { $t } from '@/locales';
|
||||
import { fetchAddRetryScene, fetchEditRetryScene, fetchGetAllGroupNameList } from '@/service/api';
|
||||
import { backOffRecordOptions, enableStatusNumberOptions, routeKeyRecordOptions } from '@/constants/business';
|
||||
import {
|
||||
DelayLevel,
|
||||
backOffRecordOptions,
|
||||
enableStatusNumberOptions,
|
||||
routeKeyRecordOptions
|
||||
} from '@/constants/business';
|
||||
import { translateOptions, translateOptions2 } from '@/utils/common';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
|
||||
@ -258,14 +263,22 @@ watch(visible, () => {
|
||||
/>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.retryScene.triggerInterval')" path="triggerInterval">
|
||||
<CronInput v-if="model.backOff === 3" v-model:value="model.triggerInterval as any" :lang="app.locale" />
|
||||
<NInputNumber
|
||||
v-if="model.backOff === 2 || model.backOff === 4"
|
||||
v-else-if="model.backOff === 2 || model.backOff === 4"
|
||||
v-model:value="model.triggerInterval as any"
|
||||
:placeholder="$t('page.retryScene.form.triggerInterval')"
|
||||
clearable
|
||||
/>
|
||||
|
||||
<CronInput v-if="model.backOff === 3" v-model:value="model.triggerInterval as any" :lang="app.locale" />
|
||||
<div v-else>
|
||||
<NCollapse>
|
||||
<NCollapseItem title="间隔时间详情" name="1">
|
||||
<p v-for="(item, index) in model.maxRetryCount" :key="index">
|
||||
第{{ item }}次: {{ DelayLevel[item as keyof typeof DelayLevel] }}
|
||||
</p>
|
||||
</NCollapseItem>
|
||||
</NCollapse>
|
||||
</div>
|
||||
</NFormItem>
|
||||
<NFormItem :label="$t('page.retryScene.maxRetryCount')" path="maxRetryCount">
|
||||
<NInputNumber
|
||||
|
Loading…
Reference in New Issue
Block a user