whychdw
2021-10-12 aa78e9f60766a149a7a0b9655073d6b27378da41
内容提交
8个文件已修改
290 ■■■■ 已修改文件
src/assets/js/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/const/const_61850.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/realTime.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/PageHeader.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chartMapSetting/addChartMap.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/alarmMager/devicepaSetting.vue 135 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataMager/produceTotal.vue 90 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/realTime.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/config.js
@@ -44,6 +44,6 @@
    bigScreen: {
        label: '大屏数据展示',
        des: '首页显示大屏展示',
        value: false,
        value: true,
    },
};
src/assets/js/const/const_61850.js
@@ -165,7 +165,16 @@
            unit: "V",
            notShow: true,
            show: false
        }
        },
        {
            id: 110,
            name: "xuHang",
            type: "",
            icon: "",
            text: "预估续航时长:",
            value: "???",
            show: true
        },
    ],
    historyStateList: [
        {
src/assets/js/realTime.js
@@ -179,6 +179,23 @@
        data: "json=" + JSON.stringify(searchParams)
    });
}
/**
 * 查询续航时长
 * @param devId
 * @returns {AxiosPromise}
 */
export const realTimeXuHang = (devId) => {
    // 查询后台
    return axios({
        method: "post",
        url: "BattEnduranceAction!getEnduranceTimeByDeviceId",
        data: "json=" + JSON.stringify({
            deviceId: devId,
        })
    });
}
/**
 * 获取设备的逆变信息
 * @param dev_id    设备id
src/components/PageHeader.vue
@@ -812,9 +812,9 @@
        case "endure":
          message.params = {
            pageInfo: {
              label: "电池续航能力历史查询",
              name: "endure",
              src: "#/reportStatistics/endure",
              label: "电池信息统计分析",
              name: 'produceTotal',
              src: "#/dataMager/produceTotal",
              closable: true,
            }
          };
src/components/chartMapSetting/addChartMap.vue
@@ -1,5 +1,5 @@
<template>
  <div class="params-dialog">
  <div class="params-dialog white-bg">
    <el-form ref="ruleForm" size="mini" label-position="top" :model="params" :rules="rules">
      <el-row :gutter="layout.gutter">
        <el-col :span="layout.span">
@@ -415,4 +415,7 @@
.params-dialog {
  padding: 15px;
}
.white-bg {
  background-color: #FFFFFF;
}
</style>
src/pages/alarmMager/devicepaSetting.vue
@@ -57,71 +57,73 @@
        <!-- 修改 -->
        <el-dialog title="提示" width="35%" :visible.sync="dialogVisible">
            <el-form size="mini" :model="form" label-position="top" class="params-dialog">
                <div class="table-layout">
                    <div class="table-row">
                        <div class="table-cell ar16 a22">
                            <el-form-item label="告警ID">
                                <el-input v-model="form.UShenFenId" disabled></el-input>
                            </el-form-item>
                        </div>
                        <div class="table-cell ar16">
                            <el-form-item label="告警名称" prop="FbsDeviceIp_YM">
                                <el-input v-model="form.names" disabled></el-input>
                            </el-form-item>
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell ar16 a22">
                            <el-form-item label="告警上限系数值(0,0-30.0)">
                                <el-input v-model="form.UEmployeeId"></el-input>
                            </el-form-item>
                        </div>
                        <div class="table-cell ar16">
                            <el-form-item label="告警上限等级(1-4)">
                                <el-select placeholder="2" v-model="form.UTelephone">
                                    <el-option label="1" value="1"></el-option>
                                    <el-option label="2" value="2"></el-option>
                                    <el-option label="3" value="3"></el-option>
                                    <el-option label="4" value="4"></el-option>
                                </el-select>
                            </el-form-item>
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell ar16 a22">
                            <el-form-item label="告警下限系数值(0,0-30.0)" prop="MonCount">
                                <el-input v-model="form.alramDown"></el-input>
                            </el-form-item>
                        </div>
                        <div class="table-cell ar16">
                            <el-form-item label="告警下限等级(1-4)">
                                <el-select placeholder="2" v-model="form.UMobDown">
                                    <el-option label="1" value="1"></el-option>
                                    <el-option label="2" value="2"></el-option>
                                    <el-option label="3" value="3"></el-option>
                                    <el-option label="4" value="4"></el-option>
                                </el-select>
                            </el-form-item>
                        </div>
                    </div>
                    <div class="table-row">
                        <div class="table-cell ar16">
                            <el-form-item label="告警上限使能">
                                <input :checked="form.alm_high_en == 1?'checked':''" v-model="form.alm_high_en" type="checkbox" />
                            </el-form-item>
                        </div>
                        <div class="table-cell ar16">
                            <el-form-item label="告警下限使能">
                                <input :checked="form.alm_low_en == 1?'checked':''" v-model="form.alm_low_en" type="checkbox" />
                            </el-form-item>
                        </div>
                        <div class="form-footer">
                            <three-btn @click="editUser" class="text">确定</three-btn>
                        </div>
                    </div>
                </div>
            </el-form>
      <div class="dialog-container white-bg">
        <el-form size="mini" :model="form" label-position="top" class="params-dialog">
          <div class="table-layout">
            <div class="table-row">
              <div class="table-cell ar16 a22">
                <el-form-item label="告警ID">
                  <el-input v-model="form.UShenFenId" disabled></el-input>
                </el-form-item>
              </div>
              <div class="table-cell ar16">
                <el-form-item label="告警名称" prop="FbsDeviceIp_YM">
                  <el-input v-model="form.names" disabled></el-input>
                </el-form-item>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell ar16 a22">
                <el-form-item label="告警上限系数值(0,0-30.0)">
                  <el-input v-model="form.UEmployeeId"></el-input>
                </el-form-item>
              </div>
              <div class="table-cell ar16">
                <el-form-item label="告警上限等级(1-4)">
                  <el-select placeholder="2" v-model="form.UTelephone">
                    <el-option label="1" value="1"></el-option>
                    <el-option label="2" value="2"></el-option>
                    <el-option label="3" value="3"></el-option>
                    <el-option label="4" value="4"></el-option>
                  </el-select>
                </el-form-item>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell ar16 a22">
                <el-form-item label="告警下限系数值(0,0-30.0)" prop="MonCount">
                  <el-input v-model="form.alramDown"></el-input>
                </el-form-item>
              </div>
              <div class="table-cell ar16">
                <el-form-item label="告警下限等级(1-4)">
                  <el-select placeholder="2" v-model="form.UMobDown">
                    <el-option label="1" value="1"></el-option>
                    <el-option label="2" value="2"></el-option>
                    <el-option label="3" value="3"></el-option>
                    <el-option label="4" value="4"></el-option>
                  </el-select>
                </el-form-item>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell ar16">
                <el-form-item label="告警上限使能">
                  <input :checked="form.alm_high_en == 1?'checked':''" v-model="form.alm_high_en" type="checkbox" />
                </el-form-item>
              </div>
              <div class="table-cell ar16">
                <el-form-item label="告警下限使能">
                  <input :checked="form.alm_low_en == 1?'checked':''" v-model="form.alm_low_en" type="checkbox" />
                </el-form-item>
              </div>
              <div class="form-footer">
                <three-btn @click="editUser" class="text">确定</three-btn>
              </div>
            </div>
          </div>
        </el-form>
      </div>
        </el-dialog>
    </flex-layout>
</template>
@@ -520,4 +522,7 @@
            bottom: 5px;
        }
    }
  .white-bg {
    background-color: #FFFFFF;
  }
</style>
src/pages/dataMager/produceTotal.vue
@@ -82,6 +82,16 @@
                    :width="header.width" :min-width="header.minWidth"
                    :sortable="header.sortable"
                    align="center"></el-table-column>
                <el-table-column
                    fixed="right"
                    label="操作"
                    width="150"
                    align="center">
                  <template slot-scope="scope">
                    <el-button @click="goRealTime(scope.row)" type="primary" size="mini">实时</el-button>
                    <el-button @click="goHistory(scope.row)" type="success" size="mini">历史</el-button>
                  </template>
                </el-table-column>
              </el-table>
            </flex-layout>
        </div>
@@ -187,14 +197,8 @@
                    {
                        prop: "BattInUseDate",
                        label: "投入使用日期",
                        minWidth: 160,
                        minWidth: 180,
                        sortable: false,
                    },
                    {
                      prop: "groupcount",
                      label: "电池组数",
                      minWidth: 80,
                      sortable: false,
                    },
                    {
                        prop: "batts_moncapstd",
@@ -211,10 +215,15 @@
                    {
                      prop: "endurance_actual_timelong",
                      label: "续航时长(时:分:秒)",
                      minWidth: 160,
                      minWidth: 180,
                      sortable: true,
                    },
                    {
                      prop: "groupcount",
                      label: "电池组数",
                      minWidth: 80,
                      sortable: false,
                    },
                ],
                data: []
            },
@@ -293,10 +302,28 @@
              },
              {
                key: 4,
                label: "3小时以上",
                label: "3-5小时",
                value: 4,
                range: {
                  min: 3,
                  max: 5,
                },
              },
              {
                key: 5,
                label: "5-8小时",
                value: 5,
                range: {
                  min: 5,
                  max: 8,
                },
              },
              {
                key: 6,
                label: "8小时以上",
                value: 6,
                range: {
                  min: 8,
                  max: Infinity,
                },
              },
@@ -427,13 +454,18 @@
        searchEndurance() {
          this.$apis.dataMager.produceTotal.searchXuHang().then(res=>{
            let rs = JSON.parse(res.data.result);
            let data = [['1小时内', 0], ['1-2小时', 0], ['2-3小时', 0], ['3小时以上', 0]];
            let data = [
                ['1小时内', 0], ['1-2小时', 0], ['2-3小时', 0],
                ['3-5小时', 0], ['5-8小时', 0], ['8小时以上', 0]
            ];
            if(rs.code == 1) {
              data[0][1] = rs.data['续航1小时内'];
              data[1][1] = rs.data['续航1小时到2小时'];
              data[2][1] = rs.data['续航2小时到3小时'];
              data[3][1] = rs.data['续航3小时以上'];
              data[3][1] = rs.data['续航3小时到5小时'];
              data[4][1] = rs.data['续航5小时到8小时'];
              data[5][1] = rs.data['续航8小时以上'];
            }
            enduranceOption.series[0].data = data;
@@ -526,6 +558,40 @@
            };
            return tmp;
          })
        },
        // 跳转到历史数据
        goHistory(data) {
          let search = this.getSearch(data.StationName);
          window.parent.postMessage({
            cmd: "syncPage",
            params: {
              pageInfo: {
                label: "历史数据",
                name: "history",
                src: "#/history" + search,
                closable: true
              }
            }
          }, "*");
        },
        // 跳转到实时数据
        goRealTime(data) {
          let search = this.getSearch(data.StationName);
          window.parent.postMessage({
            cmd: "syncPage",
            params: {
              pageInfo: {
                label: "实时监控",
                name: "movingRingSysteRrealTime",
                src: "#/moving-ring-system" + search,
                closable: true
              }
            }
          }, "*");
        },
        getSearch(stationName) {
          let list = stationName.split('-');
          return '?province=' + list[0] + '&city=' + list[1] + '&county=' + list[2] + '&home=' + list[3]
        }
    },
    computed: {
src/pages/dataTest/realTime.vue
@@ -815,7 +815,7 @@
  realTimeNot,
  realTimeAdd,
  BattRtAlarmActionGetInfo,
  BattRsAlarmActionGetInfo,
  BattRsAlarmActionGetInfo, realTimeXuHang,
} from "../../assets/js/realTime";
import {
  realTimeSearch,
@@ -1660,6 +1660,7 @@
      this.batt = data;
      this.diagram.desc = "";
      this.realTimeAlarmss();
      this.realTimeXuHang();    // 预估续航时长
      this.diagram.devType = getDevType(data.chargeType, data.buscoupleState);
      this.esVideoSn = data.videoUrl;
      this.table.headers = getTblHeader(data.FBSDeviceId);
@@ -1833,6 +1834,9 @@
      this.setStateList("stopReason", "未知");
      // 操作失败原因
      this.setStateList("failReason", "未知");
      // 预估续航时长
      //this.setStateList("xuHang", "???");
      // 显示遮罩层
      this.maskShow = true;
    },
@@ -2506,7 +2510,7 @@
        });
    },
    getStateById(id, list) {
      let result = false;
      let result = true;
      for (let i = 0; i < list.length; i++) {
        let item = list[i];
        if (id == item.id) {
@@ -2613,6 +2617,22 @@
          console.log(error);
        });
    },
    realTimeXuHang() {
      let batt = this.batt;
      realTimeXuHang(batt.FBSDeviceId).then(res=>{
        let rs = JSON.parse(res.data.result);
        if(rs.data == -1) {
          // 预估续航时长
          this.setStateList("xuHang", "???");
        }else {
          // 预估续航时长
          this.setStateList("xuHang", formatSeconds(rs.data*60));
        }
      }).catch(error=>{
        // 预估续航时长
        this.setStateList("xuHang", "???");
      })
    },
    // 逆变信息
    inversionInfo() {
      let batt = this.batt;