Forráskód Böngészése

配合韩正义软测做调整

wangtao 2 éve
szülő
commit
0529abeb37

+ 1 - 0
.env.development

@@ -2,4 +2,5 @@
 NODE_ENV='development'
 // 下面的为接口地址。此处/api是我经过webpack设置跨域代理之后的地址
 VUE_APP_BASE_URL='https://qhome.usky.cn/fivapi/'
+# VUE_APP_BASE_URL='http://172.16.120.238:8011/'
 VUE_APP_BASE_FILE='https://qhome.usky.cn/uskyfile/'

+ 1 - 0
.gitignore

@@ -22,3 +22,4 @@ pnpm-debug.log*
 *.njsproj
 *.sln
 *.sw?
+*.zip

BIN
202206171911.zip


BIN
202206171915.zip


+ 81 - 79
package-lock.json

@@ -1813,63 +1813,6 @@
           "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
           "dev": true
         },
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.2",
-          "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.2.tgz",
-          "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
         "ssri": {
           "version": "8.0.1",
           "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1617826725566&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-8.0.1.tgz",
@@ -1878,28 +1821,6 @@
           "requires": {
             "minipass": "^3.1.1"
           }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
-        "vue-loader-v16": {
-          "version": "npm:vue-loader@16.8.3",
-          "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
-          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chalk": "^4.1.0",
-            "hash-sum": "^2.0.0",
-            "loader-utils": "^2.0.0"
-          }
         }
       }
     },
@@ -12710,6 +12631,87 @@
         }
       }
     },
+    "vue-loader-v16": {
+      "version": "npm:vue-loader@16.8.3",
+      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
+      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chalk": "^4.1.0",
+        "hash-sum": "^2.0.0",
+        "loader-utils": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.4",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
+          "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
     "vue-router": {
       "version": "4.0.8",
       "resolved": "https://registry.nlark.com/vue-router/download/vue-router-4.0.8.tgz",

+ 8 - 2
src/api/home/home.js

@@ -112,6 +112,12 @@ export default {
         })
     },
 
-
-
+    // 台区下拉数据
+    taiqu_api(params) {
+        return request({
+            url: `platformArea/platformAreaListOne`,
+            method: 'GET',
+            params: params
+        })
+    },
 }

+ 50 - 16
src/views/home/components/lineChart.vue

