From c0d430f4e5adf08129c2610d9d2b5446bb19c0d6 Mon Sep 17 00:00:00 2001
From: XCSDN <gitee@xcsdn.net>
Date: 星期四, 07 四月 2022 12:57:56 +0800
Subject: [PATCH] update ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java. 字典类型必须以字母开头,且字典类型只能由小写字母或加下划线还有数字组成 防止由于字典类型不符合前端开发规范而报错
---
ruoyi-ui/src/views/monitor/job/index.vue | 85 +++++++++++++++---------------------------
1 files changed, 30 insertions(+), 55 deletions(-)
diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue
index fdabb16..a927756 100644
--- a/ruoyi-ui/src/views/monitor/job/index.vue
+++ b/ruoyi-ui/src/views/monitor/job/index.vue
@@ -1,17 +1,16 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="浠诲姟鍚嶇О" prop="jobName">
<el-input
v-model="queryParams.jobName"
placeholder="璇疯緭鍏ヤ换鍔″悕绉�"
clearable
- size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="浠诲姟缁勫悕" prop="jobGroup">
- <el-select v-model="queryParams.jobGroup" placeholder="璇烽�夋嫨浠诲姟缁勫悕" clearable size="small">
+ <el-select v-model="queryParams.jobGroup" placeholder="璇烽�夋嫨浠诲姟缁勫悕" clearable>
<el-option
v-for="dict in dict.type.sys_job_group"
:key="dict.value"
@@ -21,7 +20,7 @@
</el-select>
</el-form-item>
<el-form-item label="浠诲姟鐘舵��" prop="status">
- <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨浠诲姟鐘舵��" clearable size="small">
+ <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨浠诲姟鐘舵��" clearable>
<el-option
v-for="dict in dict.type.sys_job_status"
:key="dict.value"
@@ -75,7 +74,6 @@
plain
icon="el-icon-download"
size="mini"
- :loading="exportLoading"
@click="handleExport"
v-hasPermi="['monitor:job:export']"
>瀵煎嚭</el-button>
@@ -166,7 +164,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="浠诲姟鍒嗙粍" prop="jobGroup">
- <el-select v-model="form.jobGroup" placeholder="璇烽�夋嫨">
+ <el-select v-model="form.jobGroup" placeholder="璇烽�夋嫨浠诲姟鍒嗙粍">
<el-option
v-for="dict in dict.type.sys_job_group"
:key="dict.value"
@@ -205,7 +203,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
- <el-form-item label="閿欒绛栫暐" prop="misfirePolicy">
+ <el-form-item label="鎵ц绛栫暐" prop="misfirePolicy">
<el-radio-group v-model="form.misfirePolicy" size="small">
<el-radio-button label="1">绔嬪嵆鎵ц</el-radio-button>
<el-radio-button label="2">鎵ц涓�娆�</el-radio-button>
@@ -240,7 +238,7 @@
</div>
</el-dialog>
- <el-dialog title="Cron琛ㄨ揪寮忕敓鎴愬櫒" :visible.sync="openCron" append-to-body class="scrollbar" destroy-on-close >
+ <el-dialog title="Cron琛ㄨ揪寮忕敓鎴愬櫒" :visible.sync="openCron" append-to-body destroy-on-close class="scrollbar">
<crontab @hide="openCron=false" @fill="crontabFill" :expression="expression"></crontab>
</el-dialog>
@@ -295,7 +293,7 @@
</template>
<script>
-import { listJob, getJob, delJob, addJob, updateJob, exportJob, runJob, changeJobStatus } from "@/api/monitor/job";
+import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job";
import Crontab from '@/components/Crontab'
export default {
@@ -306,8 +304,6 @@
return {
// 閬僵灞�
loading: true,
- // 瀵煎嚭閬僵灞�
- exportLoading: false,
// 閫変腑鏁扮粍
ids: [],
// 闈炲崟涓鐢�
@@ -425,29 +421,21 @@
// 浠诲姟鐘舵�佷慨鏀�
handleStatusChange(row) {
let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
- this.$confirm('纭瑕�"' + text + '""' + row.jobName + '"浠诲姟鍚�?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(function() {
- return changeJobStatus(row.jobId, row.status);
- }).then(() => {
- this.msgSuccess(text + "鎴愬姛");
- }).catch(function() {
- row.status = row.status === "0" ? "1" : "0";
- });
+ this.$modal.confirm('纭瑕�"' + text + '""' + row.jobName + '"浠诲姟鍚楋紵').then(function() {
+ return changeJobStatus(row.jobId, row.status);
+ }).then(() => {
+ this.$modal.msgSuccess(text + "鎴愬姛");
+ }).catch(function() {
+ row.status = row.status === "0" ? "1" : "0";
+ });
},
/* 绔嬪嵆鎵ц涓�娆� */
handleRun(row) {
- this.$confirm('纭瑕佺珛鍗虫墽琛屼竴娆�"' + row.jobName + '"浠诲姟鍚�?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(function() {
- return runJob(row.jobId, row.jobGroup);
- }).then(() => {
- this.msgSuccess("鎵ц鎴愬姛");
- }).catch(() => {});
+ this.$modal.confirm('纭瑕佺珛鍗虫墽琛屼竴娆�"' + row.jobName + '"浠诲姟鍚楋紵').then(function() {
+ return runJob(row.jobId, row.jobGroup);
+ }).then(() => {
+ this.$modal.msgSuccess("鎵ц鎴愬姛");
+ }).catch(() => {});
},
/** 浠诲姟璇︾粏淇℃伅 */
handleView(row) {
@@ -492,13 +480,13 @@
if (valid) {
if (this.form.jobId != undefined) {
updateJob(this.form).then(response => {
- this.msgSuccess("淇敼鎴愬姛");
+ this.$modal.msgSuccess("淇敼鎴愬姛");
this.open = false;
this.getList();
});
} else {
addJob(this.form).then(response => {
- this.msgSuccess("鏂板鎴愬姛");
+ this.$modal.msgSuccess("鏂板鎴愬姛");
this.open = false;
this.getList();
});
@@ -509,31 +497,18 @@
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const jobIds = row.jobId || this.ids;
- this.$confirm('鏄惁纭鍒犻櫎瀹氭椂浠诲姟缂栧彿涓�"' + jobIds + '"鐨勬暟鎹」?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(function() {
- return delJob(jobIds);
- }).then(() => {
- this.getList();
- this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ this.$modal.confirm('鏄惁纭鍒犻櫎瀹氭椂浠诲姟缂栧彿涓�"' + jobIds + '"鐨勬暟鎹」锛�').then(function() {
+ return delJob(jobIds);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => {});
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
- const queryParams = this.queryParams;
- this.$confirm("鏄惁纭瀵煎嚭鎵�鏈夊畾鏃朵换鍔℃暟鎹」?", "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
- this.exportLoading = true;
- return exportJob(queryParams);
- }).then(response => {
- this.download(response.msg);
- this.exportLoading = false;
- }).catch(() => {});
+ this.download('monitor/job/export', {
+ ...this.queryParams
+ }, `job_${new Date().getTime()}.xlsx`)
}
}
};
--
Gitblit v1.9.3