mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
fix: 修复crontab月组件名称错误问题
This commit is contained in:
@@ -29,9 +29,9 @@
|
||||
/>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane v-if="shouldHide('mouth')" :label="this.$t('common.CronTab.mouth')">
|
||||
<CrontabMouth
|
||||
ref="cronmouth"
|
||||
<el-tab-pane v-if="shouldHide('month')" :label="this.$t('common.CronTab.month')">
|
||||
<CrontabMonth
|
||||
ref="cronmonth"
|
||||
:check="checkNumber"
|
||||
:cron="contabValueObj"
|
||||
@update="updateContabValue"
|
||||
@@ -81,7 +81,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<el-input
|
||||
v-model.trim="contabValueObj.mouth"
|
||||
v-model.trim="contabValueObj.month"
|
||||
size="small"
|
||||
onkeyup="value=value.replace(/[^\0-9\-\*\,]/g,'')"
|
||||
/>
|
||||
@@ -125,7 +125,7 @@
|
||||
import CrontabMin from './components/Crontab-Min.vue'
|
||||
import CrontabHour from './components/Crontab-Hour.vue'
|
||||
import CrontabDay from './components/Crontab-Day.vue'
|
||||
import CrontabMouth from './components/Crontab-Mouth.vue'
|
||||
import CrontabMonth from './components/Crontab-Month.vue'
|
||||
import CrontabWeek from './components/Crontab-Week.vue'
|
||||
import CrontabResult from './components/Crontab-Result.vue'
|
||||
|
||||
@@ -135,7 +135,7 @@ export default {
|
||||
CrontabMin,
|
||||
CrontabHour,
|
||||
CrontabDay,
|
||||
CrontabMouth,
|
||||
CrontabMonth,
|
||||
CrontabWeek,
|
||||
CrontabResult
|
||||
},
|
||||
@@ -155,7 +155,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabTitles: [this.$t('common.CronTab.min'), this.$t('common.CronTab.hour'), this.$t('common.CronTab.day'), this.$t('common.CronTab.mouth'), this.$t('common.CronTab.week')],
|
||||
tabTitles: [this.$t('common.CronTab.min'), this.$t('common.CronTab.hour'), this.$t('common.CronTab.day'), this.$t('common.CronTab.month'), this.$t('common.CronTab.week')],
|
||||
tabActive: 0,
|
||||
myindex: 0,
|
||||
contabValueObj: {
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
min: '0',
|
||||
hour: '*',
|
||||
day: '*',
|
||||
mouth: '*',
|
||||
month: '*',
|
||||
week: '*'
|
||||
// year: "",
|
||||
},
|
||||
@@ -181,7 +181,7 @@ export default {
|
||||
' ' +
|
||||
obj.day +
|
||||
' ' +
|
||||
obj.mouth +
|
||||
obj.month +
|
||||
' ' +
|
||||
obj.week
|
||||
return str
|
||||
@@ -214,7 +214,7 @@ export default {
|
||||
min: arr[0],
|
||||
hour: arr[1],
|
||||
day: arr[2],
|
||||
mouth: arr[3],
|
||||
month: arr[3],
|
||||
week: arr[4]
|
||||
}
|
||||
this.contabValueObj = {
|
||||
@@ -244,7 +244,7 @@ export default {
|
||||
},
|
||||
// 赋值到组件
|
||||
changeRadio(name, value) {
|
||||
const arr = ['second', 'min', 'hour', 'mouth']
|
||||
const arr = ['second', 'min', 'hour', 'month']
|
||||
const refName = 'cron' + name
|
||||
let insVlaue
|
||||
|
||||
@@ -374,7 +374,7 @@ export default {
|
||||
min: '0',
|
||||
hour: '0',
|
||||
day: '*',
|
||||
mouth: '*',
|
||||
month: '*',
|
||||
week: '*'
|
||||
// year: "",
|
||||
}
|
||||
|
||||
@@ -111,8 +111,6 @@ export default {
|
||||
('day rachange')
|
||||
if (this.radioValue === 1) {
|
||||
this.$emit('update', 'day', '*', 'day')
|
||||
// this.$emit('update', 'week', '?', 'day')
|
||||
// this.$emit('update', 'mouth', '*', 'day')
|
||||
} else {
|
||||
if (this.cron.hour === '*') {
|
||||
this.$emit('update', 'hour', '0', 'day')
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-form size="small">
|
||||
<el-form-item>
|
||||
<el-radio v-model="radioValue" :label="1">
|
||||
{{ this.$t('common.CronTab.mouth') }},{{ this.$t('common.CronTab.wildcardsAllowed') }}[, - * /]
|
||||
{{ this.$t('common.CronTab.month') }},{{ this.$t('common.CronTab.wildcardsAllowed') }}[, - * /]
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
<el-radio v-model="radioValue" :label="2">
|
||||
{{ this.$t('common.CronTab.from') }}
|
||||
<el-input-number v-model="cycle01" :min="1" :max="12" /> -
|
||||
<el-input-number v-model="cycle02" :min="1" :max="12" /> {{ this.$t('common.CronTab.mouth') }}
|
||||
<el-input-number v-model="cycle02" :min="1" :max="12" /> {{ this.$t('common.CronTab.month') }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-radio v-model="radioValue" :label="3">
|
||||
{{ this.$t('common.CronTab.every') }}
|
||||
<el-input-number v-model="average02" :min="1" :max="12" /> {{ this.$t('common.CronTab.mouth') }}{{ this.$t('common.CronTab.executeOnce') }}
|
||||
<el-input-number v-model="average02" :min="1" :max="12" /> {{ this.$t('common.CronTab.month') }}{{ this.$t('common.CronTab.executeOnce') }}
|
||||
</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CrontabMouth',
|
||||
name: 'CrontabMonth',
|
||||
props: {
|
||||
cron: {
|
||||
type: Object,
|
||||
@@ -107,49 +107,49 @@ export default {
|
||||
// 单选按钮值变化时
|
||||
radioChange() {
|
||||
if (this.radioValue === 1) {
|
||||
this.$emit('update', 'mouth', '*')
|
||||
this.$emit('update', 'month', '*')
|
||||
} else {
|
||||
if (this.cron.day === '*') {
|
||||
this.$emit('update', 'day', '*', 'mouth')
|
||||
this.$emit('update', 'day', '*', 'month')
|
||||
}
|
||||
if (this.cron.hour === '*') {
|
||||
this.$emit('update', 'hour', '0', 'mouth')
|
||||
this.$emit('update', 'hour', '0', 'month')
|
||||
}
|
||||
if (this.cron.min === '*') {
|
||||
this.$emit('update', 'min', '0', 'mouth')
|
||||
this.$emit('update', 'min', '0', 'month')
|
||||
}
|
||||
if (this.cron.second === '*') {
|
||||
this.$emit('update', 'second', '0', 'mouth')
|
||||
this.$emit('update', 'second', '0', 'month')
|
||||
}
|
||||
}
|
||||
switch (this.radioValue) {
|
||||
case 2:
|
||||
this.$emit('update', 'mouth', this.cycle01 + '-' + this.cycle02)
|
||||
this.$emit('update', 'month', this.cycle01 + '-' + this.cycle02)
|
||||
break
|
||||
case 3:
|
||||
this.$emit('update', 'mouth', '*' + '/' + this.average02)
|
||||
this.$emit('update', 'month', '*' + '/' + this.average02)
|
||||
break
|
||||
case 4:
|
||||
this.$emit('update', 'mouth', this.checkboxString)
|
||||
this.$emit('update', 'month', this.checkboxString)
|
||||
break
|
||||
}
|
||||
},
|
||||
// 周期两个值变化时
|
||||
cycleChange() {
|
||||
if (this.radioValue === 2) {
|
||||
this.$emit('update', 'mouth', this.cycleTotal)
|
||||
this.$emit('update', 'month', this.cycleTotal)
|
||||
}
|
||||
},
|
||||
// 平均两个值变化时
|
||||
averageChange() {
|
||||
if (this.radioValue === 3) {
|
||||
this.$emit('update', 'mouth', this.averageTotal)
|
||||
this.$emit('update', 'month', this.averageTotal)
|
||||
}
|
||||
},
|
||||
// checkbox值变化时
|
||||
checkboxChange() {
|
||||
if (this.radioValue === 4) {
|
||||
this.$emit('update', 'mouth', this.checkboxString)
|
||||
this.$emit('update', 'month', this.checkboxString)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,8 +107,8 @@ export default {
|
||||
this.$emit('update', 'week', '*')
|
||||
this.$emit('update', 'year', '*')
|
||||
} else {
|
||||
if (this.cron.mouth === '*') {
|
||||
this.$emit('update', 'mouth', '*', 'week')
|
||||
if (this.cron.month === '*') {
|
||||
this.$emit('update', 'month', '*', 'week')
|
||||
}
|
||||
if (this.cron.day === '*') {
|
||||
this.$emit('update', 'day', '*', 'week')
|
||||
|
||||
@@ -451,7 +451,7 @@
|
||||
"min": "分钟",
|
||||
"hour": "小时",
|
||||
"day": "日",
|
||||
"mouth": "月",
|
||||
"month": "月",
|
||||
"week": "周",
|
||||
"wildcardsAllowed": "允许的通配符",
|
||||
"from": "从",
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
"min": "minute",
|
||||
"hour": "hour",
|
||||
"day": "day",
|
||||
"mouth": "mouth",
|
||||
"month": "month",
|
||||
"week": "week",
|
||||
"wildcardsAllowed": "wildcards allowed",
|
||||
"from": "from",
|
||||
|
||||
Reference in New Issue
Block a user