Procházet zdrojové kódy

样式修改;
健康矩阵跳转;

chenminghua před 3 roky
rodič
revize
ad0fc3d76a

+ 1 - 1
src/router/index.js

@@ -167,7 +167,7 @@ const routes = [
     component: () => import('../views/HealthControl/Health6.vue'),
   },
   {
-    path: '/health/health7',
+    path: '/health/health7/:wtId',
     name: 'health7',
     component: () => import('../views/HealthControl/Health7.vue'),
   },

+ 8 - 1
src/views/HealthControl/Health5.vue

@@ -34,7 +34,7 @@
           </div>
           <div class="body">
             <div class="matrix">
-              <div class="item" v-for="(ele, num) in windturbineList[index]" :key="num"> 
+              <div class="item" v-for="(ele, num) in windturbineList[index]" :key="num" @click="onClickJump(ele)"> 
                 <div v-if="parseInt(ele.fjzt) == 1" class="green">{{ele.wtnum}}号</div>
                 <div v-if="parseInt(ele.fjzt) == 2" class="purple">{{ele.wtnum}}号</div>
                 <div v-if="parseInt(ele.fjzt) == 3" class="yellow">{{ele.wtnum}}号</div>
@@ -87,6 +87,12 @@ export default {
         },
       });
     },
+    // 跳转按钮
+    onClickJump(item){
+       this.$router.push({
+        path: `/health/health7/${item.wtId}`
+      });
+    }
   }
 };
 </script>
