zhangliang2 3 gadi atpakaļ
vecāks
revīzija
7ee8f807b9

+ 7 - 0
src/components/echarts/lineChart1.vue

@@ -84,6 +84,13 @@ export default {
                     },
                 },
             ],
+            grid: {
+                top: '10%',
+                left: '40px',
+                right: '40px',
+                bottom: '10%',
+                containLabel: true
+            },
         };
         this.charts.setOption(option);
     },

+ 11 - 1
src/components/echarts/lineChart2.vue

@@ -85,11 +85,21 @@ export default {
                         },
                     },
                     areaStyle: {
-                        color: "rgba(51,151,255,0.2)",
+                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                            { offset: 0, color: "rgba(51, 151, 255, 0.7)" },
+                            { offset: 1, color: "rgba(170, 197, 255, 0.5)" },
+                        ]),
                         // color: "#aac5ff",
                     },
                 },
             ],
+            grid: {
+                top: "10%",
+                left: "20px",
+                right: "20px",
+                bottom: "10%",
+                containLabel: true,
+            },
         };
         this.charts.setOption(option);
     },

+ 12 - 2
src/components/echarts/lineChart3.vue

@@ -76,7 +76,7 @@ export default {
             yAxis: {},
             series: [
                 {
-                    data: [30, 42, 48, 36, 39, 69, 51],
+                    data: [30, 42, 48, 36, 39, 96, 51],
                     type: "line",
                     smooth: true,
                     lineStyle: {
@@ -85,10 +85,20 @@ export default {
                         },
                     },
                     areaStyle: {
-                        color: "rgba(51,151,255,0.2)",
+                        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                            { offset: 0, color: "rgba(51, 151, 255, 0.7)" },
+                            { offset: 1, color: "rgba(170, 197, 255, 0.5)" },
+                        ]),
                     },
                 },
             ],
+            grid: {
+                top: "10%",
+                left: "20px",
+                right: "20px",
+                bottom: "10%",
+                containLabel: true,
+            },
         };
         this.charts.setOption(option);
     },

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

@@ -184,8 +184,188 @@ export default {
             ],
         };
 
+        let optionX = {
+            tooltip: {
+                //提示框,可以在全局也可以在
+                trigger: "item", //提示框的样式
+                formatter: "{a} <br/>{b}: {c} ({d}%)",
+                color: "#000", //提示框的背景色
+                textStyle: {
+                    //提示的字体样式
+                    color: "#ffffff",
+                },
+            },
+            series: [
+                {
+                    type: "pie",
+                    // radius: '55%',
+                    data: [
+                        {
+                            value: 335,
+                            name: "未执行",
+                            itemStyle: {
+                                normal: {
+                                    color: "#5B8FF9",
+                                },
+                            },
+                        },
+                        {
+                            value: 1234,
+                            name: "执行中",
+                            itemStyle: {
+                                normal: {
+                                    color: "#61DDAA",
+                                },
+                            },
+                        },
+                        {
+                            value: 548,
+                            name: "已中止",
+                            itemStyle: {
+                                normal: {
+                                    color: "#65789B",
+                                },
+                            },
+                        },
+                        {
+                            value: 153,
+                            name: "已完成",
+                            itemStyle: {
+                                normal: {
+                                    color: "#F6BD16",
+                                },
+                            },
+                        },
+                    ],
+                    top: 10,
+                },
+            ],
+        };
+
+        let optionY = {
+            tooltip: {
+                //提示框,可以在全局也可以在
+                trigger: "item", //提示框的样式
+                formatter: "{a} <br/>{b}: {c} ({d}%)",
+                color: "#000", //提示框的背景色
+                textStyle: {
+                    //提示的字体样式
+                    color: "#ffffff",
+                },
+            },
+            series: [
+                {
+                    type: "pie",
+                    // radius: '55%',
+                    data: [
+                        {
+                            value: 435,
+                            name: "未执行",
+                            itemStyle: {
+                                normal: {
+                                    color: "#5B8FF9",
+                                },
+                            },
+                        },
+                        {
+                            value: 234,
+                            name: "执行中",
+                            itemStyle: {
+                                normal: {
+                                    color: "#61DDAA",
+                                },
+                            },
+                        },
+                        {
+                            value: 138,
+                            name: "已中止",
+                            itemStyle: {
+                                normal: {
+                                    color: "#65789B",
+                                },
+                            },
+                        },
+                        {
+                            value: 753,
+                            name: "已完成",
+                            itemStyle: {
+                                normal: {
+                                    color: "#F6BD16",
+                                },
+                            },
+                        },
+                    ],
+                    top: 10,
+                },
+            ],
+        };
+
+        let optionZ = {
+            tooltip: {
+                //提示框,可以在全局也可以在
+                trigger: "item", //提示框的样式
+                formatter: "{a} <br/>{b}: {c} ({d}%)",
+                color: "#000", //提示框的背景色
+                textStyle: {
+                    //提示的字体样式
+                    color: "#ffffff",
+                },
+            },
+            series: [
+                {
+                    type: "pie",
+                    // radius: '55%',
+                    data: [
+                        {
+                            value: 855,
+                            name: "优秀(G)",
+                            itemStyle: {
+                                normal: {
+                                    color: "#5B8FF9",
+                                },
+                            },
+                        },
+                        {
+                            value: 693,
+                            name: "良好(A)",
+                            itemStyle: {
+                                normal: {
+                                    color: "#61DDAA",
+                                },
+                            },
+                        },
+                        {
+                            value: 548,
+                            name: "一般(M)",
+                            itemStyle: {
+                                normal: {
+                                    color: "#65789B",
+                                },
+                            },
+                        },
+                        {
+                            value: 153,
+                            name: "较差(P)",
+                            itemStyle: {
+                                normal: {
+                                    color: "#F6BD16",
+                                },
+                            },
+                        },
+                    ],
+                    top: 10,
+                },
+            ],
+        };
+
         if (this.id === "pieB") {
             this.charts.setOption(option2);
+        } else if (this.id === "pieX") {
+            this.charts.setOption(optionX);
+        } else if (this.id === "pieY") {
+            this.charts.setOption(optionY);
+        } else if (this.id === "pieZ") {
+            this.charts.setOption(optionZ);
         } else {
             this.charts.setOption(option);
         }

