Pārlūkot izejas kodu

cron生成的表达式hour优化

RuoYi 9 mēneši atpakaļ
vecāks
revīzija
5b98495067
1 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. 8 2
      ruoyi-ui/src/components/Crontab/hour.vue

+ 8 - 2
ruoyi-ui/src/components/Crontab/hour.vue

@@ -51,10 +51,16 @@ export default {
 	methods: {
 		// 单选按钮值变化时
 		radioChange() {
+			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;
+					this.$emit('update', 'hour', '*')
+					break;
 				case 2:
 					this.$emit('update', 'hour', this.cycleTotal);
 					break;