Skip to content

Commit

Permalink
节点列表增加到任务列表的链接
Browse files Browse the repository at this point in the history
  • Loading branch information
ouqiang committed Jun 26, 2018
1 parent 8f547b7 commit 868b4ed
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions web/vue/src/pages/host/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
prop="port"
label="端口">
</el-table-column>
<el-table-column label="查看任务">
<template slot-scope="scope">
<el-button type="success" @click="toTasks(scope.row)">查看任务</el-button>
</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注">
Expand Down Expand Up @@ -134,6 +139,15 @@ export default {
this.search(() => {
this.$message.success('刷新成功')
})
},
toTasks (item) {
this.$router.push(
{
path: '/task',
query: {
host_id: item.id
}
})
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions web/vue/src/pages/task/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ export default {
},
components: {taskSidebar},
created () {
const hostId = this.$route.query.host_id
if (hostId) {
this.searchParams.host_id = hostId
}
this.search()
},
filters: {
Expand Down

0 comments on commit 868b4ed

Please sign in to comment.