whychw
2020-10-10 8407ef29c969fc9da07151fd0fbc2d7650bca764
U 电机页面修改温度计  修复通讯状态灯Bug
4个文件已修改
169 ■■■■ 已修改文件
src/components/Circuit.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/GTemp.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/main.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/motor/index.vue 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Circuit.vue
@@ -134,7 +134,9 @@
      ctx.fillRect(152, 227, 493, 22);
      ctx.fillStyle = '#fff';
      // ctx.fillRect(420, 196, 50, 80);
      ctx.fillText('加载电机', 620, 200);
      // ctx.fillText('加载电机', 620, 200);
      ctx.fillText('加载电机', 698, 292);
      ctx.fillText('齿轮箱', 444, 292);
      ctx.fillText('受试电机', 90, 292);
      ctx.fillText('运行', 30, 160);
src/components/GTemp.vue
@@ -33,17 +33,22 @@
            type: Object,
            default: () => {
                return {
                    low: '#CB8921',
                    // low: '#cb8921',
                    normal: 'green',
                    hight: 'red'
                    hight: '#ea9500',
                    mal: 'red'
                }
            }
        },
        lowLimit: {
        /*lowLimit: {
            type: Number,
            default: 60
        },
            default: -20
        },*/
        highLimit: {
            type: Number,
            default: 80
        },
        malLimit: {
            type: Number,
            default: 300
        }
@@ -136,8 +141,8 @@
            let ctx = can.getContext('2d');
            let color = '';
            if (value <= this.lowLimit) {
                color = this.limitColor.low;
            if (value >= this.malLimit) {
                color = this.limitColor.mal;
            } else if (value >= this.highLimit) {
                color = this.limitColor.hight;
            } else {
@@ -210,6 +215,32 @@
            ctx.restore();
            /**
             * 画告警标线
             */
            ctx.save();
            const highLimit = (this.highLimit - this.min) / this.range * this.extent;
            const malLimit = (this.malLimit - this.min) / this.range * this.extent;
            ctx.translate(50, 484 - 40 * Math.cos(30 * Math.PI / 180));
            ctx.fillStyle = this.limitColor.hight;
            ctx.beginPath();
            ctx.moveTo(0, - highLimit);
            ctx.lineTo(-25, - highLimit);
            ctx.lineTo(-25, - highLimit - 6);
            ctx.lineTo(-10, - highLimit - 6);
            ctx.closePath();
            ctx.fill();
            ctx.fillStyle = this.limitColor.mal;
            ctx.beginPath();
            ctx.moveTo(0, - malLimit);
            ctx.lineTo(-25, - malLimit);
            ctx.lineTo(-25, - malLimit - 6);
            ctx.lineTo(-10, - malLimit - 6);
            ctx.closePath();
            ctx.fill();
            ctx.restore();
            /**
             * 画读数
             */
            ctx.save();
src/views/main.vue
@@ -103,14 +103,18 @@
              break;
            case 'load':
              reg = /^10/;
              is_water = false;
              break;
            case 'rectifier':
              reg = /^40/;
              is_water = false;
              break;
            case 'chargepower':
              is_water = false;
              reg = /^60/;
              break;
            case 'motor':
              is_water = false;
              reg = /^20/;
              break;
          }
src/views/motor/index.vue
@@ -63,21 +63,33 @@
        <div class="flex_footer">
          <div class="temp_grp">
            <div class="temp_grp_inner temp_grp_1">
              <div v-for="(item, index) in GList" class="item" :key="index">
                <g-temp :ref="'G_temp_' + index"
                  :fixedSize="true"
                  :max="210"
                  :info="item.info"
                  ></g-temp>
              <div class="temp_title">齿轮箱</div>
              <div class="temp_list">
                <div v-for="(item, index) in GList" class="item" :key="index">
                  <g-temp :ref="'G_temp_' + index"
                    :fixedSize="true"
                    :max="item.max"
                    :min="item.min"
                    :high-limit="item.highLimit"
                    :mal-limit="item.malLimit"
                    :info="item.info"
                    ></g-temp>
                </div>
              </div>
            </div>
            <div class="temp_grp_inner temp_grp_2">
              <div v-for="(item, index) in GList2" class="item" :key="'li_' + index">
                <g-temp :ref="'G_temp2_' + index"
                  :info="item.info"
                  :max="160"
                  :fixedSize="true"
                  ></g-temp>
              <div class="temp_title">加载电机</div>
              <div class="temp_list">
                <div v-for="(item, index) in GList2" class="item" :key="'li_' + index">
                  <g-temp :ref="'G_temp2_' + index"
                    :info="item.info"
                    :max="item.max"
                    :min="item.min"
                    :high-limit="item.highLimit"
                    :mal-limit="item.malLimit"
                    :fixedSize="true"
                    ></g-temp>
                </div>
              </div>
            </div>
          </div>
@@ -401,48 +413,100 @@
      
      GList: [
        {
          info: '齿轮箱轴承温度1'
          info: '轴承温度1'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 85
          ,malLimit: 90
        }, {
          info: '齿轮箱轴承温度2'
          info: '轴承温度2'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 85
          ,malLimit: 90
        }, {
          info: '齿轮箱轴承温度3'
          info: '轴承温度3'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 85
          ,malLimit: 90
        }, {
          info: '齿轮箱轴承温度4'
          info: '轴承温度4'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 85
          ,malLimit: 90
        }, {
          info: '齿轮箱轴承温度5'
          info: '轴承温度5'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 85
          ,malLimit: 90
        }, {
          info: '齿轮箱轴承温度6'
          info: '轴承温度6'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 85
          ,malLimit: 90
        }
      ],
      GList2: [
        {
          info: '电机水冷进水风温'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 60
          ,malLimit: 70
        }, {
          info: '电机水冷出水风温'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 60
          ,malLimit: 70
        },
        {
          info: '绕组温度U1'
          ,value: 0
          ,min: -5
          ,max: 180
          ,highLimit: 130
          ,malLimit: 145
        }, {
          info: '绕组温度V1'
          ,value: 0
          ,min: -5
          ,max: 180
          ,highLimit: 130
          ,malLimit: 145
        }, {
          info: '绕组温度W1'
          ,value: 0
          ,min: -5
          ,max: 180
          ,highLimit: 130
          ,malLimit: 145
        }, {
          info: 'DE轴承温度'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 90
          ,malLimit: 95
        }, {
          info: 'NDE轴承温度'
          ,value: 0
          ,min: -5
          ,max: 100
          ,highLimit: 90
          ,malLimit: 95
        }
      ],
      nowInfo: {
@@ -1631,7 +1695,18 @@
  .temp_grp_inner {
    display: -webkit-flex;
    display: flex;
    border: 2px #15e3f3 solid;
    flex-direction: column;
    /*border: 2px #15e3f3 solid;*/
    border: 2px #053134 solid;
  }
  .temp_title {
    border-bottom: 1px #053134 solid;
    padding: 10px;
  }
  .temp_list {
    flex: 1;
    display: -webkit-flex;
    display: flex;
  }
  .temp_grp_1 {
    flex: 6.4;
@@ -1652,7 +1727,8 @@
    top: 0;
    height: 100%;
    width: 1px;
    background: #15e3f3;
    /*background: #15e3f3;*/
    background: #053134;
  }
  .tool_bar {
    padding: .1rem .2rem;