From f91ebd93d2b60400d7e90e9967da1d2336c580a3 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期一, 23 八月 2021 18:28:33 +0800
Subject: [PATCH] update 重构 将下载excel工具提取到全局

---
 ruoyi-ui/src/views/monitor/job/index.vue |   19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue
index dfd962c..7cbcd82 100644
--- a/ruoyi-ui/src/views/monitor/job/index.vue
+++ b/ruoyi-ui/src/views/monitor/job/index.vue
@@ -126,7 +126,7 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['monitor:job:remove']"
           >鍒犻櫎</el-button>
-          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
+          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
             <span class="el-dropdown-link">
               <i class="el-icon-d-arrow-right el-icon--right"></i>鏇村
             </span>
@@ -280,7 +280,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";
 
 export default {
   name: "Job",
@@ -451,7 +451,7 @@
     /** 浠诲姟鏃ュ織鍒楄〃鏌ヨ */
     handleJobLog(row) {
       const jobId = row.jobId || 0;
-      this.$router.push({ path: '/job/log', query: { jobId: jobId } })
+      this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } })
     },
     /** 鏂板鎸夐挳鎿嶄綔 */
     handleAdd() {
@@ -505,18 +505,7 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     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.downLoadExcel('/monitor/job/export', this.queryParams);
     }
   }
 };

--
Gitblit v1.9.3