feat(定时): 缺陷同步频率自定义cron
This commit is contained in:
parent
03aa7c888d
commit
f3bf0a16e6
|
@ -70,19 +70,7 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- 同步频率 -->
|
<!-- 同步频率 -->
|
||||||
<a-form-item field="CRON_EXPRESSION" :label="t('project.menu.CRON_EXPRESSION')">
|
<a-form-item field="CRON_EXPRESSION" :label="t('project.menu.CRON_EXPRESSION')">
|
||||||
<a-select v-model="form.CRON_EXPRESSION">
|
<MsCronSelect v-model:model-value="form.CRON_EXPRESSION" />
|
||||||
<a-option v-for="data in frequencyOption" :key="data.value" :value="data.value">
|
|
||||||
<span class="text-[var(--color-text-2)]"> {{ data.label }}</span
|
|
||||||
><span class="ml-1 text-[var(--color-text-n4)] hover:text-[rgb(var(--primary-5))]">
|
|
||||||
{{ data.extra }}
|
|
||||||
</span>
|
|
||||||
</a-option>
|
|
||||||
<!-- <a-option value="custom">
|
|
||||||
<div class="border-t-1 cursor-pointer text-[rgb(var(--primary-5))]">{{
|
|
||||||
t('project.menu.defect.customLabel')
|
|
||||||
}}</div>
|
|
||||||
</a-option>-->
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<template v-if="platformOption.length" #footerLeft>
|
<template v-if="platformOption.length" #footerLeft>
|
||||||
|
@ -124,6 +112,7 @@
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { FormInstance, Message } from '@arco-design/web-vue';
|
import { FormInstance, Message } from '@arco-design/web-vue';
|
||||||
|
|
||||||
|
import MsCronSelect from '@/components/pure/ms-cron-select/index.vue';
|
||||||
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
|
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
|
||||||
import MsFormCreate from '@/components/pure/ms-form-create/ms-form-create.vue';
|
import MsFormCreate from '@/components/pure/ms-form-create/ms-form-create.vue';
|
||||||
import type { FormItem, FormRuleItem } from '@/components/pure/ms-form-create/types';
|
import type { FormItem, FormRuleItem } from '@/components/pure/ms-form-create/types';
|
||||||
|
@ -153,12 +142,6 @@
|
||||||
const formCreateValue = ref<Record<string, any>>({});
|
const formCreateValue = ref<Record<string, any>>({});
|
||||||
const currentVisible = ref<boolean>(props.visible);
|
const currentVisible = ref<boolean>(props.visible);
|
||||||
const platformOption = ref<PoolOption[]>([]);
|
const platformOption = ref<PoolOption[]>([]);
|
||||||
const frequencyOption = ref([
|
|
||||||
{ label: '0 0 0/1 * * ?', extra: '(每隔1小时)', value: '0 0 0/1 * * ?' },
|
|
||||||
{ label: '0 0 0/6 * * ?', extra: '(每隔6小时)', value: '0 0 0/6 * * ?' },
|
|
||||||
{ label: '0 0 0/12 * * ?', extra: '(每隔12小时)', value: '0 0 0/12 * * ?' },
|
|
||||||
{ label: '0 0 0 * * ?', extra: '(每隔一天)', value: '0 0 0 * * ?' },
|
|
||||||
]);
|
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const licenseStore = useLicenseStore();
|
const licenseStore = useLicenseStore();
|
||||||
|
|
Loading…
Reference in New Issue