From a3116cd27d6eecd34c7e8ce69ca3ab51633c07ad Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期四, 10 六月 2021 15:34:38 +0800
Subject: [PATCH] 优化部门父级启用状态
---
ruoyi-ui/src/views/monitor/job/index.vue | 41 +++++++++++++++++++++++++----------------
1 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue
index 3a35e85..c8fcd6d 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,8 +72,10 @@
<el-col :span="1.5">
<el-button
type="warning"
+ plain
icon="el-icon-download"
size="mini"
+ :loading="exportLoading"
@click="handleExport"
v-hasPermi="['monitor:job:export']"
>瀵煎嚭</el-button>
@@ -78,12 +83,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 +117,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"
@@ -268,12 +275,16 @@
return {
// 閬僵灞�
loading: true,
+ // 瀵煎嚭閬僵灞�
+ exportLoading: false,
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
single: true,
// 闈炲涓鐢�
multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
// 鎬绘潯鏁�
total: 0,
// 瀹氭椂浠诲姟琛ㄦ牸鏁版嵁
@@ -399,7 +410,7 @@
return runJob(row.jobId, row.jobGroup);
}).then(() => {
this.msgSuccess("鎵ц鎴愬姛");
- }).catch(function() {});
+ }).catch(() => {});
},
/** 浠诲姟璇︾粏淇℃伅 */
handleView(row) {
@@ -434,19 +445,15 @@
if (valid) {
if (this.form.jobId != undefined) {
updateJob(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- }
+ this.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
});
} else {
addJob(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- }
+ this.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
});
}
}
@@ -464,7 +471,7 @@
}).then(() => {
this.getList();
this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(function() {});
+ }).catch(() => {});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
@@ -473,11 +480,13 @@
confirmButtonText: "纭畾",
cancelButtonText: "鍙栨秷",
type: "warning"
- }).then(function() {
+ }).then(() => {
+ this.exportLoading = true;
return exportJob(queryParams);
}).then(response => {
this.download(response.msg);
- }).catch(function() {});
+ this.exportLoading = false;
+ }).catch(() => {});
}
}
};
--
Gitblit v1.9.3