From b87e45ce32cd0e8e7476773d289dc3ad2601e711 Mon Sep 17 00:00:00 2001
From: 抓蛙师 <770492966@qq.com>
Date: 星期六, 18 十二月 2021 16:07:24 +0800
Subject: [PATCH] 自动生成代码未引入此依赖 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
---
ruoyi-ui/src/components/Crontab/hour.vue | 40 ++++++++++++++++------------------------
1 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/ruoyi-ui/src/components/Crontab/hour.vue b/ruoyi-ui/src/components/Crontab/hour.vue
index 5a1e146..29b8891 100644
--- a/ruoyi-ui/src/components/Crontab/hour.vue
+++ b/ruoyi-ui/src/components/Crontab/hour.vue
@@ -9,16 +9,16 @@
<el-form-item>
<el-radio v-model='radioValue' :label="2">
鍛ㄦ湡浠�
- <el-input-number v-model='cycle01' :min="0" :max="60" /> -
- <el-input-number v-model='cycle02' :min="0" :max="60" /> 灏忔椂
+ <el-input-number v-model='cycle01' :min="0" :max="22" /> -
+ <el-input-number v-model='cycle02' :min="cycle01 ? cycle01 + 1 : 1" :max="23" /> 灏忔椂
</el-radio>
</el-form-item>
<el-form-item>
<el-radio v-model='radioValue' :label="3">
浠�
- <el-input-number v-model='average01' :min="0" :max="60" /> 灏忔椂寮�濮嬶紝姣�
- <el-input-number v-model='average02' :min="0" :max="60" /> 灏忔椂鎵ц涓�娆�
+ <el-input-number v-model='average01' :min="0" :max="22" /> 灏忔椂寮�濮嬶紝姣�
+ <el-input-number v-model='average02' :min="1" :max="23 - average01 || 0" /> 灏忔椂鎵ц涓�娆�
</el-radio>
</el-form-item>
@@ -51,23 +51,15 @@
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);
+ this.$emit('update', 'hour', this.cycleTotal);
break;
case 3:
- this.$emit('update', 'hour', this.average01 + '/' + this.average02);
+ this.$emit('update', 'hour', this.averageTotal);
break;
case 4:
this.$emit('update', 'hour', this.checkboxString);
@@ -94,7 +86,7 @@
}
},
watch: {
- "radioValue": "radioChange",
+ 'radioValue': 'radioChange',
'cycleTotal': 'cycleChange',
'averageTotal': 'averageChange',
'checkboxString': 'checkboxChange'
@@ -102,15 +94,15 @@
computed: {
// 璁$畻涓や釜鍛ㄦ湡鍊�
cycleTotal: function () {
- this.cycle01 = this.checkNum(this.cycle01, 0, 23)
- this.cycle02 = this.checkNum(this.cycle02, 0, 23)
- return this.cycle01 + '-' + this.cycle02;
+ const cycle01 = this.checkNum(this.cycle01, 0, 22)
+ const cycle02 = this.checkNum(this.cycle02, cycle01 ? cycle01 + 1 : 1, 23)
+ return cycle01 + '-' + cycle02;
},
// 璁$畻骞冲潎鐢ㄥ埌鐨勫��
averageTotal: function () {
- this.average01 = this.checkNum(this.average01, 0, 23)
- this.average02 = this.checkNum(this.average02, 1, 23)
- return this.average01 + '/' + this.average02;
+ const average01 = this.checkNum(this.average01, 0, 22)
+ const average02 = this.checkNum(this.average02, 1, 23 - average01 || 0)
+ return average01 + '/' + average02;
},
// 璁$畻鍕鹃�夌殑checkbox鍊煎悎闆�
checkboxString: function () {
--
Gitblit v1.9.3