Parcourir la source

智慧检修BUG修改

lining il y a 3 ans
Parent
commit
4117b56436

+ 1 - 1
src/api/zmaxios.js

@@ -3,7 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
 
 // 配置新建一个 axios 实例
 const service = axios.create({
-    baseURL: 'http://192.168.1.14:8075',
+    baseURL: 'http://192.168.1.18:8075',
     timeout: 50000,
     headers: { 'Content-Type': 'application/json' },
 });

+ 1 - 1
src/components/chart/combination/bar-line-chart.vue

@@ -77,7 +77,7 @@ export default {
     // 颜色
     color: {
       type: Array,
-      default: () => ["#323E6F", "#e17e23", "#ba3237#", "c531c7", "#ffffff", "#EDEB2F"],
+      default: () => ["#323E6F", "#e17e23", "#ba3237", "#c531c7", "#ffffff", "#EDEB2F"],
     },
     // 每页显示个数
     pageSize: {

+ 5 - 2
src/components/coms/collapse/collapse-list.vue

@@ -2,7 +2,7 @@
   <el-scrollbar>
     <div class="com-collapse" :style="{ height: allowScroll ? scrollHeight : 'auto' }">
       <div class="collapse-box" v-for="(menu, i) in list" :key="menu" :class="{ active: menuIndex == i }">
-        <div class="box-text" @click="menuClick(i)">
+        <div class="box-text" @click="menuClick(menu,i)">
           {{ menu.text }}
         </div>
         <div class="collapse-items">
@@ -116,12 +116,15 @@ export default {
   },
   // 函数
   methods: {
-    menuClick (index) {
+    menuClick (item,index) {
       if (this.menuIndex == index) {
         this.menuIndex = -1;
       } else {
         this.menuIndex = index;
       }
+      if(index === 0){
+        this.$emit("click", item);
+      }
       this.itemIndex = -1;
     },
     itemClick (item, index) {

+ 14 - 1
src/router/index.js

@@ -453,7 +453,14 @@ const routes = [{
 		name: "health10",
 		component: () =>
 			import( /* webpackChunkName: "health8" */ "../views/HealthControl/Health10.vue"),
-	}, {
+	}, 
+	{
+		path: "healthLineChart/:wpId/:wtId", // 健康趋势
+		component: () =>
+			import( /* webpackChunkName: "healthLineChart2" */
+				"../views/HealthControl/healthLineChart.vue"),
+	},
+	{
 		path: "healthLineChart2/:wpId/:wtId", // 健康趋势
 		component: () =>
 			import( /* webpackChunkName: "healthLineChart2" */
@@ -821,6 +828,12 @@ const routes = [{
 	name: "knowledgeBase",
 	component: () => import("../views/sampleDatabase/knowledgeBase/index.vue")
 },
+//发电能力分析
+// {
+// 	path: "/others/abilityAnalysis",
+// 	name: "abilityAnalysis",
+// 	component: () => import("../views/sampleDatabase/abilityAnalysis/index.vue")
+// },
 //智能营销样本库
 {
 	path: "/others/market",

+ 1 - 23
src/views/HealthControl/Health0.vue

@@ -223,28 +223,7 @@ export default {
       reportshow: false, //是否显示健康报告
       reportparams: undefined,
       bsxImg: require("@assets/png/bsx.png"),
-      options: [
-        {
-          value: "选项1",
-          label: "黄金糕",
-        },
-        {
-          value: "选项2",
-          label: "双皮奶",
-        },
-        {
-          value: "选项3",
-          label: "蚵仔煎",
-        },
-        {
-          value: "选项4",
-          label: "龙须面",
-        },
-        {
-          value: "选项5",
-          label: "北京烤鸭",
-        },
-      ],
+      options: [],
       wtid:'',
       wpid:'',
       options1:[],
@@ -810,7 +789,6 @@ export default {
              wtId : this.value2
         },
         success(res) {
-          console.log('findWtHealthInfo:',res)
           that.yxtableData.data = res.data.bjyxls;
           that.tableData2.data =  res.data.djpgls;
         },

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

@@ -41,12 +41,12 @@
     <row :type="'flex'" class="mg-b-16">
       <Col :span="12">
         <panel :title="'报警统计图'" :showLine="false">
-          <dual-pie-chart :innerData="healPieData" :outerData="healPieData" :height="'250px'" />
+          <dual-pie-chart :innerData="healPieData" :outerData="healPieData" :height="'230px'" />
         </panel>
       </Col>
       <Col :span="12">
         <panel :title="'故障统计图'" :showLine="false">
-          <dual-pie-chart :innerData="stopPieData" :outerData="stopPieData" :height="'250px'" />
+          <dual-pie-chart :innerData="stopPieData" :outerData="stopPieData" :height="'230px'" />
         </panel>
       </Col>
       <!-- <Col :span="16">
@@ -63,12 +63,12 @@
     </row>
     <div class="mg-b-16">
       <panel :title="'健康状态占比'" :showLine="false">
-        <bar-line-chart :bardata="barData" :lineData="[]" :height="'250px'" :pageSize="6" />
+        <bar-line-chart :bardata="barData" :lineData="[]" :height="'230px'" :pageSize="6" />
       </panel>
     </div>
     <div class="mg-b-16 curStyle">
       <panel :title="'健康趋势'" :showLine="false">
-        <MultipleLineChart :list="statusData" :units="['']" :height="'250px'" />
+        <MultipleLineChart :list="statusData" :units="['']" :height="'230px'" />
       </panel>
       <div class="selections">
         <div class="item" @click="changeStatus('1')" :class="{ green: status === '1' }">

+ 1 - 0
src/views/HealthControl/assess/assessindex.vue

@@ -456,6 +456,7 @@ export default {
           this.shows = "y";
           this.dialogTitle = "年信息对比";
         }
+        this.getTable(this.date);
       });
     },
     // 场站

+ 4 - 1
src/views/HealthControl/assess/selfEvaluate.vue

@@ -225,6 +225,7 @@ export default {
         success(res) {
           that.tableLoading = false;
           if (res.data.length) {
+            console.log(11111111111);
             const tableTargetName = {
               target001: "平均切入风速",
               target002: "平均达到额定风速",
@@ -341,6 +342,7 @@ export default {
                 for (let key in ele) {
                   if (key.indexOf("target") !== -1) {
                     ele["copyValue"] = ele[key]["value"];
+                    ele[key] = ele[key]["value"];
                   }
                 }
               });
@@ -351,7 +353,7 @@ export default {
                 if (key.indexOf("target") !== -1) {
                   tableData.column.push({
                     name: tableTargetName[key],
-                    field: "copyValue",
+                    field: key,
                     is_num: true,
                     is_light: false,
                     sortable: true,
@@ -388,6 +390,7 @@ export default {
           this.shows = "y";
           this.dialogTitle = "年信息对比";
         }
+        this.getTable(this.date);
       });
     },
     // 场站

+ 1 - 0
src/views/HealthControl/healthLineChart.vue

@@ -25,6 +25,7 @@ export default {
   
   methods:{
     switchWt(data){
+      
       this.$router.push(`/health/health4/healthLineChart/${data.wpId}/${data.wtId}`);
       this.wtId = this.$route.params.wtId;
       this.wpId = this.$route.params.wpId;

+ 7 - 6
src/views/MalfunctionWarning/MalfunctionWarning.vue

@@ -115,7 +115,7 @@
             style="width: 100%; margin-bottom: 10px"
           >
             <el-table-column
-              prop="id"
+              prop="idString"
               label="id"
               width="100"
               align="center"
@@ -568,6 +568,7 @@ export default {
           ),
         },
         success(res) {
+          console.log(111111111111,res);
           if (res) {
             let arr = [];
             res.forEach((item, index) => {});
@@ -623,7 +624,7 @@ export default {
     queryData() {
       let param = [];
       this.allData.forEach((item) => {
-        param.push(item.id);
+        param.push(item.idString);
       });
       let that = this;
       that.API.requestData({
@@ -635,10 +636,10 @@ export default {
         success(res) {
           if (res) {
             res.data.forEach((item) => {
-              that.allData.filter((val) => val.id === item.faultid)[0].labels =
+              that.allData.filter((val) => val.idString === item.faultid)[0].labels =
                 item.faultcode;
-              that.allData.filter((items) => items.id === item.faultid)[0].ids =
-                item.id;
+              that.allData.filter((items) => items.idString === item.faultid)[0].ids =
+                item.idString;
             });
           }
         },
@@ -908,7 +909,7 @@ export default {
       data.forEach((item) => {
         if (item.labels) {
           let obj = {
-            faultid: item.id,
+            faultid: item.idString,
             stationcn: item.stationName,
             windturbineid: item.objectId,
             faulttype: this.faultLists.filter(

+ 0 - 1
src/views/MalfunctionWarning/components/trainingResults.vue

@@ -272,7 +272,6 @@ export default {
       }
     },
     historyData(index, max) {
-      console.log(1111111111);
       let dataLsit = this.lableList.filter((item) => item.isShow === true);
       let that = this;
       that.API.requestData({

+ 4 - 0
src/views/NewPages/alarm-center-2.vue

@@ -156,6 +156,10 @@ export default {
     };
   },
   created () {
+    const myDate = new Date()
+    const year = myDate.getFullYear()
+    const mouth = `0${myDate.getMonth() + 1}`.slice(-2)
+    this.startdate = `${year}-${mouth}-01`
     this.search();
     this.searchTree();
   },

+ 49 - 13
src/views/device/device.vue

@@ -37,7 +37,7 @@
               新增
             </button>
             <el-input
-            style="width:180px;margin: 0 10px;"
+              style="width: 180px; margin: 0 10px"
               v-model="state.SearchVal"
               placeholder="筛选"
               :prefix-icon="Search"
@@ -88,7 +88,7 @@
             style="width: 100%"
             height="700"
           >
-            <el-table-column type="index" width="50" align="center"/>
+            <el-table-column type="index" width="50" align="center" />
             <el-table-column
               prop="metriccode"
               label="测点编码"
@@ -129,7 +129,11 @@
               </template>
             </el-table-column>
 
-            <el-table-column prop="unitname" label="单位" align="center"></el-table-column>
+            <el-table-column
+              prop="unitname"
+              label="单位"
+              align="center"
+            ></el-table-column>
             <el-table-column
               prop="categorydata"
               label="测点类型"
@@ -140,7 +144,11 @@
               label="物理类型"
               align="center"
             ></el-table-column>
-            <el-table-column prop="description" label="描述" align="center"></el-table-column>
+            <el-table-column
+              prop="description"
+              label="描述"
+              align="center"
+            ></el-table-column>
             <el-table-column label="操作" width="180" align="center">
               <template #default="scope">
                 <el-button
@@ -159,6 +167,17 @@
             </el-table-column>
           </el-table>
         </el-tab-pane>
+        <div class="pagination">
+          <el-pagination
+            background
+            layout="total, prev, pager, next"
+            hide-on-single-page
+            :current-page="query.page"
+            :page-size="query.limit"
+            :total="pageTotal"
+            @current-change="handlePageChange"
+          ></el-pagination>
+        </div>
         <el-tab-pane label="故障模式">
           <faultmode />
         </el-tab-pane>
@@ -529,13 +548,17 @@ provide(
 );
 //fifterSearch
 const fifterSearch = () => {
-  state.fifterSearchTableData = state.pointTableData.filter((e) => {
-    return (
-      e.name.includes(state.SearchVal) |
-      e.categorydata.includes(state.SearchVal) |
-      e.metriccode.includes(state.SearchVal)
-    );
-  });
+  if (state.SearchVal == "") {
+    return state.fifterSearchTableData = state.pointTableData;
+  } else {
+    state.fifterSearchTableData = state.pointTableData.filter((e) => {
+      return (
+        e.name.includes(state.SearchVal) |
+        e.categorydata.includes(state.SearchVal) |
+        e.metriccode.includes(state.SearchVal)
+      );
+    });
+  }
 };
 // tree click
 const handleNodeClick = (data) => {
@@ -687,9 +710,12 @@ const savedesc = async () => {
 ///// 基本信息
 // getPoint
 const getPoint = async (node) => {
-  const res = await point(node.code);
+  const res = await point(node.code, query.page, query.limit);
   console.warn(res);
-  state.pointTableData = res;
+  pageTotal.value = res.total;
+  state.pointTableData = res.records?.sort((a, b) => {
+    return a.id - b.id;
+  });
   fifterSearch();
 };
 // 递归解析基础数据
@@ -725,6 +751,16 @@ const export2Excel = () => {
   ];
   outExportExcel(tableHeader, tableKey, tableData, "测点导出excel");
 };
+const query = reactive({
+  page: 1,
+  limit: 10,
+});
+let pageTotal = ref(0);
+// 分页导航
+const handlePageChange = (val) => {
+  query.page = val;
+  getPoint(state.desc);
+};
 </script>
 <style lang="scss" scoped>
 .main {

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

@@ -1002,6 +1002,11 @@ export default {
                   path: "/others/knowledgeBase",
                 },
                 // {
+                //   text: "发电能力分析",
+                //   icon: "svg-matrix",
+                //   path: "/others/abilityAnalysis",
+                // },
+                // {
                 //   text: "风电营销样本库",
                 //   icon: "svg-matrix",
                 //   path: "/others/market",

+ 2 - 1
src/views/realSearch/index.vue

@@ -309,7 +309,8 @@ export default {
             } else if (ele.windpowerstationid === 'MCH_GDC') {
               MCH_GDC.children.push(ele);
             } else {
-              JSFW.children.push(ele);
+              // JSFW.children.push(ele);
+              JSFW = ele;
             }
           });
           that.menus.push(JSFW, MHS_FDC, NSS_FDC, QS_FDC, SBQ_FDC, XS_FDC, DWK_GDC, PL_GDC, XH_GDC, MCH_GDC);

+ 286 - 0
src/views/sampleDatabase/abilityAnalysis/index.vue

@@ -0,0 +1,286 @@
+<template>
+  <div>
+    <el-row>
+      <el-col :span="6"> </el-col>
+      <el-col :span="18">
+        <div class="operation">
+          <div class="title">操作面板</div>
+          <div class="condition">
+            <div class="query">
+              <div class="lable">使用模板:</div>
+              <div class="search">
+                <el-select
+                  v-model="model"
+                  clearable
+                  placeholder="请选择"
+                  popper-class="select"
+                  style="width: 120px;"
+                >
+                  <el-option
+                    v-for="item in modelList"
+                    :key="item.value"
+                    :value="item.value"
+                    :label="item.label"
+                  />
+                </el-select>
+              </div>
+            </div>
+            <div class="query1">
+              <div class="lable">最大风速:</div>
+              <el-input size="middle" v-model="wind" clearable></el-input>
+            </div>
+            <div class="query1">
+              <div class="lable">最小风速:</div>
+              <el-input size="middle" v-model="wind" clearable></el-input>
+            </div>
+            <div class="query1">
+              <div class="lable">最大功率:</div>
+              <el-input size="middle" v-model="wind" clearable></el-input>
+            </div>
+            <div class="query1">
+              <div class="lable">最小功率:</div>
+              <el-input size="middle" v-model="wind" clearable></el-input>
+            </div>
+          </div>
+          <div class="condition">
+            <el-checkbox-group v-model="checkList">
+              <el-checkbox label="非并网"></el-checkbox>
+              <el-checkbox label="非合理值"></el-checkbox>
+              <el-checkbox label="并网后十分钟"></el-checkbox>
+              <el-checkbox label="停机前十分钟"></el-checkbox>
+              <el-checkbox label="功率曲线偏差"></el-checkbox>
+              <el-checkbox label="欠符合等级"></el-checkbox>
+            </el-checkbox-group>
+            <div class="level">
+              <el-select
+                v-model="level"
+                clearable
+                placeholder="请选择"
+                popper-class="select"
+                style="width: 80px"
+              >
+                <el-option
+                  v-for="item in levelList"
+                  :key="item.value"
+                  :value="item.value"
+                  :label="item.label"
+                />
+              </el-select>
+            </div>
+          </div>
+        </div>
+        <div>
+          <div class="chart" id="linechart3"></div>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+<script>
+import util from "@/helper/util.js";
+import partten from "@/helper/partten.js";
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      wind: "",
+      model: "进阶模板",
+      modelList: [
+        {
+          label: "进阶模板",
+          value: "0",
+        },
+      ],
+      checkList: [
+        "非并网",
+        "非合理值",
+        "并网后十分钟",
+        "停机前十分钟",
+        "功率曲线偏差",
+        "欠符合等级",
+      ],
+      level: "1级",
+      levelList: [
+        {
+          label: "1级",
+          value: "1",
+        },
+        {
+          label: "2级",
+          value: "2",
+        },
+      ],
+      wtId: "MG01_01",
+    };
+  },
+  created() {
+    this.$nextTick(() => {
+      this.getChart3();
+    });
+  },
+  methods: {
+    async getChart3() {
+      console.log(111111111);
+      const res = await this.API.requestData({
+        method: "POST",
+        subUrl: "yaw/getTotalRanges",
+        data: {
+          wtId: this.wtId,
+          beginDate: new Date(new Date().getTime() - 86400000).formatDate("yyyy-MM-dd"),
+          endDate: new Date().formatDate("yyyy-MM-dd"),
+          type: 1,
+        },
+      });
+      if (res && res.data && res.data.data) {
+        const xData = [];
+        const lData = [];
+        const dataMap = res.data.data;
+        for (let key in dataMap) {
+          let tmpKey = key.replace(/r/, "");
+          tmpKey = tmpKey.replace(/_/, "-");
+          if (tmpKey < 100) {
+            xData.push(tmpKey);
+            lData.push(dataMap[key]);
+          }
+        }
+        this.line3Data = lData;
+        let option = {
+          color: ["#05bb4c", "#4b55ae", "#fa8c16", "#f8de5b"],
+          tooltip: {
+            trigger: "axis",
+            backgroundColor: "rgba(0,0,0,0.4)",
+            borderColor: partten.getColor("gray"),
+            textStyle: {
+              color: "#fff",
+              fontSize: util.vh(16),
+            },
+          },
+          legend: {
+            show: false,
+            data: ["偏航次数"],
+            right: 56,
+            icon: "circle",
+            itemWidth: 6,
+            inactiveColor: "#606769",
+            textStyle: {
+              color: partten.getColor("grayl"),
+              fontSize: 12,
+            },
+          },
+          grid: {
+            top: util.vh(40),
+            left: util.vh(60),
+            right: util.vh(130),
+            bottom: util.vh(24),
+          },
+          xAxis: [
+            {
+              name: "对风偏差(度)",
+              type: "category",
+              boundaryGap: false,
+              axisLabel: {
+                formatter: "{value}",
+                fontSize: util.vh(14),
+                textStyle: {
+                  color: partten.getColor("gray"),
+                },
+              },
+              data: xData,
+            },
+          ],
+          yAxis: [
+            {
+              type: "value",
+              name: "数量",
+              axisLabel: {
+                formatter: "{value}",
+                fontSize: util.vh(14),
+              },
+              splitLine: {
+                lineStyle: {
+                  color: partten.getColor("gray") + 55,
+                  type: "dashed",
+                },
+              },
+            },
+          ],
+          series: [
+            {
+              name: "数量",
+              type: "line",
+              smooth: true,
+              zlevel: 0,
+              lineStyle: {
+                normal: {
+                  color: "#05bb4c",
+                  width: 1,
+                },
+              },
+              yAxisIndex: 0,
+              data: lData,
+            },
+          ],
+        };
+        const chart = echarts.init(document.getElementById("linechart3"));
+        chart.clear();
+        chart.setOption(option);
+        this.resize = function () {
+          chart.resize();
+        };
+        window.addEventListener("resize", this.resize);
+      }
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.operation {
+  width: 95%;
+  border: 1px solid #ffffff;
+  margin-top: 20px;
+
+  .title {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 20px;
+    margin-left: 10px;
+    width: 100px;
+    padding: 10px;
+    margin-top: -30px;
+    background-image: url("../../../assets/background.png");
+  }
+  .condition {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    margin-left: 20px;
+    margin-bottom: 10px;
+    .query {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+    }
+    .query1 {
+      width: 130px;
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      margin-left: 20px;
+
+      .lable {
+        width: 150px;
+      }
+    }
+    .level {
+      margin-left: 10px;
+    }
+  }
+}
+.chart {
+    width: 100%;
+    height: 220px;
+    display: block;
+    margin: auto;
+  }
+</style>

+ 1 - 1
src/views/sampleDatabase/analysis/index.vue

@@ -264,7 +264,7 @@ export default {
         let that = this;
         await this.API.requestData({
           method: "GET",
-          subUrl: "alarm/history/page2",
+          subUrl: "http://192.168.10.18:8075/alarm/history/page",
           data: {
             pagenum: 1,
             pagesize: 20000,