Преглед на файлове

Merge branch 'xingbiao' of http://124.70.43.205:3000/lining/hb_sis_zhfx into lining

lining преди 3 години
родител
ревизия
abba43c8ee

+ 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"));

+ 3 - 0
src/views/specific/fnlyl.vue

@@ -336,6 +336,7 @@ export default {
                 }
               }
             }
+
             if(item.wpid === "0"){
               company.children.push(item)
             }
@@ -357,6 +358,8 @@ export default {
           }
           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"));

+ 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"));