@@ -157,6 +163,7 @@ export default {
         margin-bottom: 4px;
         text-align: center;
         border: 1px solid transparent;
+        cursor: pointer;
 
         & + .item {
           margin-left: 4px;

+ 2 - 2
src/views/HealthControl/Health6.vue

@@ -40,7 +40,7 @@
     </div>
     <row :type="'flex'" class="mg-b-16">
       <Col :span="12">
-        <panel :title="'健康走势图'" :showLine="false">
+        <panel :title="'报警统计图'" :showLine="false">
           <dual-pie-chart :innerData="healPieData" :outerData="healPieData" :height="'250px'" />
         </panel>
       </Col>
@@ -67,7 +67,7 @@
       </panel>
     </div>
     <div class="mg-b-16 curStyle">
-      <panel :title="'健康状态'" :showLine="false">
+      <panel :title="'健康趋势'" :showLine="false">
         <MultipleLineChart :list="statusData" :units="['']" :height="'250px'" />
       </panel>
       <div class="selections">

+ 122 - 127
src/views/HealthControl/Health7.vue

@@ -2,28 +2,19 @@
   <div class="health-7">
     <div class="power-info mg-b-16">
       <div class="info-tab">
-        <div class="tab active">
+        <div
+          class="tab"
+          v-for="(item, index) in infoList"
+          :key="index"
+          :class="item.active ? 'active' : ''"
+          @click="onClickInfo(item)"
+        >
           <i class="svg-icon svg-icon svg-icon-sm">
-            <svg-icon :svgid="'svg-24-houre'" />
+            <svg-icon :svgid="item.svgid" />
           </i>
-          <span> 24小时健康趋势 </span>
-        </div>
-        <div class="tab">
-          <i class="svg-icon svg-icon svg-icon-sm">
-            <svg-icon :svgid="'svg-h-day'" />
-          </i>
-          <span> 7日健康趋势 </span>
-        </div>
-        <div class="tab">
-          <i class="svg-icon svg-icon svg-icon-sm">
-            <svg-icon :svgid="'svg-h-month'" />
-          </i>
-          <span>30日健康趋势</span>
+          <span> {{ item.title }} </span>
         </div>
         <div class="empty"></div>
-        <div class="tab">
-          <span>全部风场健康趋势</span>
-        </div>
       </div>
       <div class="info-chart">
         <panel class="info-chart-panel" :title="'损失电量分析'">
@@ -37,7 +28,7 @@
       </panel>
     </div>
     <div class="data-list">
-      <Table :data="tableData" :canScroll="false" />
+      <Table :data="tableData" :canScroll="true" />
     </div>
   </div>
 </template>
@@ -53,124 +44,120 @@ export default {
   components: { SvgIcon, Panel, VertivalBarLineChart, NormalLineChart, Table },
   data() {
     return {
+      infoList: [
+        // {title: '24小时健康趋势', svgid: 'svg-24-houre', active: false, type: 'houre'},
+        { title: "7日健康趋势", svgid: "svg-h-day", active: true, type: "day" },
+        { title: "30日健康趋势", svgid: "svg-h-month", active: false, type: "month"},
+      ],
       tableData: {
         column: [
-          {
-            name: "部件名称",
-            field: "name",
-          },
-          {
-            name: "备件数量",
-            field: "v1",
-            is_num: true,
-          },
-          {
-            name: "平均间隔时间(h)",
-            field: "v2",
-            is_num: true,
-          },
-          {
-            name: "平均消耗时间(h)",
-            field: "v3",
-            is_num: true,
-          },
-          {
-            name: "预计作业时间(小时)",
-            field: "v4",
-            is_num: true,
-          },
-          {
-            name: "损失电量统计",
-            field: "v5",
-            is_num: true,
-          },
-          {
-            name: "当前状态",
-            field: "v6",
+          { name: "部件名称",field: "name" },
+          { name: "MTBF",field: "v1", is_num: true },
+          { name: "MTTR",field: "v2", is_num: true },
+          { name: "损失电量(kw/h)",field: "v3",is_num: true },
+          { name: "当前状态",field: "v4",
             template: function(data) {
               if (data == 1) return "<div class='dot green'></div>";
-              else return "<div class='dot yellow'></div>";
+              else if (data == 2) return "<div class='dot purple'></div>";
+              else if (data == 3) return "<div class='dot yellow'></div>";
+              else if (data == 4) return "<div class='dot orange'></div>";
             },
           },
         ],
-        data: [
-          {
-            name: "齿轮箱",
-            v1: 15.78,
-            v2: 12,
-            v3: 2.3,
-            v4: 231.23,
-            v5: 123.23,
-            v6: 1,
-          },
-          {
-            name: "齿轮箱",
-            v1: 15.78,
-            v2: 12,
-            v3: 2.3,
-            v4: 231.23,
-            v5: 123.23,
-            v6: 1,
-          },
-          {
-            name: "齿轮箱",
-            v1: 15.78,
-            v2: 12,
-            v3: 2.3,
-            v4: 231.23,
-            v5: 123.23,
-            v6: 1,
-          },
-          {
-            name: "齿轮箱",
-            v1: 15.78,
-            v2: 12,
-            v3: 2.3,
-            v4: 231.23,
-            v5: 123.23,
-            v6: 1,
-          },
-          {
-            name: "齿轮箱",
-            v1: 15.78,
-            v2: 12,
-            v3: 2.3,
-            v4: 231.23,
-            v5: 123.23,
-            v6: 1,
-          },
-          {
-            name: "齿轮箱",
-            v1: 15.78,
-            v2: 12,
-            v3: 2.3,
-            v4: 231.23,
-            v5: 123.23,
-            v6: 2,
-          },
-          {
-            name: "齿轮箱",
-            v1: 15.78,
-            v2: 12,
-            v3: 2.3,
-            v4: 231.23,
-            v5: 123.23,
-            v6: 2,
-          },
-          {
-            name: "齿轮箱",
-            v1: 15.78,
-            v2: 12,
-            v3: 2.3,
-            v4: 231.23,
-            v5: 123.23,
-            v6: 2,
-          },
-        ],
+        data: [],
       },
+      wtId: undefined,
+      hisValue: {},  //健康走势图
     };
   },
-  created() {},
+  created() {
+    this.wtId = this.$route.params.wtId;
+     this.$nextTick(() => {
+        
+    console.log(this.wtId )
+    this.requestHisValue()
+    this.requestMttrrand()
+     })
+   
+  },
+  methods:{
+     // 未确认缺陷按钮下的健康趋势选项
+    onClickInfo(item) {
+      this.infoList.forEach((element) => {
+        if (item.type == element.type) {
+          item.active = true;
+          switch (item.type) {
+            case "day":
+              this.requestCoulometry(2);
+              break;
+            case "month":
+              this.requestCoulometry(3);
+          }
+        } else {
+          element.active = false;
+        }
+      });
+    },
+    // 损失电量分析  type:1 表示24小时健康趋势,2 表示七天健康趋势 3 表示30天健康趋势
+    requestCoulometry(type) {
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl: "recommen/findAllChartjz",
+        data: { wpId: 0, type: type },
+        success(res) {
+          if (res.code == 200) {
+            that.bardata.legend = ["优数量", "良数量", "差数量"];
+            that.lineData = res.data.lvchart;
+            that.bardata.area = res.data.datechart;
+            that.bardata.data[2] = res.data.cslchart;
+            that.bardata.data[1] = res.data.lslchart;
+            that.bardata.data[0] = res.data.yslchart;
+          }
+        },
+      });
+    },
+    //风机健康走势图
+    requestHisValue(){
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl: "healthsub/findWtHisValueForBj",
+        data: { wtId: that.wtId },
+        success(res) {
+          if(res.code == 200){
+            let data = res.data;
+            data.time = data.time.slice(0, 65)
+            that.hisValue = data
+          }
+        },
+      });
+    },
+    //部件健康情况
+    requestMttrrand(){
+      let that = this;
+      that.API.requestData({
+        method: "POST",
+        subUrl: "healthsub/getWtMttrandMtbfByBj",
+        data: { wtId: that.wtId },
+        success(res) {
+          if(res.code == 200){
+            let data = res.data;
+            that.tableData.data = [
+              {name:data.clx[1], v1:data.clx[4], v2:data.clx[5], v3:data.clx[6], v4:data.clx[0]},
+              {name:data.fdj[1], v1:data.fdj[4], v2:data.fdj[5], v3:data.fdj[6], v4:data.fdj[0]},
+              {name:data.bj[1], v1:data.bj[4], v2:data.bj[5], v3:data.bj[6], v4:data.bj[0]},
+              {name:data.zk[1], v1:data.zk[4], v2:data.zk[5], v3:data.zk[6], v4:data.zk[0]},
+              {name:data.zz[1], v1:data.zz[4], v2:data.zz[5], v3:data.zz[6], v4:data.zz[0]},
+              {name:data.ph[1], v1:data.ph[4], v2:data.ph[5], v3:data.ph[6], v4:data.ph[0]},
+              {name:data.jc[1], v1:data.jc[4], v2:data.jc[5], v3:data.jc[6], v4:data.jc[0]},
+              {name:data.bpq[1], v1:data.bpq[4], v2:data.bpq[5], v3:data.bpq[6], v4:data.bpq[0]},
+            ]
+          }
+        },
+      });
+    }
+  }
 };
 </script>
 
