refactor: 修改cron默认值
This commit is contained in:
parent
39e3bcddd3
commit
2b64ad4cb4
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card" v-model="activeName">
|
||||||
<el-tab-pane :label="$t('schedule.cron.seconds')" v-if="shouldHide('second')">
|
<el-tab-pane name="second" :label="$t('schedule.cron.seconds')" v-if="shouldHide('second')">
|
||||||
<crontab-second
|
<crontab-second
|
||||||
@update="updateContabValue"
|
@update="updateContabValue"
|
||||||
:check="checkNumber"
|
:check="checkNumber"
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('schedule.cron.minutes')" v-if="shouldHide('min')">
|
<el-tab-pane name="min" :label="$t('schedule.cron.minutes')" v-if="shouldHide('min')">
|
||||||
<crontab-min
|
<crontab-min
|
||||||
@update="updateContabValue"
|
@update="updateContabValue"
|
||||||
:check="checkNumber"
|
:check="checkNumber"
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('schedule.cron.hours')" v-if="shouldHide('hour')">
|
<el-tab-pane name="hour" :label="$t('schedule.cron.hours')" v-if="shouldHide('hour')">
|
||||||
<crontab-hour
|
<crontab-hour
|
||||||
@update="updateContabValue"
|
@update="updateContabValue"
|
||||||
:check="checkNumber"
|
:check="checkNumber"
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('schedule.cron.day')" v-if="shouldHide('day')">
|
<el-tab-pane name="day" :label="$t('schedule.cron.day')" v-if="shouldHide('day')">
|
||||||
<crontab-day
|
<crontab-day
|
||||||
@update="updateContabValue"
|
@update="updateContabValue"
|
||||||
:check="checkNumber"
|
:check="checkNumber"
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('schedule.cron.month')" v-if="shouldHide('mouth')">
|
<el-tab-pane name="mouth" :label="$t('schedule.cron.month')" v-if="shouldHide('mouth')">
|
||||||
<crontab-mouth
|
<crontab-mouth
|
||||||
@update="updateContabValue"
|
@update="updateContabValue"
|
||||||
:check="checkNumber"
|
:check="checkNumber"
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('schedule.cron.weeks')" v-if="shouldHide('week')">
|
<el-tab-pane name="week" :label="$t('schedule.cron.weeks')" v-if="shouldHide('week')">
|
||||||
<crontab-week
|
<crontab-week
|
||||||
@update="updateContabValue"
|
@update="updateContabValue"
|
||||||
:check="checkNumber"
|
:check="checkNumber"
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('schedule.cron.years')" v-if="shouldHide('year')">
|
<el-tab-pane name="year" :label="$t('schedule.cron.years')" v-if="shouldHide('year')">
|
||||||
<crontab-year @update="updateContabValue"
|
<crontab-year @update="updateContabValue"
|
||||||
:check="checkNumber"
|
:check="checkNumber"
|
||||||
:cron="contabValueObj"
|
:cron="contabValueObj"
|
||||||
|
@ -142,6 +142,7 @@
|
||||||
week: "?",
|
week: "?",
|
||||||
year: "",
|
year: "",
|
||||||
},
|
},
|
||||||
|
activeName: 'hour'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: ["expression", "hideComponent"],
|
props: ["expression", "hideComponent"],
|
||||||
|
@ -319,9 +320,9 @@
|
||||||
// 还原选择项
|
// 还原选择项
|
||||||
// ("准备还原");
|
// ("准备还原");
|
||||||
this.contabValueObj = {
|
this.contabValueObj = {
|
||||||
second: "*",
|
second: "0",
|
||||||
min: "*",
|
min: "0",
|
||||||
hour: "*",
|
hour: "0/1",
|
||||||
day: "*",
|
day: "*",
|
||||||
mouth: "*",
|
mouth: "*",
|
||||||
week: "?",
|
week: "?",
|
||||||
|
@ -369,6 +370,7 @@
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
this.resolveExp();
|
this.resolveExp();
|
||||||
|
this.activeName = 'hour';
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue