1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
| <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";
| import {
| btsControl,
| startBTS9611
| } from '../js/realTime';
|
| 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);
| // 请求后台
| btsControl({
| num: this.cmd.start,
| devId: this.batt.fbsdeviceId,
| battGroupNum: this.batt.groupIndexInFBSDevice+1,
| }).then(res => {
| res = res.data;
| if (res.code && res.data) {
| // 提示信息
| 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>
|
|