<template>
|
<flex-layout>
|
<el-row :gutter=8 class="module-info">
|
<el-col :span=10>
|
<table-wrapper class="h500" :title="device.name">
|
<el-table
|
stripe
|
size="small"
|
:data="device.data"
|
height="100%">
|
<el-table-column
|
prop="name"
|
label="参数名称"
|
min-width="240"
|
align="center"></el-table-column>
|
<el-table-column
|
prop="value"
|
label="参数值"
|
min-width="150"
|
align="center"></el-table-column>
|
</el-table>
|
</table-wrapper>
|
</el-col>
|
<el-col :span=7>
|
<table-wrapper class="h500" :title="collectState.name">
|
<el-table
|
stripe
|
size="small"
|
:data="collectState.data"
|
height="100%">
|
<el-table-column
|
prop="name"
|
label="参数名称"
|
min-width="150"
|
align="center"></el-table-column>
|
<el-table-column
|
prop="value"
|
label="参数值"
|
min-width="150"
|
align="center"></el-table-column>
|
</el-table>
|
</table-wrapper>
|
</el-col>
|
<el-col :span=7>
|
<table-wrapper class="h500" :title="chargeEleState.name">
|
<el-table
|
stripe
|
size="small"
|
:data="chargeEleState.data"
|
height="100%">
|
<el-table-column
|
prop="name"
|
label="参数名称"
|
min-width="150"
|
align="center"></el-table-column>
|
<el-table-column
|
prop="value"
|
label="参数值"
|
min-width="150"
|
align="center"></el-table-column>
|
</el-table>
|
</table-wrapper>
|
</el-col>
|
</el-row>
|
</flex-layout>
|
</template>
|
|
<script>
|
import TableWrapper from "@/components/TableWrapper";
|
import {
|
Timeout,
|
getNewListByConfig
|
} from "@/assets/js/tools";
|
export default {
|
name: "ModuleInfo",
|
components: {
|
TableWrapper
|
},
|
props: {
|
batt: {
|
type: Object,
|
default() {
|
return {}
|
},
|
}
|
},
|
data() {
|
return {
|
timer: new Timeout(),
|
device: {
|
name: "绝缘装置",
|
config: {
|
// BattGroupId: '电池组id',
|
recordTime: '记录时间',
|
insulatSystemVol: '绝缘监测模块系统电压',
|
insulatGroundVol: '绝缘监测模块正对地电压',
|
insulatNegativeVol: '绝缘监测模块负对地电压',
|
insulatGroundRes: '绝缘监测模块正对地电阻',
|
insulatNegativeRes: '绝缘监测模块负对地电阻',
|
insulatBattRes: '绝缘监测模块电池对地电阻',
|
insulatFaultNum: '绝缘监测模块故障电池节数',
|
insulatAcVol: '绝缘监测模块交流电压',
|
insulatSystemState: '绝缘监测模块系统状态',
|
insulatRecordState: '绝缘监测模块瞬时记录状态',
|
insulatState: '绝缘监测模块装置状态',
|
insulatBranchNum1: '绝缘监测模块接地支路号(模块1)',
|
insulatBranchResIs1: '绝缘监测模块支路正对地电阻(模块1)',
|
insulatBranchResNe1: '绝缘监测模块支路负对地电阻(模块1)',
|
insulatBranchNum2: '绝缘监测模块接地支路号(模块2)',
|
insulatBranchResIs2: '绝缘监测模块支路正对地电阻(模块2)',
|
insulatBranchResNe2: '绝缘监测模块支路负对地电阻(模块2)',
|
insulatBranchNum3: '绝缘监测模块接地支路号(模块3)',
|
insulatBranchResIs3: '绝缘监测模块支路正对地电阻(模块3)',
|
insulatBranchResNe3: '绝缘监测模块支路负对地电阻(模块3)',
|
insulatBranchNum4: '绝缘监测模块接地支路号(模块4)',
|
insulatBranchResIs4: '绝缘监测模块支路正对地电阻(模块4)',
|
insulatBranchResNe4: '绝缘监测模块支路负对地电阻(模块4)',
|
insulatBranchNum5: '绝缘监测模块接地支路号(模块5)',
|
insulatBranchResIs5: '绝缘监测模块支路正对地电阻(模块5)',
|
insulatBranchResNe5: '绝缘监测模块支路负对地电阻(模块5)',
|
insulatBranchNum6: '绝缘监测模块接地支路号(模块6)',
|
insulatBranchResIs6: '绝缘监测模块支路正对地电阻(模块6)',
|
insulatBranchResNe6: '绝缘监测模块支路负对地电阻(模块6)',
|
insulatBranchNum7: '绝缘监测模块接地支路号(模块7)',
|
insulatBranchResIs7: '绝缘监测模块支路正对地电阻(模块7)',
|
insulatBranchResNe7: '绝缘监测模块支路负对地电阻(模块7)',
|
insulatBranchNum8: '绝缘监测模块接地支路号(模块8)',
|
insulatBranchResIs8: '绝缘监测模块支路正对地电阻(模块8)',
|
insulatBranchResNe8: '绝缘监测模块支路负对地电阻(模块8)',
|
insulatBranchNum9: '绝缘监测模块接地支路号(模块9)',
|
insulatBranchResIs9: '绝缘监测模块支路正对地电阻(模块9)',
|
insulatBranchResNe9: '绝缘监测模块支路负对地电阻(模块9)',
|
insulatBranchNum10: '绝缘监测模块接地支路号(模块10)',
|
insulatBranchResIs10: '绝缘监测模块支路正对地电阻(模块10)',
|
insulatBranchResNe10: '绝缘监测模块支路负对地电阻(模块10)',
|
insulatBranchNum11: '绝缘监测模块接地支路号(模块11)',
|
insulatBranchResIs11: '绝缘监测模块支路正对地电阻(模块11)',
|
insulatBranchResNe11: '绝缘监测模块支路负对地电阻(模块11)',
|
insulatBranchNum12: '绝缘监测模块接地支路号(模块12)',
|
insulatBranchResIs12: '绝缘监测模块支路正对地电阻(模块12)',
|
insulatBranchResNe12: '绝缘监测模块支路负对地电阻(模块12)',
|
insulatBranchNum13: '绝缘监测模块接地支路号(模块13)',
|
insulatBranchResIs13: '绝缘监测模块支路正对地电阻(模块13)',
|
insulatBranchResNe13: '绝缘监测模块支路负对地电阻(模块13)',
|
insulatBranchNum14: '绝缘监测模块接地支路号(模块14)',
|
insulatBranchResIs14: '绝缘监测模块支路正对地电阻(模块14)',
|
insulatBranchResNe14: '绝缘监测模块支路负对地电阻(模块14)',
|
insulatBranchNum15: '绝缘监测模块接地支路号(模块15)',
|
insulatBranchResIs15: '绝缘监测模块支路正对地电阻(模块15)',
|
insulatBranchResNe15: '绝缘监测模块支路负对地电阻(模块15)',
|
insulatBranchNum16: '绝缘监测模块接地支路号(模块16)',
|
insulatBranchResIs16: '绝缘监测模块支路正对地电阻(模块16)',
|
insulatBranchResNe16: '绝缘监测模块支路负对地电阻(模块16)',
|
},
|
data: []
|
},
|
collectState: {
|
name: "汇集器状态",
|
config: {
|
// BattGroupId: '电池组ID',
|
recordTime: '记录时间',
|
colVersion: '汇集器版本',
|
colState: '汇集器状态',
|
colVol: '汇集器组电压',
|
colCurr: '汇集器组电流',
|
colBattState: '汇集器电池状态',
|
colCurrDir: '汇集器电流方向',
|
colMeanRipCurr: '汇集器纹波电流均值',
|
colPeakRipCurr: '汇集器纹波电流峰值',
|
colResTestCount: '汇集器内阻测试次数',
|
colResTestType: '汇集器内阻测试方法',
|
},
|
data: []
|
},
|
chargeEleState: {
|
name: '充电机状态',
|
config: {
|
// BattGroupId: '电池组ID',
|
recordTime: '记录时间',
|
charOutputVol: '充电机输出电压',
|
charOutputCurr: '充电机输出电流',
|
charPeakRipVol: '纹波峰值',
|
charPeakRipParam: '纹波峰值系数',
|
charUan: 'Uan',
|
charIan: 'Ian',
|
charUbn: 'Ubn',
|
charIbn: 'Ibn',
|
charUcn: 'Ucn',
|
charIcn: 'Icn',
|
charSystemState: '系统状态',
|
},
|
data: []
|
},
|
}
|
},
|
methods: {
|
// 开启查询
|
startSearch() {
|
this.timer.start(()=>{
|
this.$axios.all([
|
this.searchDevice(),
|
this.searchCollectState(),
|
this.searchChargeEleState()
|
]).then(()=>{
|
// 开启计时器
|
this.timer.open();
|
}).catch(error=>{
|
console.log(error);
|
// 开启计时器
|
this.timer.open();
|
});
|
}, 4000);
|
},
|
// 绝缘装置查询
|
searchDevice() {
|
let batt = this.batt;
|
this.$apis.dataMager.moduleInfo.searchDevice({
|
battGroupId: batt.BattGroupId
|
}).then(res=>{
|
let rs = JSON.parse(res.data.result);
|
let temp = {};
|
if(rs.code == 1) {
|
temp = rs.data;
|
}
|
// 设置内容
|
this.device.data = getNewListByConfig(temp, this.device.config);
|
}).catch(error=>{
|
// 设置内容
|
this.device.data = getNewListByConfig({}, this.device.config);
|
});
|
},
|
// 汇集器查询
|
searchCollectState() {
|
let batt = this.batt;
|
this.$apis.dataMager.moduleInfo.searchCollectState({
|
battGroupId: batt.BattGroupId
|
}).then(res=>{
|
let rs = JSON.parse(res.data.result);
|
let temp = {};
|
if(rs.code == 1) {
|
temp = rs.data;
|
}
|
// 设置内容
|
this.collectState.data = getNewListByConfig(temp, this.collectState.config);
|
}).catch(error=>{
|
// 设置内容
|
this.collectState.data = getNewListByConfig({}, this.collectState.config);
|
});
|
},
|
// 充电机查询
|
searchChargeEleState() {
|
let batt = this.batt;
|
this.$apis.dataMager.moduleInfo.searchChargeEleState({
|
battGroupId: batt.BattGroupId
|
}).then(res=>{
|
let rs = JSON.parse(res.data.result);
|
let temp = {};
|
if(rs.code == 1) {
|
temp = rs.data;
|
}
|
// 设置内容
|
this.chargeEleState.data = getNewListByConfig(temp, this.chargeEleState.config);
|
}).catch(error=>{
|
// 设置内容
|
this.chargeEleState.data = getNewListByConfig({}, this.chargeEleState.config);
|
});
|
},
|
},
|
mounted() {
|
// 开始查询
|
this.startSearch();
|
},
|
destroyed() {
|
// 关闭计时器
|
this.timer.stop();
|
}
|
}
|
</script>
|
|
<style scoped>
|
.module-info {
|
text-align: left;
|
padding: 8px;
|
}
|
</style>
|