From eb9f3d37725c5df391f390c00cdeefa2d9a1d29b Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期二, 12 七月 2022 18:04:49 +0800
Subject: [PATCH] 修改验证码开关变量名

---
 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 a8928b6..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">
+    <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