Prechádzať zdrojové kódy

手动不能运行并行度为0的项目

zhangliang2 3 rokov pred
rodič
commit
c4d005c154

+ 7 - 2
src/views/workManagement/manualRunProjectList.vue

@@ -117,7 +117,7 @@
                                 scope.row.nowRunState === '30' ||
                                 scope.row.nowRunState === '40'
                             "
-                            @click="runRow(scope.row.id)"
+                            @click="runRow(scope.row.id, scope.row.parallelism)"
                             class="el-icon-video-play elIcon"
                             title="运行"
                         ></i>
@@ -336,12 +336,17 @@ export default {
                 },
             });
         },
-        runRow(id) {
+        runRow(id, parallelism) {
             this.$confirm("确认是否运行?", "提示", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
                 type: "warning",
             }).then(() => {
+                if (parallelism == "0") {
+                    this.$message.error("并行度为0,不能运行");
+                    return;
+                }
+                
                 this.$axios({
                     method: "post",
                     url: this.$api.workManagement.updateProjectNowRunState,