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
b616a2f2
Commit
b616a2f2
authored
Jul 15, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务新增更多操作
parent
60abdf1d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
11 deletions
+65
-11
index.vue
ruoyi-ui/src/views/monitor/job/index.vue
+40
-10
log.vue
ruoyi-ui/src/views/monitor/job/log.vue
+25
-1
No files found.
ruoyi-ui/src/views/monitor/job/index.vue
View file @
b616a2f2
...
...
@@ -115,17 +115,30 @@
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-
caret-righ
t"
@
click=
"handle
Run
(scope.row)"
v-hasPermi=
"['monitor:job:
changeStatus
']"
>
执行一次
</el-button>
icon=
"el-icon-
edi
t"
@
click=
"handle
Update
(scope.row)"
v-hasPermi=
"['monitor:job:
edit
']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['monitor:job:query']"
>
详细
</el-button>
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['monitor:job:remove']"
>
删除
</el-button>
<el-dropdown
size=
"mini"
@
command=
"(command) => handleCommand(command, scope.row)"
>
<span
class=
"el-dropdown-link"
>
<i
class=
"el-icon-d-arrow-right el-icon--right"
></i>
更多
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"handleRun"
icon=
"el-icon-caret-right"
v-hasPermi=
"['monitor:job:changeStatus']"
>
执行一次
</el-dropdown-item>
<el-dropdown-item
command=
"handleView"
icon=
"el-icon-view"
v-hasPermi=
"['monitor:job:query']"
>
任务详细
</el-dropdown-item>
<el-dropdown-item
command=
"handleJobLog"
icon=
"el-icon-s-operation"
v-hasPermi=
"['monitor:job:query']"
>
调度日志
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -385,6 +398,22 @@ export default {
this
.
single
=
selection
.
length
!=
1
;
this
.
multiple
=
!
selection
.
length
;
},
// 更多操作触发
handleCommand
(
command
,
row
)
{
switch
(
command
)
{
case
"handleRun"
:
this
.
handleRun
(
row
);
break
;
case
"handleView"
:
this
.
handleView
(
row
);
break
;
case
"handleJobLog"
:
this
.
handleJobLog
(
row
);
break
;
default
:
break
;
}
},
// 任务状态修改
handleStatusChange
(
row
)
{
let
text
=
row
.
status
===
"0"
?
"启用"
:
"停用"
;
...
...
@@ -420,8 +449,9 @@ export default {
});
},
/** 任务日志列表查询 */
handleJobLog
()
{
this
.
$router
.
push
(
"/job/log"
);
handleJobLog
(
row
)
{
const
jobId
=
row
.
jobId
||
0
;
this
.
$router
.
push
({
path
:
'/job/log'
,
query
:
{
jobId
:
jobId
}
})
},
/** 新增按钮操作 */
handleAdd
()
{
...
...
ruoyi-ui/src/views/monitor/job/log.vue
View file @
b616a2f2
...
...
@@ -94,6 +94,15 @@
v-hasPermi=
"['monitor:job:export']"
>
导出
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-close"
size=
"mini"
@
click=
"handleClose"
>
关闭
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
...
...
@@ -168,6 +177,7 @@
</template>
<
script
>
import
{
getJob
}
from
"@/api/monitor/job"
;
import
{
listJobLog
,
delJobLog
,
exportJobLog
,
cleanJobLog
}
from
"@/api/monitor/jobLog"
;
export
default
{
...
...
@@ -209,7 +219,16 @@ export default {
};
},
created
()
{
const
jobId
=
this
.
$route
.
query
.
jobId
;
if
(
jobId
!==
undefined
&&
jobId
!=
0
)
{
getJob
(
jobId
).
then
(
response
=>
{
this
.
queryParams
.
jobName
=
response
.
data
.
jobName
;
this
.
queryParams
.
jobGroup
=
response
.
data
.
jobGroup
;
this
.
getList
();
});
}
else
{
this
.
getList
();
}
this
.
getDicts
(
"sys_job_status"
).
then
(
response
=>
{
this
.
statusOptions
=
response
.
data
;
});
...
...
@@ -236,6 +255,11 @@ export default {
jobGroupFormat
(
row
,
column
)
{
return
this
.
selectDictLabel
(
this
.
jobGroupOptions
,
row
.
jobGroup
);
},
// 返回按钮
handleClose
()
{
this
.
$store
.
dispatch
(
"tagsView/delView"
,
this
.
$route
);
this
.
$router
.
push
({
path
:
"/monitor/job"
});
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
...
...
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