哆啦好梦 2 years ago
parent
commit
b15db4f4c2
2 changed files with 2 additions and 3 deletions
  1. 1 1
      electron/service/example.js
  2. 1 2
      frontend/src/views/base/jobs/Index.vue

+ 1 - 1
electron/service/example.js

@@ -86,7 +86,7 @@ class ExampleService extends Service {
     let res = {};
     let timerTask;
     const channel = 'controller.example.timerJobProgress';
-    if (action == 'create') {
+    if (action == 'run') {
 
       // 执行任务及监听进度
       timerTask = this.myJobPool.run('./jobs/example/timer', {jobId});

+ 1 - 2
frontend/src/views/base/jobs/Index.vue

@@ -132,9 +132,8 @@ export default {
       this.$ipc.invoke(ipcApiRoute.someJobByPool, params).then(data => {
         switch (data.jobId) {
           case 3:
-            this.progress3_pid = data.pid;
             if (data.action == 'run') {
-              this.progress1_pid = data.result.pid;
+              this.progress3_pid = data.result.pid;
             }
             break;
           case 4: