From 1f2cf719da496e0210d35a1b040f6aa9745f390d Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 21 七月 2021 14:00:07 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue into dev --- ruoyi-ui/src/views/monitor/job/index.vue | 50 ++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 40 insertions(+), 10 deletions(-) diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 69fa8bd..dfd962c 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -115,17 +115,30 @@ <el-button size="mini" type="text" - icon="el-icon-caret-right" - @click="handleRun(scope.row)" - v-hasPermi="['monitor:job:changeStatus']" - >鎵ц涓�娆�</el-button> + icon="el-icon-edit" + @click="handleUpdate(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 @@ 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 @@ }); }, /** 浠诲姟鏃ュ織鍒楄〃鏌ヨ */ - handleJobLog() { - this.$router.push("/job/log"); + handleJobLog(row) { + const jobId = row.jobId || 0; + this.$router.push({ path: '/job/log', query: { jobId: jobId } }) }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { -- Gitblit v1.9.3