<template>
|
<div class="new-home">
|
<Form ref="newBatt" :model="home" :rules="rules">
|
<Row :gutter="8">
|
<!-- <i-col span="6">
|
<FormItem label="机房编号">
|
<i-input type="text" v-model.trim="home.StationId" placeholder="机房编号" disabled></i-input>
|
</FormItem>
|
</i-col> -->
|
<i-col span="6">
|
<FormItem label="省" prop="StationName1">
|
<i-input type="text" v-model.trim="home.StationName1" placeholder="省" disabled></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="市" prop="StationName2">
|
<i-input type="text" v-model.trim="home.StationName2" placeholder="市" disabled></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="区县" prop="StationName5">
|
<i-input type="text" v-model.trim="home.StationName5" placeholder="区县" disabled></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="机房名称" prop="StationName3">
|
<i-input type="text" v-model.trim="home.StationName3" placeholder="机房名称" disabled></i-input>
|
</FormItem>
|
</i-col>
|
<!-- <i-col span="6">
|
<FormItem label="机房IP">
|
<i-input type="text" v-model.trim="home.StationIp" placeholder="机房IP"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="设备名称">
|
<i-input type="text" v-model.trim="home.StationName4" placeholder="设备名称"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="FBS设备ID" prop="FBSDeviceId">
|
<i-input type="text" v-model.trim="home.FBSDeviceId" placeholder="FBS设备ID" disabled></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="FBS设备IP">
|
<i-input type="text" v-model.trim="home.FbsDeviceIp" placeholder="FBS设备IP"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="子网掩码">
|
<i-input type="text" v-model.trim="home.FbsDeviceIp_YM" placeholder="子网掩码"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="网关">
|
<i-input type="text" v-model.trim="home.FbsDeviceIp_WG" placeholder="网关"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="FBS设备名称">
|
<i-input type="text" v-model.trim="home.FBSDeviceName" placeholder="FBS设备名称"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="FBS设备索引">
|
<Select v-model="home.GroupIndexInFBSDevice" class="black">
|
<Option :value="0">0</Option>
|
<Option :value="1">1</Option>
|
<Option :value="2">2</Option>
|
<Option :value="3">3</Option>
|
</Select>
|
</FormItem>
|
</i-col> -->
|
<i-col span="6">
|
<FormItem label="电池组名称" prop="BattGroupName">
|
<i-input type="text" v-model.trim="home.BattGroupName" placeholder="电池组名称"></i-input>
|
</FormItem>
|
</i-col>
|
<!-- <i-col span="6">
|
<FormItem label="电池组ID" prop="BattGroupId">
|
<i-input type="text" v-model.trim="home.BattGroupId" placeholder="电池组ID"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="机房内电池组组数">
|
<i-input type="text" v-model.trim="home.BattGroupNum" placeholder="机房内电池组组数"></i-input>
|
</FormItem>
|
</i-col> -->
|
<i-col span="6">
|
<FormItem label="浮充电压阀值" prop="FloatVolLevel">
|
<i-input type="text" v-model.trim="home.FloatVolLevel" placeholder="浮充电压阀值" disabled></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="离线电压阀值" prop="OfflineVolLevel">
|
<i-input type="text" v-model.trim="home.OfflineVolLevel" placeholder="离线电压阀值" disabled></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="浮充阀值" prop="BattFloatCurrent">
|
<i-input type="text" v-model.trim="home.BattFloatCurrent" placeholder="浮充阀值"></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="单体数量" prop="MonCount">
|
<i-input type="number" @on-change="handleVol" v-model.trim="home.MonCount" placeholder="单体数量"></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="标称容量" prop="MonCapStd">
|
<i-input type="text" v-model.trim="home.MonCapStd" placeholder="标称容量"></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="标称单体电压" prop="MonVolStd">
|
<i-input type="text" @on-change="handleVol" v-model.trim="home.MonVolStd" placeholder="标称单体电压"></i-input>
|
</FormItem>
|
</i-col>
|
<!-- <i-col span="6">
|
<FormItem label="标称单体内阻">
|
<i-input type="text" v-model.trim="home.MonResStd" placeholder="标称单体内阻"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="标称单体电导">
|
<i-input type="text" v-model.trim="home.MonSerStd" placeholder="标称单体电导"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="单体电压次低偏移量">
|
<i-input type="text" v-model.trim="home.MonVolLowToAvg" placeholder="单体电压次低偏移量"></i-input>
|
</FormItem>
|
</i-col> -->
|
<!-- <i-col span="6">
|
<FormItem label="负载电流">
|
<i-input type="text" v-model.trim="home.Load_curr" placeholder="负载电流"></i-input>
|
</FormItem>
|
</i-col> -->
|
<i-col span="6">
|
<FormItem label="最大核容电流" prop="DisCurrMax">
|
<i-input type="text" v-model.trim="home.DisCurrMax" placeholder="最大核容电流"></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="基站手机号码" prop="station_phone">
|
<i-input type="text" v-model.trim="home.station_phone" placeholder="基站手机号码"></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="电池品牌" prop="BattProducer">
|
<i-input type="text" v-model.trim="home.BattProducer" placeholder="电池品牌"></i-input>
|
</FormItem>
|
</i-col>
|
<i-col span="6">
|
<FormItem label="电池型号" prop="BattModel">
|
<i-input type="text" v-model.trim="home.BattModel" placeholder="电池型号"></i-input>
|
</FormItem>
|
</i-col>
|
<!-- <i-col span="6">
|
<FormItem label="电池生产日期">
|
<DatePicker type="date" v-model.trim="home.productDate" placeholder="电池生产日期"></DatePicker>
|
</FormItem>
|
</i-col> -->
|
<i-col span="6">
|
<FormItem label="投入使用日期" prop="BattInUseDate">
|
<DatePicker type="date" v-model.trim="home.BattInUseDate" placeholder="投入使用日期"></DatePicker>
|
</FormItem>
|
</i-col>
|
</Row>
|
</Form>
|
<div style="text-align:right; background-color: #FFFFFF;">
|
<Button :loading="enLoading" type="primary" @click="handleEditBatt">确认修改</Button>
|
</div>
|
</div>
|
</template>
|
<script>
|
import {ajax} from '../libs/common'
|
export default {
|
props: {
|
info: {
|
type: [Number, Object],
|
default: function() {
|
return -1;
|
}
|
}
|
},
|
data(){
|
return {
|
home: {
|
StationId: '42000064', // 机房编号
|
StationName1: '', // 省
|
StationName2: '', // 市
|
StationName5: '', // 区县
|
StationName3: '', // 机房名称
|
StationName4: 'LD-9', // 设备名称
|
StationName: '', // 全称(省+市+区县+机房名称+设备名称)
|
StationIp: '192.168.0.5', // 机房IP
|
FBSDeviceId: '401900227', // FBS设备ID(重要)
|
FbsDeviceIp: '192.168.0.88', // FBS设备IP(重要)
|
FbsDeviceIp_YM: '255.255.255.0', // 子网掩码
|
FbsDeviceIp_WG: '192.168.0.1', // 网关
|
FBSDeviceName: 'LD-9', // FBS设备名称
|
GroupIndexInFBSDevice: '0', // FBS设备索引
|
BattGroupId: '1000131', // 电池组ID
|
BattGroupNum: '1', // 机房内电池组组数
|
BattGroupName: '', // 电池组名称
|
FloatVolLevel: '120.6', // 浮充电压阀值
|
OfflineVolLevel: '115.9', // 离线电压阀值
|
BattFloatCurrent: '0.6', // 浮充阀值
|
MonCount: '9', // 单体数量
|
MonCapStd: '40', // 标称容量
|
MonVolStd: '12', // 标称单体电压
|
MonResStd: '0.2', // 标称单体内阻
|
MonSerStd: '5000', // 标称单体电导
|
MonVolLowToAvg: '0.05', // 单体电压次低偏移量
|
Load_curr: '10', // 负载电流
|
DisCurrMax: '4', // 最大核容电流
|
station_phone: '', // 基站手机号码
|
BattProducer: '', // 电池品牌
|
BattModel: '', // 电池型号
|
BattProductDate: '2006-07-06', // 电池生产日期
|
BattInUseDate: '2019-11-28', // 投入使用日期
|
// 分割线
|
Vol_grade: '0', // 电压等级(kV)
|
Manufacturers: '', // 生产厂家
|
Assetequipment: '', // 是否资产级设备
|
Deviceclasspath: '', // 设备分类全路径
|
Deviceoperationdepartment: '', // 设备运维部门
|
PropertyRightUnit: '', // 产权单位
|
PropertyAttribute: '', // 产权属性
|
FactoryNumber: '', // 出厂编号
|
OperationTeam: '', // 运维(保管)班组
|
DeviceIdentityCode: '', // 设备身份编码
|
ProjectType: '', // 项目类型
|
BatteryApplicationType: '', // 蓄电池应用类型
|
SingleRatedVoltage: '0', // 单电压额定电压
|
RemoteMonitor: '', // 是否实现远程监控
|
BatttIndependentPlaced: '', // 是否独立蓄电池室放置
|
JunChargeVoltageValue: '0', // 均充电压设定值
|
},
|
rules: {
|
StationName1: [
|
{ required: true, message: '不能为空', trigger: 'blur',},
|
],
|
StationName2: [
|
{ required: true, message: '不能为空', trigger: 'blur',},
|
],
|
StationName5: [
|
{ required: true, message: '不能为空', trigger: 'blur',},
|
],
|
StationName3: [
|
{ required: true, message: '不能为空', trigger: 'blur',},
|
],
|
FBSDeviceId: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"integer", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
BattGroupId: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"integer", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
BattGroupName:[
|
{ required: true, message: '不能为空', trigger: 'blur',},
|
],
|
FloatVolLevel: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"number", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
OfflineVolLevel: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"number", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
BattFloatCurrent: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"number", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
MonCount: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"integer", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
MonCapStd: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"number", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
MonVolStd: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"number", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
DisCurrMax: [
|
{ required: true, message: '不能为空', trigger: 'blur',transform(value) {
|
return value.toString();
|
}},
|
{ type:"number", message: '请输入数字格式', trigger: 'blur',transform(value) {
|
return Number(value);
|
}},
|
],
|
station_phone: [
|
{ required: true, message: '不能为空', trigger: 'blur',},
|
],
|
BattProducer: [
|
{ required: true, message: '不能为空', trigger: 'blur',},
|
],
|
BattModel: [
|
{ required: true, message: '不能为空', trigger: 'blur',},
|
],
|
BattInUseDate: [
|
{ type: 'date', required: true, message: '不能为空', trigger: 'blur',},
|
]
|
},
|
enLoading: false
|
}
|
},
|
methods: {
|
init: function() {
|
if(typeof(this.info) == 'object') {
|
Object.assign(this.home, this.info);
|
}
|
},
|
handleEditBatt: function() {
|
this.$refs.newBatt.validate((valid) => {
|
if(valid) {
|
this.editBatt();
|
}else {
|
this.$Message.error('存在格式不合法数据!');
|
}
|
});
|
},
|
handleVol: function() {
|
var monCount = this.home.MonCount;
|
var vol = this.home.MonVolStd;
|
var chargeVol = (vol*1.117*monCount).toFixed(1);
|
var outlineVol = (vol*1.073*monCount).toFixed(1);
|
this.home.FloatVolLevel = chargeVol;
|
this.home.OfflineVolLevel = outlineVol;
|
},
|
editBatt: function() {
|
var self = this;
|
var home = Object.assign({}, this.home);
|
// 省-市-区县-机房名称-设备名称
|
home.StationName = home.StationName1+'-'+home.StationName2+'-'+home.StationName5+'-'+
|
home.StationName3+'-'+home.StationName4;
|
home.BattProductDate = new Date(home.BattProductDate).format("yyyy-MM-dd");
|
home.BattInUseDate = new Date(home.BattInUseDate).format("yyyy-MM-dd");
|
// 构造查询条件
|
var searchParams = [home];
|
// 加载等待框
|
this.enLoading = true;
|
// 请求后台添加
|
ajax({
|
url: 'BattInfAction!update',
|
data: 'json='+JSON.stringify(searchParams),
|
success: function(res) {
|
var rs = JSON.parse(res.result);
|
if(rs.code == 1) {
|
self.$emit('ensure', true);
|
self.$Message.success('修改成功!');
|
}else {
|
self.$emit('ensure', false);
|
self.$Message.success('修改失败!');
|
}
|
},
|
complete: function() {
|
// 关闭按钮的等待框
|
self.enLoading = false;
|
}
|
});
|
},
|
},
|
mounted: function() {
|
// 初始化信息
|
this.init();
|
}
|
}
|
</script>
|