longyvfengyun
2023-12-25 d8d792a6842832e8f6af6604274c438b25053afe
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
99
100
101
102
103
<template>
    <div class="params-container">
        <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="table-layout">
                <div class="table-row">
                    <div class="table-cell pr16">
                        <el-form-item label="重启计划开始时间" prop="restart_starttime">
                            <el-date-picker
                                v-model="params.restart_starttime"
                                type="datetime"
                                size="mini"
                                placeholder="选择日期时间">
                            </el-date-picker>
                        </el-form-item>
                    </div>
                    <div class="table-cell">
                        <el-form-item label="重启周期(天)" prop="restart_cycle">
                            <el-input v-model="params.restart_cycle"></el-input>
                        </el-form-item>
                    </div>
                </div>
                <div class="table-row">
                    <div class="table-cell pr16">
                        <el-form-item label="重启计划状态" prop="restart_en">
                            <el-select v-model="params.restart_en">
                                <el-option :value="0">不启用</el-option>
                                <el-option :value="1">启用</el-option>
                            </el-select>
                        </el-form-item>
                    </div>
                </div>
            </div>
            <div class="form-footer">
                <three-btn>读取</three-btn>
                <three-btn>设定</three-btn>
            </div>
        </el-form>
    </div>
</template>
 
<script>
export default {
    name: "RestartPlanParams",
    props: {
        batt: {
            type: Object,
            default() {
                return {}
            }
        }
    },
    data() {
        let nowDate = new Date().format('yyyy-MM-dd hh:mm:ss');
        return {
            params: {
                dev_id: 0,
                restart_starttime: nowDate,     // 重启计划开始时间
                restart_cycle: 0,           // 重启周期
                restart_en: 0,          // 重启计划状态
            },
            rules: {}
        }
    },
    computed: {
        otherParams() {
            let batt = this.batt;
            let groupInfo = '单体数量:'+this.batt.MonCount+";电压(V):"
                +this.batt.MonVolStd+";容量(AH):"+this.batt.MonCapStd;
            return {
                groupName: batt.StationName,
                FBSDeviceId: batt.FBSDeviceId,
                groupInfo: groupInfo,
                GroupIndexInFBSDevice: this.batt.GroupIndexInFBSDevice+1,
 
            }
        }
    },
}
</script>
 
<style scoped>
.params-container {
    padding: 8px;
    background-color: #ececec;
}
.form-footer {
    margin-top: 16px;
    margin-bottom: 16px;
    text-align: right;
}
.form-footer .three-btn {
    margin-left: 12px;
}
</style>