Browse Source

5-20 健康管理 风机列表 时间转换修改

zhaomiao 3 years ago
parent
commit
feedc35668

+ 1 - 1
src/api/axios.js

@@ -9,7 +9,7 @@ import { Message } from 'element-ui';
 const httpService = axios.create({
   withCredentials: false, // 允许携带cookie
   baseURL: process.env.VUE_APP_API_URL || '/api/',
-  timeout: 5000, // 请求超时时间 - 3s
+  timeout: 23000, // 请求超时时间 - 3s
   // transformRequest: [
   //   // `transformRequest` 允许在向服务器发送前,修改请求数据
   //   // 只能用在 'PUT', 'POST' 和 'PATCH' 这几个请求方法

+ 4 - 0
src/assets/css/healthManagement/healthList.scss

@@ -0,0 +1,4 @@
+.searchBox{
+  width: 100%;
+  padding: 20px 0;
+}

+ 28 - 0
src/assets/css/healthManagement/healthManagement.scss

@@ -0,0 +1,28 @@
+.bg-purple-dark {
+  background: #fff;
+}
+.qbqr {
+  position: absolute;
+  left: 888px;
+  top: 301px;
+  z-index: 999;
+}
+.qbhl {
+  position: absolute;
+  left: 1033px;
+  top: 301px;
+  z-index: 999;
+}
+.fjlb {
+  position: absolute;
+  left: 1799px;
+  top: 0px;
+  z-index: 999;
+}
+
+.el-form-item {
+  margin-bottom: 0px !important;
+}
+.mar {
+  margin-left: 6% !important;
+}

+ 94 - 0
src/assets/js/healthManagement/healthList.js

@@ -0,0 +1,94 @@
+import * as echarts from "echarts";
+export default {
+  data () {
+    return {
+      form: {
+        wpId: ""
+      },
+      wpList: [],
+      healthTableData: []
+    }
+  },
+  mounted () {
+    let that = this;
+    that.$nextTick(() => {
+      that.getWpList();
+      that.renderCharts();
+    });
+  },
+  methods: {
+    // 获取风场列表
+    getWpList () {
+      this.API.get("powercompare/windfarmAllAjax").then(res => {
+        if (res.data.length) {
+          this.wpList = res.data;
+          this.form.wpId = res.data[0].id;
+          this.getHealthListData(res.data[0].id);
+        }
+      });
+    },
+
+    // 选择风场
+    changeWpId (wpId) {
+      this.getHealthListData(wpId)
+    },
+
+    getHealthListData (wpId) {
+      this.$store.commit("loadingStore", true);
+      let params = new URLSearchParams();
+      params.append("wpId", wpId);
+      this.API.post_L("wtHealthList/windTurbineHealthList", params).then(res => {
+        res.data.forEach((ele, index) => {
+          ele.chartIndex = index;
+        });
+        this.healthTableData = res.data;
+        console.log('wpList', res.data);
+        this.$store.commit("loadingStore", false);
+        this.renderCharts(res.data);
+      });
+    },
+
+    // 渲染图表
+    renderCharts (sourceData) {
+      this.$nextTick(() => {
+        sourceData && sourceData.length && sourceData.forEach(ele => {
+          ele.chartLine = echarts.init(document.getElementById('healthCharts-' + ele.chartIndex));
+          let chartsOptions = {
+            xAxis: {
+              show: false,
+              type: 'category',
+              boundaryGap: false,
+              data: ['1', '2', '3', '4']
+            },
+            yAxis: {
+              show: false,
+              type: 'value'
+            },
+            series: [{
+              data: ele.futureHealth,
+              type: 'line',
+              areaStyle: {
+                // color: '#1890ff'
+              }
+            }],
+            // tooltip: {
+            //   trigger: 'axis',
+            //   axisPointer: {
+            //     type: 'cross',
+            //     label: {
+            //       backgroundColor: '#6a7985'
+            //     }
+            //   }
+            // }
+          };
+          ele.chartLine.setOption(chartsOptions);
+        });
+      });
+    },
+
+    // index渲染函数
+    indexMethod (index) {
+      return index + 1;
+    },
+  }
+};

+ 716 - 0
src/assets/js/healthManagement/healthManagement.js

@@ -0,0 +1,716 @@
+import * as echarts from "echarts";
+export default {
+  data() {
+    return {
+      fj: "",
+      fc: "MHS_FDC",
+      Date1: "",
+      Date2: "",
+      wpIdslist: {
+        name: "",
+        id: "",
+      },
+      wtIdslist: {
+        name: "",
+        id: "",
+        key: "",
+      },
+      activeName: "serial_1",
+      contraryName: "contrary_1",
+      dialogTableVisible: false,
+      dialogTableVisible_2: false,
+      dialogTableVisible_3: false,
+      dialogTableVisible_sh: false,
+      jdt: 1,
+      jdt_2: 5,
+      jdt_3: 1,
+
+      Recommend: [],
+      Exceedthreeday: [],
+      threeday: [],
+      Confirmed: [],
+      UnfinishedList: [],
+      ParticularsList: [],
+      ParticularsList_2: [],
+      FinishedList: [],
+      LocationTree:[],
+      braceletList: {
+        PLD: [],
+        SSXY: [],
+        SZXY: [],
+        XTPL: [],
+        XYND: [],
+        TIMES: [],
+      },
+
+      braceletList_ls: [],
+      braceletList_ss: [],
+      form: {
+        name: "",
+        region: "",
+        date1: "",
+        date2: "",
+        delivery: false,
+        type: [],
+        resource: "",
+        desc: "",
+      },
+      isAsc: "asc",
+      currentPage_fy1: 1,
+      pagesize_fy1: 6,
+      orderByColumn_fy1: "",
+      pages01_fy1: 1,
+
+      currentPage_fy2: 1,
+      pagesize_fy2: 6,
+      orderByColumn_fy2: "",
+      pages01_fy2: 1,
+    };
+  },
+  created() {
+    this.Date1 = this.BASE.getBzDate(new Date().getTime(),-1);
+    this.Date2 = this.BASE.getBzDate(new Date().getTime(),0);
+    this.query_wpid();
+    this.query();
+  },
+  methods: {
+    query_wpid() {
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.wpIdslist = res.data;
+      });
+    },
+    query1() {
+      this.fj = "";
+      this.query();
+    },
+    query() {
+      let that = this;
+      this.API
+        .get("powercompare/windturbineAjax?wpId=" + that.fc)
+        .then((res) => {
+          this.wtIdslist = res.data;
+        });
+    },
+    query_fc() {
+      var newData = new Date();
+      this.beginDate = this.BASE.getBzDate(newData.getTime(),-1);
+      this.endDate = this.BASE.getBzDate(newData.getTime(),0);
+      this.API.get("powercompare/windfarmAjax?").then((res) => {
+        this.FClist = res.data;
+      });
+    },
+    handleClick() {
+      if (this.activeName == "serial_1") {
+        this.weekfitness();
+      } else if (this.activeName == "serial_2") {
+        this.weekfitness();
+        this.recommenConfirmedList();
+      } else if (this.activeName == "serial_3") {
+        this.unfinishedList();
+      } else if (this.activeName == "serial_4") {
+        this.complateList();
+      }
+    },
+    contraryClick() {
+      this.Recommend = [];
+      this.Exceedthreeday = [];
+      this.threeday = [];
+      if (this.contraryName == "contrary_1") {
+        this.currentRecommend();
+      } else if (this.contraryName == "contrary_2") {
+        this.threedayRecommend();
+      } else if (this.contraryName == "contrary_3") {
+        this.exceedthreedayRecommend();
+      }
+    },
+    filter_pd_date(cellValue) {
+      let date = new Date(cellValue.recodedate);
+      return this.BASE.getBzDate(date,0);
+    },
+    filter_tj_date(cellValue) {
+      let date = new Date(cellValue.createdate);
+      return this.BASE.getBzDate(date,0);
+    },
+    async weekfitness() {
+      var digital = new URLSearchParams();
+      digital.append("wpId", "0");
+      digital.append("type", 2);
+      const weekDateList = await this.API.post(
+        "/recommen/findAllChartjz",
+        digital
+      );
+      if (this.activeName == "serial_1") {
+        this.draw_fitnessRegulate(weekDateList.data);
+      } else if (this.activeName == "serial_2") {
+        this.draw_fitnessRegulate_2(weekDateList.data);
+      }
+      this.$store.commit("loadingStore",false);
+    },
+    async monthfitness() {
+      var digital = new URLSearchParams();
+      digital.append("wpId", "0");
+      digital.append("type", 3);
+      const weekDateList = await this.API.post(
+        "/recommen/findAllChartjz",
+        digital
+      );
+      if (this.activeName == "serial_1") {
+        this.draw_fitnessRegulate(weekDateList.data);
+      } else if (this.activeName == "serial_2") {
+        this.draw_fitnessRegulate_2(weekDateList.data);
+      }
+    },
+    affirm_all_check() {
+      this.$confirm("此操作将无法撤回, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.affirm_all();
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    fj_all_list(){
+      this.$router.push({path:"/healthList"});
+    },
+    async affirm_all() {
+      var digital = new URLSearchParams();
+      if (this.contraryName == "contrary_1") {
+        digital.append("typeid", 1);
+      } else if (this.contraryName == "contrary_2") {
+        digital.append("typeid", 2);
+      } else if (this.contraryName == "contrary_3") {
+        digital.append("typeid", 3);
+      }
+
+      const confir = await this.API.post("/recommen/confirpushAll", digital);
+      if (confir.data.code == 200 && this.contraryName == "contrary_1") {
+        this.Recommend.splice(0);
+        this.success_tj();
+      } else if (confir.data.code == 200 && this.contraryName == "contrary_2") {
+        this.threeday.splice(0);
+        this.success_tj();
+      } else if (confir.data.code == 200 && this.contraryName == "contrary_3") {
+        this.Exceedthreeday.splice(0);
+        this.success_tj();
+      } else {
+        this.fail_tj();
+      }
+    },
+    ignore_all_check() {
+      this.$confirm("此操作将无法撤回, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.ignore_all();
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    async ignore_all() {
+      var digital = new URLSearchParams();
+      if (this.contraryName == "contrary_1") {
+        digital.append("typeid", 1);
+      } else if (this.contraryName == "contrary_2") {
+        digital.append("typeid", 2);
+      } else if (this.contraryName == "contrary_3") {
+        digital.append("typeid", 3);
+      }
+
+      const confir = await this.API.post("/recommen/ignorepushAll", digital);
+      if (confir.data.code == 200 && this.contraryName == "contrary_1") {
+        this.Recommend.splice(0);
+        this.success_tj();
+      } else if (confir.data.code == 200 && this.contraryName == "contrary_2") {
+        this.threeday.splice(0);
+        this.success_tj();
+      } else if (confir.data.code == 200 && this.contraryName == "contrary_3") {
+        this.Exceedthreeday.splice(0);
+        this.success_tj();
+      } else {
+        this.fail_tj();
+      }
+    },
+    confirpush_check(rid, key) {
+      this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.confirpush(rid, key);
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+   confirpush(rid, key) {
+      let that = this;
+      var digital = new URLSearchParams();
+      digital.append("rid", rid);
+      this.API.post("/recommen/confirpush", digital).then((res) => {
+        if (res.code == 200 && this.contraryName == "contrary_1") {
+          this.Recommend.splice(key, 1);
+          this.success_tj();
+        } else if (res.code == 200 && this.contraryName == "contrary_2") {
+          this.threeday.splice(key, 1);
+          this.success_tj();
+        } else if (res.code == 200 && this.contraryName == "contrary_3") {
+          this.Exceedthreeday.splice(key, 1);
+          this.success_tj();
+        } else {
+          this.fail_tj();
+        }
+       });;
+      
+      
+    },
+    async ignorepush(rid, key) {
+      var digital = new URLSearchParams();
+      digital.append("rid", rid);
+      await this.API.post("/recommen/ignorepush", digital).then((res)=>{
+        if (res.code == 200 && this.contraryName == "contrary_1") {
+          this.Recommend.splice(key, 1);
+          this.success_tj();
+        } else if (res.code == 200 && this.contraryName == "contrary_2") {
+          this.threeday.splice(key, 1);
+          this.success_tj();
+        } else if (res.code == 200 && this.contraryName == "contrary_3") {
+          this.Exceedthreeday.splice(key, 1);
+          this.success_tj();
+        } else {
+          this.fail_tj();
+        }
+      });
+    },
+    success_tj() {
+      this.$message({
+        message: "成功!",
+        type: "success",
+      });
+    },
+    fail_tj() {
+      this.$message.error("失败!");
+    },
+    async currentRecommend() {
+      const currentRecommend = await this.API.post(
+        "/recommen/getRecommenmainDay1"
+      );
+      this.Recommend = currentRecommend.data;
+    },
+    async threedayRecommend() {
+      const currentRecommend = await this.API.post(
+        "/recommen/getRecommenmainDay3"
+      );
+      this.threeday = currentRecommend.data;
+    },
+    async exceedthreedayRecommend() {
+      const currentRecommend = await this.API.post(
+        "/recommen/getRecommenmainDay7"
+      );
+      this.Exceedthreeday = currentRecommend.data;
+    },
+    async recommenConfirmedList() {
+      this.Confirmed = [];
+      await this.API.post(
+        "/recommen/recommenConfirmedList"
+      ).then((res)=>{
+        debugger
+        this.Confirmed = res.data;
+      });
+      
+    },
+    async unfinishedList() {
+      this.UnfinishedList = [];
+      var digital = new URLSearchParams();
+      digital.append("pageNum", this.currentPage_fy1);
+      digital.append("pageSize", this.pagesize_fy1);
+      digital.append("orderByColumn", this.orderByColumn_fy1);
+      digital.append("isAsc", this.isAsc);
+      digital.append("wpId", this.fc);
+      digital.append("wtId", this.fj);
+      digital.append("beginDate", this.Date1);
+      digital.append("endDate", this.Date2);
+      const unfinishedList = await this.API.post(
+        "/recommen/unfinishedList",
+        digital
+      );
+      this.UnfinishedList = unfinishedList.data;
+    },
+    async complateList() {
+      this.FinishedList = [];
+      var digital = new URLSearchParams();
+      digital.append("pageNum", this.currentPage_fy1);
+      digital.append("pageSize", this.pagesize_fy1);
+      digital.append("orderByColumn", this.orderByColumn_fy1);
+      digital.append("isAsc", this.isAsc);
+      digital.append("wpId", this.fc);
+      digital.append("wtId", this.fj);
+      digital.append("beginDate", this.Date1);
+      digital.append("endDate", this.Date2);
+      const FinishedList = await this.API.post(
+        "/recommen/finishedList",
+        digital
+      );
+      this.FinishedList = FinishedList.data;
+    },
+    async Click_xqgz(date) {
+      let that = this;
+      this.ParticularsList = [];
+      var digital = new URLSearchParams();
+      digital.append("rid", date.rid);
+      const particulars = await this.API.post(
+        "/recommen/findMainTrack",
+        digital
+      );
+      this.dialogTableVisible = true;
+      this.ParticularsList = particulars.data;
+      var jdt = particulars.data.status;
+      if (jdt == null) {
+        that.jdt = 0;
+      } else if (jdt == "开风机工作票" || jdt == "流程未启用") {
+        that.jdt = 1;
+      }
+    },
+    async Click_xqgz_ywc(date) {
+      let that = this;
+      this.ParticularsList_2 = [];
+      var digital = new URLSearchParams();
+      digital.append("rid", date.rid);
+      const particulars = await this.API.post(
+        "/recommen/findMainTrack",
+        digital
+      );
+      this.dialogTableVisible_2 = true;
+      this.ParticularsList_2 = particulars.data;
+      this.jdt_2 = 5;
+    },
+    async shxx(rname) {
+      let that = this;
+      this.braceletList.PLD = [];
+      this.braceletList.SSXY = [];
+      this.braceletList.SZXY = [];
+      this.braceletList.XTPL = [];
+      this.braceletList.XYND = [];
+      this.braceletList.TIMES = [];
+      let list_ls = {};
+      this.dialogTableVisible_sh = true;
+      var digital = new URLSearchParams();
+      digital.append("name", rname);
+      digital.append("beginDate", "2021-03-14");
+      digital.append("endDate", "2021-03-15");
+      const particulars = await this.API.post(
+        "/recommen/findShbraceletList",
+        digital
+      );
+      this.braceletList_ss = particulars.data.ss;
+      list_ls = particulars.data.ls;
+      let len = Object.keys(list_ls.PLD).length;
+      for (let i = 0; i < len; i++) {
+        this.braceletList.PLD[i] = list_ls.PLD[i].pointValue;
+        this.braceletList.SSXY[i] = list_ls.SSXY[i].pointValue;
+        this.braceletList.SZXY[i] = list_ls.SZXY[i].pointValue;
+        this.braceletList.XTPL[i] = list_ls.XTPL[i].pointValue;
+        this.braceletList.XYND[i] = list_ls.XYND[i].pointValue;
+        this.braceletList.TIMES[i] = this.BASE.getBztime(list_ls.XYND[i].pointTime);
+      }
+      this.draw_shouhuan();
+    },
+    async Click_lscx_ywc(rname){
+      // this.LocationTree = [];
+      // var digital = new URLSearchParams();
+      // digital.append("wtId", rname.wtid);
+      // const LocationTree = await this.$http.post(
+      //   "/recommen/findLocationTreeByWtId",
+      //   digital
+      // );
+      // this.LocationTree = unfinishedList.data.data;
+    },
+    ditu(){
+      window.location.href = "http://10.155.32.4:8070/gisweb/ditujiankang.html?LAT="+"106.23507"+"&LNG="+"38.48989"+"&userid="+"1500";
+    },
+    fjkhd(){
+      window.location.href = "http://172.22.85.150";
+    },
+    handleSizeChange_fy1(val) {
+      this.pagesize_fy1 = val;
+    },
+    handleCurrentChange_fy1(val) {
+      this.currentPage2_fy1 = val;
+    },
+    handleSizeChange_fy2(val) {
+      this.pagesize_fy2 = val;
+    },
+    handleCurrentChange_fy2(val) {
+      this.currentPage2_fy2 = val;
+    },
+    draw_fitnessRegulate(weekDateList) {
+      let linearBarDom = echarts.getInstanceByDom(
+        document.getElementById("fitnessRegulate")
+      );
+      if (linearBarDom == null) {
+        linearBarDom = echarts.init(document.getElementById("fitnessRegulate"));
+      }
+      var option;
+
+      option = {
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "cross",
+            crossStyle: {
+              color: "#999",
+            },
+          },
+        },
+        toolbox: {},
+        legend: {
+          show: false,
+          data: ["优", "良", "差", "健康情况"],
+        },
+        xAxis: [
+          {
+            type: "category",
+            data: weekDateList.datechart,
+            axisPointer: {
+              type: "shadow",
+            },
+          },
+        ],
+        yAxis: [
+          {
+            type: "value",
+            name: "健康趋势",
+            min: 98.5,
+            max: 100.5,
+            axisLabel: {
+              formatter: "{value}",
+            },
+          },
+          {
+            type: "value",
+            name: "故障风机",
+            min: 0,
+            max: 1000,
+            axisLabel: {
+              formatter: "{value}",
+            },
+          },
+        ],
+        series: [
+          {
+            name: "优",
+            type: "bar",
+            stack: "total",
+            yAxisIndex: 1,
+            data: weekDateList.yslchart,
+          },
+          {
+            name: "良",
+            type: "bar",
+            stack: "total",
+            yAxisIndex: 1,
+            data: weekDateList.lslchart,
+          },
+          {
+            name: "差",
+            type: "bar",
+            stack: "total",
+            yAxisIndex: 1,
+            data: weekDateList.cslchart,
+          },
+          {
+            name: "健康情况",
+            type: "line",
+            data: weekDateList.lvchart,
+          },
+        ],
+      };
+
+      linearBarDom.setOption(option);
+    },
+    draw_fitnessRegulate_2(weekDateList) {
+      let linearBarDom = echarts.getInstanceByDom(
+        document.getElementById("fitnessRegulate_2")
+      );
+      if (linearBarDom == null) {
+        linearBarDom = echarts.init(
+          document.getElementById("fitnessRegulate_2")
+        );
+      }
+      var option;
+
+      option = {
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "cross",
+            crossStyle: {
+              color: "#999",
+            },
+          },
+        },
+        toolbox: {},
+        legend: {
+          show: false,
+          data: ["优", "良", "差", "健康情况"],
+        },
+        xAxis: [
+          {
+            type: "category",
+            data: weekDateList.datechart,
+            axisPointer: {
+              type: "shadow",
+            },
+          },
+        ],
+        yAxis: [
+          {
+            type: "value",
+            name: "健康趋势",
+            min: 98.5,
+            max: 100.5,
+            axisLabel: {
+              formatter: "{value}",
+            },
+          },
+          {
+            type: "value",
+            name: "故障风机",
+            min: 0,
+            max: 1000,
+            axisLabel: {
+              formatter: "{value}",
+            },
+          },
+        ],
+        series: [
+          {
+            name: "优",
+            type: "bar",
+            stack: "total",
+            yAxisIndex: 1,
+            data: weekDateList.yslchart,
+          },
+          {
+            name: "良",
+            type: "bar",
+            stack: "total",
+            yAxisIndex: 1,
+            data: weekDateList.lslchart,
+          },
+          {
+            name: "差",
+            type: "bar",
+            stack: "total",
+            yAxisIndex: 1,
+            data: weekDateList.cslchart,
+          },
+          {
+            name: "健康情况",
+            type: "line",
+            data: weekDateList.lvchart,
+          },
+        ],
+      };
+
+      linearBarDom.setOption(option);
+    },
+    draw_shouhuan() {
+      let shouhuan = echarts.getInstanceByDom(
+        document.getElementById("shxq")
+      );
+      if (shouhuan == null) {
+        shouhuan = echarts.init(document.getElementById("shxq"));
+      }
+      var option;
+      option = {
+        title: {
+          text: "工作期间检测值",
+        },
+        tooltip: {
+          trigger: "axis",
+        },
+        legend: {
+          data: ["疲劳度", "收缩血压", "舒张血压", "心跳频率", "血氧"],
+        },
+        grid: {
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
+        },
+        toolbox: {
+        },
+        xAxis: {
+          type: "category",
+          boundaryGap: false,
+          data: this.braceletList.TIMES,
+        },
+        yAxis: {
+          type: "value",
+        },
+        series: [
+          {
+            name: "疲劳度",
+            type: "line",
+            stack: "总量",
+            data: this.braceletList.PLD,
+          },
+          {
+            name: "收缩血压",
+            type: "line",
+            stack: "总量",
+            data: this.braceletList.SSXY,
+          },
+          {
+            name: "舒张血压",
+            type: "line",
+            stack: "总量",
+            data: this.braceletList.SZXY,
+          },
+          {
+            name: "心跳频率",
+            type: "line",
+            stack: "总量",
+            data: this.braceletList.XTPL,
+          },
+          {
+            name: "血氧",
+            type: "line",
+            stack: "总量",
+            data: this.braceletList.XYND,
+          },
+        ],
+      };
+      shouhuan.setOption(option);
+    },
+    handleClose(done) {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          done();
+        })
+        .catch((_) => {});
+    },
+  },
+  mounted() {
+    this.$store.commit("loadingStore",true);
+    this.weekfitness();
+    this.currentRecommend();
+  },
+};

