|
|
@@ -114,17 +114,30 @@
|
|
114
|
114
|
<el-button
|
|
115
|
115
|
size="mini"
|
|
116
|
116
|
type="text"
|
|
117
|
|
- icon="el-icon-caret-right"
|
|
118
|
|
- @click="handleRun(scope.row)"
|
|
119
|
|
- v-hasPermi="['monitor:job:changeStatus']"
|
|
120
|
|
- >执行一次</el-button>
|
|
|
117
|
+ icon="el-icon-edit"
|
|
|
118
|
+ @click="handleUpdate(scope.row)"
|
|
|
119
|
+ v-hasPermi="['monitor:job:edit']"
|
|
|
120
|
+ >修改</el-button>
|
|
121
|
121
|
<el-button
|
|
122
|
122
|
size="mini"
|
|
123
|
123
|
type="text"
|
|
124
|
|
- icon="el-icon-view"
|
|
125
|
|
- @click="handleView(scope.row)"
|
|
126
|
|
- v-hasPermi="['monitor:job:query']"
|
|
127
|
|
- >详细</el-button>
|
|
|
124
|
+ icon="el-icon-delete"
|
|
|
125
|
+ @click="handleDelete(scope.row)"
|
|
|
126
|
+ v-hasPermi="['monitor:job:remove']"
|
|
|
127
|
+ >删除</el-button>
|
|
|
128
|
+ <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
|
|
|
129
|
+ <span class="el-dropdown-link">
|
|
|
130
|
+ <i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
|
|
131
|
+ </span>
|
|
|
132
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
133
|
+ <el-dropdown-item command="handleRun" icon="el-icon-caret-right"
|
|
|
134
|
+ v-hasPermi="['monitor:job:changeStatus']">执行一次</el-dropdown-item>
|
|
|
135
|
+ <el-dropdown-item command="handleView" icon="el-icon-view"
|
|
|
136
|
+ v-hasPermi="['monitor:job:query']">任务详细</el-dropdown-item>
|
|
|
137
|
+ <el-dropdown-item command="handleJobLog" icon="el-icon-s-operation"
|
|
|
138
|
+ v-hasPermi="['monitor:job:query']">调度日志</el-dropdown-item>
|
|
|
139
|
+ </el-dropdown-menu>
|
|
|
140
|
+ </el-dropdown>
|
|
128
|
141
|
</template>
|
|
129
|
142
|
</el-table-column>
|
|
130
|
143
|
</el-table>
|
|
|
@@ -382,6 +395,22 @@ export default {
|
|
382
|
395
|
this.single = selection.length != 1;
|
|
383
|
396
|
this.multiple = !selection.length;
|
|
384
|
397
|
},
|
|
|
398
|
+ // 更多操作触发
|
|
|
399
|
+ handleCommand(command, row) {
|
|
|
400
|
+ switch (command) {
|
|
|
401
|
+ case "handleRun":
|
|
|
402
|
+ this.handleRun(row);
|
|
|
403
|
+ break;
|
|
|
404
|
+ case "handleView":
|
|
|
405
|
+ this.handleView(row);
|
|
|
406
|
+ break;
|
|
|
407
|
+ case "handleJobLog":
|
|
|
408
|
+ this.handleJobLog(row);
|
|
|
409
|
+ break;
|
|
|
410
|
+ default:
|
|
|
411
|
+ break;
|
|
|
412
|
+ }
|
|
|
413
|
+ },
|
|
385
|
414
|
// 任务状态修改
|
|
386
|
415
|
handleStatusChange(row) {
|
|
387
|
416
|
let text = row.status === "0" ? "启用" : "停用";
|
|
|
@@ -417,8 +446,9 @@ export default {
|
|
417
|
446
|
});
|
|
418
|
447
|
},
|
|
419
|
448
|
/** 任务日志列表查询 */
|
|
420
|
|
- handleJobLog() {
|
|
421
|
|
- this.$router.push("/job/log");
|
|
|
449
|
+ handleJobLog(row) {
|
|
|
450
|
+ const jobId = row.jobId || 0;
|
|
|
451
|
+ this.$router.push({ path: '/job/log', query: { jobId: jobId } })
|
|
422
|
452
|
},
|
|
423
|
453
|
/** 新增按钮操作 */
|
|
424
|
454
|
handleAdd() {
|