| | |
| | | } |
| | | |
| | | .el-science-blue .hdw-badge-btn { |
| | | background: url("./img//science-black/science-head-tag.png") 0 0 no-repeat; |
| | | background: url("./img/science-black/science-head-tag.png") 0 0 no-repeat; |
| | | background-size: 100% 100%; |
| | | color: #ffffff; |
| | | padding-top: 6px; |
| | |
| | | border: none; |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .el-popover.el-popper.light-popover { |
| | | background-color: #0b388a; |
| | | padding: 8px 16px; |
| | | } |
| | | .el-popper.light-popover[x-placement^=right] .popper__arrow::after { |
| | | border-right-color: #0b388a; |
| | | } |
| | | .el-popper.light-popover[x-placement^=right] .popper__arrow { |
| | | border-right-color: #0b388a; |
| | | } |
| | | |
| | | .el-popper.light-popover[x-placement^=left] .popper__arrow { |
| | | border-left-color: #0b388a; |
| | | } |
| | | .el-popper.light-popover[x-placement^=left] .popper__arrow::after { |
| | | border-left-color: #0b388a; |
| | | } |
| | |
| | | border: none; |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .el-popover.el-popper.light-popover { |
| | | background-color: #0b388a; |
| | | padding: 8px 16px; |
| | | } |
| | | .el-popper.light-popover[x-placement^=right] .popper__arrow::after { |
| | | border-right-color: #0b388a; |
| | | } |
| | | .el-popper.light-popover[x-placement^=right] .popper__arrow { |
| | | border-right-color: #0b388a; |
| | | } |
| | | |
| | | .el-popper.light-popover[x-placement^=left] .popper__arrow { |
| | | border-left-color: #0b388a; |
| | | } |
| | | .el-popper.light-popover[x-placement^=left] .popper__arrow::after { |
| | | border-left-color: #0b388a; |
| | | } |
| | |
| | | color: #041f6c; |
| | | border: none; |
| | | padding: 0 8px; |
| | | } |
| | | |
| | | .el-popover.el-popper.light-popover { |
| | | background-color: #0b388a; |
| | | padding: 8px 16px; |
| | | } |
| | | .el-popper.light-popover[x-placement^=right] .popper__arrow::after { |
| | | border-right-color: #0b388a; |
| | | } |
| | | .el-popper.light-popover[x-placement^=right] .popper__arrow { |
| | | border-right-color: #0b388a; |
| | | } |
| | | |
| | | .el-popper.light-popover[x-placement^=left] .popper__arrow { |
| | | border-left-color: #0b388a; |
| | | } |
| | | .el-popper.light-popover[x-placement^=left] .popper__arrow::after { |
| | | border-left-color: #0b388a; |
| | | } |
| | |
| | | function getDCDCWarnParams() { |
| | | let list = [ |
| | | { |
| | | key: 'dev_id', |
| | | key: 'devId', |
| | | label: '设备ID', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'bms_idx', |
| | | key: 'bmsIdx', |
| | | label: '信息索引', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'op_cmd', |
| | | key: 'opCmd', |
| | | label: '命令控制', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'data_flag', |
| | | key: 'dataFlag', |
| | | label: '', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'pack_pos', |
| | | key: 'packPos', |
| | | label: '上位机需要获取的pack组位置', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'monomer_cnt', |
| | | key: 'monomerCnt', |
| | | label: '单体电池数量', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'temp_cnt', |
| | | key: 'tempCnt', |
| | | label: '电芯温度数量', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'env_temp_alm', |
| | | key: 'envTempAlm', |
| | | label: '环境温度', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'mos_temp_alm', |
| | | key: 'mosTempAlm', |
| | | label: 'MOS管温度', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'current_alm', |
| | | key: 'currentAlm', |
| | | label: '电流', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'sum_vol_alm', |
| | | key: 'sumVolAlm', |
| | | label: '总压', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'user_def_cnt', |
| | | key: 'userDefCnt', |
| | | label: '自定义告警数量', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'junheng_event_code', |
| | | key: 'junhengEventCode', |
| | | label: '均衡事件', |
| | | value: 0, |
| | | list: [], |
| | | }, |
| | | { |
| | | key: 'vol_event_code', |
| | | key: 'volEventCode', |
| | | label: '电压事件', |
| | | value: 0, |
| | | list: [], |
| | | }, |
| | | { |
| | | key: 'temp_event_code', |
| | | key: 'tempEventCode', |
| | | label: '温度事件', |
| | | value: 0, |
| | | list: [], |
| | | }, |
| | | { |
| | | key: 'curr_event_code', |
| | | key: 'currEventCode', |
| | | label: '电流事件', |
| | | value: 0, |
| | | list: [], |
| | | }, |
| | | { |
| | | key: 'rest_cap_alm', |
| | | key: 'restCapAlm', |
| | | label: '剩余容量告警', |
| | | value: 0, |
| | | }, |
| | | { |
| | | key: 'fet_state_code', |
| | | key: 'fetStateCode', |
| | | label: 'FET状态', |
| | | value: 0, |
| | | list: [], |
| | | }, |
| | | { |
| | | key: 'junheng_state_code', |
| | | key: 'junhengStateCode', |
| | | label: '均衡状态', |
| | | value: 0, |
| | | list: [], |
| | | }, |
| | | { |
| | | key: 'sys_state_code', |
| | | key: 'sysStateCode', |
| | | label: '系统状态', |
| | | value: 0, |
| | | list: [], |
| | |
| | | // 单体电压告警 |
| | | for (let i = 1; i < 17; i++) { |
| | | list.push({ |
| | | key: 'mon_vol_alm' + i, |
| | | label: '单体' + i + '电压告警', |
| | | value: 0 |
| | | key: 'monVolAlm' + i, |
| | | label: '单体' + i + '电压', |
| | | value: -1 |
| | | }); |
| | | } |
| | | |
| | | // 电芯温度告警 |
| | | for (let i = 1; i < 5; i++) { |
| | | list.push({ |
| | | key: 'mon_tmp_alm' + i, |
| | | label: '单体' + i + '电芯温度告警', |
| | | value: 0 |
| | | key: 'monTmpAlm' + i, |
| | | label: '单体' + i + '电芯温度', |
| | | value: -1 |
| | | }); |
| | | } |
| | | |
| | |
| | | params[item.key] = item.value; |
| | | }); |
| | | return { |
| | | |
| | | list, |
| | | params, |
| | | }; |
| | | } |
| | | |
| | |
| | | <template> |
| | | <div class="inline-block-box"> |
| | | <hdw-light-input :text="text" :type="type"></hdw-light-input> |
| | | </div> |
| | | <el-popover |
| | | :disabled="isDisabled" |
| | | placement="right" |
| | | popper-class="light-popover" |
| | | width="360" |
| | | trigger="focus"> |
| | | <el-row :gutter="8"> |
| | | <el-col |
| | | :span="12" |
| | | v-for="(item, key) in list" :key="'key'+key"> |
| | | <div class="inline-block-box"> |
| | | <hdw-light-input :text="item.label" :type="item.value"></hdw-light-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div slot="reference" class="inline-block-box"> |
| | | <hdw-light-input |
| | | :text="text" |
| | | :type="totalType"></hdw-light-input> |
| | | </div> |
| | | </el-popover> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | text: { |
| | | type: String, |
| | | default: "", |
| | | } |
| | | }, |
| | | list: { |
| | | type: Array, |
| | | default() { |
| | | return [] |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | methods: {}, |
| | | computed: {}, |
| | | computed: { |
| | | isDisabled() { |
| | | return (this.list.length == 0 || this.list.length==1)?true:false; |
| | | }, |
| | | totalType() { |
| | | let list = this.list; |
| | | let type = -1; |
| | | for(let i=0; i<list.length; i++) { |
| | | let item = list[i]; |
| | | // 设置红灯 |
| | | if(item.value == 1) { |
| | | type = 1; |
| | | break; |
| | | } |
| | | |
| | | // 设置绿灯 |
| | | if(item.value == 0) { |
| | | type = 0; |
| | | } |
| | | } |
| | | return type; |
| | | } |
| | | }, |
| | | mounted() { |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | <div class="layout-content"> |
| | | <div class="mon-vol-bar"> |
| | | <flex-box title="单体电压" size="mini"> |
| | | <el-select v-model="group" slot="tools" size="mini"> |
| | | <el-option :value="0" label="组1"></el-option> |
| | | <el-option :value="1" label="组2"></el-option> |
| | | <el-option :value="2" label="组3"></el-option> |
| | | <el-option :value="3" label="组4"></el-option> |
| | | </el-select> |
| | | <divide-bar ref="monVol" name="单体电压" unit="V"></divide-bar> |
| | | </flex-box> |
| | | </div> |
| | |
| | | <div class="warn-content"> |
| | | <el-row :gutter="8"> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="单体电压"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="单体电压" :list="monVolWarn"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="电芯温度"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="电芯温度" :list="monTempWarn"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="环境温度"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="环境温度" :list="envTempAlm"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="MOS管温度"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="MOS管温度" :list="mosTempAlm"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="电流告警"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="电流告警" :list="currentAlm"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="总压告警"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="总压告警" :list="sumVolAlm"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="均衡事件"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="均衡事件" :list="junhengEventCode"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="电压事件"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="电压事件" :list="volEventCode"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="温度事件"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="温度事件" :list="tempEventCode"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="电流事件"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="电流事件" :list="currEventCode"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="剩余容量"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="剩余容量" :list="restCapAlm"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="FET状态"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="FET状态" :list="fetStateCode"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="均衡状态"></hdw-light-input-inline> |
| | | <hdw-light-input-inline text="均衡状态" :list="junhengStateCode"></hdw-light-input-inline> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <hdw-light-input-inline text="系统状态"></hdw-light-input-inline> |
| | | </el-col> |
| | | <!-- <el-col :span="6">--> |
| | | <!-- <hdw-light-input-inline text="系统状态"></hdw-light-input-inline>--> |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | </div> |
| | | </flex-box> |
| | |
| | | import DivideBar from "@/components/myCharts/DivideBar"; |
| | | import {getValByKey, Timeout} from "@/assets/js/tools"; |
| | | import getDCDCAnalogParams from "@/assets/js/tools/lithium/analogParams"; |
| | | import getDCDCWarnParams from "@/assets/js/tools/lithium/warnParams"; |
| | | import getItemByKey from "@/assets/js/tools/getItemByKey"; |
| | | import HdwLightInput from "@/pages/dataMager/components/HdwLightInput"; |
| | | import HdwLightInputInline from "@/components/HdwLightInputInline"; |
| | |
| | | group: 0, |
| | | timer: new Timeout(), |
| | | analogData: [], |
| | | monVolWarn: [], // 单体电压告警 |
| | | monTempWarn: [], // 电芯温度告警 |
| | | envTempAlm: [ |
| | | { |
| | | key: 'envTempAlm', |
| | | label: '环境温度', |
| | | value: -1, |
| | | } |
| | | ], |
| | | mosTempAlm: [ |
| | | { |
| | | key: 'mosTempAlm', |
| | | label: 'MOS管温度', |
| | | value: -1, |
| | | }, |
| | | ], |
| | | currentAlm: [ |
| | | { |
| | | key: 'currentAlm', |
| | | label: '电流', |
| | | value: -1, |
| | | }, |
| | | ], |
| | | sumVolAlm: [ |
| | | { |
| | | key: 'sumVolAlm', |
| | | label: '总压', |
| | | value: -1, |
| | | }, |
| | | ], |
| | | junhengEventCode: [ |
| | | { |
| | | bit: Math.pow(2, 0), |
| | | label: "均衡模块开启", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 4), |
| | | label: "电芯压差告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 5), |
| | | label: "充电MOS故障告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 5), |
| | | label: "放电MOS故障告警", |
| | | value: -1, |
| | | }, |
| | | ], |
| | | volEventCode: [ |
| | | { |
| | | bit: Math.pow(2, 0), |
| | | label: "单体过压告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 1), |
| | | label: "单体过压保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 2), |
| | | label: "单体欠压告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 3), |
| | | label: "单体欠压保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 4), |
| | | label: "总压过压告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 5), |
| | | label: "总压过压保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 6), |
| | | label: "总压欠压告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 7), |
| | | label: "总压欠压保护", |
| | | value: -1, |
| | | }, |
| | | ], |
| | | tempEventCode: [ |
| | | { |
| | | bit: Math.pow(2, 0), |
| | | label: "充电高温告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 1), |
| | | label: "充电过温保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 2), |
| | | label: "充电低温告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 3), |
| | | label: "充电欠温保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 4), |
| | | label: "放电高温告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 5), |
| | | label: "放电过温保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 6), |
| | | label: "放电低温告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 7), |
| | | label: "放电欠温保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 8), |
| | | label: "环境高温告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 9), |
| | | label: "环境过温保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 10), |
| | | label: "环境低温告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 11), |
| | | label: "环境欠温保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 12), |
| | | label: "功率过温保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 13), |
| | | label: "消防告警事件", |
| | | value: -1, |
| | | } |
| | | ], |
| | | currEventCode: [ |
| | | { |
| | | bit: Math.pow(2, 0), |
| | | label: "充电电流告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 1), |
| | | label: "充电过流保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 2), |
| | | label: "放电电流告警", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 3), |
| | | label: "放电过流保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 4), |
| | | label: "二级过流保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 5), |
| | | label: "输出短路保护", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 6), |
| | | label: "二级过流锁定", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 7), |
| | | label: "输出短路锁定", |
| | | value: -1, |
| | | }, |
| | | ], |
| | | restCapAlm: [ |
| | | { |
| | | bit: Math.pow(2, 0), |
| | | label: "剩余容量告警", |
| | | value: -1, |
| | | } |
| | | ], |
| | | fetStateCode: [ |
| | | { |
| | | bit: Math.pow(2, 0), |
| | | label: "放电开关开启", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 1), |
| | | label: "充电开关开启", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 2), |
| | | label: "限流开关开启", |
| | | value: -1, |
| | | }, |
| | | { |
| | | bit: Math.pow(2, 3), |
| | | label: "加热开关开启", |
| | | value: -1, |
| | | }, |
| | | ], |
| | | junhengStateCode: [], |
| | | } |
| | | }, |
| | | methods: { |
| | | resize() { |
| | | // 单体电压图表 |
| | | if(this.$refs.monVol) { |
| | | this.$refs.monVol.resize(); |
| | | } |
| | | this.$nextTick(()=>{ |
| | | // 单体电压图表 |
| | | if(this.$refs.monVol) { |
| | | this.$refs.monVol.resize(); |
| | | } |
| | | |
| | | // 单体温度图表 |
| | | if (this.$refs.monTemp) { |
| | | this.$refs.monTemp.resize(); |
| | | } |
| | | // 单体温度图表 |
| | | if (this.$refs.monTemp) { |
| | | this.$refs.monTemp.resize(); |
| | | } |
| | | }); |
| | | }, |
| | | startTimer() { |
| | | this.timer.start(()=>{ |
| | | this.$axios.all([ |
| | | this.getDcDcAnalogParams(), |
| | | this.getDcDcWarnParams(), |
| | | ]).then(()=>{ |
| | | // 开启定时查询 |
| | | this.timer.open(); |
| | |
| | | return isIn; |
| | | }); |
| | | |
| | | }, |
| | | getDcDcWarnParams() { |
| | | // 是否实时更新 |
| | | if(!this.realUpdate) { |
| | | return; |
| | | } |
| | | // 查询数据 |
| | | let batt = this.batt; |
| | | let searchParams = { |
| | | devId: batt.FBSDeviceId, |
| | | }; |
| | | // 查询后台 |
| | | this.$apis.dcdc.getDcDcWarnParams(searchParams).then(res=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | let data = []; |
| | | if(rs.code == 1) { |
| | | data = rs.data; |
| | | } |
| | | this.formatAlarmData(data); |
| | | }).catch(error=>{ |
| | | this.formatAlarmData([]); |
| | | }); |
| | | }, |
| | | formatAlarmData(data) { |
| | | let group = this.group; |
| | | let list = getDCDCAnalogParams().list; |
| | | let info = {}; |
| | | // 设置信息 |
| | | if(data.length != 0 && data.length>group) { |
| | | info = data[group]; |
| | | } |
| | | // 单体电压 |
| | | this.changeAlarmValue(this.monVolWarn, info); |
| | | |
| | | // 单体温度 |
| | | this.changeAlarmValue(this.monTempWarn, info); |
| | | |
| | | // 环境温度 |
| | | this.changeAlarmValue(this.envTempAlm, info); |
| | | |
| | | // Mos管温度 |
| | | this.changeAlarmValue(this.mosTempAlm, info); |
| | | |
| | | // 电流告警 |
| | | this.changeAlarmValue(this.currentAlm, info); |
| | | |
| | | // 总压告警 |
| | | this.changeAlarmValue(this.sumVolAlm, info); |
| | | |
| | | // 均衡事件 |
| | | this.changeAlarmValueByBit(this.junhengEventCode, info.junhengEventCode); |
| | | |
| | | // 电压事件 |
| | | this.changeAlarmValueByBit(this.volEventCode, info.volEventCode); |
| | | |
| | | // 温度事件 |
| | | this.changeAlarmValueByBit(this.tempEventCode, info.tempEventCode); |
| | | |
| | | // 电流事件 |
| | | this.changeAlarmValueByBit(this.currEventCode, info.currEventCode); |
| | | |
| | | // 剩余容量 |
| | | this.changeAlarmValueByBit(this.restCapAlm, info.restCapAlm); |
| | | |
| | | //FET状态 |
| | | this.changeAlarmValueByBit(this.fetStateCode, info.fetStateCode); |
| | | |
| | | // 均衡状态 |
| | | this.changeAlarmValueByBit(this.junhengStateCode, info.junhengStateCode); |
| | | }, |
| | | changeAlarmValue(alarms, info) { |
| | | alarms.map(item=>{ |
| | | item.value = getValByKey(item.key, info, -1); |
| | | }); |
| | | }, |
| | | changeAlarmValueByBit(alarms, bit) { |
| | | alarms.map(item=>{ |
| | | item.value = (item.bit & bit)>0?1:0; |
| | | }); |
| | | }, |
| | | getListByKeys(keys, list) { |
| | | let result= []; |
| | | for(let i=0; i<keys.length; i++) { |
| | | let key = keys[i]; |
| | | let item = getItemByKey(key, list); |
| | | if(item != 0) { |
| | | result.push(item); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | }, |
| | | mounted() { |
| | | let list = getDCDCWarnParams().list; |
| | | // 单体电压告警 |
| | | let monVolWarnKey = []; |
| | | for (let i = 1; i < 17; i++) { |
| | | monVolWarnKey.push('monVolAlm' + i); |
| | | } |
| | | this.monVolWarn = this.getListByKeys(monVolWarnKey, list); |
| | | |
| | | // 电芯温度告警 |
| | | let monTempWarnKeys = []; |
| | | for (let i = 1; i < 5; i++) { |
| | | monTempWarnKeys.push('monTmpAlm' + i); |
| | | } |
| | | this.monTempWarn = this.getListByKeys(monTempWarnKeys, list); |
| | | |
| | | // 均衡状态 |
| | | let junhengStateCode = []; |
| | | for(let i=0; i<16; i++) { |
| | | junhengStateCode.push({ |
| | | bit: Math.pow(2, i), |
| | | label: "电芯"+(i+1)+"均衡指示", |
| | | value: -1, |
| | | }); |
| | | } |
| | | this.junhengStateCode = junhengStateCode; |
| | | |
| | | this.startTimer(); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | } |
| | | .module-content-left { |
| | | flex: 1; |
| | | overflow-x: hidden; |
| | | margin-right: 8px; |
| | | } |
| | | .module-content-right { |
| | |
| | | </div> |
| | | </science-box> |
| | | </div> |
| | | |
| | | <div style="position: absolute;top: 8px; left: 8px" v-if="isLithium"> |
| | | <science-box |
| | | style="position: relative" |
| | | no-header> |
| | | <div class="hdw-state-list table-layout"> |
| | | <div class="table-row"> |
| | | <div class="table-cell text-right">设备状态:</div> |
| | | <div class="table-cell">{{ backInputs.batt_state }}</div> |
| | | </div> |
| | | <div class="table-row"> |
| | | <div class="table-cell text-right">电池电流:</div> |
| | | <div class="table-cell">{{ backInputs.group_curr }}</div> |
| | | </div> |
| | | <div class="table-row"> |
| | | <div class="table-cell text-right">测试容量:</div> |
| | | <div class="table-cell">{{ backInputs.batt_test_cap }}</div> |
| | | </div> |
| | | <div class="table-row"> |
| | | <div class="table-cell text-right">剩余容量:</div> |
| | | <div class="table-cell">{{ backInputs.batt_syrl_cap }}</div> |
| | | </div> |
| | | </div> |
| | | </science-box> |
| | | </div> |
| | | <circuit-diagram |
| | | :batt="batt" |
| | | :online-vol="inputs.online_vol" |