+ 191 - 2
src/components/echarts/pieChart1.vue

@@ -2,9 +2,9 @@
     <div
         class="linechart"
         :id="id"
-        style="width: calc(27vw - 180px); height: calc(36vh - 165px)"
+        style="width: calc(37.5vw - 180px); height: calc(42vh - 165px)"
     ></div>
-        <!-- style="width: calc(33vw - 180px); height: calc(42vh - 165px)" -->
+    <!-- style="width: calc(33vw - 180px); height: calc(42vh - 165px)" -->
 </template>
 
 <script>
@@ -48,6 +48,7 @@ export default {
             series: [
                 {
                     type: "pie",
+                    // radius: '55%',
                     data: [
                         {
                             value: 335,
@@ -86,6 +87,184 @@ export default {
                             },
                         },
                     ],
+                    // left: 0,
+                    // right: "50%",
+                    top: 10,
+                    // bottom: 0,
+                },
+            ],
+        };
+
+        let optionX = {
+            tooltip: {
+                //提示框,可以在全局也可以在
+                trigger: "item", //提示框的样式
+                formatter: "{a} <br/>{b}: {c} ({d}%)",
+                color: "#000", //提示框的背景色
+                textStyle: {
+                    //提示的字体样式
+                    color: "#ffffff",
+                },
+            },
+            series: [
+                {
+                    type: "pie",
+                    // radius: '55%',
+                    data: [
+                        {
+                            value: 335,
+                            name: "未执行",
+                            itemStyle: {
+                                normal: {
+                                    color: "#5B8FF9",
+                                },
+                            },
+                        },
+                        {
+                            value: 1234,
+                            name: "执行中",
+                            itemStyle: {
+                                normal: {
+                                    color: "#61DDAA",
+                                },
+                            },
+                        },
+                        {
+                            value: 548,
+                            name: "已中止",
+                            itemStyle: {
+                                normal: {
+                                    color: "#65789B",
+                                },
+                            },
+                        },
+                        {
+                            value: 153,
+                            name: "已完成",
+                            itemStyle: {
+                                normal: {
+                                    color: "#F6BD16",
+                                },
+                            },
+                        },
+                    ],
+                    top: 10,
+                },
+            ],
+        };
+
+        let optionY = {
+            tooltip: {
+                //提示框,可以在全局也可以在
+                trigger: "item", //提示框的样式
+                formatter: "{a} <br/>{b}: {c} ({d}%)",
+                color: "#000", //提示框的背景色
+                textStyle: {
+                    //提示的字体样式
+                    color: "#ffffff",
+                },
+            },
+            series: [
+                {
+                    type: "pie",
+                    // radius: '55%',
+                    data: [
+                        {
+                            value: 435,
+                            name: "未执行",
+                            itemStyle: {
+                                normal: {
+                                    color: "#5B8FF9",
+                                },
+                            },
+                        },
+                        {
+                            value: 234,
+                            name: "执行中",
+                            itemStyle: {
+                                normal: {
+                                    color: "#61DDAA",
+                                },
+                            },
+                        },
+                        {
+                            value: 138,
+                            name: "已中止",
+                            itemStyle: {
+                                normal: {
+                                    color: "#65789B",
+                                },
+                            },
+                        },
+                        {
+                            value: 753,
+                            name: "已完成",
+                            itemStyle: {
+                                normal: {
+                                    color: "#F6BD16",
+                                },
+                            },
+                        },
+                    ],
+                    top: 10,
+                },
+            ],
+        };
+
+        let optionZ = {
+            tooltip: {
+                //提示框,可以在全局也可以在
+                trigger: "item", //提示框的样式
+                formatter: "{a} <br/>{b}: {c} ({d}%)",
+                color: "#000", //提示框的背景色
+                textStyle: {
+                    //提示的字体样式
+                    color: "#ffffff",
+                },
+            },
+            series: [
+                {
+                    type: "pie",
+                    // radius: '55%',
+                    data: [
+                        {
+                            value: 855,
+                            name: "优秀(G)",
+                            itemStyle: {
+                                normal: {
+                                    color: "#5B8FF9",
+                                },
+                            },
+                        },
+                        {
+                            value: 693,
+                            name: "良好(A)",
+                            itemStyle: {
+                                normal: {
+                                    color: "#61DDAA",
+                                },
+                            },
+                        },
+                        {
+                            value: 548,
+                            name: "一般(M)",
+                            itemStyle: {
+                                normal: {
+                                    color: "#65789B",
+                                },
+                            },
+                        },
+                        {
+                            value: 153,
+                            name: "较差(P)",
+                            itemStyle: {
+                                normal: {
+                                    color: "#F6BD16",
+                                },
+                            },
+                        },
+                    ],
+                    top: 10,
                 },
             ],
         };
