Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
34f2552c
Commit
34f2552c
authored
Nov 29, 2021
by
fuzui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: crontab组件互斥bug
parent
89e7cb19
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
83 deletions
+22
-83
day.vue
ruoyi-ui/src/components/Crontab/day.vue
+5
-14
hour.vue
ruoyi-ui/src/components/Crontab/hour.vue
+3
-11
index.vue
ruoyi-ui/src/components/Crontab/index.vue
+6
-1
min.vue
ruoyi-ui/src/components/Crontab/min.vue
+0
-4
month.vue
ruoyi-ui/src/components/Crontab/month.vue
+3
-17
second.vue
ruoyi-ui/src/components/Crontab/second.vue
+0
-1
week.vue
ruoyi-ui/src/components/Crontab/week.vue
+5
-20
year.vue
ruoyi-ui/src/components/Crontab/year.vue
+0
-15
No files found.
ruoyi-ui/src/components/Crontab/day.vue
View file @
34f2552c
...
@@ -72,23 +72,14 @@ export default {
...
@@ -72,23 +72,14 @@ export default {
// 单选按钮值变化时
// 单选按钮值变化时
radioChange
()
{
radioChange
()
{
(
'day rachange'
);
(
'day rachange'
);
if
(
this
.
radioValue
===
1
)
{
if
(
this
.
radioValue
!==
2
&&
this
.
cron
.
week
!==
'?'
)
{
this
.
$emit
(
'update'
,
'day'
,
'*'
,
'day'
);
this
.
$emit
(
'update'
,
'week'
,
'?'
,
'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
)
{
switch
(
this
.
radioValue
)
{
case
1
:
this
.
$emit
(
'update'
,
'day'
,
'*'
);
break
;
case
2
:
case
2
:
this
.
$emit
(
'update'
,
'day'
,
'?'
);
this
.
$emit
(
'update'
,
'day'
,
'?'
);
break
;
break
;
...
...
ruoyi-ui/src/components/Crontab/hour.vue
View file @
34f2552c
...
@@ -51,18 +51,10 @@ export default {
...
@@ -51,18 +51,10 @@ export default {
methods
:
{
methods
:
{
// 单选按钮值变化时
// 单选按钮值变化时
radioChange
()
{
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
)
{
switch
(
this
.
radioValue
)
{
case
1
:
this
.
$emit
(
'update'
,
'hour'
,
'*'
)
break
;
case
2
:
case
2
:
this
.
$emit
(
'update'
,
'hour'
,
this
.
cycle01
+
'-'
+
this
.
cycle02
);
this
.
$emit
(
'update'
,
'hour'
,
this
.
cycle01
+
'-'
+
this
.
cycle02
);
break
;
break
;
...
...
ruoyi-ui/src/components/Crontab/index.vue
View file @
34f2552c
...
@@ -2,7 +2,12 @@
...
@@ -2,7 +2,12 @@
<div>
<div>
<el-tabs
type=
"border-card"
>
<el-tabs
type=
"border-card"
>
<el-tab-pane
label=
"秒"
v-if=
"shouldHide('second')"
>
<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>
<el-tab-pane
label=
"分钟"
v-if=
"shouldHide('min')"
>
<el-tab-pane
label=
"分钟"
v-if=
"shouldHide('min')"
>
...
...
ruoyi-ui/src/components/Crontab/min.vue
View file @
34f2552c
...
@@ -52,13 +52,9 @@ export default {
...
@@ -52,13 +52,9 @@ export default {
methods
:
{
methods
:
{
// 单选按钮值变化时
// 单选按钮值变化时
radioChange
()
{
radioChange
()
{
if
(
this
.
radioValue
!==
1
&&
this
.
cron
.
second
===
'*'
)
{
this
.
$emit
(
'update'
,
'second'
,
'0'
,
'min'
);
}
switch
(
this
.
radioValue
)
{
switch
(
this
.
radioValue
)
{
case
1
:
case
1
:
this
.
$emit
(
'update'
,
'min'
,
'*'
,
'min'
);
this
.
$emit
(
'update'
,
'min'
,
'*'
,
'min'
);
this
.
$emit
(
'update'
,
'hour'
,
'*'
,
'min'
);
break
;
break
;
case
2
:
case
2
:
this
.
$emit
(
'update'
,
'min'
,
this
.
cycle01
+
'-'
+
this
.
cycle02
,
'min'
);
this
.
$emit
(
'update'
,
'min'
,
this
.
cycle01
+
'-'
+
this
.
cycle02
,
'min'
);
...
...
ruoyi-ui/src/components/Crontab/month.vue
View file @
34f2552c
...
@@ -51,24 +51,10 @@ export default {
...
@@ -51,24 +51,10 @@ export default {
methods
:
{
methods
:
{
// 单选按钮值变化时
// 单选按钮值变化时
radioChange
()
{
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
)
{
switch
(
this
.
radioValue
)
{
case
1
:
this
.
$emit
(
'update'
,
'month'
,
'*'
);
break
;
case
2
:
case
2
:
this
.
$emit
(
'update'
,
'month'
,
this
.
cycle01
+
'-'
+
this
.
cycle02
);
this
.
$emit
(
'update'
,
'month'
,
this
.
cycle01
+
'-'
+
this
.
cycle02
);
break
;
break
;
...
...
ruoyi-ui/src/components/Crontab/second.vue
View file @
34f2552c
...
@@ -54,7 +54,6 @@ export default {
...
@@ -54,7 +54,6 @@ export default {
switch
(
this
.
radioValue
)
{
switch
(
this
.
radioValue
)
{
case
1
:
case
1
:
this
.
$emit
(
'update'
,
'second'
,
'*'
,
'second'
);
this
.
$emit
(
'update'
,
'second'
,
'*'
,
'second'
);
this
.
$emit
(
'update'
,
'min'
,
'*'
,
'second'
);
break
;
break
;
case
2
:
case
2
:
this
.
$emit
(
'update'
,
'second'
,
this
.
cycle01
+
'-'
+
this
.
cycle02
);
this
.
$emit
(
'update'
,
'second'
,
this
.
cycle01
+
'-'
+
this
.
cycle02
);
...
...
ruoyi-ui/src/components/Crontab/week.vue
View file @
34f2552c
...
@@ -67,27 +67,13 @@ export default {
...
@@ -67,27 +67,13 @@ export default {
methods
:
{
methods
:
{
// 单选按钮值变化时
// 单选按钮值变化时
radioChange
()
{
radioChange
()
{
if
(
this
.
radioValue
===
1
)
{
if
(
this
.
radioValue
!==
2
&&
this
.
cron
.
day
!==
'?'
)
{
this
.
$emit
(
'update'
,
'week'
,
'*'
);
this
.
$emit
(
'update'
,
'day'
,
'?'
,
'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'
);
}
}
}
switch
(
this
.
radioValue
)
{
switch
(
this
.
radioValue
)
{
case
1
:
this
.
$emit
(
'update'
,
'week'
,
'*'
);
break
;
case
2
:
case
2
:
this
.
$emit
(
'update'
,
'week'
,
'?'
);
this
.
$emit
(
'update'
,
'week'
,
'?'
);
break
;
break
;
...
@@ -105,7 +91,6 @@ export default {
...
@@ -105,7 +91,6 @@ export default {
break
;
break
;
}
}
},
},
// 根据互斥事件,更改radio的值
// 周期两个值变化时
// 周期两个值变化时
cycleChange
()
{
cycleChange
()
{
...
...
ruoyi-ui/src/components/Crontab/year.vue
View file @
34f2552c
...
@@ -59,21 +59,6 @@ export default {
...
@@ -59,21 +59,6 @@ export default {
methods
:
{
methods
:
{
// 单选按钮值变化时
// 单选按钮值变化时
radioChange
()
{
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
)
{
switch
(
this
.
radioValue
)
{
case
1
:
case
1
:
this
.
$emit
(
'update'
,
'year'
,
''
);
this
.
$emit
(
'update'
,
'year'
,
''
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment