Browse Source

数据管理搜索BUG修复

Koishi 3 years ago
parent
commit
ffc22e373c
4 changed files with 314 additions and 5 deletions
  1. 4 4
      src/App.vue
  2. 5 0
      src/router/index.js
  3. 304 0
      src/views/malfunctionDiagnose/index.vue
  4. 1 1
      src/views/realSearch/index.vue

+ 4 - 4
src/App.vue

@@ -223,10 +223,10 @@ export default {
             method: "POST", // 请求方式,默认为 GET ,可缺省
             method: "POST", // 请求方式,默认为 GET ,可缺省
             subUrl: "admin/usermenu", // 请求接口地址,必传项
             subUrl: "admin/usermenu", // 请求接口地址,必传项
             success() {
             success() {
-              that.BASE.showMsg({
-                msg: "登陆成功",
-                type: "success",
-              });
+              // that.BASE.showMsg({
+              //   msg: "登陆成功",
+              //   type: "success",
+              // });
               // that.$router.push('/'); // 跳转到首页
               // that.$router.push('/'); // 跳转到首页
             },
             },
           });
           });

+ 5 - 0
src/router/index.js

@@ -614,6 +614,11 @@ const routes = [{
 	component: () => import("../views/alarmCenter/customStatistics.vue")
 	component: () => import("../views/alarmCenter/customStatistics.vue")
 },
 },
 {
 {
+	path: "/malfunctionDiagnose", // 故障诊断
+	name: "customStatistics",
+	component: () => import("../views/malfunctionDiagnose/index.vue")
+},
+{
 	path: "/new/pb",
 	path: "/new/pb",
 	name: "pb",
 	name: "pb",
 	component: () => import(/* webpackChunkName: "powerbenchmarking" */ "../views/NewPages/power-benchmarking.vue"),
 	component: () => import(/* webpackChunkName: "powerbenchmarking" */ "../views/NewPages/power-benchmarking.vue"),

+ 304 - 0
src/views/malfunctionDiagnose/index.vue

@@ -0,0 +1,304 @@
+<template>
+  <div class="draught-fan-list">
+    <div class="query mg-b-8">
+      <div class="query-items">
+        <div class="query-item">
+          <div class="lable">场站:</div>
+          <div class="search-input">
+            <el-select
+              v-model="wpId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+              @change="
+                (wpId) => {
+                  getProject();
+                }
+              "
+            >
+              <el-option
+                v-for="item in wpArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">项目:</div>
+          <div class="search-input">
+            <el-select
+              v-model="projectId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in projectArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">模型:</div>
+          <div class="search-input">
+            <el-select
+              v-model="modelId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in modelArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
+            </el-select>
+          </div>
+        </div>
+        <div class="query-item">
+          <div class="lable">时间类型:</div>
+          <div class="search-input">
+            <el-select
+              v-model="typeId"
+              clearable
+              placeholder="请选择"
+              popper-class="select"
+            >
+              <el-option
+                v-for="item in typeArray"
+                :key="item.id"
+                :value="item.id"
+                :label="item.name"
+              />
+            </el-select>
+          </div>
+        </div>
+      </div>
+      <div class="query-actions">
+        <button class="btn green" @click="search()">查询</button>
+      </div>
+    </div>
+    <div class="df-table">
+      <ComTable height="78vh" :data="tableData"></ComTable>
+    </div>
+    <el-dialog
+      title="切入切出风速整合历史"
+      v-model="dialogShow"
+      width="85%"
+      top="10vh"
+      custom-class="modal"
+      :close-on-click-modal="true"
+      @closed="dialogType = ''"
+    >
+      <ComTable height="100vh" :data="tableHistoryData"></ComTable>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import ComTable from "@com/coms/table/table.vue";
+export default {
+  // 名称
+  name: "cutAnalyse",
+
+  // 使用组件
+  components: {
+    ComTable,
+  },
+
+  // 数据
+  data() {
+    const that = this;
+    return {
+      isAsc: "asc",
+      wpArray: [],
+      wpId: "",
+      projectId: "",
+      projectArray: [],
+      modelId: "2",
+      modelArray: [
+        {
+          id: "2",
+          value: "2",
+          name: "极限学习机",
+        },
+        {
+          id: "1",
+          value: "1",
+          name: "决策树分类法",
+        },
+      ],
+      typeId: "1",
+      typeArray: [
+        {
+          id: "1",
+          value: "1",
+          name: "顺时",
+        },
+        {
+          id: "2",
+          value: "2",
+          name: "趋势",
+        },
+      ],
+      dialogShow: false,
+      tableData: {
+        column: [
+          {
+            name: "风机",
+            field: "windturbineid",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+          },
+          {
+            name: "型号",
+            field: "inputsmall",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+          },
+          {
+            name: "评分",
+            field: "inputsmallratio",
+            is_num: false,
+            is_light: false,
+            sortable: true,
+          },
+          {
+            name: "操作",
+            field: "",
+            is_num: false,
+            is_light: false,
+            template() {
+              return "<el-button type='text' style='cursor: pointer;'>详情</el-button>";
+            },
+            click(e, row) {},
+          },
+        ],
+        data: [],
+      },
+    };
+  },
+
+  // 函数
+  methods: {
+    // 请求服务
+    requestData() {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/windfarmAjax",
+        success(res) {
+          that.wpArray = res.data;
+          that.wpId = res.data[0].id;
+          that.getProject();
+        },
+      });
+    },
+
+    // 获取期数
+    getProject() {
+      let that = this;
+      that.API.requestData({
+        method: "GET",
+        subUrl: "powercompare/projectAjax",
+        data: {
+          wpIds: that.wpId,
+        },
+        success(res) {
+          that.projectArray = res.data;
+          that.projectId = res.data[0].id;
+          that.getTableData();
+        },
+      });
+    },
+
+    getTableData() {
+      let that = this;
+      if (!that.wpId || !that.projectId) {
+        that.BASE.showMsg({
+          msg: "场站与期数不可为空",
+        });
+      } else if (!that.modelId || !that.typeId) {
+        that.BASE.showMsg({
+          msg: "模型与时间类型不可为空",
+        });
+      } else {
+        that.API.requestData({
+          method: "POST",
+          subUrl: "stopanalysis/stopAnalysisList",
+          data: {
+            wpId: that.projectId,
+            isAsc: that.isAsc,
+            modelId: that.modelId,
+            typeId: that.typeId,
+          },
+          success(res) {
+            console.log(123123, res);
+            that.tableData.data = res.data;
+          },
+        });
+      }
+    },
+
+    search() {
+      this.getTableData();
+    },
+  },
+
+  created() {
+    this.requestData();
+  },
+
+  mounted() {},
+
+  unmounted() {},
+};
+</script>
+
+<style lang="less" scoped>
+.draught-fan-list {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+
+  .btn-group-tabs {
+    display: flex;
+    flex-direction: row;
+
+    .photovoltaic {
+      margin-left: 1.481vh;
+    }
+  }
+
+  .df-table {
+    border: 0.093vh solid fade(@darkgray, 50%);
+    position: relative;
+    overflow: auto;
+    flex-grow: 1;
+    margin-top: 1.481vh;
+
+    &:before {
+      content: "";
+      width: 0.37vh;
+      height: 0.37vh;
+      background: @write;
+      position: absolute;
+      left: 0.278vh;
+      top: 0.278vh;
+    }
+
+    tbody {
+      height: calc(100vh - 166px);
+    }
+  }
+}
+</style>

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

@@ -326,7 +326,7 @@ export default {
         method:"GET",
         method:"GET",
         data:{
         data:{
           tableid:that.tableid,
           tableid:that.tableid,
-          pointId:that.pointId,
+          pointId:that.form.pointId,
           pointName:that.form.pointName || "",
           pointName:that.form.pointName || "",
           pageNum:that.currentPage,
           pageNum:that.currentPage,
           pageSize:that.pagesizereal,
           pageSize:that.pagesizereal,