| | |
| | | </div>
|
| | | </div>
|
| | | <script type="text/html" id="battInfoTpl">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">机房编号</label>
|
| | | <div class="layui-input-block">
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg4">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">省<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg4">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">市<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg4">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">区/县<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | |
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">设备名称</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="StationName4" disabled="" lay-verify="required" id="homename" autocomplete="off" class="layui-input layui-bg-gray" value="{{= d.StationName4 }}">
|
| | | <input type="text" name="StationName4" disabled="" lay-verify="required" id="btsName" autocomplete="off" class="layui-input layui-bg-gray" value="{{= d.StationName4 }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">机房ip</label>
|
| | | <div class="layui-input-block">
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">设备ID<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | |
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">设备IP</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="FbsDeviceIp" disabled="" id="fbsip" autocomplete="off" class="layui-input layui-bg-gray" value="{{= d.FbsDeviceIp }}">
|
| | | <input type="text" name="FbsDeviceIp" id="fbsip" autocomplete="off" class="layui-input" value="{{= d.FbsDeviceIp }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | |
| | | <label class="layui-form-label">负载电流<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="Load_curr" lay-verify="required|number" id="loadcurr" autocomplete="off" class="layui-input" value="{{= d.Load_curr }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">电价模板id<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="tmp_id" id="tmp_id" autocomplete="off" class="layui-input" value="{{= d.tmp_id }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">母联状态<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="buscoupleState" id="buscoupleState" autocomplete="off" class="layui-input" value="{{= d.buscoupleState }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">充电类型<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="chargeType" id="chargeType" autocomplete="off" class="layui-input" value="{{= d.chargeType }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">电压等级<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="Vol_grade" id="Vol_grade" autocomplete="off" class="layui-input" value="{{= d.Vol_grade }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">单电压额定电压<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="SingleRatedVoltage" id="SingleRatedVoltage" autocomplete="off" class="layui-input" value="{{= d.SingleRatedVoltage }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-col-xs6 layui-col-sm6 layui-col-md4 layui-col-lg3 layui-not-show">
|
| | | <div class="layui-block">
|
| | | <label class="layui-form-label">均充电压设定值<span class="red">*</span></label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="JunChargeVoltageValue" id="JunChargeVoltageValue" autocomplete="off" class="layui-input" value="{{= d.JunChargeVoltageValue }}">
|
| | | </div>
|
| | | </div>
|
| | | </div>
|
| | |
| | | var editPopupShow = parent.$('#iframeShowEidt');
|
| | | var monCapStds = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 1000];
|
| | | var battProducers = getBattProducers();
|
| | | console.log(battProducers);
|
| | | var monNums = [4, 24];
|
| | | // 省-市-区县模板
|
| | | var provinceTpl = $('#provinceTpl').html();
|
| | |
| | | editInfo.monCapStds = monCapStds; // 标称容量列表
|
| | | editInfo.battProducers = battProducers; // 电池品牌列表
|
| | | editInfo.monNums = monNums; // 单体数量
|
| | | //console.log(editInfo);
|
| | | var data = {
|
| | | StationId: '4011100'
|
| | | ,StationName1: '广西省'
|
| | |
| | | ,productDate: '2018-09-18 00:00:00'
|
| | | ,useDate: '2018-09-18 00:00:00'
|
| | | ,install_user: '呵呵'
|
| | |
|
| | | ,videoUrl: "", // 萤石云视频监控序列号
|
| | | chargeType: 1, // 充电类型
|
| | | buscoupleState: "0", // 母联状态
|
| | | tmp_id: "0", // 电价模板id
|
| | |
|
| | | Vol_grade: "0", // 电压等级(kV)
|
| | | Manufacturers: '', // 生产厂家
|
| | | Assetequipment: '', // 是否资产级设备
|
| | | Deviceclasspath: '', // 设备分类全路径
|
| | | Deviceoperationdepartment: '', // 设备运维部门
|
| | | PropertyRightUnit: '', // 产权单位
|
| | | PropertyAttribute: '', // 产权属性
|
| | | FactoryNumber: '', // 出厂编号
|
| | | OperationTeam: '', // 运维(保管)班组
|
| | | DeviceIdentityCode: '', // 设备身份编码
|
| | | ProjectType: '', // 项目类型
|
| | | BatteryApplicationType: '', // 蓄电池应用类型
|
| | | SingleRatedVoltage: "0", // 单电压额定电压
|
| | | RemoteMonitor: '', // 是否实现远程监控
|
| | | BatttIndependentPlaced: '', // 是否独立蓄电池室放置
|
| | | JunChargeVoltageValue: "0", // 均充电压设定值
|
| | | };
|
| | |
|
| | | // 渲染内容
|
| | |
| | | // 修改电池品牌
|
| | | form.on('select(battProducer)', function(data) {
|
| | | if(data.value==-100 ) {
|
| | | //console.log(provinces);
|
| | | laytpl(battProducerTpl).render({}, function(html) {
|
| | | // 打开面板设置新建电池组个数
|
| | | layer.open({
|
| | |
| | | checkHomeName(data, function() {
|
| | | //console.log(data);
|
| | | layer.confirm('是否确认添加', {icon: 3, title:'提示'}, function(index){
|
| | | var _data = data.field;
|
| | | var province = _data.StationName1; // 省
|
| | | var city = _data.StationName2; // 市
|
| | | var home = _data.StationName3; // 机房名称
|
| | | var bts = _data.StationName4; // 设备名称
|
| | | _data.StationName = province+'-'+city+'-'+home+'-'+bts;
|
| | | |
| | | var temp = analysisData(editInfo.addGroupNum, _data);
|
| | | |
| | | checkDevId(_data.FBSDeviceId, function(devid){
|
| | | // 添加电池信息
|
| | | addBatt(temp);
|
| | | }, function(pre, max) {
|
| | | layer.msg('设备ID:'+pre+'被占用,推荐使用'+max);
|
| | | // 更新设备id和设备ip
|
| | | $('#devid').val(max);
|
| | | $('#fbsip').val(getDevIp(max));
|
| | | });
|
| | | var _data = data.field;
|
| | | var province = _data.StationName1; // 省
|
| | | var city = _data.StationName2; // 市
|
| | | var home = _data.StationName3; // 机房名称
|
| | | var bts = _data.StationName4; // 设备名称
|
| | | _data.StationName = province+'-'+city+'-'+home+'-'+bts;
|
| | |
|
| | | var temp = analysisData(editInfo.addGroupNum, _data);
|
| | |
|
| | | // 添加电池信息
|
| | | addBatt(temp);
|
| | | });
|
| | | });
|
| | |
|
| | |
| | |
|
| | | // 解析添加的数据
|
| | | function analysisData(arr, data) {
|
| | | //console.log(arr);
|
| | | var rs = [];
|
| | | for(var i=0; i<arr.length; i++) {
|
| | | var temp = {};
|
| | |
| | | ,btn:['确定', '取消']
|
| | | ,yes: function(index) {
|
| | | var val = $('#oCounty').val();
|
| | | console.log(val);
|
| | | setSelVal($('#county'), val);
|
| | | layer.close(index);
|
| | | }
|