瀏覽代碼

矩阵数据修改,可框选数据

SunZehao 1 月之前
父節點
當前提交
f32aa6b46e

+ 56 - 56
package.json

@@ -1,58 +1,58 @@
 {
-    "name": "project-neic",
-    "version": "2.2.1",
-    "private": true,
-    "scripts": {
-        "serve": "vue-cli-service serve",
-        "build": "vue-cli-service build",
-        "eb": "vue-cli-service electron:build",
-        "es": "vue-cli-service electron:serve",
-        "postinstall": "electron-builder install-app-deps",
-        "postuninstall": "electron-builder install-app-deps"
-    },
-    "main": "background.js",
-    "dependencies": {
-        "axios": "^0.21.1",
-        "bufferutil": "^4.0.6",
-        "core-js": "^3.6.5",
-        "dayjs": "^1.10.6",
-        "echarts": "^5.1.2",
-        "element-plus": "^1.1.0-beta.4",
-        "file-saver": "^2.0.5",
-        "html2canvas": "^1.4.1",
-        "jquery": "^3.6.0",
-        "json-bigint": "^1.0.0",
-        "rebuild": "^0.1.2",
-        "register-service-worker": "^1.7.1",
-        "stompjs": "^2.3.3",
-        "utf-8-validate": "^5.0.9",
-        "vue": "^3.0.11",
-        "vue-grid-layout": "^3.0.0-beta1",
-        "vue-router": "^4.0.0-0",
-        "vuex": "^4.0.0-0",
-        "xlsx": "^0.17.5",
-        "xlsx-js-style": "^1.2.0",
-        "xlsx-style": "^0.8.13"
-    },
-    "devDependencies": {
-        "@vue/cli-plugin-babel": "~4.5.0",
-        "@vue/cli-plugin-pwa": "~4.5.0",
-        "@vue/cli-plugin-router": "~4.5.0",
-        "@vue/cli-plugin-vuex": "~4.5.0",
-        "@vue/cli-service": "~4.5.0",
-        "@vue/compiler-sfc": "^3.0.0",
-        "electron": "^13.0.0",
-        "electron-devtools-installer": "^3.1.0",
-        "less": "^3.0.4",
-        "less-loader": "^5.0.0",
-        "node-sass": "^4.14.1",
-        "sass-loader": "^8.0.2",
-        "vue-cli-plugin-electron-builder": "~2.1.1"
-    },
-    "browserslist": [
-        "> 1%",
-        "last 2 versions",
-        "not dead"
-    ],
-    "__npminstall_done": false
+  "name": "project-neic",
+  "version": "2.2.1",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve",
+    "build": "vue-cli-service build",
+    "eb": "vue-cli-service electron:build",
+    "es": "vue-cli-service electron:serve",
+    "postinstall": "electron-builder install-app-deps",
+    "postuninstall": "electron-builder install-app-deps"
+  },
+  "main": "background.js",
+  "dependencies": {
+    "axios": "^0.21.1",
+    "bufferutil": "^4.0.6",
+    "core-js": "^3.6.5",
+    "dayjs": "^1.10.6",
+    "echarts": "^5.1.2",
+    "element-plus": "^1.1.0-beta.4",
+    "file-saver": "^2.0.5",
+    "html2canvas": "^1.4.1",
+    "jquery": "^3.6.0",
+    "json-bigint": "^1.0.0",
+    "rebuild": "^0.1.2",
+    "register-service-worker": "^1.7.1",
+    "stompjs": "^2.3.3",
+    "utf-8-validate": "^5.0.9",
+    "vue": "^3.0.11",
+    "vue-grid-layout": "^3.0.0-beta1",
+    "vue-router": "^4.0.0-0",
+    "vuex": "^4.0.0-0",
+    "xlsx": "^0.17.5",
+    "xlsx-js-style": "^1.2.0",
+    "xlsx-style": "^0.8.13"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "~4.5.0",
+    "@vue/cli-plugin-pwa": "~4.5.0",
+    "@vue/cli-plugin-router": "~4.5.0",
+    "@vue/cli-plugin-vuex": "~4.5.0",
+    "@vue/cli-service": "~4.5.0",
+    "@vue/compiler-sfc": "^3.0.0",
+    "electron": "^13.0.0",
+    "electron-devtools-installer": "^3.1.0",
+    "less": "^3.0.4",
+    "less-loader": "^5.0.0",
+    "node-sass": "^4.14.1",
+    "sass-loader": "^8.0.2",
+    "vue-cli-plugin-electron-builder": "~2.1.1"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not dead"
+  ],
+  "__npminstall_done": false
 }

