mirror of
https://gitee.com/dromara/dbswitch.git
synced 2026-01-13 06:04:44 +08:00
任务管理研发
This commit is contained in:
@@ -1,23 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card>
|
<el-card>
|
||||||
|
<el-row>
|
||||||
|
<el-button size="mini" icon="el-icon-switch-button" :disabled=false plain>启动</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-video-pause" :disabled=true plain>停止</el-button>
|
||||||
|
<span style="color:#e9e9f3;"> | </span>
|
||||||
|
<el-button size="mini" plain>导入任务</el-button>
|
||||||
|
<el-button size="mini" :disabled=true plain>导出任务</el-button>
|
||||||
|
<!-- <div class="right-add-button-group">-->
|
||||||
|
<el-button class="right-add-button-group" type="primary"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-document-add"
|
||||||
|
@click="handleCreate">创建任务
|
||||||
|
</el-button>
|
||||||
|
<!-- </div>-->
|
||||||
|
</el-row>
|
||||||
<div class="assignment-list-top">
|
<div class="assignment-list-top">
|
||||||
<div class="left-search-input-group">
|
<div class="left-search-input-group">
|
||||||
<div class="left-search-input">
|
<div class="left-search-input">
|
||||||
<el-input placeholder="请输入任务名称关键字搜索"
|
<el-input size="mini" placeholder="请输入任务名称关键字搜索"
|
||||||
v-model="keyword"
|
v-model="keyword"
|
||||||
:clearable=true
|
:clearable=true
|
||||||
@change="searchByKeyword"
|
@change="searchByKeyword"
|
||||||
style="width:300px">
|
style="width:100%">
|
||||||
|
<el-button @click="searchByKeyword" slot="append" icon="el-icon-search"></el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-add-button-group">
|
|
||||||
<el-button type="primary"
|
|
||||||
size="mini"
|
|
||||||
icon="el-icon-document-add"
|
|
||||||
@click="handleCreate">添加</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table :header-cell-style="{background:'#eef1f6',color:'#606266'}"
|
<el-table :header-cell-style="{background:'#eef1f6',color:'#606266'}"
|
||||||
@@ -62,10 +72,20 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="runStatus"
|
|
||||||
|
<el-table-column
|
||||||
label="运行状态"
|
label="运行状态"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="10%"></el-table-column>
|
min-width="10%">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-icon class="el-icon-success color-success" v-if="scope.row.runStatus == '执行成功'"></el-icon>
|
||||||
|
<el-icon class="el-icon-error color-error" v-if="scope.row.runStatus == '执行异常'"></el-icon>
|
||||||
|
<el-icon class="el-icon-remove color-cancel" v-if="scope.row.runStatus == '任务取消'"></el-icon>
|
||||||
|
<el-icon class="el-icon-loading color-running" v-if="scope.row.runStatus == '执行中'"></el-icon>
|
||||||
|
<span>{{ scope.row.runStatus }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="isPublished"
|
<el-table-column prop="isPublished"
|
||||||
label="任务状态"
|
label="任务状态"
|
||||||
:formatter="boolFormatPublish"
|
:formatter="boolFormatPublish"
|
||||||
@@ -82,40 +102,47 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-timer"
|
icon="el-icon-timer"
|
||||||
@click="handlePublish(scope.$index, scope.row)"
|
@click="handlePublish(scope.$index, scope.row)"
|
||||||
round>调度日志</el-button>
|
round>调度日志
|
||||||
|
</el-button>
|
||||||
<el-button size="small"
|
<el-button size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-timer"
|
icon="el-icon-timer"
|
||||||
v-if="scope.row.isPublished===false"
|
v-if="scope.row.isPublished===false"
|
||||||
@click="handlePublish(scope.$index, scope.row)"
|
@click="handlePublish(scope.$index, scope.row)"
|
||||||
round>启动</el-button>
|
round>启动
|
||||||
|
</el-button>
|
||||||
<el-button size="small"
|
<el-button size="small"
|
||||||
type="info"
|
type="info"
|
||||||
icon="el-icon-delete-location"
|
icon="el-icon-delete-location"
|
||||||
v-if="scope.row.isPublished===true"
|
v-if="scope.row.isPublished===true"
|
||||||
@click="handleRetireTask(scope.$index, scope.row)"
|
@click="handleRetireTask(scope.$index, scope.row)"
|
||||||
round>停止</el-button>
|
round>停止
|
||||||
|
</el-button>
|
||||||
<el-button size="small"
|
<el-button size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-video-play"
|
icon="el-icon-video-play"
|
||||||
@click="handleRunTask(scope.$index, scope.row)"
|
@click="handleRunTask(scope.$index, scope.row)"
|
||||||
round>手工调度</el-button>
|
round>手工调度
|
||||||
|
</el-button>
|
||||||
<el-button size="small"
|
<el-button size="small"
|
||||||
type="success"
|
type="success"
|
||||||
icon="el-icon-document"
|
icon="el-icon-document"
|
||||||
@click="handleDetail(scope.$index, scope.row)"
|
@click="handleDetail(scope.$index, scope.row)"
|
||||||
round>详情</el-button>
|
round>详情
|
||||||
|
</el-button>
|
||||||
<el-button size="small"
|
<el-button size="small"
|
||||||
type="warning"
|
type="warning"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.$index, scope.row)"
|
@click="handleUpdate(scope.$index, scope.row)"
|
||||||
round>修改</el-button>
|
round>修改
|
||||||
|
</el-button>
|
||||||
<el-button size="small"
|
<el-button size="small"
|
||||||
type="danger"
|
type="danger"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
v-if="scope.row.isPublished===false"
|
v-if="scope.row.isPublished===false"
|
||||||
@click="handleDelete(scope.$index, scope.row)"
|
@click="handleDelete(scope.$index, scope.row)"
|
||||||
round>删除</el-button>
|
round>删除
|
||||||
|
</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -350,21 +377,43 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.left-search-input-group {
|
.left-search-input-group {
|
||||||
width: calc(100% - 100px);
|
width: 100%;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-search-input {
|
.left-search-input {
|
||||||
width: 300px;
|
width: 100%;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin: 10px 5px;
|
margin: 10px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-add-button-group {
|
.right-add-button-group {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin: 10px 5px;
|
//margin: 0px 0px;
|
||||||
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.color-running {
|
||||||
|
color: #8c85d1 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-error {
|
||||||
|
color: #ff9c86 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-cancel {
|
||||||
|
color: #a0a6b8 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-success {
|
||||||
|
color: #6cdbbc !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-common{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user