Kaynağa Gözat

Merge branch 'master' of http://10.15.12.70:3000/zhangliang/simulation-front

shiyu 3 yıl önce
ebeveyn
işleme
139ddd5b57

+ 2 - 14
src/components/echarts/lineChart.vue

@@ -9,7 +9,7 @@ export default {
     name: "lineChart",
     props: {
         id: {
-            default: "a",
+            default: "lineChart1",
             type: String,
         },
         LineChartData: {
@@ -71,16 +71,6 @@ export default {
                         },
                     },
                 },
-                {
-                    data: [20, 42, 18, 13, 39],
-                    type: "line",
-                    // smooth: true,
-                    lineStyle: {
-                        normal: {
-                            color: "#67C239",
-                        },
-                    },
-                },
             ],
         };
         this.charts.setOption(option);
@@ -180,15 +170,13 @@ export default {
         },
     },
     destroyed() {
-        console.log("destroyed");
         this.charts.dispose();
     },
 };
 </script>
 
-
 <style lang='less' scoped>
 .linechart {
     margin: 0 auto;
 }
-</style>
+</style>

+ 3 - 4
src/components/echarts/lineChartA.vue

@@ -13,7 +13,7 @@ export default {
     name: "lineChartA",
     props: {
         id: {
-            default: "a",
+            default: "lineChartA",
             type: String,
         },
         dataList: {
@@ -153,15 +153,14 @@ export default {
     },
 
     destroyed() {
-        console.log("destroyed");
+        // console.log("destroyed");
         this.charts.dispose();
     },
 };
 </script>
 
-
 <style lang='less' scoped>
 .linechart {
     margin: 0 auto;
 }
-</style>
+</style>

+ 2 - 1
src/components/upload/upload.vue

@@ -140,7 +140,7 @@ export default {
                             this.attachmentList.push({
                                 // attachmentName: file.file.name,
                                 // attachmentAddress: res.params,
-                                md5: defaultParam.md5,
+                                md5: defaultParam.md5 || "",
                                 // uid: file.file.uid,
                                 fileType: file.file.type,
                                 fileName: res.info.fileName,
@@ -153,6 +153,7 @@ export default {
                         } else {
                             this.$message.error(res.message || "上传失败");
                             this.$emit("didUpload", "fail");
+                            reject("失败");
                         }
                     })
                     .catch((err) => {

+ 11 - 13
src/views/algorithmsLibrary/exportAlgorithms.vue

@@ -115,7 +115,7 @@ export default {
             objectPath: "", // 用于上传文件的传参
             isUploading: false,
             uploadUrl: this.$api.common.uploadProcessBar,
-            timer: "", // 用来接收进度条的定时器
+            timer: null, // 用来接收进度条的定时器
             percentage: 0, // 进度条数据
             customColor: "", // 进度条颜色
         };
@@ -170,10 +170,9 @@ export default {
                     objectPath: this.objectPath,
                 },
             }).then((res) => {
-                // console.log(res);
                 if (res.code == 200 && res.info) {
                     console.log(res.info);
-                    
+
                     if (this.percentage >= res.info * 100) {
                         if (this.percentage < 99) {
                             ++this.percentage;
@@ -190,7 +189,9 @@ export default {
 
                     if (!this.isUploading) {
                         clearInterval(this.timer);
+                        this.timer = null;
                         this.percentage = 0;
+                        this.objectPath = this.$getObjectPathByRandom();
                     }
                 } else {
                     this.$message.error(res.message || "获取进度信息失败");
@@ -200,24 +201,16 @@ export default {
         willUpload() {
             this.isUploading = true;
 
-            // let timer = setTimeout(() => {
-            //     this.isUploading = true;
-            //     this.onProgress();
-            //     clearTimeout(timer);
-            // }, 100);
-
             this.timer = setInterval(() => {
                 this.onProgress();
-                if (!this.isUploading) {
-                    clearInterval(this.timer);
-                    this.percentage = 0;
-                }
             }, 4500);
         },
         didUpload(state) {
             this.isUploading = false;
             clearInterval(this.timer);
+            this.timer = null;
             this.percentage = 0;
+            this.objectPath = this.$getObjectPathByRandom();
         },
     },
 
@@ -245,6 +238,11 @@ export default {
             });
         }
     },
+
+    beforeDestroy() {
+        clearInterval(this.timer);
+        this.timer = null;
+    }
 };
 </script>
 

+ 4 - 4
src/views/modelLibrary/components/handleConfigList.vue

@@ -19,7 +19,7 @@
                 <li
                     class="content"
                     v-for="(item, index) in configList.camera"
-                    :key="item.id + index"
+                    :key="item.id + index.toString()"
                 >
                     <div
                         class="nameBox"
@@ -61,7 +61,7 @@
                 <li
                     class="content"
                     v-for="(item, index) in configList.ogt"
-                    :key="item.id + index"
+                    :key="item.id + index.toString()"
                 >
                     <div
                         class="nameBox"
@@ -102,7 +102,7 @@
                 <li
                     class="content"
                     v-for="(item, index) in configList.lidar"
-                    :key="item.id + index"
+                    :key="item.id + index.toString()"
                 >
                     <div
                         class="nameBox"
@@ -144,7 +144,7 @@
                 <li
                     class="content"
                     v-for="(item, index) in configList.gps"
-                    :key="item.id + index"
+                    :key="item.id + index.toString()"
                 >
                     <div
                         class="nameBox"

+ 2 - 0
src/views/modelLibrary/components/modelList.vue

@@ -163,6 +163,8 @@ export default {
 
             li {
                 margin-top: 10px;
+                word-break: break-all;
+                align-items: center;
 
                 span,
                 i {

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

@@ -74,7 +74,7 @@ export default {
                     prop: "sceneNum",
                 },
                 {
-                    label: "测试权重",
+                    label: "测试权重%",
                     prop: "weight",
                 },
                 {

+ 5 - 3
src/views/workManagement/manualRunProjectDetail.vue

@@ -356,11 +356,13 @@ export default {
                     data: {
                         id,
                     },
-                }).then((res) => {
+                }).then(async (res) => {
                     if (res.code == 200 && res.info) {
                         this.form = res.info;
-                        this.getLists();
-                        this.getMaxSimulationTime();
+                        await this.getLists();
+                        await this.getMaxSimulationTime();
+                        this.vehicleSelChange(res.info.vehicle);
+                        this.sceneSelChange(res.info.scene);
                     } else {
                         this.$message.error(res.message || "获取信息失败");
                     }

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

@@ -262,8 +262,14 @@ export default {
     },
 
     methods: {
-        viewRow() {
-            this.$router.push({ path: "/taskInfo" });
+        viewRow(row) {
+            this.$router.push({
+                path: "/taskInfo",
+                query: {
+                    taskId: row.id,
+                    id: row.pid,
+                },
+            });
         },
         toReport() {
             if (this.info.nowRunState === "30") {
@@ -274,6 +280,7 @@ export default {
             }
         },
         downReport() {
+            if (this.info.nowRunState != "30") return;
             this.$axios({
                 method: "post",
                 url: this.$api.workManagement.exportProjectReportById,

+ 60 - 53
src/views/workManagement/taskInfo.vue

@@ -27,7 +27,7 @@
                 </div>
                 <div class="info">
                     <span>结束时间:</span>
-                   <b>{{ info.runEndTime }}</b>
+                    <b>{{ info.runEndTime }}</b>
                 </div>
                 <div class="info">
                     <span>完成状态:</span>
@@ -38,7 +38,7 @@
 
         <div class="panel boxB">
             <div class="titlePanel">
-                <div class="titlePanelBor">三维仿真动画</div>
+                <div class="titlePanelBor">仿真动画</div>
             </div>
             <div class="contentBox">
                 <div class="content">
@@ -59,21 +59,25 @@
                     <span>里程(千米):</span>
                     <b>{{ info.mileage }}</b>
                 </div>
+                <div class="info">
+                    <span>平均速度(千米/小时):</span>
+                    <b>{{ info.averageVelocity }}</b>
+                </div>
                 <div class="info">
                     <span>最大速度(千米/小时):</span>
                     <b>{{ info.maximunSpeed }}</b>
                 </div>
                 <div class="info">
-                    <span>最大减速度(千米/小时):</span>
-                    <b>{{ info.maximumDeceleration }}</b>
+                    <span>最速度(千米/小时):</span>
+                    <b>{{ info.minimunVelocity }}</b>
                 </div>
                 <div class="info">
-                    <span>平均速度(千米/小时):</span>
-                    <b>{{ info.averageVelocity }}</b>
+                    <span>最大加速度(千米/小时):</span>
+                    <b>{{ info.maximumAcceleration }}</b>
                 </div>
                 <div class="info">
-                    <span>最速度(千米/小时):</span>
-                    <b>{{ info.minimunVelocity }}</b>
+                    <span>最大减速度(千米/小时):</span>
+                    <b>{{ info.maximumDeceleration }}</b>
                 </div>
                 <div class="info">
                     <span>最大摆角速度(弧度/秒):</span>
@@ -89,7 +93,7 @@
             <div class="contentBox">
                 <div class="content">
                     <div class="tip">
-                        自车速度方差:{{info.speedVariance}}
+                        自车速度方差:{{ info.speedVariance }}
                     </div>
                     <tableList
                         :columns="columns"
@@ -100,7 +104,9 @@
                 </div>
                 <div class="content">
                     <div class="tip">
-                        自车横摆角速度均方根:{{info.swingSpeedMeanSquareRoot}}
+                        自车横摆角速度均方根:{{
+                            info.swingSpeedMeanSquareRoot
+                        }}
                     </div>
                     <tableList
                         :columns="columnsA"
@@ -119,32 +125,32 @@
             <div class="contentBox">
                 <div class="content">
                     <div class="chart">
-                        <div class="title">变化曲线</div>
-                        <line-chart id="lineA"></line-chart>
+                        <div class="title">加速度变化曲线</div>
+                        <line-chart id="taskInfoLineA"></line-chart>
                     </div>
                     <div class="chart">
-                        <div class="title">变化曲线</div>
-                        <line-chart id="lineB"></line-chart>
+                        <div class="title">距车道中心线距离变化曲线</div>
+                        <line-chart id="taskInfoLineB"></line-chart>
                     </div>
                     <div class="chart">
-                        <div class="title">变化曲线</div>
-                        <line-chart id="lineC"></line-chart>
+                        <div class="title">刹车变化曲线</div>
+                        <line-chart id="taskInfoLineC"></line-chart>
                     </div>
                     <div class="chart">
-                        <div class="title">变化曲线</div>
-                        <line-chart id="lineD"></line-chart>
+                        <div class="title">方向盘转角变化曲线</div>
+                        <line-chart id="taskInfoLineD"></line-chart>
                     </div>
                     <div class="chart">
-                        <div class="title">变化曲线</div>
-                        <line-chart id="lineE"></line-chart>
+                        <div class="title">油门变化曲线</div>
+                        <line-chart id="taskInfoLineE"></line-chart>
                     </div>
                     <div class="chart">
-                        <div class="title">变化曲线</div>
-                        <line-chart id="lineF"></line-chart>
+                        <div class="title">横摆角速度变化曲线</div>
+                        <line-chart id="taskInfoLineF"></line-chart>
                     </div>
                     <div class="chart">
-                        <div class="title">变化曲线</div>
-                        <line-chart id="lineG"></line-chart>
+                        <div class="title">速度变化曲线</div>
+                        <line-chart id="taskInfoLineG"></line-chart>
                     </div>
                 </div>
             </div>
@@ -161,12 +167,12 @@ export default {
     components: { tableList, lineChart },
     data() {
         return {
-            id: "",
+            // id: "",
             info: {},
             columns: [
                 {
                     label: "方差范围",
-                    prop: "id",
+                    prop: "range",
                 },
                 {
                     label: "舒适程度",
@@ -180,15 +186,15 @@ export default {
                 firstRequest: false,
                 data: [
                     {
-                        id: "0<方差值<5",
+                        range: "0≤方差值≤5",
                         ktName: "舒适",
                     },
                     {
-                        id: "5<方差值<10",
+                        range: "5<方差值≤10",
                         ktName: "不舒适",
                     },
                     {
-                        id: "方差值>10",
+                        range: "方差值>10",
                         ktName: "极不舒适",
                     },
                 ],
@@ -197,7 +203,7 @@ export default {
             columnsA: [
                 {
                     label: "均方根范围",
-                    prop: "id",
+                    prop: "range",
                 },
                 {
                     label: "舒适程度",
@@ -211,15 +217,15 @@ export default {
                 firstRequest: false,
                 data: [
                     {
-                        id: "0<均方根值<0.02",
+                        range: "0≤均方根值≤0.02",
                         ktName: "舒适",
                     },
                     {
-                        id: "0.02<均方根值<0.04",
+                        range: "0.02<均方根值≤0.04",
                         ktName: "不舒适",
                     },
                     {
-                        id: "均方根值>0.04",
+                        range: "均方根值>0.04",
                         ktName: "极不舒适",
                     },
                 ],
@@ -233,25 +239,26 @@ export default {
     methods: {},
 
     mounted() {
-        if (this.$route.query.id) {
-            this.id = this.$route.query.id;
-
-            if (this.id) {
-                this.$axios({
-                    method: "post",
-                    url: this.$api.workManagement.selectProjectTaskById,
-                    data: {
-                        id: this.id,
-                        taskId: "1",
-                    },
-                }).then((res) => {
-                    if (res.code == 200 && res.info) {
-                        this.info = res.info;
-                    } else {
-                        this.$message.error(res.message || "获取信息失败");
-                    }
-                });
-            }
+        let taskId = this.$route.query.taskId;
+        let id = this.$route.query.id;
+
+        if (taskId && id) {
+            let id = this.$route.query.id;
+
+            this.$axios({
+                method: "post",
+                url: this.$api.workManagement.selectProjectTaskById,
+                data: {
+                    id,
+                    taskId,
+                },
+            }).then((res) => {
+                if (res.code == 200 && res.info) {
+                    this.info = res.info;
+                } else {
+                    this.$message.error(res.message || "获取信息失败");
+                }
+            });
         }
     },
 };
@@ -318,7 +325,7 @@ export default {
 
         .info {
             display: flex;
-            width: 300px;
+            width: 250px;
             margin: 0 20px 22px 0;
 
             span {

+ 2 - 2
vue.config.js

@@ -102,10 +102,10 @@ module.exports = {
             },
             '/simulation/resource/server': {
                 // target: 'http://10.15.12.73:7003', // 王志强
-                target: 'http://10.15.12.88:7003', // 王耀栋
+                // target: 'http://10.15.12.88:7003', // 王耀栋
                 // target: 'http://10.15.12.72:7003',  // 王晓峰
                 // target: 'http://10.15.12.87:7003',  // 赵艳
-                // target: 'http://10.15.12.70',  // windowstest
+                target: 'http://10.15.12.70',  // windowstest
                 // target: 'http://192.168.30.75',  // gq
                 // target: 'http://47.94.105.148',  // aliyun
                 changeOrigin: true,