Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
7ac06c40
authored
2023-01-31 09:50:11 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:定时任务
1 parent
40dcaf8d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
42 deletions
src/api/system.js → src/api/sjsbTask.js
src/views/system/components/addTask.vue
src/views/system/components/editDictionary.vue → src/views/system/components/editDictionary.vue 废弃
src/views/system/menus/index.vue
src/views/system/roles/index.vue
src/views/system/timedTask/index.vue
src/views/system/users/index.vue
src/api/s
ystem
.js
→
src/api/s
jsbTask
.js
View file @
7ac06c4
import
request
from
'@/utils/request'
import
SERVER
from
'./config'
class
s
ystem
{
class
s
jsbTask
{
// 定时任务
// 定时任务查询接口
async
getTaskListByName
(
data
)
{
return
request
({
url
:
'/sjsbTask/getTaskListByName'
,
url
:
SERVER
.
SERVERAPI
+
'/sjsbTask/getTaskListByName'
,
method
:
'post'
,
data
})
...
...
@@ -14,7 +14,7 @@ class system {
// 定时任务新增接口
async
sjsbTaskSave
(
data
)
{
return
request
({
url
:
'/sjsbTask/save'
,
url
:
SERVER
.
SERVERAPI
+
'/sjsbTask/save'
,
method
:
'post'
,
data
})
...
...
@@ -22,7 +22,7 @@ class system {
// 修改定时任务执行时间接口
async
updateCron
(
data
)
{
return
request
({
url
:
'/sjsbTask/updateCron'
,
url
:
SERVER
.
SERVERAPI
+
'/sjsbTask/updateCron'
,
method
:
'post'
,
data
})
...
...
@@ -30,7 +30,7 @@ class system {
// 定时任务删除接口
async
sjsbTaskRemove
(
id
)
{
return
request
({
url
:
'/sjsbTask/remove'
,
url
:
SERVER
.
SERVERAPI
+
'/sjsbTask/remove'
,
method
:
'get'
,
params
:
{
id
:
id
...
...
@@ -40,7 +40,7 @@ class system {
// 暂停任务接口
async
pauseJob
(
id
)
{
return
request
({
url
:
'/sjsbTask/pauseJob'
,
url
:
SERVER
.
SERVERAPI
+
'/sjsbTask/pauseJob'
,
method
:
'get'
,
params
:
{
id
:
id
...
...
@@ -50,7 +50,7 @@ class system {
// 恢复任务接口
async
resumeJob
(
id
)
{
return
request
({
url
:
'/sjsbTask/resumeJob'
,
url
:
SERVER
.
SERVERAPI
+
'/sjsbTask/resumeJob'
,
method
:
'get'
,
params
:
{
id
:
id
...
...
@@ -60,7 +60,7 @@ class system {
// 激活任务接口
async
activateJob
(
id
)
{
return
request
({
url
:
'/sjsbTask/activateJob'
,
url
:
SERVER
.
SERVERAPI
+
'/sjsbTask/activateJob'
,
method
:
'get'
,
params
:
{
id
:
id
...
...
@@ -70,7 +70,7 @@ class system {
// 手动测试
async
sjsbTaskRun
(
id
)
{
return
request
({
url
:
'/sjsbTask/run'
,
url
:
SERVER
.
SERVERAPI
+
'/sjsbTask/run'
,
method
:
'get'
,
params
:
{
id
:
id
...
...
@@ -78,4 +78,4 @@ class system {
})
}
}
export
default
new
system
()
\ No newline at end of file
export
default
new
sjsbTask
()
\ No newline at end of file
...
...
src/views/system/components/addTask.vue
View file @
7ac06c4
...
...
@@ -40,7 +40,7 @@
</
template
>
<
script
>
import
s
ystem
from
'@/api/system
.js'
import
s
jsbTask
from
'@/api/sjsbTask
.js'
export
default
{
props
:
{
taskData
:
{
...
...
@@ -92,7 +92,7 @@ export default {
if
(
valid
)
{
if
(
!
_this
.
taskData
)
{
try
{
let
res
=
await
s
ystem
.
sjsbTaskSave
(
_this
.
ruleForm
)
let
res
=
await
s
jsbTask
.
sjsbTaskSave
(
_this
.
ruleForm
)
if
(
res
.
code
==
200
)
{
_this
.
loading
=
false
_this
.
$message
({
...
...
@@ -108,7 +108,7 @@ export default {
}
}
else
{
try
{
let
res
=
await
s
ystem
.
updateCron
(
_this
.
ruleForm
)
let
res
=
await
s
jsbTask
.
updateCron
(
_this
.
ruleForm
)
if
(
res
.
code
==
200
)
{
_this
.
$message
({
message
:
res
.
message
,
...
...
src/views/system/components/editDictionary.vue
→
src/views/system/components/editDictionary.vue
废弃
View file @
7ac06c4
File moved
src/views/system/menus/index.vue
View file @
7ac06c4
...
...
@@ -28,7 +28,7 @@
<
script
>
// 定时任务
import
data
from
"./data"
import
s
ystem
from
'@/api/system
.js'
import
s
jsbTask
from
'@/api/sjsbTask
.js'
import
tableMixin
from
'@/mixins/tableMixin.js'
import
addTask
from
'../components/addTask.vue'
export
default
{
...
...
@@ -114,7 +114,7 @@ export default {
try
{
this
.
form
=
Object
.
assign
(
this
.
form
,
this
.
formData
)
let
{
result
:
{
list
,
total
,
pages
:
pageSize
,
pageNum
:
current
}
}
=
await
s
ystem
.
getTaskListByName
(
this
.
form
)
}
=
await
s
jsbTask
.
getTaskListByName
(
this
.
form
)
this
.
tableData
.
data
=
list
this
.
pageData
=
{
pageSize
,
...
...
@@ -134,7 +134,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
pauseJob
(
row
.
id
)
s
jsbTask
.
pauseJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -166,7 +166,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
activateJob
(
row
.
id
)
s
jsbTask
.
activateJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -198,7 +198,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
resumeJob
(
row
.
id
)
s
jsbTask
.
resumeJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -230,7 +230,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
sjsbTaskRun
(
row
.
id
)
s
jsbTask
.
sjsbTaskRun
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$alert
(
res
.
message
,
'提示'
,
{
...
...
@@ -265,7 +265,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
sjsbTaskRemove
(
row
.
id
)
s
jsbTask
.
sjsbTaskRemove
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
src/views/system/roles/index.vue
View file @
7ac06c4
...
...
@@ -28,7 +28,7 @@
<
script
>
// 定时任务
import
data
from
"./data"
import
s
ystem
from
'@/api/system
.js'
import
s
jsbTask
from
'@/api/sjsbTask
.js'
import
tableMixin
from
'@/mixins/tableMixin.js'
import
addTask
from
'../components/addTask.vue'
export
default
{
...
...
@@ -114,7 +114,7 @@ export default {
try
{
this
.
form
=
Object
.
assign
(
this
.
form
,
this
.
formData
)
let
{
result
:
{
list
,
total
,
pages
:
pageSize
,
pageNum
:
current
}
}
=
await
s
ystem
.
getTaskListByName
(
this
.
form
)
}
=
await
s
jsbTask
.
getTaskListByName
(
this
.
form
)
this
.
tableData
.
data
=
list
this
.
pageData
=
{
pageSize
,
...
...
@@ -134,7 +134,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
pauseJob
(
row
.
id
)
s
jsbTask
.
pauseJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -166,7 +166,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
activateJob
(
row
.
id
)
s
jsbTask
.
activateJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -198,7 +198,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
resumeJob
(
row
.
id
)
s
jsbTask
.
resumeJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -230,7 +230,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
sjsbTaskRun
(
row
.
id
)
s
jsbTask
.
sjsbTaskRun
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$alert
(
res
.
message
,
'提示'
,
{
...
...
@@ -265,7 +265,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
sjsbTaskRemove
(
row
.
id
)
s
jsbTask
.
sjsbTaskRemove
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
src/views/system/timedTask/index.vue
View file @
7ac06c4
...
...
@@ -28,7 +28,7 @@
<
script
>
// 定时任务
import
data
from
"./data"
import
s
ystem
from
'@/api/system
.js'
import
s
jsbTask
from
'@/api/sjsbTask
.js'
import
tableMixin
from
'@/mixins/tableMixin.js'
import
addTask
from
'../components/addTask.vue'
export
default
{
...
...
@@ -114,7 +114,7 @@ export default {
try
{
this
.
form
=
Object
.
assign
(
this
.
form
,
this
.
formData
)
let
{
result
:
{
list
,
total
,
pages
:
pageSize
,
pageNum
:
current
}
}
=
await
s
ystem
.
getTaskListByName
(
this
.
form
)
}
=
await
s
jsbTask
.
getTaskListByName
(
this
.
form
)
this
.
tableData
.
data
=
list
this
.
pageData
=
{
pageSize
,
...
...
@@ -134,7 +134,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
pauseJob
(
row
.
id
)
s
jsbTask
.
pauseJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -166,7 +166,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
activateJob
(
row
.
id
)
s
jsbTask
.
activateJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -198,7 +198,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
resumeJob
(
row
.
id
)
s
jsbTask
.
resumeJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -230,7 +230,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
sjsbTaskRun
(
row
.
id
)
s
jsbTask
.
sjsbTaskRun
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$alert
(
res
.
message
,
'提示'
,
{
...
...
@@ -265,7 +265,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
sjsbTaskRemove
(
row
.
id
)
s
jsbTask
.
sjsbTaskRemove
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
src/views/system/users/index.vue
View file @
7ac06c4
...
...
@@ -6,7 +6,7 @@
<
script
>
// 定时任务
import
data
from
"./data"
import
s
ystem
from
'@/api/system
.js'
import
s
jsbTask
from
'@/api/sjsbTask
.js'
import
tableMixin
from
'@/mixins/tableMixin.js'
import
addTask
from
'../components/addTask.vue'
export
default
{
...
...
@@ -92,7 +92,7 @@ export default {
try
{
this
.
form
=
Object
.
assign
(
this
.
form
,
this
.
formData
)
let
{
result
:
{
list
,
total
,
pages
:
pageSize
,
pageNum
:
current
}
}
=
await
s
ystem
.
getTaskListByName
(
this
.
form
)
}
=
await
s
jsbTask
.
getTaskListByName
(
this
.
form
)
this
.
tableData
.
data
=
list
this
.
pageData
=
{
pageSize
,
...
...
@@ -112,7 +112,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
pauseJob
(
row
.
id
)
s
jsbTask
.
pauseJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -144,7 +144,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
activateJob
(
row
.
id
)
s
jsbTask
.
activateJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -176,7 +176,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
resumeJob
(
row
.
id
)
s
jsbTask
.
resumeJob
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
@@ -208,7 +208,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
sjsbTaskRun
(
row
.
id
)
s
jsbTask
.
sjsbTaskRun
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$alert
(
res
.
message
,
'提示'
,
{
...
...
@@ -243,7 +243,7 @@ export default {
type
:
'warning'
,
})
.
then
(()
=>
{
s
ystem
.
sjsbTaskRemove
(
row
.
id
)
s
jsbTask
.
sjsbTaskRemove
(
row
.
id
)
.
then
((
res
)
=>
{
if
((
res
.
code
=
200
))
{
this
.
$message
({
...
...
Please
register
or
sign in
to post a comment