+ 1 - 1
src/jsonData/menu.json

@@ -303,7 +303,7 @@
         },
         {
           "name": "健康管理",
-          "url": "/a",
+          "url": "/",
           "children": []
         }
       ]

+ 1 - 1
src/main.js

@@ -33,7 +33,7 @@ Vue.prototype.Get_PDF = Get_PDF;
 
 //时间格式转换
 import moment from 'moment';
-Vue.use(moment);
+Vue.prototype.Moment = moment;
 // 滚动条
 import vuescroll from "vuescroll"; 
 Vue.use(vuescroll, {

+ 1 - 1
src/router/index.js

@@ -55,7 +55,7 @@ const routes = [
 
 const router = new VueRouter({
   mode: 'history',
-  base: '/sis/', // 部署单页面 404 history  带井号解决(去掉history 放web-inf)
+  //base: '/sis/', // 部署单页面 404 history  带井号解决(去掉history 放web-inf)
   routes
 })
 

+ 8 - 0
src/router/zm.js

@@ -78,5 +78,13 @@ export default [
   { // 损失率排行
     path:'/percentageLossrRank',
     component: r => require.ensure([], () => r(require('@views/normRanking/percentageLossrRank')), 'benchmarkingSys')
+  },
+  { // 健康管理
+    path:'/healthManagement',
+    component: r => require.ensure([], () => r(require('@views/healthManagement/healthManagement')), 'healthManagement')
+  },
+  { // 健康管理
+    path:'/healthList',
+    component: r => require.ensure([], () => r(require('@views/healthManagement/healthList')), 'healthManagement')
   }
 ]

+ 99 - 0
src/views/healthManagement/healthList.vue

@@ -0,0 +1,99 @@
+<template>
+  <div class="pageBox">
+    <div class="searchBox">
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-form-item label="风场:">
+          <el-select v-model="form.wpId" placeholder="请选择" @change="changeWpId">
+            <el-option v-for="item in wpList" :key="item.id" :label="item.name" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="tableBox">
+      <el-table :data="healthTableData" style="width: 100%;" height="600">
+        <el-table-column type="index" :index="indexMethod" label="序号" width="80"></el-table-column>
+        <el-table-column prop="wtid" label="风机编号"></el-table-column>
+        <el-table-column prop="model" label="风机型号"></el-table-column>
+        <el-table-column prop="address" label="置信度" width="230">
+          <template slot-scope="scope">
+            <div>
+              <el-progress :percentage="scope.row.zxd"></el-progress>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="健康分数">
+          <template slot-scope="scope">
+            <div>{{scope.row.score}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="未来风机健康程度" width="250">
+          <template slot-scope="scope">
+            <div :id="'healthCharts-' + scope.row.chartIndex" style="width:100%;height:50px;"></div>
+          </template>
+        </el-table-column>
+        <el-table-column label="组件健康度">
+          <el-table-column label="齿轮箱" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.clx === '优' ? '#1890ff' : scope.row.clx === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.clx}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="发电机" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.fdj === '优' ? '#1890ff' : scope.row.fdj === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.fdj}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="发电机" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.fdj === '优' ? '#1890ff' : scope.row.fdj === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.fdj}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="主轴" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.zz === '优' ? '#1890ff' : scope.row.zz === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.zz}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="变桨" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.bj === '优' ? '#1890ff' : scope.row.bj === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.bj}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="偏航" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.ph === '优' ? '#1890ff' : scope.row.ph === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.ph}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="机舱" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.jc === '优' ? '#1890ff' : scope.row.jc === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.jc}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="变频器" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.bpq === '优' ? '#1890ff' : scope.row.bpq === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.bpq}}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="主控" width="100">
+            <template slot-scope="scope">
+              <div :style="'color:' + (scope.row.zk === '优' ? '#1890ff' : scope.row.zk === '良' ? 'rgb(230,162,60)' : '#F25656')">{{scope.row.zk}}</div>
+            </template>
+          </el-table-column>
+        </el-table-column>
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+import healthList from "@assets/js/healthManagement/healthList";
+export default healthList;
+</script>
+<style lang="scss" scoped>
+@import '@assets/css/healthManagement/healthList.scss';
+</style>
+<style lang="scss">
+.tableBox {
+  .cell {
+    text-align: center;
+  }
+}
+</style>

File diff suppressed because it is too large
+ 1431 - 0
src/views/healthManagement/healthManagement.vue