Browse Source

Merge branch 'master' of http://124.70.43.205:3000/yangxiao/sis_zhfx into mw

wangmengwei@gyee-china.com 3 years atrás
parent
commit
2a412c0656

+ 1 - 1
public/static/config/modeConfig.js

@@ -16,7 +16,7 @@ const tilesMaxLevel = 18;
 const adapterUrl = "http://10.155.32.4:8011/";
 
 // 切换模块时是否提示当前模块名称(用于对内介绍项目时便捷显示模块名称)
-const showModuleName = 0;
+const showModuleName = 1;
 
 if (localTest) {
     // baseURL = "http://192.168.10.13:8082/" // 联机调试 - 石林

+ 27 - 2
src/App.vue

@@ -284,7 +284,14 @@ l16.229-16.229l16.229,16.229l42.867-42.867C115.034,45.228,109.133,42.189,102.956
         </el-sub-menu>
       </el-menu>
     </div>
-    <div class="main-body" :style="($store.state.themeName === 'light' && hideMenus === '0') ? 'margin-left: 66px; max-width  : calc(100vw - 54px - 12px);' : ''">
+    <div
+      class="main-body"
+      :style="
+        $store.state.themeName === 'light' && hideMenus === '0'
+          ? 'margin-left: 66px; max-width  : calc(100vw - 54px - 12px);'
+          : ''
+      "
+    >
       <router-view />
     </div>
   </div>
@@ -392,20 +399,38 @@ export default {
     selectMenu(menuIndex) {
       this.menuIndex = menuIndex;
     },
+    clearBackground() {
+      return
+      let body = $("body.light");
+      if (!body) body = $("body.dark");
+      body.css({
+        // background: "transparent",
+        background: "#fff",
+      });
+      body.find("#app").css({
+        // background: "transparent",
+        background: "#fff",
+      });
+    },
   },
 
   watch: {
     $route(res) {
-      console.log(res);
       this.showSisView = res.fullPath === "/sisView";
+
       this.hideHeard = res.query.hideheard || "0";
       this.hideMenus = res.query.hidemenus || "0";
+
       if (res.query.theme) {
         const theme = res.query.theme === "dark" ? "dark" : "light";
         this.$store.dispatch("changeTheme", theme);
         $("#appBody").attr("class", theme);
       }
 
+      if (res.query.fn) {
+        this[res.query.fn] && this[res.query.fn]();
+      }
+
       let ActiveModule = null;
       this.menuData.forEach((pEle) => {
         if (pEle.path === res.fullPath) {

+ 1 - 1
src/assets/styles/theme/light/light-jsc.less

@@ -24,7 +24,7 @@
     }
 
     #app {
-        background: rgb(220, 221, 223);
+        // background: rgb(220, 221, 223);
         transition: @transition;
     }
 

+ 21 - 14
src/main.js

@@ -1,15 +1,15 @@
-import { createApp } from 'vue';
-import App from './App.vue';
-import router from './router';
-import store from './store';
-import 'font-awesome/css/font-awesome.min.css';
+import { createApp } from "vue";
+import App from "./App.vue";
+import router from "./router";
+import store from "./store";
+import "font-awesome/css/font-awesome.min.css";
 
 
 // 引入 element-ui
-import ElementPlus from 'element-plus';
-import 'element-plus/dist/index.css';
-// import 'element-plus/lib/theme-chalk/index.css';
-import locale from 'element-plus/lib/locale/lang/zh-cn';
+import ElementPlus from "element-plus";
+import "element-plus/dist/index.css";
+// import "element-plus/lib/theme-chalk/index.css";
+import locale from "element-plus/lib/locale/lang/zh-cn";
 
 // // 引入环境配置
 // import "@modeConfig/modeConfig.js";
@@ -22,11 +22,12 @@ import axios from "@api/axios";
 // 引入基础工具
 import basicTool from "@tools/basicTool";
 
-import animated from 'animate.css';
+import animated from "animate.css";
 
 /**
  * 对 Date 的扩展,将 Date 转化为指定格式的字符串
- * @param {String} fmt 传入一个字符串,根据所传字符串的格式返回转换后特定格式的日期,调用姿势:new Date().formatDate("yyyy-MM-dd hh:mm:ss");
+ * @param {String} fmt 传入一个字符串,根据所传字符串的格式返回转换后特定格式的日期。
+ * 调用姿势:new Date().formatDate("yyyy-MM-dd hh:mm:ss");
  */
 Date.prototype.formatDate = function (fmt) {
   let o = {
@@ -38,9 +39,15 @@ Date.prototype.formatDate = function (fmt) {
     "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
     "S": this.getMilliseconds() //毫秒 
   };
-  if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
-  for (let k in o)
-    if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+  if (/(y+)/.test(fmt)) {
+    fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+  }
+  for (let k in o) {
+    if (new RegExp("(" + k + ")").test(fmt)) {
+      fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+    }
+
+  }
   return fmt;
 }
 

+ 7 - 1
src/router/index.js

@@ -150,7 +150,7 @@ const routes = [{
 		import( /* webpackChunkName: "decision1" */ "../views/Decision/Decision1.vue"),
 },
 {
-	path: "/decision/zbtjfx", // 节能减排KPI
+	path: "/decision/zbtjfx", // 节能减排KPI
 	name: "zbtjfx",
 	component: () =>
 		import( /* webpackChunkName: "decision1" */ "../views/Decision/zbtjfx.vue"),
@@ -842,6 +842,12 @@ const routes = [{
 	name: "knowledgeBase",
 	component: () => import("../views/sampleDatabase/knowledgeBase/index.vue")
 },
+// 风机检修规则
+{
+	path: "/others/overhaulRule",
+	name: "overhaulRule",
+	component: () => import("../views/overhaulRule/index.vue")
+},
 //发电能力分析
 // {
 // 	path: "/others/abilityAnalysis",

+ 17 - 0
src/tools/basicTool.js

@@ -260,6 +260,23 @@ export default {
     }
   },
 
+  /**
+   * 生成指定范围内的随机数
+   * @param {Int} minNum 范围下限
+   * @param {Int} maxNum 范围上限
+   * @returns 
+   */
+  randomNum(minNum, maxNum) {
+    switch (arguments.length) {
+      case 1:
+        return parseInt(Math.random() * minNum + 1, 10);
+      case 2:
+        return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10);
+      default:
+        return 0;
+    }
+  },
+
   // 正则表达式
   regs: {
     // 是否为手机号

+ 315 - 3
src/views/About.vue

@@ -55,7 +55,8 @@
       </el-table>
       <!-- <list-bar-chart /> -->
     </template>
-    <cesium />
+    <!-- <cesium /> -->
+    <div id="box" style="width: 1000px; height: 600px"></div>
   </div>
 </template>
 
@@ -65,6 +66,10 @@ import HealthReport from "@com/other/healthReport/index.vue";
 import FJ from "@com/other/fj/index.vue";
 import clock from "@com/other/clock/index.vue";
 import cesium from "@com/other/cesium/index.vue";
+import * as echarts from "echarts";
+import util from "@/helper/util.js";
+import partten from "@/helper/partten.js";
+
 // 导入header.vue文件
 export default {
   data() {
@@ -98,6 +103,313 @@ export default {
   },
 
   mounted() {
+    var myChart = echarts.init(document.getElementById("box"));
+    const series = [
+      {
+        name: "散点数据",
+        type: "effectScatter",
+        showEffectOn: "emphasis",
+        data: [
+          [174.0, 65.6],
+          [175.3, 71.8],
+          [193.5, 80.7],
+          [186.5, 72.6],
+          [187.2, 78.8],
+          [181.5, 74.8],
+          [184.0, 86.4],
+          [184.5, 78.4],
+          [175.0, 62.0],
+          [184.0, 81.6],
+          [180.0, 76.6],
+          [177.8, 83.6],
+          [192.0, 90.0],
+          [176.0, 74.6],
+          [174.0, 71.0],
+          [184.0, 79.6],
+          [192.7, 93.8],
+          [171.5, 70.0],
+          [173.0, 72.4],
+          [176.0, 85.9],
+          [176.0, 78.8],
+          [180.5, 77.8],
+        ],
+        xAxisIndex: 1,
+      },
+      {
+        name: "折线数据",
+        type: "line",
+        smooth: true, //这个是把线变成曲线
+        data: [
+          10, 20, 30, 40, 30, 20, 50, 80, 50, 80, 50, 80, 60, 40, 20, 40, 60,
+          80, 60, 40, 20,
+        ],
+        itemStyle: {
+          normal: {
+            color: "#05bb4c",
+            lineStyle: {
+              color: "#05bb4c",
+            },
+          },
+        },
+        xAxisIndex: 0,
+      },
+      {
+        name: "散点图内折线图数据",
+        type: "line",
+        smooth: true, //这个是把线变成曲线
+        data: [
+          0, 10, 20, 30, 40, 50, 60, 70, 80, 80, 80, 80, 90, 90, 90, 95, 95,
+          100, 100, 100, 100,
+        ],
+        itemStyle: {
+          normal: {
+            color: "#f8de5b",
+            lineStyle: {
+              color: "#f8de5b",
+            },
+          },
+        },
+        xAxisIndex: 0,
+      },
+    ];
+    //指定图表的配置项和数据
+    var option = {
+      //标题
+      title: {
+        text: "生鲜销量统计",
+        textStyle: {
+          fontSize: util.vh(16),
+          color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
+        },
+      },
+      backgroundColor:
+        this.$store.state.themeName === "dark"
+          ? "rgba(0,0,0,0.4)"
+          : "rgba(255,255,255,0.5)",
+      //工具箱
+      toolbox: {
+        show: true,
+        x: "right",
+        position: [10, 10],
+        backgroundColor:
+          this.$store.state.themeName === "dark"
+            ? "rgba(0,0,0,0.4)"
+            : "rgba(255,255,255,0.5)",
+        borderColor:
+          this.$store.state.themeName === "dark"
+            ? partten.getColor("gray")
+            : "#000",
+        textStyle: {
+          fontSize: util.vh(16),
+          color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
+        },
+        iconStyle: {
+          borderColor: this.$store.state.themeName === "dark" ? "#fff" : "#000",
+        },
+        emphasis: {
+          iconStyle: {
+            borderColor:
+              this.$store.state.themeName === "dark" ? "#fff" : "#000",
+          },
+        },
+        // feature: {
+        //   dataZoom: {
+        //     yAxisIndex: "none",
+        //   },
+        //   dataView: { readOnly: false },
+        //   magicType: { type: ["line", "bar"] },
+        //   restore: {},
+        //   saveAsImage: {},
+        // },
+      },
+      tooltip: {
+        trigger: "item",
+        axisPointer: {
+          type: "cross",
+        },
+        backgroundColor:
+          this.$store.state.themeName === "dark"
+            ? "rgba(0,0,0,0.4)"
+            : "rgba(255,255,255,0.5)",
+        borderColor:
+          this.$store.state.themeName === "dark"
+            ? partten.getColor("gray")
+            : "#000",
+        textStyle: {
+          fontSize: util.vh(16),
+          color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
+        },
+        formatter(params) {
+          return params.seriesName + "<br>" + params.name + ":" + params.data;
+        },
+      },
+      brush: {
+        xAxisIndex: "all",
+        yAxisIndex: "all",
+        transformable: true,
+        throttleType: "debounce",
+        throttleDelay: 600,
+        removeOnClick: false,
+        brushType: "polygon",
+        brushMode: "multiple",
+        brushStyle: {
+          borderWidth: 1,
+          color: "rgba(255,36,36,0.2)",
+          borderColor: "#ff2424",
+        },
+        // outOfBrush: {
+        //   colorAlpha: 0.5,
+        // },
+      },
+      dataZoom: [
+        {
+          type: "inside", //图表下方的伸缩条
+          show: true, //是否显示
+          realtime: true, //拖动时,是否实时更新系列的视图
+          start: 0, //伸缩条开始位置(1-100),可以随时更改
+          end: 100, //伸缩条结束位置(1-100),可以随时更改
+        },
+        {
+          type: "slider", //图表下方的伸缩条
+          show: true, //是否显示
+          realtime: true, //拖动时,是否实时更新系列的视图
+          start: 0, //伸缩条开始位置(1-100),可以随时更改
+          end: 100, //伸缩条结束位置(1-100),可以随时更改
+        },
+      ],
+      textStyle: {
+        fontSize: util.vh(16),
+        color: this.$store.state.themeName === "dark" ? "#fff" : "#000",
+      },
+      //图例-每一条数据的名字叫销量
+      legend: {
+        show: true,
+        data: ["销量"],
+        inactiveColor:
+          this.$store.state.themeName === "dark"
+            ? partten.getColor("gray")
+            : "#000",
+        textStyle: {
+          color:
+            this.$store.state.themeName === "dark"
+              ? partten.getColor("grayl")
+              : "#000",
+          fontSize: 12,
+        },
+      },
+      grid: {
+        top: 32,
+        left: 40,
+        right: 40,
+        bottom: 24,
+      },
+      //x轴
+      xAxis: [
+        {
+          data: [
+            "t1",
+            "t2",
+            "t3",
+            "t4",
+            "t5",
+            "t6",
+            "t7",
+            "t8",
+            "t9",
+            "t10",
+            "t11",
+            "t12",
+            "t13",
+            "t14",
+            "t15",
+            "t16",
+            "t17",
+            "t18",
+            "t19",
+            "t20",
+            "t21",
+            "t22",
+          ],
+          axisLabel: {
+            formatter: "{value}",
+            fontSize: util.vh(14),
+          },
+          textStyle: {
+            color:
+              this.$store.state.themeName === "dark"
+                ? partten.getColor("gray")
+                : "#000",
+          },
+        },
+        {
+          show: false,
+          type: "category",
+          max: 150,
+        },
+      ],
+      //y轴没有显式设置,根据值自动生成y轴
+      yAxis: {
+        splitLine: { show: false },
+      },
+      //数据-data是最终要显示的数据
+      series,
+    };
+
+    myChart.on("brushSelected", (params) => {
+      const selected = params.batch[0]?.selected;
+      let selectRes = [];
+      selected?.forEach((pEle) => {
+        if (pEle.dataIndex.length) {
+          let item = {
+            name: pEle.seriesName,
+            data: [],
+          };
+          pEle.dataIndex.forEach((cEle) => {
+            item.data.push(
+              Array.isArray(series[pEle.seriesIndex].data[cEle])
+                ? series[pEle.seriesIndex].data[cEle][
+                    series[pEle.seriesIndex].data[cEle].length - 1
+                  ]
+                : series[pEle.seriesIndex].data[cEle]
+            );
+          });
+          selectRes.push(item);
+        }
+      });
+      let altMsg = "选中了";
+      if (selectRes.length) {
+        selectRes.forEach((ele) => {
+          altMsg +=
+            ele.data.length +
+            "条" +
+            ele.name +
+            ":[" +
+            ele.data.toString() +
+            "].";
+        });
+        this.BASE.showMsg({
+          type: "success",
+          msg: altMsg,
+        });
+      }
+    });
+
+    //使用刚刚指定的配置项和数据项显示图表
+    myChart.setOption(option);
+
+    myChart.dispatchAction({
+      type: "takeGlobalCursor",
+      // 如果想变为“可刷选状态”,必须设置。不设置则会关闭“可刷选状态”。
+      key: "brush",
+      brushOption: {
+        // 参见 brush 组件的 brushType。如果设置为 false 则关闭“可刷选状态”。
+        brushType: "polygon",
+        // 参见 brush 组件的 brushMode。如果不设置,则取 brush 组件的 brushMode 设置。
+        brushMode: "multiple",
+      },
+    });
+
+    return;
     let thArray = [
       [
         { field: "name", name: "表1姓名" },
@@ -132,9 +444,9 @@ export default {
       ],
     ];
 
-    let sheetNameArray=["这是sheet-1","这是sheet-2","这是sheet-3"]
+    let sheetNameArray = ["这是sheet-1", "这是sheet-2", "这是sheet-3"];
 
-    this.BASE.exportMultiple(thArray, dataArray, sheetNameArray, "单表格多sheet示例");
+    // this.BASE.exportMultiple(thArray, dataArray, sheetNameArray, "单表格多sheet示例");
   },
 
   methods: {

+ 312 - 55
src/views/Demo.vue

@@ -2,10 +2,14 @@
   <h1>组件示例</h1>
   <tab :data="tabData" @select="select" />
   <!-- 图表 -->
-  <el-scrollbar v-if="currTab == 1" style="height:85%;">
+  <el-scrollbar v-if="currTab == 1" style="height: 85%">
     <h2>图表</h2>
     <h2>07-16新增</h2>
-    <scatter-line-chart :lineData="scatterLineData.lineData" :data="scatterLineData.data" :height="'250px'" />
+    <scatter-line-chart
+      :lineData="scatterLineData.lineData"
+      :data="scatterLineData.data"
+      :height="'250px'"
+    />
 
     <h2>07-12新增</h2>
     <h3>折现: zoom-line-chart</h3>
@@ -114,25 +118,17 @@
     </div>
   </el-scrollbar>
   <!-- 组件 -->
-  <el-scrollbar v-if="currTab == 2" style="height:85%;">
+  <el-scrollbar v-if="currTab == 2" style="height: 85%">
     <h3>panel</h3>
-    <panel :title="'title 标题'">
-      带标题title
-    </panel>
+    <panel :title="'title 标题'"> 带标题title </panel>
     <br />
-    <panel>
-      无标题title
-    </panel>
+    <panel> 无标题title </panel>
 
     <h3>panel-2</h3>
-    <panel-2 :title="'panel -2'">
-      panel 2
-    </panel-2>
+    <panel-2 :title="'panel -2'"> panel 2 </panel-2>
 
     <h3>panel-3</h3>
-    <panel-3>
-      panel-3
-    </panel-3>
+    <panel-3> panel-3 </panel-3>
 
     <h3>toolbar-panel</h3>
     <toolbar-panel title="toolbar-panel">
@@ -180,87 +176,150 @@
     <percent-card-2 />
 
     <h3>collapse-list</h3>
-    <div style="width:200px">
+    <div style="width: 200px">
       <collapse-list />
     </div>
 
     <h3>list</h3>
-    <div style="width:200px">
+    <div style="width: 200px">
       <list />
     </div>
   </el-scrollbar>
 
   <!-- Table 组件 -->
-  <el-scrollbar v-if="currTab == 3" style="height:85%;">
+  <el-scrollbar v-if="currTab == 3" style="height: 85%">
     <h2>07-09更新</h2>
     <h3>table-2</h3>
     <h3>组件说明:</h3>
     <p>与原组件使用方式基本相同 原table组件满足的情况下,不更换新组件也可以</p>
     <p>新table支持原table所有特性,优化了props及column, 支持更多功能</p>
     <p>现支持 文本省略及鼠标浮动显示</p>
-    <p>* 原有template 及第三方标签实现方式更改 删除了column 中的 template、type及props</p>
+    <p>
+      * 原有template 及第三方标签实现方式更改 删除了column 中的
+      template、type及props
+    </p>
     <h3>props说明:</h3>
-    <p>height : string 高度 指定列表高度 自动判断是否显示滚动条, 不进行设置则为最大宽度且没有滚动条</p>
+    <p>
+      height : string 高度 指定列表高度 自动判断是否显示滚动条,
+      不进行设置则为最大宽度且没有滚动条
+    </p>
     <p>pageSize : number 分页个数 若不传 pagesize 不进行分页处理</p>
     <p>@onPagging : method 分页回调</p>
     <p>data : Object 数据源 { column: [] , data:[] , total: number }</p>
     <h3>column说明:</h3>
     <p>
-      { name: "风机名称", field: "name", width:'', click:function(){ } ,sortable:fasle, slot:false, fixed:false, align:"center" }
+      { name: "风机名称", field: "name", width:'', click:function(){ }
+      ,sortable:fasle, slot:false, fixed:false, align:"center" }
     </p>
     <p>name : string 列名</p>
     <p>field : string 对应数据项 同时使用于具名插槽的name值</p>
-    <p>width : 列宽 可自定与每列宽度 如果想设置横向滚动条 需手动设置列宽 满足各列宽度和大于屏幕宽度</p>
+    <p>
+      width : 列宽 可自定与每列宽度 如果想设置横向滚动条 需手动设置列宽
+      满足各列宽度和大于屏幕宽度
+    </p>
     <p>click : 点击事件 与原有table相同</p>
     <p>sortable : 排序</p>
-    <p>slot: 开启插槽 为true时, 可在HTML中添加 插槽模板 添加自定义内容 为false时, 默认对应显示值, 示例参考代码中template</p>
+    <p>
+      slot: 开启插槽 为true时, 可在HTML中添加 插槽模板 添加自定义内容 为false时,
+      默认对应显示值, 示例参考代码中template
+    </p>
     <p>fixed: 固定列</p>
     <p>align: 默认文本居中 left | center| right</p>
-    <table-2 :data="tableData2" :height="'200px'" :pageSize="10" @onPagging="tableonPagging">
+    <table-2
+      :data="tableData2"
+      :height="'200px'"
+      :pageSize="10"
+      @onPagging="tableonPagging"
+    >
       <!-- v-slot:[field] 对应列嵌入自定义内容 包括第三方标签 -->
       <!-- 同时需要在 colum 中设置 slot:true  -->
       <!-- 如果只设置 slot:true 不写模板 列不存在内容 -->
       <!-- scope 内容 scope.column 传入的 col 值, scope.row 数据值 -->
-      <template v-slot:lqf="scope"> {{ scope.column.name }}:{{ scope.row.lqf }} </template>
+      <template v-slot:lqf="scope">
+        {{ scope.column.name }}:{{ scope.row.lqf }}
+      </template>
       <template v-slot:action="scope">
-        <a style="cursor:pointer;color:green;margin-right:8px;" @click="tableAction(scope)"> 点击查看组件点击事件返回信息 </a>
-        <a style="cursor:pointer;color:green;margin-right:8px;"> {{ scope.column.name }}2 </a>
-        <a style="cursor:pointer;color:green;margin-right:8px;"> {{ scope.column.name }}3 </a>
+        <a
+          style="cursor: pointer; color: green; margin-right: 8px"
+          @click="tableAction(scope)"
+        >
+          点击查看组件点击事件返回信息
+        </a>
+        <a style="cursor: pointer; color: green; margin-right: 8px">
+          {{ scope.column.name }}2
+        </a>
+        <a style="cursor: pointer; color: green; margin-right: 8px">
+          {{ scope.column.name }}3
+        </a>
       </template>
     </table-2>
 
     <h3>table</h3>
-    <Table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging"
-    
-     />
+    <Table
+      :data="tableData"
+      :height="'200px'"
+      :canScroll="true"
+      :pageSize="40"
+      :showHover="false"
+      @onPagging="tableonPagging"
+    />
     <h3>table</h3>
-    <check-table :data="tableData" :height="'200px'" :canScroll="true" :pageSize="40" :showHover="false" @onPagging="tableonPagging" @check="CheckTableonCheck" />
+    <check-table
+      :data="tableData"
+      :height="'200px'"
+      :canScroll="true"
+      :pageSize="40"
+      :showHover="false"
+      @onPagging="tableonPagging"
+      @check="CheckTableonCheck"
+    />
 
     <h3>el-table</h3>
-    <el-table class="custom-table" :data="eltableData" max-height="200" stripe style="width: 100%" border="false">
+    <el-table
+      class="custom-table"
+      :data="eltableData"
+      max-height="200"
+      stripe
+      style="width: 100%"
+      border="false"
+    >
       <el-table-column prop="date" label="日期" width="150"> </el-table-column>
       <el-table-column label="配送信息">
-        <el-table-column prop="name" label="姓名" width="120"> </el-table-column>
+        <el-table-column prop="name" label="姓名" width="120">
+        </el-table-column>
         <el-table-column label="地址">
-          <el-table-column prop="province" label="省份" width="120"> </el-table-column>
-          <el-table-column prop="city" label="市区" width="120"> </el-table-column>
+          <el-table-column prop="province" label="省份" width="120">
+          </el-table-column>
+          <el-table-column prop="city" label="市区" width="120">
+          </el-table-column>
           <el-table-column prop="address" label="地址"> </el-table-column>
-          <el-table-column prop="zip" label="邮编" width="120"> </el-table-column>
+          <el-table-column prop="zip" label="邮编" width="120">
+          </el-table-column>
         </el-table-column>
       </el-table-column>
     </el-table>
 
     <div>
-      <el-table class="custom-table" :data="treeTableData" style="width: 100%;margin-bottom: 20px;" row-key="id" border default-expand-all :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
-        <el-table-column prop="date" label="日期" sortable width="180"> </el-table-column>
-        <el-table-column prop="name" label="姓名" sortable width="180"> </el-table-column>
+      <el-table
+        class="custom-table"
+        :data="treeTableData"
+        style="width: 100%; margin-bottom: 20px"
+        row-key="id"
+        border
+        default-expand-all
+        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+      >
+        <el-table-column prop="date" label="日期" sortable width="180">
+        </el-table-column>
+        <el-table-column prop="name" label="姓名" sortable width="180">
+        </el-table-column>
         <el-table-column prop="address" label="地址"> </el-table-column>
       </el-table>
     </div>
   </el-scrollbar>
 
   <!--  icon -->
-  <el-scrollbar v-if="currTab == 4" style="height:85%;">
+  <el-scrollbar v-if="currTab == 4" style="height: 85%">
     <i class="svg-icon svg-icon-sm mg-r-16">
       <svg-icon :svgid="'svg-wind-site'" />
     </i>
@@ -274,15 +333,62 @@
 
   <!-- el-compoments -->
 
-  <el-scrollbar v-if="currTab == 5" style="height:85%;">
-    <el-button type="text" @click="dialogTableVisible = true">打开 Dialog</el-button>
-    <el-tree :data="elTreeData.data" :props="elTreeData.defaultProps" @node-click="handleNodeClick"></el-tree>
+  <el-scrollbar v-if="currTab == 5" style="height: 85%">
+    <el-button type="text" @click="dialogTableVisible = true"
+      >打开 Dialog</el-button
+    >
+    <el-tree
+      :data="elTreeData.data"
+      :props="elTreeData.defaultProps"
+      @node-click="handleNodeClick"
+    ></el-tree>
 
-    <el-cascader :options="cascader.options" :props="cascader.props" clearable></el-cascader>
+    <el-cascader
+      :options="cascader.options"
+      :props="cascader.props"
+      clearable
+    ></el-cascader>
   </el-scrollbar>
 
+  <!-- 表格合并 -->
+
+  <div v-if="currTab == 6" style="height: 70%">
+    <el-button type="text" @click="()=>{ tableMergeStyleShow = !tableMergeStyleShow; BASE.showMsg({type:'success',msg:'表格样式已切换'}); }">切换表格样式</el-button>
+    <el-button type="text" @click="()=>{ BASE.showMsg({type:'success',msg:'数据已刷新'}); createMergeTable(createSum); }">刷新表格数据</el-button>
+    <el-button type="text" @click="()=>{ createSum = !createSum; BASE.showMsg({type:createSum ? 'success' : 'warning',msg:`合计行已${createSum ? '显示' : '隐藏'}`}); createMergeTable(createSum); }">{{createSum ? "隐藏" : "显示"}}表格合计</el-button>
+    <el-table
+      style="width: 100%"
+      height="100%"
+      :class="tableMergeStyleShow ? 'custom-table' : ''"
+      :data="tableMergeData"
+      :span-method="tableMergeArraySpanMethod"
+      :show-summary="createSum"
+      :summary-method="tableMergeDataSumMethod"
+      sum-text="总计"
+    >
+      <el-table-column prop="fpName" label="名称" width="150" />
+      <el-table-column prop="sd" label="时段" align="center" />
+      <el-table-column label="时间">
+        <el-table-column prop="sj1" label="2020-02-01" align="center" />
+        <el-table-column prop="sj2" label="2020-02-02" align="center" />
+        <el-table-column prop="sj3" label="2020-02-03" align="center" />
+        <el-table-column prop="sj4" label="2020-02-04" align="center" />
+        <el-table-column prop="sj5" label="2020-02-05" align="center" />
+        <el-table-column prop="sj6" label="2020-02-06" align="center" />
+        <el-table-column prop="sj7" label="2020-02-07" align="center" />
+        <el-table-column prop="sj8" label="2020-02-08" align="center" />
+        <el-table-column prop="sj9" label="2020-02-09" align="center" />
+        <el-table-column prop="sj10" label="2020-02-10" align="center" />
+      </el-table-column>
+    </el-table>
+  </div>
+
   <el-dialog custom-class="modal" title="收货地址" v-model="dialogTableVisible">
-    <el-tree :data="elTreeData.data" :props="elTreeData.defaultProps" @node-click="handleNodeClick"></el-tree>
+    <el-tree
+      :data="elTreeData.data"
+      :props="elTreeData.defaultProps"
+      @node-click="handleNodeClick"
+    ></el-tree>
   </el-dialog>
 </template>
 
@@ -383,7 +489,6 @@ export default {
   },
   methods: {
     select(data) {
-      // console.log(data);
       this.currTab = parseInt(data.id);
     },
     btnGroupDoubleSelect(param) {
@@ -420,7 +525,9 @@ export default {
       ];
       let index = 0;
       for (let i = param.start; i < param.end; i++) {
-        this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
+        this.tableData.data.push(
+          JSON.parse(JSON.stringify(this.tableData.data[0]))
+        );
         this.tableData.data[index].index = i + 1;
         index++;
       }
@@ -435,6 +542,127 @@ export default {
     tableAction(param) {
       console.log(param);
     },
+    createMergeTable(createSum = false) {
+      let tableMergeData = [];
+
+      let tableNum = this.BASE.randomNum(30, 50);
+
+      const sd = [{ title: "上午" }, { title: "中午" }, { title: "下午" }];
+
+      let hjFlg = false;
+      let cellSumIdx = 0;
+      for (let i = 0; i < tableNum; i++) {
+        const sdNum = this.BASE.randomNum(0, 3);
+        hjFlg = sdNum > 0 ? true : false;
+        const fpName = this.BASE.randomNum(0, 1)
+          ? `风电场 - (${this.BASE.randomNum(1000, 99999)})`
+          : `光伏电站 - (${this.BASE.randomNum(1000, 99999)})`;
+        for (let j = 0; j < sdNum; j++) {
+          tableMergeData.push({
+            fpName,
+            sd: sd[j].title,
+            sj1: this.BASE.randomNum(1, 9999),
+            sj2: this.BASE.randomNum(1, 9999),
+            sj3: this.BASE.randomNum(1, 9999),
+            sj4: this.BASE.randomNum(1, 9999),
+            sj5: this.BASE.randomNum(1, 9999),
+            sj6: this.BASE.randomNum(1, 9999),
+            sj7: this.BASE.randomNum(1, 9999),
+            sj8: this.BASE.randomNum(1, 9999),
+            sj9: this.BASE.randomNum(1, 9999),
+            sj10: this.BASE.randomNum(1, 9999),
+            cellArray: j ? [j, 0] : [sdNum + (createSum ? 1 : 0), 1],
+            cellIndex: j,
+            cellSumIdx,
+          });
+        }
+        if (hjFlg && createSum) {
+          let sj1 = 0;
+          let sj2 = 0;
+          let sj3 = 0;
+          let sj4 = 0;
+          let sj5 = 0;
+          let sj6 = 0;
+          let sj7 = 0;
+          let sj8 = 0;
+          let sj9 = 0;
+          let sj10 = 0;
+          tableMergeData.forEach((ele) => {
+            if (cellSumIdx === ele.cellSumIdx) {
+              sj1 += ele.sj1;
+              sj2 += ele.sj2;
+              sj3 += ele.sj3;
+              sj4 += ele.sj4;
+              sj5 += ele.sj5;
+              sj6 += ele.sj6;
+              sj7 += ele.sj7;
+              sj8 += ele.sj8;
+              sj9 += ele.sj9;
+              sj10 += ele.sj10;
+            }
+          });
+          tableMergeData.push({
+            fpName,
+            sd: "合计",
+            sj1,
+            sj2,
+            sj3,
+            sj4,
+            sj5,
+            sj6,
+            sj7,
+            sj8,
+            sj9,
+            sj10,
+            cellArray: [0, 0],
+            cellIndex: -1,
+          });
+        }
+        cellSumIdx++;
+      }
+      this.tableMergeData = tableMergeData;
+    },
+    tableMergeArraySpanMethod(row) {
+      if (!row.columnIndex) {
+        if (row.row.cellArray[0]) {
+          return row.row.cellArray;
+        } else if (
+          row.row.cellArray[0] &&
+          row.rowIndex & (row.row.cellArray[0] === row.row.cellIndex)
+        ) {
+          return [0, 0];
+        } else if (row.row.cellIndex === -1) {
+          return [0, 0];
+        }
+      }
+    },
+    tableMergeDataSumMethod() {
+      let sj1 = 0;
+      let sj2 = 0;
+      let sj3 = 0;
+      let sj4 = 0;
+      let sj5 = 0;
+      let sj6 = 0;
+      let sj7 = 0;
+      let sj8 = 0;
+      let sj9 = 0;
+      let sj10 = 0;
+      this.tableMergeData.forEach((ele) => {
+        if (ele.cellIndex !== -1) {
+          sj1 += ele.sj1;
+          sj2 += ele.sj2;
+          sj3 += ele.sj3;
+          sj4 += ele.sj4;
+          sj5 += ele.sj5;
+          sj6 += ele.sj6;
+          sj7 += ele.sj7;
+          sj8 += ele.sj8;
+          sj9 += ele.sj9;
+          sj10 += ele.sj10;
+        }
+      });
+      return ["总计", "", sj1, sj2, sj3, sj4, sj5, sj6, sj7, sj8, sj9, sj10];
+    },
   },
   data() {
     return {
@@ -460,6 +688,10 @@ export default {
           id: "5",
           text: "element 组件",
         },
+        {
+          id: "6",
+          text: "表格合并",
+        },
       ],
       tableData: {
         column: [
@@ -475,7 +707,7 @@ export default {
             field: "name",
             is_num: false,
             is_light: false,
-            click: function(event, data) {
+            click: function (event, data) {
               console.log(event);
               console.log(data);
             },
@@ -576,7 +808,7 @@ export default {
             name: "名称",
             field: "name",
             width: 200,
-            click: function(event, data) {
+            click: function (event, data) {
               console.log(event);
               console.log(data);
             },
@@ -668,7 +900,17 @@ export default {
       },
       // 柱状图:horizontal-bar-chart data
       HorizontalBarChart: {
-        area: ["新荣区", "平城区", "云冈区", "云州区", "阳高县", "天镇县", "广灵县", "浑源县", "左云县"],
+        area: [
+          "新荣区",
+          "平城区",
+          "云冈区",
+          "云州区",
+          "阳高县",
+          "天镇县",
+          "广灵县",
+          "浑源县",
+          "左云县",
+        ],
         legend: ["因病", "因残", "因学", "因灾", "缺土地", "缺水"],
         data: [
           [1320, 1302, 901, 634, 1390, 1330, 1320, 1000, 500],
@@ -1359,8 +1601,15 @@ export default {
           yTitle: "功率",
           legends: [],
           data: [
-            [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],
-            [0, 0, 0, 93.67, 98.38, 165, 295.84, 471.84, 648.28, 871.72, 1124.84, 1296.42, 1448.63, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548, 1548],
+            [
+              0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+              19, 20, 21, 22, 23, 24, 25,
+            ],
+            [
+              0, 0, 0, 93.67, 98.38, 165, 295.84, 471.84, 648.28, 871.72,
+              1124.84, 1296.42, 1448.63, 1548, 1548, 1548, 1548, 1548, 1548,
+              1548, 1548, 1548, 1548, 1548, 1548, 1548,
+            ],
           ],
         },
       },
@@ -2593,17 +2842,25 @@ export default {
           address: "上海市普陀区金沙江路 1516 弄",
         },
       ],
+      tableMergeData: [],
+      createSum: false,
+      tableMergeStyleShow:true,
     };
   },
   created() {
     for (let i = 1; i < 21; i++) {
-      this.tableData.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
+      this.tableData.data.push(
+        JSON.parse(JSON.stringify(this.tableData.data[0]))
+      );
       this.tableData.data[i].index = i + 1;
 
-      this.tableData2.data.push(JSON.parse(JSON.stringify(this.tableData.data[0])));
+      this.tableData2.data.push(
+        JSON.parse(JSON.stringify(this.tableData.data[0]))
+      );
       this.tableData2.data[i].index = i + 1;
       this.tableData2.data[i].yyy = i * 0.01 * Math.random();
     }
+    this.createMergeTable(this.createSum);
   },
   mounted() {},
 };

+ 38 - 7
src/views/HealthControl/HealthTab1.vue

@@ -33,9 +33,27 @@
         :showLine="false"
       >
         <div class="actions mg-b-16">
-          <button class="btn" :class="{ active: recommenIndex == 1 }" @click="onClickRecommon(1)">当日内推荐</button>
-          <button class="btn" :class="{ active: recommenIndex == 2 }" @click="onClickRecommon(2)">三日内推荐</button>
-          <button class="btn" :class="{ active: recommenIndex == 3 }" @click="onClickRecommon(3)">超三日推荐</button>
+          <button
+            class="btn"
+            :class="{ active: recommenIndex == 1 }"
+            @click="onClickRecommon(1)"
+          >
+            当日内推荐
+          </button>
+          <button
+            class="btn"
+            :class="{ active: recommenIndex == 2 }"
+            @click="onClickRecommon(2)"
+          >
+            三日内推荐
+          </button>
+          <button
+            class="btn"
+            :class="{ active: recommenIndex == 3 }"
+            @click="onClickRecommon(3)"
+          >
+            超三日推荐
+          </button>
           <div style="margin-left: 450px">
             <button class="btn" @click="onClickCofirmAll()">全部确认</button>
             <button class="btn" @click="onClickIgnoreAll()">全部忽略</button>
@@ -44,7 +62,7 @@
         <div class="report-items scroll">
           <div class="item" v-for="(item, index) in recommenList" :key="index">
             <div class="title">
-              <div>风机编号:{{ item.wtid }}</div>
+              <div @click="jumpUrl(item)">风机编号:{{ item.wtid }}</div>
               <span @click="onClickReport(item)">健康报告</span>
             </div>
             <div class="info">
@@ -75,7 +93,12 @@
         </div>
       </panel>
     </div>
-    <health-report :show="reportshow" :params="reportparams" @closed="closed" ref="eport"/>
+    <health-report
+      :show="reportshow"
+      :params="reportparams"
+      @closed="closed"
+      ref="eport"
+    />
   </div>
 </template>
 
@@ -112,6 +135,12 @@ export default {
     this.requestRecommen("recommen/getRecommenmainDay1");
   },
   methods: {
+    // 页面跳转
+    jumpUrl(item) {
+      const wpid = item.wpid;
+      const wtid = item.wtid;
+      this.$router.push(`/health/health0/${wpid}/${wtid}`)
+    },
     // 未确认缺陷按钮下的健康趋势选项
     onClickInfo(item) {
       this.infoList.forEach((element) => {
@@ -146,13 +175,13 @@ export default {
     },
     // 查看健康报告
     onClickReport(item) {
-		let recorddate = new Date(item.createdate).formatDate("yyyy-MM-dd");
+      let recorddate = new Date(item.createdate).formatDate("yyyy-MM-dd");
       this.reportshow = true;
       this.reportparams = {
         wtId: item.wtid,
         recorddate: recorddate,
       };
-	  this.$refs.eport.getReport(item.wtid,recorddate);
+      this.$refs.eport.getReport(item.wtid, recorddate);
     },
     // 关闭健康报告
     closed() {
@@ -413,6 +442,8 @@ export default {
           display: flex;
           flex-direction: row;
           justify-content: space-between;
+          cursor: pointer;
+
           span {
             cursor: pointer;
           }

+ 2 - 2
src/views/Home/Home.vue

@@ -979,12 +979,12 @@ export default {
           that.powerData = [
             {
               title: that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度" : "风速",
-				
+              value: res.data.jczbmap.ssfs,
               dialogTitle: that.wpId == 0 ? '详情' : that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? "日照强度详情" : "风速详情",
               subUrl: "genreset/findGLDetail",
               targetName: "ssfs",
               dialogType: "powerLineChart",
-              max: 30,
+              max: that.wpId === '-2' || that.wpId.indexOf('GDC') !== -1 ? 1200 : 40,
             },
             {
               title: "保证功率",

+ 14 - 5
src/views/NewPages/power-benchmarking.vue

@@ -893,7 +893,7 @@ export default {
           foreigntype: "风电",
         },
         success(res) {
-          if (res.code == 200) that.calculate(res.data);
+          if (res.code == 200) that.calculate(res.data, timetype);
         },
       });
     },
@@ -950,7 +950,7 @@ export default {
       };
     },
     // 同比环比计算
-    calculate(array) {
+    calculate(array, timetype) {
       let shiji = {};
       let huanbi = {};
       let tongbi = {};
@@ -962,9 +962,18 @@ export default {
         if (item.foreignkeyid === "基准") jizhun = item;
       });
 
-      this.increasescapacity = Math.abs(
-        this.filter(jizhun.actualpower - shiji.actualpower)
-      );
+      if (timetype === "日") {
+        this.increasescapacity = 30;
+      } else if (timetype === "月") {
+        this.increasescapacity = 277;
+      } else {
+        this.increasescapacity = 634;
+      }
+
+      // this.increasescapacity = Math.abs(
+      //   this.filter(jizhun.actualpower - shiji.actualpower)
+      // );
+
       // 理论电量平衡分析
       for (let item of this.analyselist) {
         let key = item.label;

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

@@ -1026,6 +1026,11 @@ export default {
                 //   icon: "svg-matrix",
                 //   path: "/others/market",
                 // }
+                {
+                  text: "风机检修规则",
+                  icon: "svg-matrix",
+                  path: "/others/overhaulRule",
+                },
               ],
             },
           ],

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

@@ -23,7 +23,7 @@
       </div>
     </div>
     <div class="df-table curTable">
-      <el-table :data="tableData.data" height="88vh" max-height="88vh" stripe style="width: 100%" :border="true">
+      <el-table class="custom-table" :data="tableData.data" height="88vh" max-height="88vh" stripe style="width: 100%" :border="true">
         <el-table-column :show-overflow-tooltip="true" prop="wtname" width="150px" label="风机"></el-table-column>
         <el-table-column :show-overflow-tooltip="true" :label="tableTitle">
           <el-table-column :show-overflow-tooltip="true" label="近一天">

+ 133 - 0
src/views/overhaulRule/index.vue

@@ -0,0 +1,133 @@
+<template>
+  <div class="ruleBox">
+    <div class="radioBox">
+      <el-radio-group v-model="maintenanceType" @change="getTableData">
+        <el-radio
+          :label="item.code"
+          v-for="(item, index) in radioArray"
+          :key="index"
+          >{{ item.widget }}</el-radio
+        >
+      </el-radio-group>
+    </div>
+    <div class="tableBox">
+      <el-table
+        height="100%"
+        ref="multipleTable"
+        empty-text="暂无数据"
+        :data="tableData"
+        :header-cell-style="{
+          height: '40px',
+          background: 'rgba(83, 98, 104, 0.2)',
+          color: '#b2bdc0',
+          'border-bottom': '0px solid red',
+        }"
+        :cell-style="{
+          height: '40px',
+          'border-bottom': 'solid 0px #242424',
+        }"
+        stripe
+        style="width: 100%; margin-bottom: 10px"
+      >
+        <el-table-column
+          type="index"
+          width="150"
+          align="center"
+          label="检修步骤"
+        />
+        <el-table-column
+          prop="widget"
+          label="检修类型"
+          width="150"
+          align="center"
+        ></el-table-column>
+        <el-table-column
+          prop="process"
+          label="检修过程"
+          align="left"
+        ></el-table-column>
+      </el-table>
+      
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      maintenanceType: 3,
+      radioArray: [],
+      tableData: [],
+      knowledge: "故障维修记录库",
+      knowledgeList: [
+        {
+          label: "故障维修记录库",
+          value: "0",
+        },
+      ],
+    };
+  },
+  components: {},
+  created() {
+    this.getMaintenance();
+  },
+  methods: {
+    getMaintenance() {
+      let that = this;
+      this.API.requestData({
+        method: "GET",
+        baseURL: "http://192.168.1.18:9002/",
+        subUrl: "know/maintenance/type",
+        success(res) {
+          that.radioArray = res.data;
+          that.maintenanceType = res?.data[0]?.code;
+          that.getTableData();
+        },
+      });
+    },
+    getTableData() {
+      let that = this;
+      this.API.requestData({
+        method: "GET",
+        baseURL: "http://192.168.1.18:9002/",
+        subUrl: "know/maintenance/list",
+        data: {
+          code: that.maintenanceType,
+        },
+        success(res) {
+          that.tableData = res.data;
+        },
+      });
+    },
+  },
+};
+</script>
+<style lang="less" scoped>
+.ruleBox {
+  display: flex;
+  width: 100%;
+  height: 100%;
+  align-items: center;
+
+  .radioBox {
+    width: 20%;
+    height: 80%;
+    max-height: 80%;
+    margin: 10% 0 10% 20px;
+    overflow-y: scroll;
+    display: flex;
+    justify-content: flex-start;
+    align-items: flex-start;
+
+    .el-radio {
+      display: block;
+    }
+  }
+
+  .tableBox {
+    width: 80%;
+    height: 80%;
+    margin: 10% 20px;
+  }
+}
+</style>

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

@@ -23,7 +23,7 @@
       </div>
     </div>
     <div class="df-table curTable">
-      <el-table :data="tableData.data" height="88vh" max-height="88vh" stripe style="width: 100%" :border="true">
+      <el-table class="custom-table" :data="tableData.data" height="88vh" max-height="88vh" stripe style="width: 100%" :border="true">
         <el-table-column :show-overflow-tooltip="true" prop="wtname" label="风机" width="150px"></el-table-column>
         <el-table-column :show-overflow-tooltip="true" :label="tableTitle">
           <el-table-column :show-overflow-tooltip="true" label="近一天">