@@ -5,16 +5,43 @@
 import * as echarts from "echarts";
 
 export default {
-  props: {
-    ftrendIcoCount: Object,
-  },
-  computed: {
-    ftrendIco() {
-      return this.ftrendIcoCount;
-    },
-  },
+//   props: {
+//     ftrendIcoCount: Array,
+//   },
+//   computed: {
+//     ftrendIco() {
+//       return this.ftrendIcoCount;
+//     },
+//   },
   data() {
-    return {};
+    return {
+        ftrendIcoCount:  [
+                {
+                        "name": "工单数量",
+                        "list": [
+                        6
+                        ],
+                        "listDate": ['02-17']
+                },
+                {
+                        "name": "及时处理数量",
+                        "list": [
+                        5
+                        ],
+                        "listDate": ['02-17']
+                },
+                {
+                        "name": "故障数量",
+                        "list": [4],
+                        "listDate": ['02-17']
+                },
+                {
+                        "name": "及时抢修数量",
+                        "list": [3],
+                        "listDate": ['02-17']
+                }
+        ]
+    };
   },
   mounted() {
     this.$nextTick(() => {
@@ -147,14 +174,21 @@ export default {
             type: "line",
             smooth: false, // 曲线是否平滑显示
             data: this.ftrendIcoCount[1].list,
-            // data: [
-            //   30, 50, 110, 144, 110, 240, 228, 240, 130, 240, 220, 130, 110,
-            //   240, 228, 240, 130, 240, 220, 130, 240, 228, 240, 130, 240, 220,
-            //   130, 30, 50, 110, 144, 110, 240, 228, 240,
-            // ],
-            // symbol: "circle",
             symbolSize: 6,
-            
+          },
+          {
+            name: this.ftrendIcoCount[2].name,
+            type: "line",
+            smooth: false, // 曲线是否平滑显示
+            data: this.ftrendIcoCount[2].list,
+            symbolSize: 6,
+          },
+          {
+            name: this.ftrendIcoCount[3].name,
+            type: "line",
+            smooth: false, // 曲线是否平滑显示
+            data: this.ftrendIcoCount[3].list,
+            symbolSize: 6,
           },
         ],
       };

+ 171 - 0
src/views/home/components/lineChart原.vue

@@ -0,0 +1,171 @@
+<template>
+  <div ref="lineChart" style="width: 100%; height: 100%"></div>
+</template>
+<script>
+import * as echarts from "echarts";
+
+export default {
+  props: {
+    ftrendIcoCount: Array,
+  },
+  computed: {
+    ftrendIco() {
+      return this.ftrendIcoCount;
+    },
+  },
+  data() {
+    return {
+    };
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.initChart();
+    });
+  },
+
+  beforeUnmount() {
+    window.removeEventListener("resize", this.chart);
+  },
+  watch: {
+    ftrendIco() {
+      this.initChart();
+    },
+  },
+  methods: {
+    //次数分布折线图
+    initChart() {
+      var _this = this;
+      var chart = echarts.init(this.$refs.lineChart);
+      var option;
+
+      var timeLine = new Array();
+      timeLine = this.ftrendIcoCount[0].listDate;
+      var time = this.$store.state.Time_Data;
+      this.$store.commit("getAll", [
+        time[0].split(" ")[0],
+        time[1].split(" ")[0],
+      ]); //将time变量中的开始时间和结束时间传给getAll方法
+      var timeall = this.$store.state.timearr; //将getAll已便利好的时间区间数组存入变量timeall
+
+      if (this.ftrendIcoCount[0].listDate.length) {
+        timeLine = this.ftrendIcoCount[0].listDate;
+      } else {
+        timeLine = [
+          parseInt(timeall[0].split("-")[1]) +
+            "-" +
+            parseInt(timeall[0].split("-")[2]),
+        ];
+        timeLine.map(() => {
+          _this.ftrendIcoCount[0].list.push(0);
+          _this.ftrendIcoCount[1].list.push(0);
+          return;
+        });
+      }
+
+      option = {
+        color: ["#00F4FD", "#2FA4EE"],
+        tooltip: {
+          trigger: "axis",
+        },
+        // 图列组件
+        legend: {
+          itemHeight: 8, //改变圆圈大小
+          itemWidth: 26, //改变圆圈大小
+          itemGap: 30,
+          textStyle: {
+            color: "#fff",
+          },
+
+          // left: "10%",
+          bottom: -5,
+        },
+        grid: {
+          left: "0%",
+          right: "0%",
+          bottom: "12%",
+          top: "20%",
+          containLabel: true,
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: true,
+          data: timeLine,
+          axisTick: {
+            show: false, //去除刻度线
+          },
+          axisLabel: {
+            color: "#fff", // 文本颜色
+          },
+          axisLine: {
+            show: false, // 去除轴线
+          },
+        },
+        yAxis: {
+          type: "value",
+          axisTick: {
+            show: false, //去除刻度线
+          },
+          axisLabel: {
+            color: "#fff", // 文本颜色
+          },
+          axisLine: {
+            show: false, // 去除轴线
+          },
+          splitNumber: 5,
+          splitLine: {
+            show: true,
+            lineStyle: {
+              color: "rgba(255,255,255,0.1)",
+            },
+          },
+        },
+        series: [
+          {
+            // name: "故障数量",
+            name: this.ftrendIcoCount[0].name,
+            type: "line",
+            smooth: false, // 曲线是否平滑显示
+            data: this.ftrendIcoCount[0].list,
+            // data: [
+            //   24, 40, 101, 134, 90, 230, 210, 230, 120, 230, 210, 120, 230, 210,
+            //   230, 120, 230, 210, 120, 120, 230, 210, 230, 120, 230, 210, 120,
+            //   24, 40, 101, 134, 90, 230,
+            // ],
+            symbolSize: 6, //拐点圆的大小
+            // symbol: "circle",
+            // lineStyle: {
+            //   color: "#00F4FD",
+            //   width: 1,
+            // },
+            // itemStyle: {
+            //   borderWidth: 1,
+            //   borderColor: "#00F4FD",
+            //   color: "#000",
+            // },
+          },
+          {
+            name: this.ftrendIcoCount[1].name,
+            type: "line",
+            smooth: false, // 曲线是否平滑显示
+            data: this.ftrendIcoCount[1].list,
+            // data: [
+            //   30, 50, 110, 144, 110, 240, 228, 240, 130, 240, 220, 130, 110,
+            //   240, 228, 240, 130, 240, 220, 130, 240, 228, 240, 130, 240, 220,
+            //   130, 30, 50, 110, 144, 110, 240, 228, 240,
+            // ],
+            // symbol: "circle",
+            symbolSize: 6,
+            
+          },
+        ],
+      };
+
+      chart.setOption(option, true);
+      window.addEventListener("resize", () => {
+        chart.resize();
+      });
+      this.chart = chart;
+    },
+  },
+};
+</script>

+ 40 - 7
src/views/home/index.vue

@@ -44,6 +44,17 @@
       </div>
       <div class="column mapBox" style="position: relative">
         <map-static-top :fsiteCount="siteCount"></map-static-top>