@@ -110,6 +289,10 @@ export default {
                             show: true,
                         },
                     },
+                    rich: {
+                        padding: [0, 0, 0, 0],
+                    },
+                    padding: [0, 10, 10, 10],
                     labelLine: {
                         show: false,
                     },
@@ -191,6 +374,12 @@ export default {
 
         if (this.id === "pieB") {
             this.charts.setOption(option2);
+        } else if (this.id === "pieX") {
+            this.charts.setOption(optionX);
+        } else if (this.id === "pieY") {
+            this.charts.setOption(optionY);
+        } else if (this.id === "pieZ") {
+            this.charts.setOption(optionZ);
         } else {
             this.charts.setOption(option);
         }

+ 4 - 4
src/views/mainPage.vue

@@ -156,19 +156,19 @@
                     <div class="shadowBox">
                         <div class="title">项目运行状态统计</div>
                         <div class="pieBox">
-                            <pie-chart1 id="pieA"></pie-chart1>
+                            <pie-chart1 id="pieX"></pie-chart1>
                         </div>
                     </div>
                     <div class="shadowBox shadowBoxB">
                         <div class="title">任务运行状态统计</div>
                         <div class="pieBox">
-                            <pie-chart1 id="pieC"></pie-chart1>
+                            <pie-chart1 id="pieY"></pie-chart1>
                         </div>
                     </div>
                     <div class="shadowBox">
                         <div class="title">评测等级分布</div>
                         <div class="pieBox">
-                            <pie-chart1 id="pieD"></pie-chart1>
+                            <pie-chart1 id="pieZ"></pie-chart1>
                         </div>
                     </div>
                 </div>
@@ -203,7 +203,7 @@ export default {
     },
     data() {
         return {
-            activeName: "2",
+            activeName: "1",
             activitedPageNumA: "1",
             subPageActiveNameA: 1,
             pageBtnListA: [

+ 5 - 0
src/views/modelLibrary/common/util.less

@@ -8,6 +8,7 @@
     div {
         line-height: 32px;
     }
+
 }
 
 .titlePanel {
@@ -16,4 +17,8 @@
 
 .el-textarea {
     width: 230px;
+}
+
+.el-form {
+    width: 390px;
 }

+ 2 - 2
src/views/modelLibrary/sensorModel.vue

@@ -248,8 +248,8 @@ export default {
             flex: 1;
             min-width: 300px;
             // padding-left: 40px;
-            padding-left: 10%;
-            padding-right: 10%;
+            padding-left: 6%;
+            padding-right: 3%;
         }
     }
 

+ 29 - 12
src/views/workManagement/projectInfo.vue

@@ -28,7 +28,7 @@
                     </div>
                     <div class="info">
                         <span>完成进度:</span>
-                        <b>{{ info.nowRunState }}</b>
+                        <b>{{ info.nowRunStateName }}</b>
                     </div>
                     <div class="info">
                         <span>结果等级:</span>
@@ -54,15 +54,24 @@
             <div class="box panel">
                 <div class="titlePanel">
                     <div class="titlePanelBor">测试报告</div>
-                    <i class="el-icon-download download"></i>
+                    <i
+                        class="el-icon-download download"
+                        v-bind:class="{ cursor: info.nowRunState === '30' }"
+                        @click="toReport"
+                    ></i>
                 </div>
                 <div class="boxContent boxContentC">
                     <div class="cbox" @click="toReport">
                         <img
-                            src="../../assets/common/image/others/1.png"
+                            :src="downImgSrc"
                             width="100%"
+                            v-bind:class="{ cursor: info.nowRunState === '30' }"
                         />
-                        <div>仿真云测试报告</div>
+                        <div
+                            v-bind:class="{ cursor: info.nowRunState === '30' }"
+                        >
+                            仿真云测试报告
+                        </div>
                     </div>
                 </div>
             </div>
@@ -109,10 +118,10 @@
             <div class="box">
                 <div class="boxContentA">
                     <div class="chart">
-                        <pie-chart id="pieA"></pie-chart>
+                        <pie-chart id="pieX"></pie-chart>
                     </div>
                     <div class="chart">
-                        <pie-chart id="pieC"></pie-chart>
+                        <pie-chart id="pieZ"></pie-chart>
                     </div>
                 </div>
                 <div>
@@ -216,6 +225,7 @@ export default {
                 name: "",
                 index: -1,
             },
+            downImgSrc: require("@/assets/common/image/others/noDoc.png"),
         };
     },
 
@@ -226,10 +236,12 @@ export default {
             this.$router.push({ path: "/taskInfo" });
         },
         toReport() {
-            this.$router.push({
-                path: "/evaluationReport",
-                query: { id: this.id },
-            });
+            if (this.info.nowRunState === "30") {
+                this.$router.push({
+                    path: "/evaluationReport",
+                    query: { id: this.id },
+                });
+            }
         },
         curItem(item) {
             this.curOne = item;
@@ -255,6 +267,11 @@ export default {
                         this.configList.ogt = res.info.sensorOgtList || [];
                         this.configList.lidar = res.info.sensorLidarList || [];
                         this.configList.gps = res.info.sensorGpsList || [];
+                        if (this.info.nowRunState === "30") {
+                            this.downImgSrc = require("@/assets/common/image/others/hasDoc.png");
+                        } else {
+                            this.downImgSrc = require("@/assets/common/image/others/noDoc.png");
+                        }
                     } else {
                         this.$message.error(res.message || "获取信息失败");
                     }
@@ -299,7 +316,7 @@ export default {
                 right: 0;
                 color: @themeColor;
                 font-size: 18px;
-                cursor: pointer;
+                // cursor: pointer;
             }
         }
 
@@ -332,7 +349,7 @@ export default {
             .cbox {
                 text-align: center;
                 color: @themeColor;
-                cursor: pointer;
+                // cursor: pointer;
 
                 > div {
                     margin-top: 18px;

+ 2 - 2
vue.config.js

@@ -100,9 +100,9 @@ module.exports = {
                 }
             },
             '/simulation/resource/server': {
-                // target: 'http://10.15.12.73: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.72:7003',  // 王晓峰
                 // target: 'http://10.15.12.87:7003',  // 赵艳
                 // target: 'http://10.15.12.70',  // windowstest
                 // target: 'http://192.168.30.75',  // gq