From 492ee4fae5ebc8b37214dd12c43852d26883c766 Mon Sep 17 00:00:00 2001 From: yjb Date: Wed, 22 Sep 2021 18:54:10 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9Array.indexOf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Crontab/result.vue | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ruoyi-ui/src/components/Crontab/result.vue b/ruoyi-ui/src/components/Crontab/result.vue index 07b963b79..537f34524 100644 --- a/ruoyi-ui/src/components/Crontab/result.vue +++ b/ruoyi-ui/src/components/Crontab/result.vue @@ -3,7 +3,7 @@

最近5次运行时间

@@ -25,7 +25,6 @@ export default { methods: { // 表达式值变化时,开始去计算结果 expressionChange() { - // 计算开始-隐藏结果 this.isShow = false; // 获取规则数组[0秒、1分、2时、3日、4月、5星期、6年] @@ -151,7 +150,6 @@ export default { } continue; } - // 判断日期的合法性,不合法的话也是跳出当前循环 if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true && this.dayRule !== 'workDay' && this.dayRule !== 'lastWeek' && this.dayRule !== 'lastDay') { resetDay(); @@ -160,7 +158,6 @@ export default { // 如果日期规则中有值时 if (this.dayRule == 'lastDay') { // 如果不是合法日期则需要将前将日期调到合法日期即月末最后一天 - if (this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { while (DD > 0 && this.checkDate(YY + '-' + MM + '-' + thisDD + ' 00:00:00') !== true) { DD--; @@ -200,7 +197,7 @@ export default { // 获取当前日期是属于星期几 let thisWeek = this.formatDate(new Date(YY + '-' + MM + '-' + DD + ' 00:00:00'), 'week'); // 校验当前星期是否在星期池(dayRuleSup)中 - if (Array.indexOf(this.dayRuleSup, thisWeek) < 0) { + if (this.dayRuleSup.indexOf(thisWeek) < 0) { // 如果到达最大值时 if (Di == DDate.length - 1) { resetDay(); @@ -241,11 +238,9 @@ export default { } // 判断时间值是否小于10置换成“05”这种格式 DD = DD < 10 ? '0' + DD : DD; - // 循环“时”数组 goHour: for (let hi = hIdx; hi < hDate.length; hi++) { let hh = hDate[hi] < 10 ? '0' + hDate[hi] : hDate[hi] - // 如果到达最大值时 if (nMin > mDate[mDate.length - 1]) { resetMin(); @@ -266,7 +261,6 @@ export default { // 循环"分"数组 goMin: for (let mi = mIdx; mi < mDate.length; mi++) { let mm = mDate[mi] < 10 ? '0' + mDate[mi] : mDate[mi]; - // 如果到达最大值时 if (nSecond > sDate[sDate.length - 1]) { resetSecond(); From 6d709f9fab536ba398fa3760ed1b82eca8bc8d10 Mon Sep 17 00:00:00 2001 From: yjb Date: Wed, 22 Sep 2021 19:00:25 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=87=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=20=3F=EF=BC=9A=E5=8F=AA=E8=83=BD?= =?UTF-8?q?=E7=94=A8=E5=9C=A8DayOfMonth=E5=92=8CDayOfWeek=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Crontab/day.vue | 37 +- ruoyi-ui/src/components/Crontab/hour.vue | 247 +++---- ruoyi-ui/src/components/Crontab/index.vue | 771 +++++++++++---------- ruoyi-ui/src/components/Crontab/min.vue | 244 +++---- ruoyi-ui/src/components/Crontab/month.vue | 21 +- ruoyi-ui/src/components/Crontab/second.vue | 10 +- ruoyi-ui/src/components/Crontab/week.vue | 317 +++++---- ruoyi-ui/src/components/Crontab/year.vue | 23 +- 8 files changed, 844 insertions(+), 826 deletions(-) diff --git a/ruoyi-ui/src/components/Crontab/day.vue b/ruoyi-ui/src/components/Crontab/day.vue index bf9f5664e..d2f67298f 100644 --- a/ruoyi-ui/src/components/Crontab/day.vue +++ b/ruoyi-ui/src/components/Crontab/day.vue @@ -15,23 +15,28 @@ 周期从 - - - 日 + + - + + 日 从 - 号开始,每 - 日执行一次 + + 号开始,每 + + 日执行一次 每月 - 号最近的那个工作日 + + 号最近的那个工作日 @@ -45,7 +50,7 @@ 指定 - {{item}} + {{ item }} @@ -69,23 +74,19 @@ export default { name: 'crontab-day', props: ['check', 'cron'], methods: { + init() { + this.workday = 1 + this.cycle01 = 1 + this.cycle02 = 2 + this.average01 = 1 + this.average02 = 1 + this.checkboxList = [] + }, // 单选按钮值变化时 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'); - } } switch (this.radioValue) { diff --git a/ruoyi-ui/src/components/Crontab/hour.vue b/ruoyi-ui/src/components/Crontab/hour.vue index 5a1e14678..236691d12 100644 --- a/ruoyi-ui/src/components/Crontab/hour.vue +++ b/ruoyi-ui/src/components/Crontab/hour.vue @@ -1,122 +1,125 @@ - - - \ No newline at end of file + + + diff --git a/ruoyi-ui/src/components/Crontab/index.vue b/ruoyi-ui/src/components/Crontab/index.vue index 27b4ab36c..5896e9335 100644 --- a/ruoyi-ui/src/components/Crontab/index.vue +++ b/ruoyi-ui/src/components/Crontab/index.vue @@ -1,110 +1,110 @@ diff --git a/ruoyi-ui/src/components/Crontab/min.vue b/ruoyi-ui/src/components/Crontab/min.vue index 980c4e768..41d7bb19b 100644 --- a/ruoyi-ui/src/components/Crontab/min.vue +++ b/ruoyi-ui/src/components/Crontab/min.vue @@ -1,120 +1,124 @@ - - - \ No newline at end of file + + + diff --git a/ruoyi-ui/src/components/Crontab/month.vue b/ruoyi-ui/src/components/Crontab/month.vue index 619d1e791..1ebcb3b97 100644 --- a/ruoyi-ui/src/components/Crontab/month.vue +++ b/ruoyi-ui/src/components/Crontab/month.vue @@ -49,24 +49,17 @@ export default { name: 'crontab-month', props: ['check', 'cron'], methods: { + init() { + this.cycle01 = 1 + this.cycle02 = 2 + this.average01 = 1 + this.average02 = 1 + this.checkboxList = [] + }, // 单选按钮值变化时 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 2: diff --git a/ruoyi-ui/src/components/Crontab/second.vue b/ruoyi-ui/src/components/Crontab/second.vue index 0fdf3386d..60bda69b2 100644 --- a/ruoyi-ui/src/components/Crontab/second.vue +++ b/ruoyi-ui/src/components/Crontab/second.vue @@ -25,7 +25,7 @@ 指定 - + {{item-1}} @@ -49,12 +49,18 @@ export default { name: 'crontab-second', props: ['check', 'radioParent'], methods: { + init() { + this.cycle01 = 1 + this.cycle02 = 2 + this.average01 = 0 + this.average02 = 1 + this.checkboxList = [] + }, // 单选按钮值变化时 radioChange() { 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); diff --git a/ruoyi-ui/src/components/Crontab/week.vue b/ruoyi-ui/src/components/Crontab/week.vue index 5ad949d6b..fda5fa4d8 100644 --- a/ruoyi-ui/src/components/Crontab/week.vue +++ b/ruoyi-ui/src/components/Crontab/week.vue @@ -1,167 +1,178 @@ diff --git a/ruoyi-ui/src/components/Crontab/year.vue b/ruoyi-ui/src/components/Crontab/year.vue index 800dfa522..fe0216ef5 100644 --- a/ruoyi-ui/src/components/Crontab/year.vue +++ b/ruoyi-ui/src/components/Crontab/year.vue @@ -57,23 +57,16 @@ export default { name: 'crontab-year', props: ['check', 'month', 'cron'], methods: { + init() { + this.fullYear = Number(new Date().getFullYear()) + this.cycle01 = 0 + this.cycle02 = 0 + this.average01 = 0 + this.average02 = 1 + this.checkboxList = [] + }, // 单选按钮值变化时 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', ''); From cbae45c7cea1c41091aceafcac324340b9b7aa74 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 4 Oct 2021 10:28:13 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=8D=87=E7=BA=A7element-ui=E5=88=B0?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC2.15.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 ++-- ruoyi-ui/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 2e1d5e075..c1d9a291c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,8 +21,8 @@ 1.2.6 1.21 3.0.0 - 2.3.2 - 2.1.4 + 2.3.2 + 2.1.4 1.3.1 1.2.78 5.8.0 diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index c7db2d8ed..034e0642d 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -41,7 +41,7 @@ "clipboard": "2.0.6", "core-js": "3.8.1", "echarts": "4.9.0", - "element-ui": "2.15.5", + "element-ui": "2.15.6", "file-saver": "2.0.5", "fuse.js": "6.4.3", "highlight.js": "9.18.5", From cfdd6231798c4141126a2fc0df91633f528b8638 Mon Sep 17 00:00:00 2001 From: yjb Date: Sat, 23 Oct 2021 23:25:03 +0800 Subject: [PATCH 4/6] =?UTF-8?q?1=E3=80=81=E9=87=8D=E7=BD=AE=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E8=A7=A3=E5=86=B3=E9=9C=80=E8=A6=81=E5=A4=9A?= =?UTF-8?q?=E6=AC=A1=E9=87=8D=E7=BD=AE=E5=9B=9E=E5=A4=8D=E5=88=B0=E5=8E=9F?= =?UTF-8?q?=E5=A7=8B=E7=8A=B6=E6=80=81=EF=BC=88=E9=80=89=E6=8B=A9=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6(0=200=200=200=200=201-2=20)=EF=BC=8C=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E7=82=B9=E5=87=BB3=E6=AC=A1=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E6=89=8D=E8=83=BD=E9=87=8D=E7=BD=AE=E5=88=B0(=20*=20*?= =?UTF-8?q?=20*=20*=20=3F)=202=E3=80=81=E5=88=A0=E9=99=A4=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E6=AF=8F=E4=B8=80=E9=A1=B9=E9=83=BD=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E7=94=A8=E6=88=B7=E8=87=AA=E8=A1=8C=E5=A1=AB=E5=86=99?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E6=94=AF=E6=8C=81=E8=87=AA=E5=8A=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Crontab/day.vue | 336 +++++++++++---------- ruoyi-ui/src/components/Crontab/hour.vue | 234 +++++++------- ruoyi-ui/src/components/Crontab/min.vue | 5 +- ruoyi-ui/src/components/Crontab/month.vue | 6 +- ruoyi-ui/src/components/Crontab/second.vue | 252 ++++++++-------- ruoyi-ui/src/components/Crontab/week.vue | 15 +- 6 files changed, 437 insertions(+), 411 deletions(-) diff --git a/ruoyi-ui/src/components/Crontab/day.vue b/ruoyi-ui/src/components/Crontab/day.vue index d2f67298f..901cef9f9 100644 --- a/ruoyi-ui/src/components/Crontab/day.vue +++ b/ruoyi-ui/src/components/Crontab/day.vue @@ -1,180 +1,184 @@ diff --git a/ruoyi-ui/src/components/Crontab/hour.vue b/ruoyi-ui/src/components/Crontab/hour.vue index 236691d12..c4bf01ca2 100644 --- a/ruoyi-ui/src/components/Crontab/hour.vue +++ b/ruoyi-ui/src/components/Crontab/hour.vue @@ -1,125 +1,129 @@ diff --git a/ruoyi-ui/src/components/Crontab/min.vue b/ruoyi-ui/src/components/Crontab/min.vue index 41d7bb19b..55befd0d3 100644 --- a/ruoyi-ui/src/components/Crontab/min.vue +++ b/ruoyi-ui/src/components/Crontab/min.vue @@ -25,7 +25,7 @@ 指定 - + {{item-1}} @@ -50,6 +50,9 @@ export default { name: 'crontab-min', props: ['check', 'cron'], methods: { + selectChange() { + this.radioValue = 4 + }, init() { this.cycle01 = 1 this.cycle02 = 2 diff --git a/ruoyi-ui/src/components/Crontab/month.vue b/ruoyi-ui/src/components/Crontab/month.vue index 1ebcb3b97..1f5f64110 100644 --- a/ruoyi-ui/src/components/Crontab/month.vue +++ b/ruoyi-ui/src/components/Crontab/month.vue @@ -25,7 +25,7 @@ 指定 - + {{item}} @@ -48,7 +48,9 @@ export default { }, name: 'crontab-month', props: ['check', 'cron'], - methods: { + methods: { selectChange() { + this.radioValue = 4 + }, init() { this.cycle01 = 1 this.cycle02 = 2 diff --git a/ruoyi-ui/src/components/Crontab/second.vue b/ruoyi-ui/src/components/Crontab/second.vue index 60bda69b2..b001eaeb9 100644 --- a/ruoyi-ui/src/components/Crontab/second.vue +++ b/ruoyi-ui/src/components/Crontab/second.vue @@ -1,54 +1,62 @@ diff --git a/ruoyi-ui/src/components/Crontab/week.vue b/ruoyi-ui/src/components/Crontab/week.vue index fda5fa4d8..f42fb60ad 100644 --- a/ruoyi-ui/src/components/Crontab/week.vue +++ b/ruoyi-ui/src/components/Crontab/week.vue @@ -40,7 +40,8 @@ 指定 - + {{ item }} @@ -68,11 +69,16 @@ export default { name: 'crontab-week', props: ['check', 'cron'], methods: { - checkChange(data) { + selectChange(data) { + console.log(data); + this.radioValue = 6 this.checkboxList = [] + this.checkboxDescribeList = [] data.forEach(value => { - this.weekList.find((item, index) => { - if (item === value) { + this.weekList.forEach((item,index) => { + if (index+1 === value) { + console.log((item)); + this.checkboxDescribeList.push(this.weekList[index]) this.checkboxList.push(index + 1) } }) @@ -90,7 +96,6 @@ export default { // 单选按钮值变化时 radioChange() { - switch (this.radioValue) { case 1: this.$emit('update', 'week', '*'); From 730151b13fb6ae5c426039868a7566cfd9fc3b96 Mon Sep 17 00:00:00 2001 From: yjb Date: Sat, 23 Oct 2021 23:37:21 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=91=A8=E5=A4=9A?= =?UTF-8?q?=E9=80=89=E6=97=B6=E6=96=87=E5=AD=97=E6=98=BE=E7=A4=BA=E5=8F=8A?= =?UTF-8?q?=E8=A1=A8=E8=BE=BE=E6=95=B0=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/Crontab/week.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/components/Crontab/week.vue b/ruoyi-ui/src/components/Crontab/week.vue index f42fb60ad..377fa4006 100644 --- a/ruoyi-ui/src/components/Crontab/week.vue +++ b/ruoyi-ui/src/components/Crontab/week.vue @@ -42,7 +42,7 @@ 指定 - {{ item }} + {{ item }} @@ -70,15 +70,11 @@ export default { props: ['check', 'cron'], methods: { selectChange(data) { - console.log(data); this.radioValue = 6 this.checkboxList = [] - this.checkboxDescribeList = [] data.forEach(value => { this.weekList.forEach((item,index) => { - if (index+1 === value) { - console.log((item)); - this.checkboxDescribeList.push(this.weekList[index]) + if (item === value) { this.checkboxList.push(index + 1) } }) From f5f9685685ceac340a0a2152e0be8b8bef64bfbb Mon Sep 17 00:00:00 2001 From: yjb Date: Sat, 23 Oct 2021 23:50:18 +0800 Subject: [PATCH 6/6] =?UTF-8?q?https://gitee.com/y=5Fproject/RuoYi-Vue/iss?= =?UTF-8?q?ues/I3YMWW=20=E9=83=A8=E7=BD=B2=E8=AE=BE=E7=BD=AE=E4=B8=ADHead?= =?UTF-8?q?=E5=A4=B4=E5=9B=BA=E5=AE=9A=E5=90=8E=EF=BC=8C=E5=BC=B9=E5=87=BA?= =?UTF-8?q?el-dialoger=EF=BC=8Cheader=E5=A4=B4=E9=83=A8=E4=BC=9A=E5=90=91?= =?UTF-8?q?=E5=8F=B3=E5=81=8F=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/index.vue | 215 +++++++++++++++++----------------- 1 file changed, 108 insertions(+), 107 deletions(-) diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue index 718723ea4..31b01971f 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/ruoyi-ui/src/layout/index.vue @@ -1,107 +1,108 @@ - - - - - + + + + +