From d73994f05de4b4965e2d1e01a752a978a43ddacc Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 05 一月 2021 09:22:36 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue
---
ruoyi-ui/src/views/monitor/job/index.vue | 53 ++++++++++++++++++++++++++---------------------------
1 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue
index 01b90c5..a5dc8c7 100644
--- a/ruoyi-ui/src/views/monitor/job/index.vue
+++ b/ruoyi-ui/src/views/monitor/job/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="浠诲姟鍚嶇О" prop="jobName">
<el-input
v-model="queryParams.jobName"
@@ -40,6 +40,7 @@
<el-col :span="1.5">
<el-button
type="primary"
+ plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
@@ -49,6 +50,7 @@
<el-col :span="1.5">
<el-button
type="success"
+ plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@@ -59,6 +61,7 @@
<el-col :span="1.5">
<el-button
type="danger"
+ plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@@ -69,6 +72,7 @@
<el-col :span="1.5">
<el-button
type="warning"
+ plain
icon="el-icon-download"
size="mini"
@click="handleExport"
@@ -78,12 +82,14 @@
<el-col :span="1.5">
<el-button
type="info"
+ plain
icon="el-icon-s-operation"
size="mini"
@click="handleJobLog"
v-hasPermi="['monitor:job:query']"
>鏃ュ織</el-button>
</el-col>
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
@@ -110,7 +116,7 @@
type="text"
icon="el-icon-caret-right"
@click="handleRun(scope.row)"
- v-hasPermi="['monitor:job:edit']"
+ v-hasPermi="['monitor:job:changeStatus']"
>鎵ц涓�娆�</el-button>
<el-button
size="mini"
@@ -132,8 +138,8 @@
/>
<!-- 娣诲姞鎴栦慨鏀瑰畾鏃朵换鍔″璇濇 -->
- <el-dialog :title="title" :visible.sync="open" width="700px">
- <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+ <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="浠诲姟鍚嶇О" prop="jobName">
@@ -210,7 +216,7 @@
</el-dialog>
<!-- 浠诲姟鏃ュ織璇︾粏 -->
- <el-dialog title="浠诲姟璇︾粏" :visible.sync="openView" width="700px">
+ <el-dialog title="浠诲姟璇︾粏" :visible.sync="openView" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="120px" size="mini">
<el-row>
<el-col :span="12">
@@ -238,8 +244,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="鏄惁骞跺彂锛�">
- <div v-if="form.status == 0">鍏佽</div>
- <div v-else-if="form.status == 1">绂佹</div>
+ <div v-if="form.concurrent == 0">鍏佽</div>
+ <div v-else-if="form.concurrent == 1">绂佹</div>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -259,7 +265,6 @@
</div>
</template>
-
<script>
import { listJob, getJob, delJob, addJob, updateJob, exportJob, runJob, changeJobStatus } from "@/api/monitor/job";
@@ -275,6 +280,8 @@
single: true,
// 闈炲涓鐢�
multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
// 鎬绘潯鏁�
total: 0,
// 瀹氭椂浠诲姟琛ㄦ牸鏁版嵁
@@ -398,9 +405,9 @@
type: "warning"
}).then(function() {
return runJob(row.jobId, row.jobGroup);
- }).then(function() {
+ }).then(() => {
this.msgSuccess("鎵ц鎴愬姛");
- }).catch(function() {});
+ })
},
/** 浠诲姟璇︾粏淇℃伅 */
handleView(row) {
@@ -435,23 +442,15 @@
if (valid) {
if (this.form.jobId != undefined) {
updateJob(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- } else {
- this.msgError(response.msg);
- }
+ this.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
});
} else {
addJob(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- } else {
- this.msgError(response.msg);
- }
+ this.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
});
}
}
@@ -469,7 +468,7 @@
}).then(() => {
this.getList();
this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(function() {});
+ })
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
@@ -482,8 +481,8 @@
return exportJob(queryParams);
}).then(response => {
this.download(response.msg);
- }).catch(function() {});
+ })
}
}
};
-</script>
+</script>
\ No newline at end of file
--
Gitblit v1.9.3