+ 69 - 27
src/components/allMatricesNoDia.vue

@@ -33,10 +33,10 @@
             v-for="(item, index) in stationArr"
             :key="index"
           >
-            <div class="stationTitle" v-if="item[0].stationId">
+            <div class="stationTitle" v-if="item[0].childer[0].stationId">
               <div class="stationName">
                 <!-- {{ getStationName(item) }} -->
-                测试
+                风场测试场站
               </div>
               <div class="num">
                 <div class="jrts">接入台数</div>
@@ -89,7 +89,8 @@
             </div>
             <div class="stationTitle" v-else>
               <div class="stationName">
-                {{ getStationName(item) }}
+                <!-- {{ getStationName(item) }} -->
+                光伏测试场站
               </div>
               <div class="num">
                 <div class="jrts">接入台数</div>
@@ -165,24 +166,24 @@
                 </div>
               </div>
             </div>
-            <div class="block" v-if="showWh(item)">
-              <div class="data_views_text" v-for="iv in 3" :key="iv">
-                <div class="textsx">一期</div>
+            <div class="block" v-if="showWh(item[0].childer)">
+              <div class="data_views_text" v-for="iv in item" :key="iv">
+                <div class="textsx">{{ iv.text }}</div>
                 <UnpaidMatrixBlock
                   @on-click="handleDetial"
                   @choose-click="handleClick"
-                  :dataList="item"
+                  :dataList="iv.childer"
                 >
                 </UnpaidMatrixBlock>
               </div>
             </div>
             <div class="block" v-else>
-              <div class="data_views_text" v-for="iv in 3" :key="iv">
-                <div class="textsx">一期</div>
+              <div class="data_views_text" v-for="iv in item" :key="iv">
+                <div class="textsx">{{ iv.text }}</div>
                 <UnpaidMatrixBlockPv
                   @on-click="handleDetialPv"
                   @choose-click="handleClickPv"
-                  :dataList="item"
+                  :dataList="iv.childer"
                 >
                 </UnpaidMatrixBlockPv>
               </div>
