Biao hace 3 años
padre
commit
543eb06e7e

+ 66 - 63
src/views/NewPages/power-benchmarking.vue

@@ -356,6 +356,7 @@ export default {
       selecttionIndex: 2,
       btnIndex: 0,
       increasescapacity: 0, //增发电量
+      ChangZhan:[],
       analyselist: [
         //理论平衡分析法
         { name: "风能利用率", label: "windenergy" },
@@ -584,6 +585,7 @@ export default {
     };
   },
   created() {
+    this.ChangZhanVal();
     this.requestDataTable("月");
     this.requestDataTop("月");
   },
@@ -595,6 +597,11 @@ export default {
     });
   },
   methods: {
+    ChangZhanVal() {
+      api.benchmarkingWplist({}).then((res) => {
+        this.ChangZhan = res.data;
+      });
+    },
     selectionClick(index) {
       this.selecttionIndex = index;
       switch (index) {
@@ -649,220 +656,216 @@ export default {
         .then((res) => {
           if (res.code == 200) {
             res.data.forEach((item) => {
-              if (item.foreignkeyid === "SBQ_FDC") item.name = "石板泉";
-              if (item.foreignkeyid === "MHS_FDC") item.name = "麻黄山";
-              if (item.foreignkeyid === "NSS_FDC") item.name = "牛首山";
-              if (item.foreignkeyid === "XS_FDC") item.name = "香山";
-              if (item.foreignkeyid === "QS_FDC") item.name = "青山";
-              item.mark = that.filter(item.mark);
-              item.theoreticalpower = that.filter(item.theoreticalpower);
-              item.actualpower = that.filter(item.actualpower);
-              item.daynhgzssdl = that.filter(item.daynhgzssdl);
-              item.daynhwhssdl = that.filter(item.daynhwhssdl);
-              item.daynhxdssdl = that.filter(item.daynhxdssdl);
-              item.daynhcfdl = that.filter(item.daynhcfdl);
-              item.daynhqfdl = that.filter(item.daynhqfdl);
-              item.windenergy = that.filter(item.windenergy);
-              item.powerlossrate = that.filter(item.powerlossrate);
-              item.performancelossrate = that.filter(item.performancelossrate);
-              item.comprehensiverate = that.filter(item.comprehensiverate);
-              item.utilizationhours = that.filter(item.utilizationhours);
-              item.windpoweraccuracy = that.filter(item.windpoweraccuracy);
-              item.agccurvefollowing = that.filter(item.agccurvefollowing);
-              item.mtbf = that.filter(item.mtbf);
-              item.mttf = that.filter(item.mttf);
-              item.availability = that.filter(item.availability);
-              item.availabilityfactor = that.filter(item.availabilityfactor);
-              item.failurelossrate = that.filter(item.failurelossrate);
-              item.mainlossrate = that.filter(item.mainlossrate);
-              item.mttr = that.filter(item.mttr);
-              item.hiddentimely = that.filter(item.hiddentimely);
-              item.resettimelyrate = that.filter(item.resettimelyrate);
-              item.statetransitionrate = that.filter(item.statetransitionrate);
-              item.eliminationrate = that.filter(item.eliminationrate);
+              item.name = this.ChangZhan.filter(val => item.foreignkeyid === val.id)[0].name
+              item.mark = this.filter(item.mark);
+              item.theoreticalpower = this.filter(item.theoreticalpower);
+              item.actualpower = this.filter(item.actualpower);
+              item.daynhgzssdl = this.filter(item.daynhgzssdl);
+              item.daynhwhssdl = this.filter(item.daynhwhssdl);
+              item.daynhxdssdl = this.filter(item.daynhxdssdl);
+              item.daynhcfdl = this.filter(item.daynhcfdl);
+              item.daynhqfdl = this.filter(item.daynhqfdl);
+              item.windenergy = this.filter(item.windenergy);
+              item.powerlossrate = this.filter(item.powerlossrate);
+              item.performancelossrate = this.filter(item.performancelossrate);
+              item.comprehensiverate = this.filter(item.comprehensiverate);
+              item.utilizationhours = this.filter(item.utilizationhours);
+              item.windpoweraccuracy = this.filter(item.windpoweraccuracy);
+              item.agccurvefollowing = this.filter(item.agccurvefollowing);
+              item.mtbf = this.filter(item.mtbf);
+              item.mttf = this.filter(item.mttf);
+              item.availability = this.filter(item.availability);
+              item.availabilityfactor = this.filter(item.availabilityfactor);
+              item.failurelossrate = this.filter(item.failurelossrate);
+              item.mainlossrate = this.filter(item.mainlossrate);
+              item.mttr = this.filter(item.mttr);
+              item.hiddentimely = this.filter(item.hiddentimely);
+              item.resettimelyrate = this.filter(item.resettimelyrate);
+              item.statetransitionrate = this.filter(item.statetransitionrate);
+              item.eliminationrate = this.filter(item.eliminationrate);
             });
 
             // 合计列
             let item = res.data;
             let obj = {
               name: "合计",
-              mark: that.filter(
+              mark: this.filter(
                 (Number(item[0].mark) +
                   Number(item[1].mark) +
                   Number(item[2].mark) +
                   Number(item[3].mark)) /
                   4
               ),
-              capacity: that.filter(
+              capacity: this.filter(
                 Number(item[0].capacity) +
                   Number(item[1].capacity) +
                   Number(item[2].capacity) +
                   Number(item[3].capacity)
               ),
-              units: that.filter(
+              units: this.filter(
                 Number(item[0].units) +
                   Number(item[1].units) +
                   Number(item[2].units) +
                   Number(item[3].units)
               ),
-              theoreticalpower: that.filter(
+              theoreticalpower: this.filter(
                 Number(item[0].theoreticalpower) +
                   Number(item[1].theoreticalpower) +
                   Number(item[2].theoreticalpower) +
                   Number(item[3].theoreticalpower)
               ),
-              actualpower: that.filter(
+              actualpower: this.filter(
                 Number(item[0].actualpower) +
                   Number(item[1].actualpower) +
                   Number(item[2].actualpower) +
                   Number(item[3].actualpower)
               ),
-              daynhgzssdl: that.filter(
+              daynhgzssdl: this.filter(
                 Number(item[0].daynhgzssdl) +
                   Number(item[1].daynhgzssdl) +
                   Number(item[2].daynhgzssdl) +
                   Number(item[3].daynhgzssdl)
               ),
-              daynhwhssdl: that.filter(
+              daynhwhssdl: this.filter(
                 Number(item[0].daynhwhssdl) +
                   Number(item[1].daynhwhssdl) +
                   Number(item[2].daynhwhssdl) +
                   Number(item[3].daynhwhssdl)
               ),
-              daynhxdssdl: that.filter(
+              daynhxdssdl: this.filter(
                 Number(item[0].daynhxdssdl) +
                   Number(item[1].daynhxdssdl) +
                   Number(item[2].daynhxdssdl) +
                   Number(item[3].daynhxdssdl)
               ),
-              daynhcfdl: that.filter(
+              daynhcfdl: this.filter(
                 Number(item[0].daynhcfdl) +
                   Number(item[1].daynhcfdl) +
                   Number(item[2].daynhcfdl) +
                   Number(item[3].daynhcfdl)
               ),
-              daynhqfdl: that.filter(
+              daynhqfdl: this.filter(
                 Number(item[0].daynhqfdl) +
                   Number(item[1].daynhqfdl) +
                   Number(item[2].daynhqfdl) +
                   Number(item[3].daynhqfdl)
               ),
-              windenergy: that.filter(
+              windenergy: this.filter(
                 (Number(item[0].windenergy) +
                   Number(item[1].windenergy) +
                   Number(item[2].windenergy) +
                   Number(item[3].windenergy)) /
                   4
               ),
-              powerlossrate: that.filter(
+              powerlossrate: this.filter(
                 (Number(item[0].powerlossrate) +
                   Number(item[1].powerlossrate) +
                   Number(item[2].powerlossrate) +
                   Number(item[3].powerlossrate)) /
                   4
               ),
-              performancelossrate: that.filter(
+              performancelossrate: this.filter(
                 (Number(item[0].performancelossrate) +
                   Number(item[1].performancelossrate) +
                   Number(item[2].performancelossrate) +
                   Number(item[3].performancelossrate)) /
                   4
               ),
-              comprehensiverate: that.filter(
+              comprehensiverate: this.filter(
                 (Number(item[0].comprehensiverate) +
                   Number(item[1].comprehensiverate) +
                   Number(item[2].comprehensiverate) +
                   Number(item[3].comprehensiverate)) /
                   4
               ),
-              utilizationhours: that.filter(
+              utilizationhours: this.filter(
                 Number(item[0].utilizationhours) +
                   Number(item[1].utilizationhours) +
                   Number(item[2].utilizationhours) +
                   Number(item[3].utilizationhours)
               ),
-              windpoweraccuracy: that.filter(
+              windpoweraccuracy: this.filter(
                 (Number(item[0].windpoweraccuracy) +
                   Number(item[1].windpoweraccuracy) +
                   Number(item[2].windpoweraccuracy) +
                   Number(item[3].windpoweraccuracy)) /
                   4
               ),
-              agccurvefollowing: that.filter(
+              agccurvefollowing: this.filter(
                 (Number(item[0].agccurvefollowing) +
                   Number(item[1].agccurvefollowing) +
                   Number(item[2].agccurvefollowing) +
                   Number(item[3].agccurvefollowing)) /
                   4
               ),
-              mtbf: that.filter(
+              mtbf: this.filter(
                 Number(item[0].mtbf) +
                   Number(item[1].mtbf) +
                   Number(item[2].mtbf) +
                   Number(item[3].mtbf)
               ),
-              mttf: that.filter(
+              mttf: this.filter(
                 Number(item[0].mttf) +
                   Number(item[1].mttf) +
                   Number(item[2].mttf) +
                   Number(item[3].mttf)
               ),
-              availability: that.filter(
+              availability: this.filter(
                 (Number(item[0].availability) +
                   Number(item[1].availability) +
                   Number(item[2].availability) +
                   Number(item[3].availability)) /
                   4
               ),
-              availabilityfactor: that.filter(
+              availabilityfactor: this.filter(
                 (Number(item[0].availabilityfactor) +
                   Number(item[1].availabilityfactor) +
                   Number(item[2].availabilityfactor) +
                   Number(item[3].availabilityfactor)) /
                   4
               ),
-              failurelossrate: that.filter(
+              failurelossrate: this.filter(
                 (Number(item[0].failurelossrate) +
                   Number(item[1].failurelossrate) +
                   Number(item[2].failurelossrate) +
                   Number(item[3].failurelossrate)) /
                   4
               ),
-              mainlossrate: that.filter(
+              mainlossrate: this.filter(
                 (Number(item[0].mainlossrate) +
                   Number(item[1].mainlossrate) +
                   Number(item[2].mainlossrate) +
                   Number(item[3].mainlossrate)) /
                   4
               ),
-              mttr: that.filter(
+              mttr: this.filter(
                 Number(item[0].mttr) +
                   Number(item[1].mttr) +
                   Number(item[2].mttr) +
                   Number(item[3].mttr)
               ),
-              hiddentimely: that.filter(
+              hiddentimely: this.filter(
                 (Number(item[0].hiddentimely) +
                   Number(item[1].hiddentimely) +
                   Number(item[2].hiddentimely) +
                   Number(item[3].hiddentimely)) /
                   4
               ),
-              resettimelyrate: that.filter(
+              resettimelyrate: this.filter(
                 (Number(item[0].resettimelyrate) +
                   Number(item[1].resettimelyrate) +
                   Number(item[2].resettimelyrate) +
                   Number(item[3].resettimelyrate)) /
                   4
               ),
-              statetransitionrate: that.filter(
+              statetransitionrate: this.filter(
                 (Number(item[0].statetransitionrate) +
                   Number(item[1].statetransitionrate) +
                   Number(item[2].statetransitionrate) +
                   Number(item[3].statetransitionrate)) /
                   4
               ),
-              eliminationrate: that.filter(
+              eliminationrate: this.filter(
                 (Number(item[0].eliminationrate) +
                   Number(item[1].eliminationrate) +
                   Number(item[2].eliminationrate) +
@@ -871,9 +874,9 @@ export default {
               ),
             };
             item.push(obj);
-            that.eltableData.data = res.data;
-            that.setRank();
-            that.echartData(that.eltableData.column[1].child.slice(3));
+            this.eltableData.data = res.data;
+            this.setRank();
+            this.echartData(this.eltableData.column[1].child.slice(3));
           }
         });
 
@@ -1238,7 +1241,7 @@ export default {
     },
     // 保留小数位l
     filter(num) {
-      return num % 1 === 0 ? num : num.toFixed(1);
+      return num % 1 === 0 ? num : num?.toFixed(1);
     },
     resetTableSize(themeName) {
       this.$nextTick(() => {

+ 5 - 5
src/views/layout/Menu.vue

@@ -331,11 +331,11 @@ export default {
                 },
               ],
             },
-            // {
-            //   text: "气象分析",
-            //   icon: "svg-qxfx",
-            //   path: "/decision/fs",
-            // },
+            {
+              text: "气象分析",
+              icon: "svg-qxfx",
+              path: "/decision/fs",
+            },
             // {
             //   text: "电量预测",
             //   icon: "svg-dlyc",

+ 0 - 1
src/views/sampleDatabase/performance/index.vue

@@ -333,7 +333,6 @@ export default {
           et: that.time[1].valueOf(),
         },
         success(res) {
-          console.log(11111, res);
           if (res.code == 200) {
             that.tableData.data = [];
             if (res.data.length) {

+ 58 - 16
src/views/specific/fdl.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                      <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -233,6 +261,7 @@ export default {
   },
   data() {
     return {
+       stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -320,6 +349,12 @@ export default {
           year: year,
         })
         .then((res) => {
+           let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
               this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -331,22 +366,29 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+          
+            if(item.wpid === "0"){
+              company.children.push(item)
+            }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
             }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
+
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));

+ 46 - 43
src/views/specific/fnlyl.vue

@@ -50,33 +50,33 @@
               <tbody>
                 <tr>
                   <td style="width: 4vh"></td>
-                  <template v-for="(x, i) of MhsLists" :key="i">
+                  <template v-for="(x, i) of GsList" :key="i">
                     <td style="width: 3vh">本期</td>
                     <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                <tr>
-                  <td class="td-item" style="width: 4vh">麻黄山</td>
-                  <template v-for="(item, index) of MhsLists" :key="index">
-                    <td style="width: 3vh">
-                      {{ item.current }}
-                      <template v-if="item.compare === -1">
-                        <span class="svg-icon svg-icon-yellow">
-                          <svg-icon svgid="svg-arrow-dpwn-1" />
-                        </span>
-                      </template>
-                      <template v-if="item.compare === 1">
-                        <span class="svg-icon svg-icon-green">
-                          <svg-icon svgid="svg-arrow-up-1" />
-                        </span>
-                      </template>
-                    </td>
-                    <td style="width: 3vh">
-                      {{ item.sameperiod }}
-                    </td>
-                  </template>
-                </tr>
-                <tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td class="td-item" style="width: 4vh">牛首山</td>
                   <template v-for="(item, index) of NshList" :key="index">
                     <td style="width: 3vh">
@@ -180,7 +180,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -242,6 +242,7 @@ export default {
       XshList: [],
       GsList: [],
       units: [],
+      stations:{},
       nowCurrent: 1,
       months: new Date().getMonth() + 1,
       pickerOptions: {},
@@ -319,6 +320,11 @@ export default {
          year: year,
       }).then((res) => {
         let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
          this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -330,33 +336,30 @@ export default {
                 }
               }
             }
-            
-            if(!stations[item.wpid]){
+
+            if(item.wpid === "0"){
+              company.children.push(item)
+            }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
               stations[item.wpid] = {
                 id:item.wpid,
-                name:item.name||'',
+                name:item.wpname||'',
                 children: []
               }
             }
-            stations[item.wpid].children.push(item)
-            console.log(stations);
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
               GsList.push(item);
-            }
+            } 
           });
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
 
+          
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));
           this.QshList = QshList.sort(this.compare("month"));

+ 60 - 18
src/views/specific/fwjsl.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                  <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -104,8 +132,8 @@
                       {{ item.current }}
                       <template v-if="item.compare === -1">
                         <span class="svg-icon svg-icon-yellow">
-                          <svg-icon svgid="svg-arrow-dpwn-1" />
-                        </span>
+                          <svg-icon svgid="svg-arrow-dpwn-1" /> -->
+                        <!-- </span>
                       </template>
                       <template v-if="item.compare === 1">
                         <span class="svg-icon svg-icon-green">
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+      stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -321,6 +350,12 @@ export default {
           year: year,
         })
         .then((res) => {
+           let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
             this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -332,22 +367,29 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+
+            if(item.wpid === "0"){
+              company.children.push(item)
             }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
+            }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
+
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));

+ 74 - 16
src/views/specific/gzssl.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                  <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+      stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -319,6 +348,12 @@ export default {
       api.specificGzsslList({
          year: year,
       }).then((res) => {
+            let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
            this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -330,22 +365,45 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+
+      if(item.wpid === "0"){
+              company.children.push(item)
+            }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
             }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
+            // if (item.wpid === "MHS_FDC") {
+            //   MhsLists.push(item);
+            // } else if (item.wpid === "NSS_FDC") {
+            //   NshList.push(item);
+            // } else if (item.wpid === "QS_FDC") {
+            //   QshList.push(item);
+            // } else if (item.wpid === "NSS_FDC") {
+            //   NshList.push(item);
+            // } else if (item.wpid === "SBQ_FDC") {
+            //   SbaqList.push(item);
+            // } else if (item.wpid === "XS_FDC") {
+            //   XshList.push(item);
+            // } else {
+            //   GsList.push(item);
+            // }
+
+
           });
+           stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));

+ 61 - 16
src/views/specific/mtbf.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                  <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+       stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -319,6 +348,13 @@ export default {
       api.specificMtbfList({
        year: year,
       }).then((res) => {
+ let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
+
            this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -330,22 +366,31 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+
+
+           
+            if(item.wpid === "0"){
+              company.children.push(item)
             }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
+            }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
+
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));

+ 59 - 16
src/views/specific/mttr.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                  <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+       stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -319,6 +348,13 @@ export default {
         api.specificMttrList({
          year: year,
       }).then((res) => {
+           let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
+
               this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -330,22 +366,29 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+
+
+           if(item.wpid === "0"){
+              company.children.push(item)
             }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
+            }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));

+ 58 - 16
src/views/specific/slssl.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                    <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+       stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -321,6 +350,13 @@ export default {
           year: year,
         })
         .then((res) => {
+
+  let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
            this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -332,23 +368,29 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+            if(item.wpid === "0"){
+              company.children.push(item)
             }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
+            }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
 
+          
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));
           this.QshList = QshList.sort(this.compare("month"));

+ 81 - 24
src/views/specific/whssl.vue

@@ -48,14 +48,39 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+           
+                       <tr> 
                   <td style="width: 4vh"></td>
-                  <template v-for="(x, i) of MhsLists" :key="i">
+                  <template v-for="(x, i) of GsList" :key="i">
                     <td style="width: 3vh">本期</td>
                     <td style="width: 3vh">同期</td>
                   </template>
                 </tr>
-                <tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+
+
+
+                <!-- <tr>
                   <td class="td-item" style="width: 4vh">麻黄山</td>
                   <template v-for="(item, index) of MhsLists" :key="index">
                     <td style="width: 3vh">
@@ -75,8 +100,8 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
-                <tr>
+                </tr> -->
+                <!-- <tr>
                   <td class="td-item" style="width: 4vh">牛首山</td>
                   <template v-for="(item, index) of NshList" :key="index">
                     <td style="width: 3vh">
@@ -180,7 +205,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +259,7 @@ export default {
   },
   data() {
     return {
+      stations: {},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -316,10 +342,18 @@ export default {
       }
       const site = ["compare", "year", "month"];
 
-        api.specificFnlylList({
+      api
+        .specificFnlylList({
           year: year,
-      }).then((res) => {
-         console.log(res);
+        })
+        .then((res) => {
+          let stations = {}
+          let company ={
+          id:'0',
+          name:'公司',
+          children: []
+           }
+          console.log(res);
           this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -331,22 +365,45 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+
+                 if(item.wpid === "0"){
+              company.children.push(item)
             }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
+            }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
+
+            // if (item.wpid === "MHS_FDC") {
+            //   MhsLists.push(item);
+            // } else if (item.wpid === "NSS_FDC") {
+            //   NshList.push(item);
+            // } else if (item.wpid === "QS_FDC") {
+            //   QshList.push(item);
+            // } else if (item.wpid === "NSS_FDC") {
+            //   NshList.push(item);
+            // } else if (item.wpid === "SBQ_FDC") {
+            //   SbaqList.push(item);
+            // } else if (item.wpid === "XS_FDC") {
+            //   XshList.push(item);
+            // } else {
+            //   GsList.push(item);
+            // }
           });
+       stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
+
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));
@@ -400,7 +457,7 @@ export default {
               },
             ],
           };
-      });
+        });
 
       // _this.API.requestData({
       //   showLoading,

+ 57 - 17
src/views/specific/xdssl.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                 <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+       stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -321,6 +350,12 @@ export default {
           year: year,
         })
         .then((res) => {
+           let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
            this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -332,23 +367,28 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+
+    if(item.wpid === "0"){
+              company.children.push(item)
+            }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
             }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
-
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));
           this.QshList = QshList.sort(this.compare("month"));

+ 56 - 17
src/views/specific/xnssl.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                    <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+        stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -319,6 +348,12 @@ export default {
     api.specificXnsslList({
          year: year,
       }).then((res) => {
+          let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
          this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -330,23 +365,27 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+              if(item.wpid === "0"){
+              company.children.push(item)
+            }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
             }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
-
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));
           this.QshList = QshList.sort(this.compare("month"));

+ 57 - 16
src/views/specific/xqjsl.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                 <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+       stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -321,6 +350,12 @@ export default {
           year: year,
         })
         .then((res) => {
+           let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
                    this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -332,22 +367,28 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+
+            if(item.wpid === "0"){
+              company.children.push(item)
             }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
+            }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));

+ 62 - 14
src/views/specific/zhcydl.vue

@@ -50,6 +50,37 @@
               <tbody>
                 <tr>
                   <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                <tr v-for="(items, key, index) in stations" :key="index">
+                  <td class="td-item" style="width: 4vh">{{ items.name }}</td>
+                  <template
+                    v-for="(item, index) of items.children"
+                    :key="index"
+                  >
+                    <td style="width: 3vh">
+                      {{ item.current }}
+                      <template v-if="item.compare === -1">
+                        <span class="svg-icon svg-icon-yellow">
+                          <svg-icon svgid="svg-arrow-dpwn-1" />
+                        </span>
+                      </template>
+                      <template v-if="item.compare === 1">
+                        <span class="svg-icon svg-icon-green">
+                          <svg-icon svgid="svg-arrow-up-1" />
+                        </span>
+                      </template>
+                    </td>
+                    <td style="width: 3vh">
+                      {{ item.sameperiod }}
+                    </td>
+                  </template>
+                </tr>
+                <!-- <tr>
+                  <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
                     <td style="width: 3vh">同期</td>
@@ -180,7 +211,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +265,7 @@ export default {
   },
   data() {
     return {
+      stations: {},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -321,8 +353,15 @@ export default {
           year: year,
         })
         .then((res) => {
+          let stations = {};
+          let company = {
+            id: "0",
+            name: "公司",
+            children: [],
+          };
           this.list = res.data.map((item) => {
             for (let key in item) {
+              // console.log(key);
               if (!site.includes(key)) {
                 if (this.isNumber(item[key])) {
                   item[key] = item[key].toFixed(2);
@@ -332,22 +371,31 @@ export default {
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
+
+            if (item.wpid === "0") {
+              company.children.push(item);
+            }
+            if (!stations[item.wpid] && item.wpid !== "0") {
+              stations[item.wpid] = {
+                id: item.wpid,
+                name: item.wpname || "",
+                children: [],
+              };
+            }
+            stations[item.wpid]?.children.push(item);
+            if (item.wpid === "0") {
               GsList.push(item);
             }
           });
+          stations.company = company;
+          // for (const item in stations) {
+          //   stations[item].children = stations[item].children.sort(
+          //     this.compare("month")
+          //   );
+          // }
+          // console.log(stations);
+          this.stations = stations;
+          console.log(stations);
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));

+ 0 - 1
src/views/specific/ztfx.vue

@@ -1753,7 +1753,6 @@ export default {
       } else {
         months = this.monthChange(this.monthValue);
       }
-console.log(11111111);
       api.specificMaincenterlist({
           month: months,
       }).then((res) => {

+ 57 - 16
src/views/specific/ztzhl.vue

@@ -48,7 +48,35 @@
               cellspacing="0"
             >
               <tbody>
-                <tr>
+                   <tr>
+                  <td style="width: 4vh"></td>
+                  <template v-for="(x, i) of GsList" :key="i">
+                    <td style="width: 3vh">本期</td>
+                    <td style="width: 3vh">同期</td>
+                  </template>
+                </tr>
+                  <tr v-for="(items,key,index) in stations" :key="index">
+                    <td class="td-item" style="width: 4vh">{{items.name}}</td>
+                    <template v-for="(item, index) of items.children" :key="index">
+                      <td style="width: 3vh">
+                        {{ item.current }}
+                        <template v-if="item.compare === -1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                        <template v-if="item.compare === 1">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td style="width: 3vh">
+                        {{ item.sameperiod }}
+                      </td>
+                    </template>
+                  </tr>
+                <!-- <tr>
                   <td style="width: 4vh"></td>
                   <template v-for="(x, i) of MhsLists" :key="i">
                     <td style="width: 3vh">本期</td>
@@ -180,7 +208,7 @@
                       {{ item.sameperiod }}
                     </td>
                   </template>
-                </tr>
+                </tr> -->
               </tbody>
             </table>
           </div>
@@ -234,6 +262,7 @@ export default {
   },
   data() {
     return {
+          stations:{},
       monthData: [],
       MhsLists: [],
       NshList: [],
@@ -321,6 +350,12 @@ export default {
 api.specificZtzhlList({
          year: year,
       }).then((res) => {
+          let stations = {}
+        let company ={
+          id:'0',
+          name:'公司',
+          children: []
+        }
           this.list = res.data.map((item) => {
             for (let key in item) {
               if (!site.includes(key)) {
@@ -332,22 +367,28 @@ api.specificZtzhlList({
                 }
               }
             }
-            if (item.wpid === "MHS_FDC") {
-              MhsLists.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "QS_FDC") {
-              QshList.push(item);
-            } else if (item.wpid === "NSS_FDC") {
-              NshList.push(item);
-            } else if (item.wpid === "SBQ_FDC") {
-              SbaqList.push(item);
-            } else if (item.wpid === "XS_FDC") {
-              XshList.push(item);
-            } else {
-              GsList.push(item);
+         
+            if(item.wpid === "0"){
+              company.children.push(item)
             }
+            if(!stations[item.wpid] && item.wpid !== "0" ){
+              stations[item.wpid] = {
+                id:item.wpid,
+                name:item.wpname||'',
+                children: []
+              }
+            }
+            stations[item.wpid]?.children.push(item)
+            if (item.wpid === "0") {
+              GsList.push(item);
+            } 
           });
+          stations.company = company
+          for (const item in stations) {
+            stations[item].children = stations[item].children.sort(this.compare("month"));
+          }
+          console.log(stations);
+          this.stations = stations
 
           this.MhsLists = MhsLists.sort(this.compare("month"));
           this.NshList = NshList.sort(this.compare("month"));