wangjunjun 3 lat temu
rodzic
commit
21466e27e6
2 zmienionych plików z 448 dodań i 106 usunięć
  1. 7 7
      src/views/NewPages/alarm-center.vue
  2. 441 99
      src/views/NewPages/ztfx.vue

+ 7 - 7
src/views/NewPages/alarm-center.vue

@@ -168,13 +168,13 @@ export default {
           success(res) {
             _this.options = res.data
             _this.optSelectValue = res.data[0].id
-            _this.getList(false);
-            // _this.$nextTick(() => {
-            //   _this.getList(false);
-            //   _this.timmer = setInterval(() => {
-            //     _this.getList(false)
-            //   }, _this.$store.state.websocketTimeSec);
-            // });
+            // _this.getList(false);
+            _this.$nextTick(() => {
+              _this.getList(false);
+              _this.timmer = setInterval(() => {
+                _this.getList(false)
+              }, _this.$store.state.websocketTimeSec);
+            });
           }
       })
     }

+ 441 - 99
src/views/NewPages/ztfx.vue

@@ -43,42 +43,45 @@
             <table style="width:100%;" border="0" cellspacing="0">
               <thead>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:5vh;"></th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1" style="width:6vh;"></th>
+                  <th rowspan="2" class="type1">
+                    理论发电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    实际发电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    风能利用率
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    维护损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    维护损失率
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
+                  <th rowspan="2" class="type1">
                     故障损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    故障损失
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    限电损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    限电损失率
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    性能损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    性能损失率
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    受累损失电量
+                  </th>
+                  <th rowspan="2" class="type1">
+                    受累损失率
                   </th>
                 </tr>
               </thead>
@@ -96,87 +99,219 @@
                         本期
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.yllfdl }}
+                        
+                        <template v-if="compares.yllfdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.yllfdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
-                        <span class="svg-icon svg-icon-green">
-                          <svg-icon svgid="svg-arrow-up-1" />
-                        </span>
+                        {{ nowCurrents.ysjfdl }}
+                        <template v-if="compares.ysjfdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.ysjfdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.yfnlyl}}
+                        <template v-if="compares.yfnlyl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.yfnlyl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.ywhssdl }}
+                        <template v-if="compares.ywhssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.ywhssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.ywhssl }}
+                        <template v-if="compares.ywhssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.ywhssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.ygzssdl }}
+                        <template v-if="compares.ygzssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.ygzssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.ygzssl }}
+                        <template v-if="compares.ygzssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.ygzssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.yxdssdl }}
+                        <template v-if="compares.yxdssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.yxdssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.yxdssl }}
+                        <template v-if="compares.yxdssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.yxdssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.yxnssdl }}
+                        <template v-if="compares.yxnssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.yxnssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.yxnssl}}
+                        <template v-if="compares.yxnssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.yxnssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.yslssdl }}
+                        <template v-if="compares.yslssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.yslssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                      </td>
+                      <td class="td-item">
+                        {{ nowCurrents.yslssl }}
+                        <template v-if="compares.yslssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.yslssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                     </tr>
                     <tr>
                       <td style="width:5vh;">
-                        当期
+                        同期
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.yllfdl }}
+                        
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.ysjfdl }}
                       </td>
                       <td class="td-item">
-                        0.59
-                        <span class="svg-icon svg-icon-yellow">
-                          <svg-icon svgid="svg-arrow-dpwn-1" />
-                        </span>
+                        {{ sameList.yfnlyl}}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.ywhssdl }}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.ywhssl }}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.ygzssdl }}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.ygzssl }}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.yxdssdl }}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.yxdssl }}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.yxnssdl }}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.yxnssl}}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.yslssdl }}
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.yslssl }}
                       </td>
                     </tr>
                   </tbody>
@@ -192,44 +327,44 @@
             <table style="width:100%;" border="0" cellspacing="0">
               <thead>
                 <tr>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                <th rowspan="2" class="type1">
