whychdw
2019-11-15 a80e50305a5c3b9c00ae299df9f2cc690938f83b
内容提交
2个文件已修改
33 ■■■■ 已修改文件
Idce_Lithium/WebRoot/batt-station-update1.jsp 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Idce_Lithium/WebRoot/iframe/batt-info-edit.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Idce_Lithium/WebRoot/batt-station-update1.jsp
@@ -156,6 +156,7 @@
                var cFilenameContent = '<div style="width:300px; height: 110px;"><div style="margin-top: 20px;margin-left: 8px; margin-right: 8px; text-algin: center;">'+
                                        '<span>选择文件名:</span>'+
                                        '<select id="equipeTypeSel" style="width: 200px;height: 26px; border: 1px solid #ccc">'+
                                            '<option value="IDCE-Power8kw.bin">IDCE-Power8kw.bin</option>'+
                                            '<option value="avr_dfu.uc3">avr_dfu.uc3</option>'+
                                            '<option value="E51_DFU_1.SM5">E51_DFU_1.SM5</option>'+
                                            '<option value="E51_DFU_2.SM5">E51_DFU_2.SM5</option>'+
@@ -588,6 +589,11 @@
                                    for(var i=0; i<formaterData.length; i++) {
                                        var _formaterData = formaterData[i];
                                        var tmp = {};
                                        // 检测设备是否为8kw
                                        if(checkDevId(_formaterData.FBSDeviceId, 98) && _formaterData.StationIp == '') {
                                            _formaterData.StationIp = 'IDCE-8KW-V0.0.0';
                                        }
                                        tmp.stationid = _formaterData.StationId;        // 机房id
                                        tmp.stationname = _formaterData.StationName;    // 机房名称
                                        tmp.fbsid = _formaterData.FBSDeviceId;            // 设备id
@@ -1021,12 +1027,15 @@
                        ,{
                            filename: 'E51_DFU_2.SM5'
                            ,pattern: /^.*V2\.53\.[0-9]*$/
                        },{
                        }
                        ,{
                            filename: 'E51_DFU_1.SM5'
                            ,pattern: /^.*V12\.53\.[0-9]*$/
                        }
                        ,{
                            filename: 'IDCE-Power8kw.bin'
                            ,pattern: /^.*V[0-9]+\.[0-9]+\.+[0-9]$/
                        }
                    ];
                    
                    // 遍历并获取filename
@@ -1069,6 +1078,18 @@
                    // console.log(rs);
                    return rs;
                }
                // 验证设备ID
                function checkDevId(dev_id, type) {
                    var reg;
                    // 根据类型选择正则匹配规则
                    switch(type) {
                        case 98:
                            reg = /^98[0-9]{7}$/;
                        break;
                    }
                    return reg.test(dev_id);
                }
            });
        </script>
    </body>
Idce_Lithium/WebRoot/iframe/batt-info-edit.html
@@ -590,9 +590,9 @@
                    //var ptn = /^1$/;
                }
                ,devid: function(value) {
                    var ptn = /^91([0-9]{7})$/;
                    var ptn = /^9([0-9]{8})$/;
                    if(!ptn.test(value)) {
                        return '设备id的格式不正确!以91开头的11位数字';
                        return '设备id的格式不正确!以9开头的8位数字';
                    }
                }
            });
@@ -822,7 +822,7 @@
            });
            // 根据设备id计算设备ip
            function getDevIp(dev_id) {
                var ptn = /^91([0-9]{7})$/;
                var ptn = /^9([0-9]{8})$/;
                var ip = '';
                if(ptn.test(dev_id)) {
                    var value = Number(RegExp.$1);