@@ -233,7 +234,7 @@ export default {
   data() {
     return {
       current: "all",
-      windterbin: {},
+      windterbin: [],
       stationObj: {},
       cache: {},
       stationArr: [],
@@ -282,7 +283,8 @@ export default {
   mounted() {
     this.$nextTick(() => {
       this.stationOverviewInfosNow = dataJson.stationOverviewInfos;
-      this.stationArr = dataJson.stationArr;
+      this.stationArr = dataJson.stationArrQ;
+      this.windterbin = dataJson.windterbin;
     });
   },
   methods: {
@@ -434,7 +436,7 @@ export default {
       this.dialogVisible = true;
       this.currentWindturbine = itm;
     },
-    handleClick(values) {
+    handleClick(values, datas) {
       if (values.active) {
         let showIndex = null;
         this.chooseList.forEach((item, index) => {
@@ -446,12 +448,17 @@ export default {
       } else {
         this.chooseList.push(values);
       }
-      this.stationArr.forEach((item) => {
-        item.forEach((val) => {
-          if (val.windturbineId === values.windturbineId) {
-            val.active = !val.active;
-          }
-        });
+      //   this.stationArr.forEach((item) => {
+      //     item.forEach((val) => {
+      //       if (val.windturbineId === values.windturbineId) {
+      //         val.active = !val.active;
+      //       }
+      //     });
+      //   });
+      datas.forEach((val) => {
+        if (val.windturbineId === values.windturbineId) {
+          val.active = !val.active;
+        }
       });
     },
     handleClose() {
@@ -464,7 +471,7 @@ export default {
       this.currentWindturbinePv = item;
       console.log("item", item);
     },
-    handleClickPv(values) {
+    handleClickPv(values, datas) {
       if (values.active) {
         let showIndex = null;
         this.chooseList.forEach((item, index) => {
@@ -476,12 +483,17 @@ export default {
       } else {
         this.chooseList.push(values);
       }
-      this.stationArr.forEach((item) => {
-        item.forEach((val) => {
-          if (val.id === values.id) {
-            val.active = !val.active;
-          }
-        });
+      //   this.stationArr.forEach((item) => {
+      //     item.forEach((val) => {
+      //       if (val.id === values.id) {
+      //         val.active = !val.active;
+      //       }
+      //     });
+      //   });
+      datas.forEach((val) => {
+        if (val.id === values.id) {
+          val.active = !val.active;
+        }
       });
     },
     handleClosePv() {
@@ -490,7 +502,36 @@ export default {
 
     selectList(val) {
       val.forEach((item) => {
-        this.handleClick(this.windterbin[item.id]);
+        if (item.id.indexOf("风场") > -1) {
+          let data = this.windterbin.filter(
+            (iv) => iv.windturbineId === item.id
+          );
+          let datas = [];
+          this.stationArr.forEach((ic) => {
+            ic.forEach((iv) => {
+              iv.childer.forEach((ib) => {
+                if (ib.windturbineId === data[0].windturbineId) {
+                  datas = iv.childer;
+                }
+              });
+            });
+          });
+          this.handleClick(data[0], datas);
+        } else {
+          let data = this.windterbin.filter((iv) => iv.id === item.id * 1);
+          let datas = [];
+          this.stationArr.forEach((ic) => {
+            ic.forEach((iv) => {
+              iv.childer.forEach((ib) => {
+                if (ib.id === data[0].id) {
+                  datas = iv.childer;
+                }
+              });
+            });
+          });
+          this.handleClickPv(data[0], datas);
+        }
+        // this.handleClick(this.windterbin[item.id]);
       });
     },
     getLocks() {
@@ -1050,6 +1091,7 @@ export default {
         letter-spacing: 5px;
         color: #fff;
         text-align: center;
+        margin-right: 10px;
       }
     }
   }

文件差異過大導致無法顯示
+ 1459 - 48
src/components/allMatricesNoDiaJson.json


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

@@ -471,7 +471,6 @@ export default {
       //     });
       //     return;
       //   }
-      this.current = values;
       if (this.current !== values) {
         this.$store.commit("current", Number(values));
         if (values === 2) {
@@ -497,6 +496,8 @@ export default {
           }
         }
       } else if (values === 2) {
+        this.current = values;
+        this.$store.commit("current", Number(values));
         this.$router.push(`/ManualPage?current=${values}`);
       }
     },

+ 2 - 3
src/components/unpaidMatrixBlock.vue

@@ -103,11 +103,11 @@ export default {
     // this.getWindturbineFdc();
   },
   created() {
-    console.log('dataList1', this.dataList)
+    console.log("dataList1", this.dataList);
   },
   methods: {
     onSelectHandler(values) {
-      this.$emit("choose-click", values);
+      this.$emit("choose-click", values, this.dataList);
     },
     sendMsg: function (itm) {
       // this.dialogVisible = true;
@@ -594,7 +594,6 @@ export default {
   margin-top: 10px;
 }
 
-
 .unpaid-5 {
   display: flex;
   align-items: center;

+ 58 - 39
src/components/unpaidMatrixBlockPv.vue

@@ -15,8 +15,9 @@
               item.active ? 'left-' + item.status : 'unleft-' + item.status
             "
           >
-            <div style="white-space:nowrap">{{ getName(item, 'top') }}</div>
-            <div style="white-space:nowrap">{{ getName(item, 'bot') }}</div><!-- item.id.slice(5) -->
+            <div style="white-space: nowrap">{{ getName(item, "top") }}</div>
+            <div style="white-space: nowrap">{{ getName(item, "bot") }}</div>
+            <!-- item.id.slice(5) -->
 
             <!-- <div>{{ item.windturbineId.slice(0, 2) }}</div>
             <div>{{ item.code }}</div> -->
@@ -31,8 +32,6 @@
             <div class="rightrow">{{ item.u.toFixed(2) }} V</div>
 
             <div class="rightrow">{{ item.p.toFixed(2) }} kw</div>
-
-            
           </div>
           <div class="locks" v-if="item.lockValue > 0">
             <el-popover
@@ -103,29 +102,29 @@ export default {
   },
   methods: {
     getName(item, type) {
-        let name = ''
-        if (item.station) {
-            if (item.station.indexOf('HZJ') > -1) {
-                // debugger
-                if (type === 'top') {
-                    // name = item.code.slice(0, item.code.indexOf('-'))
-                    name = item.code
-                } else {
-                    // name = item.code.slice(item.code.indexOf('-')+1)
-                    name = ''
-                }
-            } else {
-                if (type === 'top') {
-                    name = item.station.slice(0, item.station.indexOf('_'))
-                } else {
-                    name = item.id.slice(item.id.indexOf('_')+1)
-                }
-            }
+      let name = "";
+      if (item.station) {
+        if (item.station.indexOf("HZJ") > -1) {
+          // debugger
+          if (type === "top") {
+            // name = item.code.slice(0, item.code.indexOf('-'))
+            name = item.code;
+          } else {
+            // name = item.code.slice(item.code.indexOf('-')+1)
+            name = "";
+          }
+        } else {
+          if (type === "top") {
+            name = item.station.slice(0, item.station.indexOf("_"));
+          } else {
+            name = item.id.slice(item.id.indexOf("_") + 1);
+          }
         }
-        return name
+      }
+      return name;
     },
     onSelectHandler(values) {
-      this.$emit("choose-click", values);
+      this.$emit("choose-click", values, this.dataList);
     },
     sendMsg: function (itm) {
       // this.dialogVisible = true;
@@ -341,7 +340,9 @@ export default {
   flex-direction: column;
   justify-content: center;
 }
-.box-2, .box-4, .box-5 {
+.box-2,
+.box-4,
+.box-5 {
   width: 135px;
   height: 60px;
   color: #ffffff;
@@ -355,7 +356,9 @@ export default {
   box-shadow: 0px 0px 6px #ff1313;
 }
 
-.unbox-2, .unbox-4, .unbox-5 {
+.unbox-2,
+.unbox-4,
+.unbox-5 {
   width: 135px;
   height: 60px;
   color: #ffffff;
@@ -368,7 +371,9 @@ export default {
   margin-top: 10px;
 }
 
-.unpaid-2, .unpaid-4, .unpaid-5 {
+.unpaid-2,
+.unpaid-4,
+.unpaid-5 {
   display: flex;
   align-items: center;
   width: 100%;
@@ -376,7 +381,9 @@ export default {
   border-top: 1px solid rgba(186, 50, 55, 1);
 }
 
-.left-2, .left-4, .left-5 {
+.left-2,
+.left-4,
+.left-5 {
   width: 35%;
   height: 100%;
   font-size: 12px;
@@ -389,7 +396,9 @@ export default {
   align-items: center;
 }
 
-.unleft-2, .unleft-4, .unleft-5 {
+.unleft-2,
+.unleft-4,
+.unleft-5 {
   width: 37%;
   height: 100%;
   font-size: 12px;
@@ -402,7 +411,9 @@ export default {
   align-items: center;
 }
 
-.right-2, .right-4, .right-5 {
+.right-2,
+.right-4,
+.right-5 {
   width: 69%;
   height: 100%;
   font-size: 12px;
@@ -413,7 +424,9 @@ export default {
   justify-content: center;
 }
 
-.unright-2, .unright-4, .unright-5 {
+.unright-2,
+.unright-4,
+.unright-5 {
   width: 69%;
   height: 100%;
   font-size: 12px;
@@ -521,7 +534,8 @@ export default {
   box-shadow: 0px 0px 6px #6876f2;
 }
 
-.box-5, .box-6 {
+.box-5,
+.box-6 {
   width: 135px;
   height: 60px;
   color: #ffffff;
@@ -535,7 +549,8 @@ export default {
   box-shadow: 0px 0px 6px #ff1313;
 }
 
-.unbox-5, .unbox-6 {
+.unbox-5,
+.unbox-6 {
   width: 135px;
   height: 60px;
   color: #ffffff;
@@ -548,8 +563,8 @@ export default {
   margin-top: 10px;
 }
 
-
-.unpaid-5, .unpaid-6 {
+.unpaid-5,
+.unpaid-6 {
   display: flex;
   align-items: center;
   width: 100%;
@@ -557,7 +572,8 @@ export default {
   border-top: 1px solid rgba(186, 50, 55, 1);
 }
 
-.left-5, .left-6 {
+.left-5,
+.left-6 {
   width: 35%;
   height: 100%;
   font-size: 12px;
@@ -570,7 +586,8 @@ export default {
   align-items: center;
 }
 
-.unleft-5, .unleft-6 {
+.unleft-5,
+.unleft-6 {
   width: 37%;
   height: 100%;
   font-size: 12px;
@@ -583,7 +600,8 @@ export default {
   align-items: center;
 }
 
-.right-5, .right-6 {
+.right-5,
+.right-6 {
   width: 69%;
   height: 100%;
   font-size: 12px;
@@ -594,7 +612,8 @@ export default {
   justify-content: center;
 }
 
-.unright-5, .unright-6 {
+.unright-5,
+.unright-6 {
   width: 69%;
   height: 100%;
   font-size: 12px;