+                    理论发电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    实际电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    风能利用率
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    维护损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    维护损失率
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
+                  <th rowspan="2" class="type1">
                     故障损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    故障损失
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    限电损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    限电损失率
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    性能损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    性能损失率
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    受累损失电量
                   </th>
-                  <th rowspan="2" class="type1" style="width:6vh;">
-                    故障损失电量
+                  <th rowspan="2" class="type1">
+                    受累损失率
                   </th>
                 </tr>
               </thead>
@@ -242,48 +377,217 @@
                   cellspacing="0"
                 >
                   <tbody>
-                    <tr v-for="index of 2" :key="index">
+                    <tr>
+                       <td class="td-item">
+                        {{ nowCurrents.nllfdl }}
+                        
+                        <template v-if="compares.nllfdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nllfdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
+                      </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nsjfdl }}
+                        <template v-if="compares.nsjfdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nsjfdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
-                        <span class="svg-icon svg-icon-yellow">
-                          <svg-icon svgid="svg-arrow-dpwn-1" />
-                        </span>
+                        {{ nowCurrents.nfnlyl}}
+                        <template v-if="compares.nfnlyl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nfnlyl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nwhssdl }}
+                        <template v-if="compares.nwhssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nwhssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nwhssl }}
+                        <template v-if="compares.nwhssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nwhssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.ngzssdl }}
+                        <template v-if="compares.ngzssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.ngzssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.ngzssl }}
+                        <template v-if="compares.ngzssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.ngzssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nxdssdl }}
+                        <template v-if="compares.nxdssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nxdssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nxdssl }}
+                        <template v-if="compares.nxdssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nxdssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nxnssdl }}
+                        <template v-if="compares.nxnssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nxnssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nxnssl}}
+                        <template v-if="compares.nxnssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nxnssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nslssdl }}
+                        <template v-if="compares.nslssdl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nslssdl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
                       <td class="td-item">
-                        0.59
+                        {{ nowCurrents.nslssl }}
+                        <template v-if="compares.nslssl === 2">
+                          <span class="svg-icon svg-icon-green">
+                            <svg-icon svgid="svg-arrow-up-1" />
+                          </span>
+                        </template>
+                        <template v-if="compares.nslssl === 1">
+                          <span class="svg-icon svg-icon-yellow">
+                            <svg-icon svgid="svg-arrow-dpwn-1" />
+                          </span>
+                        </template>
                       </td>
+                    </tr>
+                    <tr>
                       <td class="td-item">
-                        0.59
+                        {{ sameList.nllfdl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nsjfdl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nfnlyl}}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nwhssdl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nwhssl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.ngzssdl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.ngzssl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nxdssdl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nxdssl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nxnssdl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nxnssl}}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nslssdl }}
+                      </td>
+                      <td class="td-item">
+                        {{ sameList.nslssl }}
                       </td>
                     </tr>
                   </tbody>
@@ -514,6 +818,9 @@ export default {
   },
   data() {
     return {
+      nowCurrents: {},
+      compares: {},
+      sameList: {},
       tableData2: {
         column: [
           {
@@ -604,11 +911,46 @@ export default {
             v11: "0.59",
             v12: "0.59",
           },
-        ],
+        ]
       },
     };
   },
-  created() {},
+  created() {
+    this.getMonthList()
+  },
+  mounted() {
+    // this.getMonthList()
+  },
+  methods: {
+    getMonthList() {
+      let _this = this
+      _this.API.requestData({
+          // showLoading,
+          method: "GET",
+          baseURL: 'http://10.155.32.4:8034',
+          subUrl: "/specific/maintoplist",
+          data:{
+            month: '2021-07'
+          },
+          success(res) {
+            res.data.map(item => {
+              for (let key in item) {
+                if (key !== 'type' && item.type !== '比较') {
+                  item[key] = item[key].toFixed(2)
+                }
+              }
+              if (item.type === '当前') {
+                _this.nowCurrents = item
+              } else if (item.type === '比较') {
+                _this.compares = item
+              } else {
+                _this.sameList = item
+              }
+            })
+          }
+      })
+    }
+  }
 };
 </script>