@@ -284,9 +271,17 @@ export default {
         background: @green;
       }
 
+      &.purple {
+        background: @purple;
+      }
+
       &.yellow {
         background: @yellow;
       }
+
+      &.orange {
+        background: @orange;
+      }
     }
   }
 }

+ 64 - 39
src/views/Status/components/static.vue

@@ -8,19 +8,19 @@
             <span>0</span>
           </div>
           <div class="box">
-            <div class="category-item">
-              <div>001</div>
-              <div class="green">0</div>
+            <div class="category-item" v-for="(item, index) of datas" :key="index">
+              <div>{{ item.text }}</div>
+              <div :class="item.color">{{ item.num }}</div>
             </div>
           </div>
         </div>
         <div class="item-box">
-          <div class="data-item">
-            <div class="f1">0</div>
-            <div class="f2">0</div>
-            <div class="f3">0</div>
-            <div class="f4">0</div>
-            <div class="f5">0</div>
+          <div class="data-item" v-for="(item, index) of items" :key="index" :class="{ light: item.is_light }">
+            <div class="f1">{{ item.f1 }}</div>
+            <div class="f2">{{ item.f2 }}</div>
+            <div class="f3">{{ item.f3 }}</div>
+            <div class="f4">{{ item.f4 }}</div>
+            <div class="f5">{{ item.f5 }}</div>
           </div>
         </div>
       </div>
