From 34f2552cad396ce79a7cf4a50a15ff8bf5d817b6 Mon Sep 17 00:00:00 2001
From: fuzui <73400@163.com>
Date: 星期二, 30 十一月 2021 00:17:12 +0800
Subject: [PATCH] fix: crontab组件互斥bug

---
 ruoyi-ui/src/components/Crontab/week.vue |   25 +++++--------------------
 1 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/ruoyi-ui/src/components/Crontab/week.vue b/ruoyi-ui/src/components/Crontab/week.vue
index 5ad949d..8cc82e2 100644
--- a/ruoyi-ui/src/components/Crontab/week.vue
+++ b/ruoyi-ui/src/components/Crontab/week.vue
@@ -67,27 +67,13 @@
 	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;
@@ -105,7 +91,6 @@
 					break;
 			}
 		},
-		// 根据互斥事件,更改radio的值
 
 		// 周期两个值变化时
 		cycleChange() {

--
Gitblit v1.9.2