| | |
| | | // 单选按钮值变化时 |
| | | radioChange() { |
| | | ('day rachange'); |
| | | if (this.radioValue === 1) { |
| | | this.$emit('update', 'day', '*', 'day'); |
| | | this.$emit('update', 'week', '?', 'day'); |
| | | this.$emit('update', 'month', '*', 'day'); |
| | | } else { |
| | | if (this.cron.hour === '*') { |
| | | this.$emit('update', 'hour', '0', 'day'); |
| | | } |
| | | if (this.cron.min === '*') { |
| | | this.$emit('update', 'min', '0', 'day'); |
| | | } |
| | | if (this.cron.second === '*') { |
| | | this.$emit('update', 'second', '0', 'day'); |
| | | } |
| | | if (this.radioValue !== 2 && this.cron.week !== '?') { |
| | | this.$emit('update', 'week', '?', 'day') |
| | | } |
| | | |
| | | switch (this.radioValue) { |
| | | case 1: |
| | | this.$emit('update', 'day', '*'); |
| | | break; |
| | | case 2: |
| | | this.$emit('update', 'day', '?'); |
| | | break; |
| | |
| | | methods: {
|
| | | // 单选按钮值变化时
|
| | | radioChange() {
|
| | | if (this.radioValue === 1) {
|
| | | this.$emit('update', 'hour', '*', 'hour');
|
| | | this.$emit('update', 'day', '*', 'hour');
|
| | | } else {
|
| | | if (this.cron.min === '*') {
|
| | | this.$emit('update', 'min', '0', 'hour');
|
| | | }
|
| | | if (this.cron.second === '*') {
|
| | | this.$emit('update', 'second', '0', 'hour');
|
| | | }
|
| | | }
|
| | | switch (this.radioValue) {
|
| | | case 1:
|
| | | this.$emit('update', 'hour', '*')
|
| | | break;
|
| | | case 2:
|
| | | this.$emit('update', 'hour', this.cycle01 + '-' + this.cycle02);
|
| | | break;
|
| | |
| | | <div> |
| | | <el-tabs type="border-card"> |
| | | <el-tab-pane label="秒" v-if="shouldHide('second')"> |
| | | <CrontabSecond @update="updateCrontabValue" :check="checkNumber" ref="cronsecond" /> |
| | | <CrontabSecond |
| | | @update="updateCrontabValue" |
| | | :check="checkNumber" |
| | | :cron="crontabValueObj" |
| | | ref="cronsecond" |
| | | /> |
| | | </el-tab-pane> |
| | | |
| | | <el-tab-pane label="分钟" v-if="shouldHide('min')"> |
| | |
| | | methods: {
|
| | | // 单选按钮值变化时
|
| | | radioChange() {
|
| | | if (this.radioValue !== 1 && this.cron.second === '*') {
|
| | | this.$emit('update', 'second', '0', 'min');
|
| | | }
|
| | | switch (this.radioValue) {
|
| | | case 1:
|
| | | this.$emit('update', 'min', '*', 'min');
|
| | | this.$emit('update', 'hour', '*', 'min');
|
| | | break;
|
| | | case 2:
|
| | | this.$emit('update', 'min', this.cycle01 + '-' + this.cycle02, 'min');
|
| | |
| | | methods: { |
| | | // 单选按钮值变化时 |
| | | radioChange() { |
| | | if (this.radioValue === 1) { |
| | | this.$emit('update', 'month', '*'); |
| | | this.$emit('update', 'year', '*'); |
| | | } else { |
| | | if (this.cron.day === '*') { |
| | | this.$emit('update', 'day', '0', 'month'); |
| | | } |
| | | if (this.cron.hour === '*') { |
| | | this.$emit('update', 'hour', '0', 'month'); |
| | | } |
| | | if (this.cron.min === '*') { |
| | | this.$emit('update', 'min', '0', 'month'); |
| | | } |
| | | if (this.cron.second === '*') { |
| | | this.$emit('update', 'second', '0', 'month'); |
| | | } |
| | | } |
| | | switch (this.radioValue) { |
| | | case 1: |
| | | this.$emit('update', 'month', '*'); |
| | | break; |
| | | case 2: |
| | | this.$emit('update', 'month', this.cycle01 + '-' + this.cycle02); |
| | | break; |
| | |
| | | switch (this.radioValue) { |
| | | case 1: |
| | | this.$emit('update', 'second', '*', 'second'); |
| | | this.$emit('update', 'min', '*', 'second'); |
| | | break; |
| | | case 2: |
| | | this.$emit('update', 'second', this.cycle01 + '-' + this.cycle02); |
| | |
| | | methods: { |
| | | // 单选按钮值变化时 |
| | | radioChange() { |
| | | if (this.radioValue === 1) { |
| | | this.$emit('update', 'week', '*'); |
| | | this.$emit('update', 'year', '*'); |
| | | } else { |
| | | if (this.cron.month === '*') { |
| | | this.$emit('update', 'month', '0', 'week'); |
| | | } |
| | | if (this.cron.day === '*') { |
| | | this.$emit('update', 'day', '0', 'week'); |
| | | } |
| | | if (this.cron.hour === '*') { |
| | | this.$emit('update', 'hour', '0', 'week'); |
| | | } |
| | | if (this.cron.min === '*') { |
| | | this.$emit('update', 'min', '0', 'week'); |
| | | } |
| | | if (this.cron.second === '*') { |
| | | this.$emit('update', 'second', '0', 'week'); |
| | | } |
| | | if (this.radioValue !== 2 && this.cron.day !== '?') { |
| | | this.$emit('update', 'day', '?', 'week'); |
| | | } |
| | | switch (this.radioValue) { |
| | | case 1: |
| | | this.$emit('update', 'week', '*'); |
| | | break; |
| | | case 2: |
| | | this.$emit('update', 'week', '?'); |
| | | break; |
| | |
| | | break; |
| | | } |
| | | }, |
| | | // 根据互斥事件,更改radio的值 |
| | | |
| | | // 周期两个值变化时 |
| | | cycleChange() { |
| | |
| | | methods: { |
| | | // 单选按钮值变化时 |
| | | radioChange() { |
| | | if (this.cron.month === '*') { |
| | | this.$emit('update', 'month', '0', 'year'); |
| | | } |
| | | if (this.cron.day === '*') { |
| | | this.$emit('update', 'day', '0', 'year'); |
| | | } |
| | | if (this.cron.hour === '*') { |
| | | this.$emit('update', 'hour', '0', 'year'); |
| | | } |
| | | if (this.cron.min === '*') { |
| | | this.$emit('update', 'min', '0', 'year'); |
| | | } |
| | | if (this.cron.second === '*') { |
| | | this.$emit('update', 'second', '0', 'year'); |
| | | } |
| | | switch (this.radioValue) { |
| | | case 1: |
| | | this.$emit('update', 'year', ''); |