@@ -37,41 +37,65 @@ export default {
   components: {
     ComPanel,
   },
-  /**
-   * {
-          title: "某某某风电场",
-          weather: {
-              type: "cloudy",
-              temperature: 11
-          },
-          breakOff: false,
-          category: {
-              score: 66,
-              datas: [
-                  { text: "运行", num: 30, color: 'green' },
-                  { text: "待机", num: 27, color: 'purple' },
-                  { text: "限电", num: 30, color: 'yellow' },
-                  { text: "检修", num: 30, color: 'orange' },
-                  { text: "故障", num: 13, color: 'red' },
-                  { text: "受累", num: 30, color: 'blue' },
-                  { text: "离线", num: 30, color: 'gray' },
-              ]
-          },
-          items: [
-              { f1: 'AGC宋六:', f2: '设定', f3: '66', f4: '出线', f5: '11', is_light: true },
-              { f1: '升压站:', f2: '出线Uab/La', f3: '23/3 23/3', f4: '电压', f5: '103 103', is_light: false },
-              { f1: '风功:', f2: '未来15分钟', f3: '103', f4: '', f5: '', is_light: false },
-              { f1: '测风塔:', f2: '风速', f3: '103KM', f4: '风向', f5: '103 62', is_light: false },
-              { f1: '电能量表:', f2: '', f3: '103 62', f4: '', f5: '', is_light: false },
-          ]
-      }
-   */
   props: {
     data: Object,
   },
   // 数据
   data() {
-    return {};
+    return {
+      datas:[
+        {text:'运行',num:0,color:'green'},
+        {text:'待机',num:0,color:'purple'},
+        {text:'限电',num:0,color:'yellow'},
+        {text:'检修',num:0,color:'orange'},
+        {text:'故障',num:0,color:'red'},
+        {text:'受累',num:0,color:'blue'},
+        {text:'离线',num:0,color:'gray'},
+      ],
+      items: [
+        {
+          // f1: ("AGC" + ele.name.replace(/风电场/g, "") + ":"),
+          f1: "AGC:",
+          f2: "设定",
+          f3: 0,
+          f4: "出线",
+          f5: 0,
+          is_light: true,
+        },
+        {
+          f1: "升压站:",
+          f2: "Uab",
+          f3: 0,
+          f4: "Ia",
+          f5: 0,
+          is_light: false,
+        },
+        {
+          f1: "风功:",
+          f2: "未来15分钟",
+          f3: 0,
+          f4: "",
+          f5: "",
+          is_light: false,
+        },
+        {
+          f1: "测风塔:",
+          f2: "风速",
+          f3: 0 + "m/s",
+          f4: "风向",
+          f5: 0,
+          is_light: false,
+        },
+        {
+          f1: "电能量表:",
+          f2: "",
+          f3: 0,
+          f4: "",
+          f5: "",
+          is_light: false,
+        },
+      ],
+    };
   },
   // 函数
   methods: {
@@ -108,6 +132,7 @@ export default {
 .status-panel {
   position: relative;
   height: 22.315vh;
+  cursor: pointer;
 
   .pause {
     position: absolute;

+ 1 - 0
src/views/Status/components/status-panel.vue

@@ -108,6 +108,7 @@ export default {
 .status-panel {
   position: relative;
   height: 22.315vh;
+  cursor: pointer;
 
   .pause {
     position: absolute;

+ 16 - 16
src/views/WindSite/WindSite.vue

@@ -45,10 +45,10 @@ export default {
           icon: "svg-matrix",
           path: "/monitor/windsite/draughtfanlist",
         },
-        {
-          icon: "svg-agc",
-          path: "/monitor/windsite/matrix",
-        },
+        // {
+        //   icon: "svg-agc",
+        //   path: "/monitor/windsite/matrix",
+        // },
         {
           icon: "svg-agc",
           path: "/monitor/windsite/lightmatrix",
@@ -65,18 +65,18 @@ export default {
           icon: "svg-easy-compass",
           path: "/monitor/windsite/tower",
         },
-        {
-          icon: "svg-easy-compass",
-          path: "/monitor/windsite/Inverter-Info",
-        },
-        {
-          icon: "svg-easy-compass",
-          path: "/monitor/windsite/map",
-        },
-        {
-          icon: "svg-easy-compass",
-          path: "/monitor/windsite/map1",
-        },
+        // {
+        //   icon: "svg-easy-compass",
+        //   path: "/monitor/windsite/Inverter-Info",
+        // },
+        // {
+        //   icon: "svg-easy-compass",
+        //   path: "/monitor/windsite/map",
+        // },
+        // {
+        //   icon: "svg-easy-compass",
+        //   path: "/monitor/windsite/map1",
+        // },
       ],
     };
   },

+ 1 - 8
src/views/WindSite/pages/Home/Home.vue

@@ -214,7 +214,7 @@
         </panel>
       </Col>
       <Col :span="8">
-        <panel title="完成电量">
+        <panel title="日发电量对比">
           <multiple-bar-chart height="21.296vh" :list="CompleteElectricity.data" :units="CompleteElectricity.units" :showLegend="true" />
         </panel>
       </Col>
@@ -333,25 +333,18 @@ export default {
       switch (fjzt) {
         case 0:
           return "green";
-          break;
         case 1:
           return "blue";
-          break;
         case 2:
           return "red";
-          break;
         case 3:
           return "gray";
-          break;
         case 4:
           return "orange";
-          break;
         case 5:
           return "purple";
-          break;
         case 6:
           return "write";
-          break;
       }
     },
     // 请求服务

+ 1 - 0
src/views/WindSite/pages/Home/light-matrix.vue

@@ -115,6 +115,7 @@ export default {
     text-align: center;
     border: 0.093vh solid;
     font-size: 14px;
+    cursor: pointer;
 
     &.write {
       color: @black;

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

@@ -80,11 +80,11 @@ export default {
               icon: "svg-agc",
               path: "/monitor/agc",
             },
-            {
-              text: "风场",
-              icon: "svg-wind-site",
-              path: "/monitor/windsite/home",
-            },
+            // {
+            //   text: "风场",
+            //   icon: "svg-wind-site",
+            //   path: "/monitor/windsite/home",
+            // },
           ],
         },
         {