Bläddra i källkod

自动运行项目优化

zhangliang2 2 år sedan
förälder
incheckning
bdec449bfd

+ 8 - 9
src/views/workManagement/autoRunProjectDetail.vue

@@ -28,7 +28,7 @@
                     >
                     </el-input>
                 </el-form-item>
-                <el-form-item label="算法来源:" prop="algorithmType">
+                <!-- <el-form-item label="算法来源:" prop="algorithmType">
                     <el-radio
                         v-model="form.algorithmType"
                         label="1"
@@ -41,7 +41,7 @@
                         @change="typeChange"
                         >算法平台</el-radio
                     >
-                </el-form-item>
+                </el-form-item> -->
                 <el-form-item label="选择算法:" prop="algorithm">
                     <el-select v-model="form.algorithm">
                         <el-option
@@ -140,9 +140,7 @@
         <div class="ruleTip">
             <el-collapse v-model="activeNames">
                 <el-collapse-item title="运行周期规则查看" name="1">
-                    <div class="collapseInfo">
-                        运行周期规则查看
-                    </div>
+                    <div class="collapseInfo">运行周期规则查看</div>
                 </el-collapse-item>
             </el-collapse>
         </div>
@@ -194,7 +192,7 @@ export default {
                 id: "",
                 projectName: "", // 项目名称
                 projectDescribe: "", // 项目描述
-                algorithmType: "1", // 算法来源
+                algorithmType: "2", // 算法来源
                 algorithm: "", // 选择算法
                 vehicle: "", // 选择车辆
                 scene: "", // 选择场景
@@ -216,9 +214,9 @@ export default {
                 projectDescribe: [
                     { required: true, message: "请输入", trigger: "blur" },
                 ],
-                algorithmType: [
-                    { required: true, message: "请选择", trigger: "change" },
-                ],
+                // algorithmType: [
+                //     { required: true, message: "请选择", trigger: "change" },
+                // ],
                 algorithm: [
                     { required: true, message: "请选择", trigger: "change" },
                 ],
@@ -405,6 +403,7 @@ export default {
                 }).then(async (res) => {
                     if (res.code == 200 && res.info) {
                         this.form = res.info;
+                        this.form.algorithmType = "2";
                         await this.getLists();
                         await this.getMaxSimulationTime();
                         this.vehicleSelChange(res.info.vehicle);

+ 16 - 4
src/views/workManagement/projectInfo.vue

@@ -342,8 +342,14 @@ export default {
 
     methods: {
         viewRow(row) {
+            let path = "/manualRunProjectList/projectInfo/taskInfo";
+            if (this.projectType === "2") {
+                path =
+                    "/autoRunProjectList/autoRunSubProjectList/projectInfo/taskInfo";
+            }
+
             this.$router.push({
-                path: "/manualRunProjectList/projectInfo/taskInfo",
+                path,
                 query: {
                     taskId: row.id,
                     id: row.pid,
@@ -352,9 +358,15 @@ export default {
             });
         },
         toReport() {
+            let path = "/manualRunProjectList/projectInfo/evaluationReport";
+            if (this.projectType === "2") {
+                path =
+                    "/autoRunProjectList/autoRunSubProjectList/projectInfo/evaluationReport";
+            }
+
             if (this.info.nowRunState === "30") {
                 this.$router.push({
-                    path: "/manualRunProjectList/projectInfo/evaluationReport",
+                    path,
                     query: { id: this.id, projectType: this.projectType },
                 });
             }
@@ -444,7 +456,7 @@ export default {
 };
 </script>
 
-<style lang='less' scoped>
+<style lang="less" scoped>
 .projectInfoPanel {
     padding: 18px;
 
@@ -615,4 +627,4 @@ export default {
         }
     }
 }
-</style>
+</style>