zhangliang2 vor 3 Jahren
Ursprung
Commit
a6d7c22b03

+ 3 - 1
src/api/workManagement.js

@@ -13,6 +13,7 @@ const selectProjectDetailsById = basePart + '/simulationProject/selectProjectDet
 const selectProjectTaskList = basePart + '/simulationProject/selectProjectTaskList'; // 获取手动运行项目工作详情-任务列表
 const selectProjectReportById = basePart + '/simulationProject/selectProjectReportById'; // 获取手动运行项目工作详情-测试报告
 const selectProjectTaskById = basePart + '/simulationProject/selectProjectTaskById'; // 获取手动运行项目工作详情-任务详情
+const exportProjectReportById = basePart + '/simulationProject/exportProjectReportById'; // 获取手动运行项目工作详情-下载测试报告
 
 
 export default {
@@ -28,5 +29,6 @@ export default {
     selectProjectDetailsById,
     selectProjectTaskList,
     selectProjectReportById,
-    selectProjectTaskById
+    selectProjectTaskById,
+    exportProjectReportById
 }

+ 1 - 0
src/components/echarts/pieChart.vue

@@ -94,6 +94,7 @@ export default {
                         name: this.seriesName,
                         type: "pie",
                         // radius: '55%',
+                        avoidLabelOverlap: true,
                         data,
                         top: 10,
                     },

+ 1 - 0
src/components/echarts/pieChartA.vue

@@ -100,6 +100,7 @@ export default {
                         // radius: '55%',
                         data,
                         top: 15,
+                        avoidLabelOverlap: true,
                         label: {
                             // alignTo: "edge",
                             // formatter: "{name|{b}}\n{time|{c} 小时}",

+ 18 - 10
src/components/upload/upload.vue

@@ -68,33 +68,33 @@ export default {
                 } 个文件,共选择了 ${files.length + fileList.length} 个文件`
             );
         },
-        handleRemove(file, fileList) {
+        async handleRemove(file, fileList) {
             let md5 = "";
             if (file.raw) {
-                this.$md5(file.raw).then((res) => {
+                await this.$md5(file.raw).then((res) => {
                     md5 = res;
                 });
             } else {
                 md5 = file.md5;
             }
+
             let removeIndex = "";
             this.attachmentList.forEach((item, index) => {
                 if (md5 === item.md5) {
                     removeIndex = index;
                 }
             });
+
+            // if (removeIndex < 0) {
+            //     this.$message.error("删除失败");
+            // }
+
             this.attachmentList.splice(removeIndex, 1);
             this.$emit("attachmentChange", this.attachmentList);
         },
         async toUpload(file) {
             let _this = this;
-            // 获取MD5值
-            /* await this.$md5(file.file).then((res) => {
-                _this.defaultParam = {
-                    file: file.file,
-                    md5: res,
-                };
-            }); */
+
             return new Promise(async (resolve, reject) => {
                 let formData = new FormData();
                 await formData.append("name", file.file.name);
@@ -114,8 +114,16 @@ export default {
                 this.$emit("willUpload");
 
                 let url = this.uploadUrl;
+                let defaultParam = {};
                 if (!url) {
                     url = this.$api.common.uploadWj;
+                    // 获取MD5值
+                    await this.$md5(file.file).then((res) => {
+                        defaultParam = {
+                            // file: file.file,
+                            md5: res,
+                        };
+                    });
                 }
 
                 await axios({
@@ -132,7 +140,7 @@ export default {
                             this.attachmentList.push({
                                 // attachmentName: file.file.name,
                                 // attachmentAddress: res.params,
-                                // md5: _this.defaultParam.md5,
+                                md5: defaultParam.md5,
                                 // uid: file.file.uid,
                                 fileType: file.file.type,
                                 fileName: res.info.fileName,

+ 1 - 1
src/views/algorithmsLibrary/exportAlgorithms.vue

@@ -212,7 +212,7 @@ export default {
                     clearInterval(this.timer);
                     this.percentage = 0;
                 }
-            }, 3000);
+            }, 4500);
         },
         didUpload(state) {
             this.isUploading = false;

+ 2 - 2
src/views/mainPage.vue

@@ -268,7 +268,7 @@ export default {
                     prop: "endDateStr",
                 },
                 {
-                    label: "可用内存",
+                    label: "可用内存(G)",
                     prop: "projectDateStr",
                 },
                 {
@@ -276,7 +276,7 @@ export default {
                     prop: "cgInfos",
                 },
                 {
-                    label: "剩余容量",
+                    label: "剩余容量(G)",
                     prop: "endDateStr1",
                 },
                 {

+ 2 - 2
src/views/modelLibrary/components/canvasSensorModelA.vue

@@ -61,7 +61,7 @@ export default {
                 0,
                 +data.r * rate,
                 0.5 * Math.PI,
-                (hr1 / 180 + 0.5) * Math.PI
+                (hr2 / 180 + 0.5) * Math.PI
             );
             this.ctx.closePath();
             this.ctx.fillStyle = "rgba(252,222,147,0.54)";
@@ -76,7 +76,7 @@ export default {
                 0,
                 +data.r * rate,
                 0.5 * Math.PI,
-                (0.5 - hr2 / 180) * Math.PI,
+                (0.5 - hr1 / 180) * Math.PI,
                 true
             );
             this.ctx.closePath();

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

@@ -52,6 +52,7 @@ export default {
             searchName: "",
             listPub: [], // 公有列表
             listPri: [], // 私有列表
+            isShowed: false, // 判断是否进行过初次展示,只执行一次
         };
     },
 
@@ -81,6 +82,13 @@ export default {
                 if (res.code == 200 && res.info) {
                     this.listPub = res.info.filter((i) => i.share === "1");
                     this.listPri = res.info.filter((i) => i.share === "0");
+
+                    if (!this.isShowed) {
+                        this.isShowed = true;
+                        if (this.listPub[0].id) {
+                            this.showInfo(this.listPub[0].id);
+                        }
+                    }
                 } else {
                     this.$message.error(res.message || "获取失败");
                 }

+ 16 - 3
src/views/modelLibrary/vehicleConfigurationDetail.vue

@@ -524,13 +524,25 @@ export default {
                 this.formA.sensorP = "0";
                 this.formA.sensorR = "0";
                 if (this.curOne.name === "ogt") {
-                    this.formA.sensorPort = "62001";
+                    this.formA.sensorPort = "62000";
                 }
             } else {
-                Object.assign(
+                // 此写法因formA包含太多信息,直接覆盖式的传后续会有问题
+                /* Object.assign(
                     this.formA,
                     this.configList[item.name][item.index]
-                );
+                ); */
+                let formA = this.configList[item.name][item.index];
+
+                this.formA.sensorX = formA.sensorX;
+                this.formA.sensorY = formA.sensorY;
+                this.formA.sensorZ = formA.sensorZ;
+                this.formA.sensorH = formA.sensorH;
+                this.formA.sensorP = formA.sensorP;
+                this.formA.sensorR = formA.sensorR;
+                if (this.curOne.name === "ogt") {
+                    this.formA.sensorPort = formA.sensorPort;
+                }
             }
             this.$refs.canvasSensor.clear();
             this.inputChange();
@@ -540,6 +552,7 @@ export default {
                 this.$message.info("请先选择传感器");
                 return;
             }
+
             this.$refs.formA.validate((valid) => {
                 if (valid) {
                     Object.assign(

+ 91 - 1
src/views/modelLibrary/vehicleConfigurationList.vue

@@ -87,12 +87,61 @@
 
         <tableList
             ref="table"
+            class="myTable"
             style="margin: 0 30px"
             :columns="columns"
             :getDataWay="getDataWay"
             :pagination="pagination"
             index
         >
+            <el-table-column
+                label="传感器配置"
+                slot="sensorCount"
+                align="center"
+            >
+                <template v-slot="scope">
+                    <i
+                        class="sensorIcon sensorIconA"
+                        v-show="scope.row.sensorCount.camera"
+                        title="摄像头"
+                    ></i
+                    ><span
+                        class="sensorCount"
+                        v-show="scope.row.sensorCount.camera"
+                        >{{ scope.row.sensorCount.camera }}</span
+                    >
+                    <i
+                        class="sensorIcon sensorIconB"
+                        v-show="scope.row.sensorCount.ogt"
+                        title="完美传感器"
+                    ></i
+                    ><span
+                        class="sensorCount"
+                        v-show="scope.row.sensorCount.ogt"
+                        >{{ scope.row.sensorCount.ogt }}</span
+                    >
+                    <i
+                        class="sensorIcon sensorIconC"
+                        v-show="scope.row.sensorCount.lidar"
+                        title="激光雷达"
+                    ></i
+                    ><span
+                        class="sensorCount"
+                        v-show="scope.row.sensorCount.lidar"
+                        >{{ scope.row.sensorCount.lidar }}</span
+                    >
+                    <i
+                        class="sensorIcon sensorIconE"
+                        v-show="scope.row.sensorCount.gps"
+                        title="GPS"
+                    ></i
+                    ><span
+                        class="sensorCount"
+                        v-show="scope.row.sensorCount.gps"
+                        >{{ scope.row.sensorCount.gps }}</span
+                    >
+                </template>
+            </el-table-column>
             <el-table-column label="操作" slot="cgInfos" align="center">
                 <template v-slot="scope">
                     <i
@@ -161,7 +210,8 @@ export default {
                 },
                 {
                     label: "传感器配置",
-                    prop: "configSensors",
+                    prop: "sensorCount",
+                    template: true,
                 },
                 {
                     label: "操作",
@@ -279,4 +329,44 @@ export default {
 </script>
 
 <style scoped lang="less">
+.myTable {
+    .sensorIconA {
+        background: url("../../assets/common/image/sensor/001.png") center
+            no-repeat;
+    }
+    .sensorIconB {
+        background: url("../../assets/common/image/sensor/002.png") center
+            no-repeat;
+    }
+    .sensorIconC {
+        background: url("../../assets/common/image/sensor/003.png") center
+            no-repeat;
+    }
+    .sensorIconD {
+        background: url("../../assets/common/image/sensor/004.png") center
+            no-repeat;
+    }
+    .sensorIconE {
+        background: url("../../assets/common/image/sensor/005.png") center
+            no-repeat;
+    }
+
+    .sensorIcon {
+        display: inline-block;
+        width: 18px;
+        height: 18px;
+        background-size: contain;
+        vertical-align: middle;
+        cursor: pointer;
+    }
+
+    .sensorCount {
+        display: inline-block;
+        width: 18px;
+        height: 18px;
+        margin-right: 6px;
+        line-height: 18px;
+        text-align: center;
+    }
+}
 </style>

+ 1 - 1
src/views/modelLibrary/vehicleModel.vue

@@ -118,7 +118,7 @@
                         </el-input>
                     </el-form-item>
                     <el-form-item
-                        label="最大减速度(m/s2):"
+                        label="最大减速度(m/s²):"
                         prop="maxDeceleration"
                     >
                         <el-input

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

@@ -59,6 +59,7 @@ export default {
     methods: {},
     computed: {
         list() {
+            // console.log(this.$route.matched);
             let isMainPage = false;
             this.$route.matched.filter((item) => {
                 if (item.name === this.$route.name) {

+ 1 - 1
src/views/sceneLibrary/gradingRule.vue

@@ -95,7 +95,7 @@ export default {
             // 调用save时,应写成save(),给不给参数均可,不写小括号的话,isAdd会是事件源,则为true
             this.$refs.form.validate((valid) => {
                 if (valid) {
-                    if (isAdd || !this.$route.query.formData) {
+                    if (isAdd || !this.$route.query.rulesId) {
                         // 另存为或新增页面
                         this.form.rulesId = "";
                         this.form.share = "0";

+ 9 - 7
src/views/sceneLibrary/naturalDrivingScenarioList.vue

@@ -1,5 +1,5 @@
 <template>
-    <div>
+    <div class="naturalDrivingScenarioListPanel">
         <search-layout :needBox="true">
             <template slot="searchItem1">
                 <span class="label">场景编号</span>
@@ -466,13 +466,15 @@ export default {
 
 <style lang='less' scoped>
 @import "./common/util.less";
-.inputBox {
-    .label {
-        min-width: 75px;
+.naturalDrivingScenarioListPanel {
+    .inputBox {
+        .label {
+            min-width: 75px;
+        }
     }
-}
 
-.btnsPanel {
-    text-align: right;
+    .btnsPanel {
+        text-align: right;
+    }
 }
 </style>

+ 12 - 10
src/views/sceneLibrary/trafficAccidentSimulationScenarioList.vue

@@ -1,5 +1,5 @@
 <template>
-    <div>
+    <div class="trafficAccidentSimulationScenarioListPanel">
         <search-layout :needBox="true">
             <template slot="searchItem1">
                 <span class="label">场景名称</span>
@@ -362,17 +362,19 @@ export default {
 
 <style lang='less' scoped>
 @import "./common/util.less";
-.inputBox {
-    .radioBox {
-        width: 340px;
-    }
+.trafficAccidentSimulationScenarioListPanel {
+    .inputBox {
+        .radioBox {
+            width: 340px;
+        }
 
-    .label {
-        min-width: 90px;
+        .label {
+            min-width: 90px;
+        }
     }
-}
 
-.btnsPanel {
-    text-align: right;
+    .btnsPanel {
+        text-align: right;
+    }
 }
 </style>

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

@@ -49,6 +49,7 @@
                             :label="item.name"
                             :value="item.id"
                             :key="item.id"
+                            :title="item.description"
                         ></el-option>
                     </el-select>
                 </el-form-item>
@@ -62,6 +63,7 @@
                             :label="item.name"
                             :value="item.id"
                             :key="item.id"
+                            :title="item.description"
                         ></el-option>
                     </el-select>
                 </el-form-item>
@@ -129,7 +131,7 @@
             <el-button
                 type="primary"
                 @click="save(true)"
-                v-if="this.$route.query.formData"
+                v-if="this.$route.query.id"
                 >另存为</el-button
             >
             <el-button type="primary" @click="save(false, true)"

+ 26 - 1
src/views/workManagement/projectInfo.vue

@@ -57,7 +57,7 @@
                     <i
                         class="el-icon-download download"
                         v-bind:class="{ cursor: info.nowRunState === '30' }"
-                        @click="toReport"
+                        @click="downReport"
                     ></i>
                 </div>
                 <div class="boxContent boxContentC">
@@ -273,6 +273,31 @@ export default {
                 });
             }
         },
+        downReport() {
+            this.$axios({
+                method: "post",
+                url: this.$api.workManagement.exportProjectReportById,
+                responseType: "blob",
+                data: { id: this.id },
+            }).then((res) => {
+                let blob = new Blob([res]);
+                let fileName = "测试报告.pdf";
+                if ("download" in document.createElement("a")) {
+                    // 非IE下载
+                    let emlink = document.createElement("a");
+                    emlink.download = fileName;
+                    emlink.style.display = "none";
+                    emlink.href = URL.createObjectURL(blob);
+                    document.body.appendChild(emlink);
+                    emlink.click();
+                    URL.revokeObjectURL(emlink.href);
+                    document.body.removeChild(emlink);
+                } else {
+                    // IE下载
+                    navigator.msSaveBlob(blob, fileName);
+                }
+            });
+        },
         curItem(item) {
             this.curOne = item;
         },

+ 2 - 2
vue.config.js

@@ -101,8 +101,8 @@ module.exports = {
                 }
             },
             '/simulation/resource/server': {
-                target: 'http://10.15.12.73:7003', // 王志强
-                // target: 'http://10.15.12.88:7003', // 王耀栋
+                // target: 'http://10.15.12.73: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