+        <div class="filterSec topSelect" v-if="taiquStatus">
+            <label for="所属台区" class="txt">所属台区:</label>
+            <select  name="全部" id="" v-model="taiqu"  @change="siteList_api()">
+                <option value="" selected>全部</option>
+              <option 
+                v-for="item in taiquList"
+                        :key="item.id"
+                        :label="item.platformAreaName"
+                        :value="item.id" />
+            </select>
+          </div>
         <!-- <div id="pickerBox">
           <input
             id="pickerInput"
@@ -193,6 +204,9 @@ export default {
   },
   data() {
     return {
+        taiquStatus:false,
+      taiqu:"",
+      taiquList:[],//台区下拉数据
       dDefaultTime: this.$store.state.se_defaultTime,
       // fDefaultTime: [
       //   new Date("2021-6-23 00:00:00"),
@@ -251,6 +265,7 @@ export default {
   },
   created() {},
   mounted() {
+    this.taiquGet()
     this.alarmCount_api();
     this.personalCount_api();
     this.epLoad_api();
@@ -264,10 +279,6 @@ export default {
     this.eptrendIcoMonth_api();
   },
   methods: {
-    // searchSite(){
-    //     this.siteList_api({"name":this.name});
-    // },
-
     //告警总数数据对接
     alarmCount_api() {
       api.alarmCount_api().then((requset) => {
@@ -331,8 +342,9 @@ export default {
       });
     },
     //地图撒点
-    siteList_api(query = {}) {
-      api.siteList_api(query).then((requset) => {
+   
+    siteList_api() {
+      api.siteList_api( {'stationAreaId':this.taiqu}).then((requset) => {
         this.siteList = requset.data;
         this.initMap();
       });
@@ -374,6 +386,7 @@ export default {
       this.map = await new AMap.Map("mapF", {
         mapStyle: "amap://styles/659dc6c4753dc6e87c65c8a874c02133", //设置地图的显示样式
         resizeEnable: true,
+        center:[121.48,31.23],
         zoom: 13,
         zooms: [3, 16],
         // features: [] //清空背景道路等
@@ -432,7 +445,6 @@ export default {
       // 创建标点和点击事件
       let markers = lnglats.map((val, ind) => {
         console.log("val");
-        console.log(val);
         let marker = new AMap.Marker({
           position: new AMap.LngLat(val.longitude, val.latitude),
           icon:
@@ -598,6 +610,14 @@ export default {
     },
 
     // 嘉定区边界高亮 end
+
+    taiquGet(){
+        api.taiqu_api({'size':0}).then((requset) => {
+                this.taiquList = requset.data.records
+                this.taiquStatus = true
+        });
+    },
+   
   },
 };
 </script>
@@ -644,4 +664,17 @@ export default {
 .amap-icon img {
   width: 35px;
 }
+
+
+
+
+.topSelect{
+        position: absolute;
+        top:1.5rem;
+        right:0.086rem;
+        .txt{
+                font-size: 14px;
+                margin-right:10px;
+        }
+}
 </style>

+ 14 - 0
src/views/site/components/Overview/modalBox.vue

@@ -1,3 +1,11 @@
+<!--
+ * @Descripttion: 
+ * @version: 
+ * @Author: wt
+ * @Date: 2023-02-17 11:09:01
+ * @LastEditors: wt
+ * @LastEditTime: 2023-02-17 15:12:21
+-->
 <template>
   <div class="siteModelBox">
     <h2>
@@ -31,6 +39,10 @@
         <span>监控类型:</span>
         <p>{{ deviceType }}</p>
       </div>
+      <div class="infoLine">
+        <span>区位分布:</span>
+        <p>{{ stationAreaName }}</p>
+      </div>
       <div class="infoLine">
         <span>联系人:</span>
         <p>{{ userName }}</p>
@@ -56,6 +68,7 @@ export default {
       siteAddress: "", //站点地址
       createTime: "", //投运时间
       deviceType: "", //监控类型
+      stationAreaName:"",
     };
   },
 
@@ -69,6 +82,7 @@ export default {
         this.siteName = data.siteName;
         this.siteAddress = data.siteAddress;
         this.createTime = data.createTime;
+        this.stationAreaName = data.stationAreaName;
         data.deviceType.map((val) => {
           return (this.deviceType += val);
         });

+ 10 - 0
vue.config.js

@@ -1,3 +1,11 @@
+/*
+ * @Descripttion: 
+ * @version: 
+ * @Author: wt
+ * @Date: 2023-02-17 11:09:01
+ * @LastEditors: wt
+ * @LastEditTime: 2023-02-17 11:24:46
+ */
 const path = require('path')
 
 function resolve(dir) {
@@ -46,6 +54,8 @@ module.exports = {
             // '/vuefiv/': {
             './backStage/': {
                 target: 'https://qhome.usky.cn/fivapi',
+                // target: 'http://172.16.120.238:8011',
+
                 ws: false,
                 changeOrigin: true,
                 pathRewrite: {