Procházet zdrojové kódy

手动运行项目详情-面包屑

zhangliang2 před 3 roky
rodič
revize
f5edab56a6

+ 1 - 1
src/router/filter.js

@@ -9,7 +9,7 @@ Router.prototype.push = function push(location) {
 
 
 router.beforeEach((to, from, next) => {
-    // console.log(to);
+    console.log(to);
     if (to.fullPath === '/' || to.name === '*') {
         let {
             code,

+ 56 - 28
src/router/workManagement.js

@@ -5,7 +5,35 @@ export default [{
             tabname: "手动运行项目列表",
             menuKind: "workManagement"
         },
-        component: () => import("@/views/workManagement/manualRunProjectList")
+        component: () => import("@/views/workManagement/manualRunProjectList"),
+        children: [{
+            path: "projectInfo",
+            name: "projectInfo",
+            meta: {
+                tabname: "项目详情",
+                menuKind: "workManagement"
+            },
+            component: () => import("@/views/workManagement/projectInfo"),
+            children: [{
+                    path: "taskInfo",
+                    name: "taskInfo",
+                    meta: {
+                        tabname: "任务详情",
+                        menuKind: "workManagement"
+                    },
+                    component: () => import("@/views/workManagement/taskInfo")
+                },
+                {
+                    path: "evaluationReport",
+                    name: "evaluationReport",
+                    meta: {
+                        tabname: "评价报告",
+                        menuKind: "workManagement"
+                    },
+                    component: () => import("@/views/workManagement/evaluationReport")
+                },
+            ]
+        }, ]
     },
     {
         path: "/manualRunProjectDetail",
@@ -16,31 +44,31 @@ export default [{
         },
         component: () => import("@/views/workManagement/manualRunProjectDetail")
     },
-    {
-        path: "/projectInfo",
-        name: "projectInfo",
-        meta: {
-            tabname: "项目详情",
-            menuKind: "workManagement"
-        },
-        component: () => import("@/views/workManagement/projectInfo")
-    },
-    {
-        path: "/taskInfo",
-        name: "taskInfo",
-        meta: {
-            tabname: "任务详情",
-            menuKind: "workManagement"
-        },
-        component: () => import("@/views/workManagement/taskInfo")
-    },
-    {
-        path: "/evaluationReport",
-        name: "evaluationReport",
-        meta: {
-            tabname: "评价报告",
-            menuKind: "workManagement"
-        },
-        component: () => import("@/views/workManagement/evaluationReport")
-    },
+    // {
+    //     path: "/projectInfo",
+    //     name: "projectInfo",
+    //     meta: {
+    //         tabname: "项目详情",
+    //         menuKind: "workManagement"
+    //     },
+    //     component: () => import("@/views/workManagement/projectInfo")
+    // },
+    // {
+    //     path: "/taskInfo",
+    //     name: "taskInfo",
+    //     meta: {
+    //         tabname: "任务详情",
+    //         menuKind: "workManagement"
+    //     },
+    //     component: () => import("@/views/workManagement/taskInfo")
+    // },
+    // {
+    //     path: "/evaluationReport",
+    //     name: "evaluationReport",
+    //     meta: {
+    //         tabname: "评价报告",
+    //         menuKind: "workManagement"
+    //     },
+    //     component: () => import("@/views/workManagement/evaluationReport")
+    // },
 ]

+ 2 - 1
src/store/index.js

@@ -7,7 +7,8 @@ export default new Vuex.Store({
   state: {
     // configTitleList: ['摄像头', '完美传感器', '激光雷达', '毫米波雷达', 'GPS'],
     configTitleList: ['摄像头', '完美传感器', '激光雷达', 'GPS'],
-    fileHost: 'http://10.12.10.70:8001', // 开发环境需要连开发服务器地址,上线后会用相对地址拼接fileUrl
+    // fileHost: 'http://10.12.10.70:8001', // 开发环境需要连开发服务器地址,上线后会用相对地址拼接fileUrl
+    fileHost: 'http://47.94.105.148', // 开发环境需要连开发服务器地址,上线后会用相对地址拼接fileUrl
     fileUrl: '/simulation/resource/common/minio/preview',
     themeColor: '#3397FF',
   },

+ 26 - 9
src/views/modelLibrary/components/canvasVehicleConfiguration.vue

@@ -73,8 +73,11 @@ export default {
                 // 摄像头从自己左上角的原点开始绘制,需要移到自己的中心点
                 let x = +data.x * rate;
                 let y = +data.y * rate;
-                let h1 = 90 - +data.h / 2;
-                let h2 = 90 + +data.h / 2;
+                // let h1 = 90 - +data.h / 2;
+                // let h2 = 90 + +data.h / 2;
+
+                let h1 = +data.h;
+                let h2 = Math.abs(h1);
 
                 this.ctx.clearRect(-250, -40, 500, 1000);
                 // this.ctx.drawImage(this.imgIcon, x - 6, y - 6, 20.5, 14.5);
@@ -84,13 +87,27 @@ export default {
                 //定义起点
                 this.ctx.moveTo(x, y);
                 //以起点为圆心,画一个半径为100的圆弧
-                this.ctx.arc(
-                    x,
-                    y,
-                    400,
-                    (h1 * Math.PI) / 180,
-                    (h2 * Math.PI) / 180
-                );
+                if (h1 > 0) {
+                    this.ctx.arc(
+                        x,
+                        y,
+                        400,
+                        // (h1 * Math.PI) / 180,
+                        // (h2 * Math.PI) / 180
+                        0.5 * Math.PI,
+                        (0.5 - h2 / 180) * Math.PI,
+                        true
+                    );
+                } else {
+                    this.ctx.arc(
+                        x,
+                        y,
+                        400,
+                        0.5 * Math.PI,
+                        (h2 / 180 + 0.5) * Math.PI
+                    );
+                }
+
                 this.ctx.closePath();
                 this.ctx.fillStyle = "rgba(252,222,147,0.54)";
                 this.ctx.fill();

+ 1 - 1
src/views/page/breadCrumb.vue

@@ -22,7 +22,7 @@
                         >
                             <i
                                 class="el-icon-folder-opened"
-                                v-if="index > 1"
+                                v-if="index > 0 && index === list.length - 1"
                             ></i>
                             {{ item.meta.tabname }}
                         </router-link>

+ 14 - 14
src/views/page/pageMenu.vue

@@ -72,13 +72,13 @@
                             <i class="my-icon-menuA"></i>
                             <span>模型库</span>
                         </template>
-                        <el-menu-item index="sensorModel"
+                        <el-menu-item index="/sensorModel"
                             >传感器模型</el-menu-item
                         >
-                        <el-menu-item index="vehicleModel"
+                        <el-menu-item index="/vehicleModel"
                             >车辆模型</el-menu-item
                         >
-                        <el-menu-item index="vehicleConfigurationList"
+                        <el-menu-item index="/vehicleConfigurationList"
                             >车辆配置</el-menu-item
                         >
                     </el-submenu>
@@ -87,10 +87,10 @@
                             <i class="my-icon-menuB"></i>
                             <span>算法库</span>
                         </template>
-                        <el-menu-item index="algorithmsLibraryList"
+                        <el-menu-item index="/algorithmsLibraryList"
                             >算法库列表</el-menu-item
                         >
-                        <el-menu-item index="algorithmsPlatformList"
+                        <el-menu-item index="/algorithmsPlatformList"
                             >算法平台</el-menu-item
                         >
                     </el-submenu>
@@ -99,21 +99,21 @@
                             <i class="my-icon-menuC"></i>
                             <span>场景库</span>
                         </template>
-                        <el-menu-item index="naturalDrivingScenarioList"
+                        <el-menu-item index="/naturalDrivingScenarioList"
                             >自然驾驶场景</el-menu-item
                         >
                         <el-menu-item
-                            index="standardRegulationSimulationScenarioList"
+                            index="/standardRegulationSimulationScenarioList"
                             >标准法规仿真场景</el-menu-item
                         >
                         <el-menu-item
-                            index="trafficAccidentSimulationScenarioList"
+                            index="/trafficAccidentSimulationScenarioList"
                             >交通事故仿真场景</el-menu-item
                         >
-                        <el-menu-item index="scenarioTestPackageManagementList"
+                        <el-menu-item index="/scenarioTestPackageManagementList"
                             >场景测试包管理</el-menu-item
                         >
-                        <el-menu-item index="gradingRulesList"
+                        <el-menu-item index="/gradingRulesList"
                             >评分规则</el-menu-item
                         >
                     </el-submenu>
@@ -122,7 +122,7 @@
                             <i class="my-icon-menuD"></i>
                             <span>工作管理</span>
                         </template>
-                        <el-menu-item index="manualRunProjectList"
+                        <el-menu-item index="/manualRunProjectList"
                             >手动运行项目</el-menu-item
                         >
                     </el-submenu>
@@ -131,10 +131,10 @@
                             <i class="my-icon-menuF"></i>
                             <span>系统管理</span>
                         </template>
-                        <el-menu-item index="accountManagement"
+                        <el-menu-item index="/accountManagement"
                             >账户管理</el-menu-item
                         >
-                        <el-menu-item index="parameterManagement"
+                        <el-menu-item index="/parameterManagement"
                             >参数管理</el-menu-item
                         >    
                     </el-submenu> -->
@@ -154,7 +154,7 @@ export default {
             menuFold: false, // menu是否折叠
             opened: false,
             menus: [
-                "mainPage",
+                "/mainPage",
                 "modelLibrary",
                 "algorithmsLibrary",
                 "sceneLibrary",

+ 11 - 1
src/views/workManagement/manualRunProjectList.vue

@@ -1,5 +1,7 @@
 <template>
     <div>
+        <div v-if="!$route.path.includes('projectInfo')">
+
         <search-layout :needBox="true">
             <template slot="searchItem1">
                 <span class="label">项目ID</span>
@@ -183,6 +185,9 @@
                 <el-button @click="cancelDown">取 消</el-button>
             </span>
         </el-dialog>
+
+        </div>
+        <router-view v-else></router-view>
     </div>
 </template>
 
@@ -421,7 +426,7 @@ export default {
         },
 
         viewRow(id) {
-            this.$router.push({ path: "/projectInfo", query: { id } });
+            this.$router.push({ path: "/manualRunProjectList/projectInfo", query: { id } });
         },
         downRow(row) {
             this.curRow = row;
@@ -487,11 +492,16 @@ export default {
     },
 
     async mounted() {
+        console.log(666);
         await this.$dicsListsInit({
             nowRunStateList: "projectRunState",
             evaluationLevelList: "evaluationLevel",
         });
+        console.log(this.$route);
     },
+    activated(){
+        console.log(6);
+    }
 };
 </script>
 

+ 8 - 2
src/views/workManagement/projectInfo.vue

@@ -1,5 +1,7 @@
 <template>
     <div class="projectInfoPanel">
+        <div v-if="!$route.path.includes('taskInfo')&&!$route.path.includes('evaluationReport')">
+
         <div class="headPanel panel">
             <div class="titlePanel">
                 <div class="titlePanelBor">基本信息</div>
@@ -184,6 +186,9 @@
                 </div>
             </div>
         </div>
+
+        </div>
+        <router-view v-else></router-view>
     </div>
 </template>
 
@@ -282,7 +287,7 @@ export default {
     methods: {
         viewRow(row) {
             this.$router.push({
-                path: "/taskInfo",
+                path: "/manualRunProjectList/projectInfo/taskInfo",
                 query: {
                     taskId: row.id,
                     id: row.pid,
@@ -292,7 +297,7 @@ export default {
         toReport() {
             if (this.info.nowRunState === "30") {
                 this.$router.push({
-                    path: "/evaluationReport",
+                    path: "/manualRunProjectList/projectInfo/evaluationReport",
                     query: { id: this.id },
                 });
             }
@@ -341,6 +346,7 @@ export default {
     },
 
     mounted() {
+        console.log(this.$route);
         if (this.$route.query.id) {
             this.id = this.$route.query.id;
 

+ 1 - 1
src/views/workManagement/taskInfo.vue

@@ -340,7 +340,7 @@ export default {
 
 <style lang='less' scoped>
 .taskInfoPanel {
-    padding: 18px;
+    // padding: 18px;
 
     .panel {
         border: 1px solid #dfdfdf;

+ 4 - 4
vue.config.js

@@ -89,11 +89,11 @@ module.exports = {
                 // target: 'http://10.12.10.70/simulation',
                 // target: 'http://10.12.10.70:7001', // 登录
                 // target: 'http://10.12.10.73:7003',  // 王志强
-                target: 'http://10.12.10.70', // windowstest
+                // target: 'http://10.12.10.70', // windowstest
                 // target: 'http://10.12.10.87:8001',  // 赵艳
                 // target: 'http://10.12.10.72:8001',  // 王晓峰
                 // target: 'http://192.168.30.75',  // gq
-                // target: 'http://47.94.105.148',  // aliyun
+                target: 'http://47.94.105.148',  // aliyun
                 // target: 'http://10.12.10.74:8001',
                 changeOrigin: true,
                 secure: false, // 如果是https接口,需要配置这个参数
@@ -106,9 +106,9 @@ module.exports = {
                 // target: 'http://10.12.10.88:7003', // 王耀栋
                 // target: 'http://10.12.10.72:7003',  // 王晓峰
                 // target: 'http://10.12.10.87:7003',  // 赵艳
-                target: 'http://10.12.10.70',  // windowstest
+                // target: 'http://10.12.10.70',  // windowstest
                 // target: 'http://192.168.30.75',  // gq
-                // target: 'http://47.94.105.148',  // aliyun
+                target: 'http://47.94.105.148',  // aliyun
                 // target: 'http://10.12.10.74:7003', // 孟令鑫
                 changeOrigin: true,
                 secure: false, // 如果是https接口,需要配置这个参数