<template>
|
<el-form
|
ref="ruleForm"
|
size="mini"
|
label-position="top"
|
:model="params"
|
:rules="rules"
|
class="params-dialog">
|
<el-form-item label="电池组名称">
|
<el-input v-model="otherParams.groupName" readonly></el-input>
|
</el-form-item>
|
<div class="form-footer">
|
<!-- <three-btn>清除告警</three-btn> -->
|
<three-btn @click="confirmStart">启动内阻测试</three-btn>
|
</div>
|
</el-form>
|
</template>
|
|
<script>
|
import {const_9100} from "@/assets/js/const";
|
|
export default {
|
name: "ResTest9611",
|
props: {
|
batt: {
|
type: Object,
|
default() {
|
return {}
|
}
|
}
|
},
|
data() {
|
let cmd = const_9100.cmd;
|
return {
|
cmd: cmd,
|
params: {},
|
rules: {},
|
}
|
},
|
methods: {
|
confirmStart() {
|
this.$confirm('确定启动内阻测试', '系统提示', {
|
type: 'warning'
|
}).then(()=>{
|
this.start();
|
}).catch(()=>{});
|
},
|
start() {
|
// 等待框
|
let loading = this.$layer.loading(1);
|
// 请求后台
|
this.$apis.dischargeTest.bts9611.start({
|
num: this.cmd.start,
|
dev_id: this.batt.FBSDeviceId,
|
BattGroupNum: this.batt.GroupIndexInFBSDevice+1,
|
}).then(res => {
|
let rs = JSON.parse(res.data.result);
|
if (rs.code == 1) {
|
// 提示信息
|
this.$layer.msg('启动测试成功');
|
} else {
|
// 提示信息
|
this.$layer.msg('启动测试失败!');
|
}
|
// 关闭等待框
|
this.$layer.close(loading);
|
}).catch(error => {
|
console.log(error);
|
// 关闭等待框
|
this.$layer.close(loading);
|
// 提示信息
|
this.$layer.msg('启动测试失败,启动测试请求异常!');
|
});
|
},
|
},
|
computed: {
|
otherParams() {
|
let batt = this.batt;
|
let groupInfo = '单体数量:' + this.batt.MonCount + ";电压(V):"
|
+ this.batt.MonVolStd + ";容量(AH):" + this.batt.MonCapStd;
|
return {
|
groupName: batt.StationName + "-" + batt.BattGroupName,
|
FBSDeviceId: batt.FBSDeviceId,
|
groupInfo: groupInfo,
|
GroupIndexInFBSDevice: this.batt.GroupIndexInFBSDevice + 1,
|
}
|
}
|
},
|
}
|
</script>
|
|
<style scoped>
|
|
</style>
|