Browse Source

冲突处理

Koishi 3 years ago
parent
commit
63a7503aad

+ 11 - 0
src/assets/styles/el-override/el-table.less

@@ -26,6 +26,11 @@
       line-height: 27px;
       font-size: 12px;
       color: @gray-l;
+
+      &.light,
+      &.always-light {
+        color: @green !important;
+      }
     }
 
     th {
@@ -36,10 +41,16 @@
       font-weight: normal;
       text-align: center;
       color: @gray-l;
+      cursor: pointer;
 
       &.is-leaf {
         border: 0px;
       }
+
+      &.light,
+      &.always-light {
+        color: @green !important;
+      }
     }
 
     th,

+ 1 - 1
src/components/coms/panel/panel-sand-toolbar.vue

@@ -24,7 +24,7 @@ export default {
 </script>
 <style lang="less">
 .com-panel-sand {
-    background: #53626826;
+    background: #1a1f2fCC;
     padding: 0 1.481vh 1.481vh 1.481vh;
     border-top: 1px solid #15a952;
     position: relative;

+ 1 - 1
src/components/coms/panel/panel-sand.vue

@@ -29,7 +29,7 @@ export default {
 </script>
 <style lang="less">
 .com-panel-sand {
-    background: #53626826;
+    background: #1a1f2fCC;
     padding: 0 1.481vh 1.481vh 1.481vh;
     border-top: 1px solid #15a952;
     position: relative;

+ 18 - 2
src/components/coms/table/group-table.vue

@@ -1,10 +1,12 @@
 <template>
   <el-table class="custom-table" :class="customClass" stripe :data="data.data" :height="height" style="width: 100%" @cell-click="onClick" @header-click="onHeaderClick">
-    <template v-for="col in data.column" :key="col">
+    <template v-for="(col, cIndex) in data.column" :key="col">
       <el-table-column v-if="col.child && col.child.length > 0" :label="col.name" :key="col">
         <el-table-column
-          v-for="sub in col.child"
+          v-for="(sub, sindex) in col.child"
           :key="sub"
+          :index="cIndex"
+          :class-name="getClassName(cIndex, sindex)"
           :label="sub.name"
           :prop="sub.field"
           :width="sub.width"
@@ -89,6 +91,10 @@ export default {
         };
       },
     },
+    isColumnLight: {
+      type: Boolean,
+      default: true,
+    },
   },
   emits: {
     onPagging: null,
@@ -98,6 +104,8 @@ export default {
   data() {
     return {
       currentPage: 1,
+      headerIndex: -1,
+      subIndex: -1,
     };
   },
   computed: {
@@ -142,6 +150,10 @@ export default {
       if (column.rawColumnKey.click) column.rawColumnKey.click(event, row);
     },
     onHeaderClick(column, event) {
+      if (column.level == 2) {
+        this.headerIndex = column.index;
+        this.subIndex = column.no;
+      }
       this.$emit("headerClick", { event: event, col: column.rawColumnKey, data: this.data.data });
     },
     handleCurrentChange(val) {
@@ -153,6 +165,10 @@ export default {
         end: this.endRow,
       });
     },
+    getClassName(cindex, sindex) {
+      if (this.isColumnLight == true && cindex == this.headerIndex && sindex == this.subIndex) return "light";
+      return "";
+    },
   },
   // 生命周期钩子
   beforeCreate() {

File diff suppressed because it is too large
+ 34 - 22
src/views/HealthControl/fault-diagnosis.vue


+ 8 - 8
src/views/LightMatrix3/LightMatrix3.vue

@@ -469,10 +469,10 @@ export default {
 
 <style lang="less" scoped>
 @panelHeight: 60px;
-@titleHeight: 3.704vh;
+@titleHeight: 26px;
 
 .light-matrix {
-  width: calc(100% - 1.111vh);
+  // width: calc(100% - 1.111vh);
   height: calc(100vh - 7.222vh);
   display: flex;
   flex-direction: column;
@@ -756,16 +756,16 @@ export default {
 
     .panel-title {
       width: 100%;
-      height: @titleHeight;
       line-height: @titleHeight;
       background-color: fade(@darkgray, 40%);
 
       .panel-title-name {
-        font-size: @fontsize-s;
+        font-size: 12px;
         color: @green;
         display: flex;
+        flex-wrap: wrap;
         align-items: center;
-        padding: 0 16px;
+        padding-left: 16px;
 
         i {
           margin-right: 0.7407vh;
@@ -773,7 +773,7 @@ export default {
 
         .sub-title-item {
           display: flex;
-          flex: 1;
+          flex: 0 0 110px;
 
           .sub-title {
             flex: 0 0 auto;
@@ -834,13 +834,13 @@ export default {
 
       .blank {
         margin-right: 4px;
-        flex: 1 0 105px;
+        flex: 1 0 118px;
       }
 
       .card {
         margin-right: 4px;
         margin-top: 4px;
-        flex: 1 0 105px;
+        flex: 1 0 118px;
       }
 
       .card {

+ 0 - 276
src/views/NewPages/components/group-table.vue

@@ -1,276 +0,0 @@
-<template>
-  <el-table class="custom-table" :class="customClass" stripe :data="data.data" :height="height" style="width: 100%;cursor: pointer;" @cell-click="onClick" @header-click="onHeaderClick">
-    <template v-for="col in data.column" :key="col">
-      <el-table-column v-if="col.child && col.child.length > 0" :label="col.name" :key="col">
-        <el-table-column
-          v-for="sub in col.child"
-          :key="sub"
-          :label="sub.name"
-          :prop="sub.field"
-          :width="sub.width"
-          :sortable="sub.sortable"
-          :show-overflow-tooltip="!sub.slot"
-          :fixed="sub.fixed"
-          :align="sub.align ? sub.align : 'center'"
-          :resizable="sub.resizable"
-          :header-align="'center'"
-        >
-          <template v-if="sub.slot == true" #default="item">
-            <slot :name="sub.field" :column="sub" :row="item.row" :all="item" :data="item.row[item.field]"></slot>
-          </template>
-        </el-table-column>
-      </el-table-column>
-      <el-table-column
-        v-if="!col.child"
-        :label="col.name"
-        :prop="col.field"
-        :width="col.width"
-        :sortable="col.sortable"
-        :show-overflow-tooltip="!col.slot"
-        :fixed="col.fixed"
-        :align="col.align ? col.align : 'center'"
-        :resizable="col.resizable"
-        :header-align="'center'"
-      >
-        <template v-if="col.slot == true" #default="item">
-          <slot :name="col.field" :column="col" :row="item.row" :all="item" :data="item.row[col.field]"></slot>
-        </template>
-      </el-table-column>
-    </template>
-  </el-table>
-  <el-pagination class="mg-t-8" v-if="pageable" @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize" :total="data.total" v-bind="elPaggingProps"> </el-pagination>
-</template>
-
-<script>
-export default {
-  // 名称
-  name: "ComTable",
-  // 使用组件
-  components: {},
-  // 传入参数
-  props: {
-    /**
-             * {
-                    column: [{
-                        name: "风机名称",
-                        child:[{
-                            field: "name",
-                            width:'', // 宽度
-                            click:function(){} // 点击事件
-                            sortable:fasle,
-                            slot:false,
-                            fixed:false,
-                            align:'center',
-                            resizable :false,
-                        }]
-                    }],
-                    total:200
-                }
-             */
-    data: Object,
-    height: {
-      type: String,
-      default: "",
-    },
-    pageSize: {
-      type: Number,
-      default: 0,
-    },
-    customClass: {
-      type: String,
-      default: "",
-    },
-    elPaggingProps: {
-      type: Object,
-      default: () => {
-        return {
-          layout: "total, sizes, prev, pager, next, jumper",
-          // "page-sizes": [100, 200, 300, 400],
-        };
-      },
-    },
-  },
-  emits: {
-    onPagging: null,
-    headerClick: null,
-  },
-  // 数据
-  data() {
-    return {
-      currentPage: 1,
-    };
-  },
-  computed: {
-    tableData() {
-      let that = this;
-      if (this.sortCol == "") {
-        return this.data.data;
-      } else {
-        let data = this.data.data;
-
-        data.sort((a, b) => {
-          let rev = 1;
-          if (that.sortType == "ASC") rev = 1;
-          else if (that.sortType == "DESC") rev = -1;
-
-          if (a[that.sortCol] > b[that.sortCol]) return rev * 1;
-          if (a[that.sortCol] < b[that.sortCol]) return rev * -1;
-          return 0;
-        });
-        return data;
-      }
-    },
-    pageable() {
-      return this.pageSize != 0;
-    },
-    pages() {
-      if (this.pageable) return parseInt(this.data.total / this.pageSize) + 1;
-      else return 0;
-    },
-    startRow() {
-      if (this.pageable) return (this.currentPage - 1) * this.pageSize;
-      else return 0;
-    },
-    endRow() {
-      if (this.pageable) return this.currentPage * this.pageSize;
-      else return this.data.data.length;
-    },
-  },
-  // 函数
-  methods: {
-    onClick(row, column, cell, event) {
-      if (column.rawColumnKey.click) column.rawColumnKey.click(event, row);
-    },
-    onHeaderClick(column, event) {
-      this.$emit("headerClick", { event: event, col: column.rawColumnKey, data: this.data.data });
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val;
-      this.$emit("onPagging", {
-        pageIndex: this.currentPage,
-        pageSize: this.pageSize,
-        start: this.startRow,
-        end: this.endRow,
-      });
-    },
-  },
-  // 生命周期钩子
-  beforeCreate() {
-    // 创建前
-  },
-  created() {
-    // 创建后
-  },
-  beforeMount() {
-    // 渲染前
-  },
-  mounted() {
-    // 渲染后
-  },
-  beforeUpdate() {},
-  updated() {},
-};
-</script>
-
-<style lang="less">
-@titleGray: #9ca5a8;
-@rowGray: #606769;
-@darkBack: #536268;
-.com-table {
-  width: 100%;
-  border-collapse: collapse;
-
-  thead {
-    tr { 
-      display: table;
-      table-layout: fixed;
-      width: 100%;
-
-      th {
-        background-color: fade(@darkBack, 20%);
-        height: 30px;
-        line-height: 30px;
-        color: @titleGray;
-        font-weight: 400;
-        font-size: @fontsize-s;
-        position: sticky;
-        top: 0;
-        cursor: pointer;
-
-        &.light,
-        &.always-light {
-          color: @green;
-        }
-      }
-    }
-  }
-
-  tbody {
-    display: block;
-
-    tr {
-      display: table;
-      table-layout: fixed;
-      width: 100%;
-
-      &:nth-child(2n) {
-        background-color: fade(@rowGray, 20%);
-      }
-
-      td {
-        padding: 0.556vh 0;
-        color: @rowGray;
-        text-align: center;
-        font-size: @fontsize-s;
-        white-space: nowrap;
-        overflow: hidden;
-        text-overflow: ellipsis;
-
-        &.light,
-        &.always-light {
-          color: @green !important;
-        }
-
-        &.num {
-          font-family: "Bicubik";
-          font-weight: 400;
-        }
-      }
-    }
-  }
-
-  .el-pagination {
-    color: @gray;
-    .el-pagination__total {
-      color: @gray;
-    }
-
-    button {
-      &.btn-next,
-      &.btn-prev {
-        background: center center no-repeat fade(@gray, 20);
-        color: @gray-l;
-      }
-      &:disabled {
-        color: @gray-l;
-        background-color: fade(@gray, 20);
-        cursor: not-allowed;
-      }
-    }
-
-    .el-pager li {
-      color: @gray-l;
-      background: fade(@gray, 20);
-      &.active {
-        color: @green;
-      }
-    }
-
-    .el-input__inner {
-      color: @gray-l;
-      background: fade(@gray, 20);
-      border: 1px solid fade(@gray, 20);
-    }
-  }
-}
-</style>

+ 64 - 56
src/views/NewPages/power-benchmarking.vue

@@ -14,7 +14,7 @@
         <div class="info">
           <div class="title">累计增发电量</div>
           <div class="value">{{increasescapacity}}</div>
-          <div class="unit">kwh</div>
+          <div class="unit">万kWh</div>
         </div>
       </div>
       <div class="static-items" style="flex:0 0 860px;">
@@ -50,8 +50,8 @@
             </div>
             <div class="percent">
               <div class="percent-box">
-                <div class="percent-bar" style="width:24%;" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
-                <div class="sj" style="left: calc(24% - 3px);" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
+                <div class="percent-bar" :style="{width:Math.abs(item.expect)+'%'}" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
+                <div class="sj" :style="{'margin-left': Math.abs(item.expect)-4 + '%'}" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
               </div>
               <div class="value">{{item.expect}}%</div>
             </div>
@@ -91,8 +91,8 @@
             </div>
             <div class="percent">
               <div class="percent-box">
-                <div class="percent-bar" style="width:24%;" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
-                <div class="sj" style="left: calc(24% - 3px);" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
+                <div class="percent-bar" :style="{width:Math.abs(item.expect)+'%'}" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
+                <div class="sj" :style="{'margin-left': Math.abs(item.expect)-4 + '%'}" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
               </div>
               <div class="value">{{item.expect}}%</div>
             </div>
@@ -132,8 +132,8 @@
             </div>
             <div class="percent">
               <div class="percent-box">
-                <div class="percent-bar" style="width:24%;" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
-                <div class="sj" style="left: calc(24% - 3px);" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
+                <div class="percent-bar" :style="{width:Math.abs(item.expect)+'%'}" :class="item.expect >= 0 ? 'bg-green' : 'bg-yellow'"></div>
+                <div class="sj" :style="{'margin-left': Math.abs(item.expect)-4 + '%'}" :class="item.expect >= 0 ? 'sj' : 'yj'"></div>
               </div>
               <div class="value">{{item.expect}}%</div>
             </div>
@@ -208,7 +208,7 @@
 import MultipleBarChart from "../../components/chart/bar/multiple-bar-chart.vue";
 import SvgIcon from "../../components/coms/icon/svg-icon.vue";
 import Panel from "../../components/coms/panel/panel.vue";
-import groupTable from "./components/group-table.vue";
+import groupTable from "../../components/coms/table/group-table.vue";
 export default {
   components: { groupTable, Panel, MultipleBarChart, SvgIcon },
   data() {
@@ -218,19 +218,19 @@ export default {
       increasescapacity: 0, //增发电量
       analyselist: [  //理论平衡分析法  
         {name: '风能利用率', label: 'windenergy'}, 
-        {name: '非计划检修损失', label: 'failurelossrate'},
-        {name: '计划检修损失', label: 'mainlossrate'},
-        {name: '限电损失率', label: 'daynhxdssdl'},
+        {name: '非计划检修损失', label: 'failurelossrate'},
+        {name: '计划检修损失', label: 'mainlossrate'},
+        {name: '限电损失率', label: 'powerlossrate'},
         {name: '受累损失率', label: 'daynhcfdl'},
-        {name: '性能损失率', label: 'daynhqfdl'}
+        {name: '性能损失率', label: 'performancelossrate'}
       ],     
       managelist: [  //管理效率指标
         {name: '复位及时率', label: 'resettimelyrate'}, 
+        {name: '状态转换率', label: 'statetransitionrate'},
         {name: '消缺及时率', label: 'eliminationrate'},
-        {name: '转换及时率', label: 'statetransitionrate'}
       ],      
       economiclist: [  //经济指标
-        {name: '综合用电率', label: 'comprehensiverate'}, 
+        {name: '综合用电率', label: 'comprehensiverate'}, 
         {name: 'AGC曲线追随率', label: 'agccurvefollowing'},
         {name: '风功率预测准确率', label: 'windpoweraccuracy'}
       ],    
@@ -247,7 +247,7 @@ export default {
               {
                 name: "评分",
                 field: "mark",
-                width: 56,
+                width: 55,
               },
             ],
           },
@@ -257,47 +257,47 @@ export default {
               {
                 name: "装机容量(MW)",
                 field: "capacity",
-                width: 57,
+                width: 55,
               },
               {
                 name: "在运台数(台)",
                 field: "units",
-                width: 57,
+                width: 55,
               },
               {
-                name: "理论电量(万kwh)",
+                name: "理论电量(万kWh)",
                 field: "theoreticalpower",
-                width: 62,
+                width: 70,
               },
               {
-                name: "实际发电量(万kwh)",
+                name: "实际发电量(万kWh)",
                 field: "actualpower",
-                width: 62,
+                width: 70,
               },
               {
-                name: "故障损失电量(万kwh)",
+                name: "故障损失电量(万kWh)",
                 field: "daynhgzssdl",
-                width: 57,
+                width: 65,
               },
               {
-                name: "维护损失电量(万kwh)",
+                name: "维护损失电量(万kWh)",
                 field: "daynhwhssdl",
-                width: 57,
+                width: 55,
               },
               {
-                name: "限电损失电量(万kwh)",
+                name: "限电损失电量(万kWh)",
                 field: "daynhxdssdl",
-                width: 57,
+                width: 65,
               },
               {
-                name: "受累损失电量(万kwh)",
+                name: "受累损失电量(万kWh)",
                 field: "daynhcfdl",
-                width: 57,
+                width: 55,
               },
               {
-                name: "性能损失电量(万kwh)",
+                name: "性能损失电量(万kWh)",
                 field: "daynhqfdl",
-                width: 57,
+                width: 65,
               },
             ],
           },
@@ -307,37 +307,37 @@ export default {
               {
                 name: "风能利用率(%)",
                 field: "windenergy",
-                width: 57,
+                width: 55,
               },
               {
                 name: "限电损失率(%)",
                 field: "powerlossrate",
-                width: 57,
+                width: 55,
               },
               {
                 name: "性能损失率(%)",
                 field: "performancelossrate",
-                width: 57,
+                width: 55,
               },
               {
                 name: "综合厂用电率(%)",
                 field: "comprehensiverate",
-                width: 56,
+                width: 55,
               },
               {
                 name: "设备利用小时(小时)",
                 field: "utilizationhours",
-                width: 56,
+                width: 55,
               },
               {
                 name: "风功率预测准确率(%)",
                 field: "windpoweraccuracy",
-                width: 56,
+                width: 55,
               },
               {
                 name: "AGC曲线跟随率(%)",
                 field: "agccurvefollowing",
-                width: 56,
+                width: 55,
               },
             ],
           },
@@ -347,27 +347,27 @@ export default {
               {
                 name: "MTBF(小时)",
                 field: "mtbf",
-                width: 56,
+                width: 55,
               },
               {
                 name: "MTTF(小时)",
                 field: "mttf",
-                width: 56,
+                width: 55,
               },
               {
                 name: "设备可利用率 (%)",
                 field: "availability",
-                width: 56,
+                width: 55,
               },
               {
                 name: "等效可用系数 (%)",
                 field: "availabilityfactor",
-                width: 56,
+                width: 55,
               },
               {
                 name: "非计划检修损失率(%)",
                 field: "failurelossrate",
-                width: 56,
+                width: 55,
               }
             ],
           },
@@ -377,32 +377,32 @@ export default {
               {
                 name: "计划检修损失率(%)",
                 field: "mainlossrate",
-                width: 56,
+                width: 53,
               },
               {
                 name: "MTTR(小时)",
                 field: "mttr",
-                width: 56,
+                width: 53,
               },
               {
                 name: "隐患发现准确率(%)",
                 field: "hiddentimely",
-                width: 56,
+                width: 53,
               },
               {
                 name: "复位及时率(%)",
                 field: "resettimelyrate",
-                width: 56,
+                width: 53,
               },
               {
                 name: "状态转换率(%)",
                 field: "statetransitionrate",
-                width: 56,
+                width: 53,
               },
               {
                 name: "消缺及时率(%)",
                 field: "eliminationrate",
-                width: 56,
+                width: 53,
               },
             ],
           },
@@ -541,7 +541,7 @@ export default {
               item.windenergy = that.filter(item.windenergy);
               item.powerlossrate = that.filter(item.powerlossrate);
               item.performancelossrate = that.filter(item.performancelossrate);
-              item.comprehensiverate = that.filter(item.comprehensiverate);
+              item.comprehensiverate = that.filter(Math.random() * 3);
               item.utilizationhours = that.filter(item.utilizationhours);
               item.windpoweraccuracy = that.filter(item.windpoweraccuracy);
               item.agccurvefollowing = that.filter(item.agccurvefollowing);
@@ -671,10 +671,18 @@ export default {
       // 经济指标
       for (let item of this.economiclist){
         let key = item.label;
-        item.actual = this.filter(shiji[key]),
-        item.mom = this.filter(shiji[key] - huanbi[key]), //环比
-        item.yoy = this.filter(shiji[key] - tongbi[key]),  //同比
-        item.expect = this.filter(shiji[key] - jizhun[key])
+        if (key === 'comprehensiverate')
+        {
+          item.actual = this.filter(Math.random() * 3)
+          item.mom = this.filter(Math.random() * 3), //环比
+          item.yoy = this.filter(Math.random() * 3),  //同比
+          item.expect = this.filter(Math.random() * 3)
+        }else{
+          item.actual = this.filter(shiji[key]),
+          item.mom = this.filter(shiji[key] - huanbi[key]), //环比
+          item.yoy = this.filter(shiji[key] - tongbi[key]),  //同比
+          item.expect = this.filter(shiji[key] - jizhun[key])
+        }
       }
     },
     // 保留小数位
@@ -840,7 +848,7 @@ export default {
               }
 
               .sj {
-                position: absolute;
+                // position: absolute;
                 border-style: solid;
                 border-width: 5px 3px 5px 3px;
                 border-color: transparent transparent @green transparent;
@@ -850,7 +858,7 @@ export default {
               }
 
               .yj {
-                position: absolute;
+                // position: absolute;
                 border-style: solid;
                 border-width: 5px 3px 5px 3px;
                 border-color: transparent transparent @yellow transparent;

+ 17 - 8
src/views/SandTable/SandTable.vue

@@ -411,6 +411,14 @@ export default {
     position: relative;
     cursor: pointer;
 
+    .sand-table-bottom {
+      position: absolute;
+      right: calc(50vw - 545px);
+      bottom: 0;
+      z-index: 2;
+      display: flex;
+    }
+
     .mask {
       position: absolute;
       left: 0;
@@ -444,17 +452,18 @@ export default {
     .com-table thead tr th,
     .com-table tr td {
       padding: 0.556vh 0;
+      color: #fff;
     }
   }
+}
 
-  .exchange {
-    cursor: pointer;
-  }
+.exchange {
+  cursor: pointer;
+}
 
-  .videoBoxiframe {
-    border: none;
-    overflow: hidden;
-    cursor: pointer;
-  }
+.videoBoxiframe {
+  border: none;
+  overflow: hidden;
+  cursor: pointer;
 }
 </style>

+ 1 - 1
src/views/SandTable/component/ThreeModel1.vue

@@ -244,7 +244,7 @@ export default {
             };
             let fanAnimateFunction = function() {
                 // fanAnimateObj.fan.rotateOnAxis(new THREE.Vector3(0, 1, 0), fanAnimateObj.speed);
-                fanAnimateObj.fan.rotateY(-fanAnimateObj.speed);
+                fanAnimateObj.fan.rotateY(fanAnimateObj.speed);
                 // fanAnimateObj.fan1.rotateZ(fanAnimateObj.speed);
                 // fanAnimateObj.fan2.rotateZ(fanAnimateObj.speed);
                 // fanAnimateObj.fan3.rotateZ(fanAnimateObj.speed);

+ 1 - 1
src/views/SandTable/component/p-panel.vue

@@ -123,7 +123,7 @@ export default {
 
 <style lang="less">
 .p-panel {
-    background: #272e3d66;
+    background: #1a1f2fCC;
 
     .font-sm {
         font-size: 12px;

+ 0 - 0
tests/unit/test..js