xushining 1 year ago
parent
commit
f8ece8a19b
1 changed files with 12 additions and 4 deletions
  1. 12 4
      src/components/search/action.vue

+ 12 - 4
src/components/search/action.vue

@@ -135,7 +135,7 @@ export default {
   mounted() {},
   data() {
     return {
-      currentPage: 10,
+      currentPage: 20,
       filterText: "",
       pageIndex: 1,
       station: [],
@@ -185,14 +185,23 @@ export default {
     // },
     dataDeal() {
       let stationList = this.$store.state.stationList;
-      this.showData[0].children = [];
+      this.showData[0].children = [
+        // {
+        //   id : 1,
+        // code : "风机全部",
+        // stationId : "WIND_ALL",
+        // children : [],
+        // }
+      ];
       stationList.forEach((item, index) => {
-        let obj = {};
+        if (item.type === 1) {
+          let obj = {};
         obj.id = index + 1;
         obj.code = item.name;
         obj.stationId = item.id;
         obj.children = [];
         this.showData[0].children.push(obj);
+        }
       });
       this.datas = this.$store.state.windturbinelist
         ? this.$store.state.windturbinelist
@@ -204,7 +213,6 @@ export default {
           .filter((val) => val.stationId === item.stationId)[0]
           ?.children.push(item);
       }
-      console.log(this.showData);
     },
     handleChange(value) {
       this.chooseStation = value;