| | |
| | | var element = layui.element; // 获取元素操作模块 |
| | | |
| | | // 设置检测文件名弹出框的content |
| | | var cFilenameContent = '<div style="width:300px; height: 110px;"><div style="margin-top: 20px;margin-left: 8px; margin-right: 8px; text-algin: center;">'+ |
| | | var cFilenameContent = '<div style="width:300px; height: 80px;"><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">'+ |
| | | '<select id="equipeTypeSel" style="width: 200px;height: 26px; border: 1px solid #ccc" disabled>'+ |
| | | '<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>'+ |
| | | '</select><br><br>'+ |
| | | '<span>系 统 类 型:</span>'+ |
| | | '<select id="sysType" style="width: 200px;height: 26px; border: 1px solid #ccc">'+ |
| | | '<span style="display: none">系 统 类 型:</span>'+ |
| | | '<select id="sysType" style="display: none; width: 200px;height: 26px; border: 1px solid #ccc">'+ |
| | | '<option value="12">1U</option>'+ |
| | | '<option value="2">2U</option>'+ |
| | | '</select><br><br>'+ |
| | | '<span>输入版本号:</span>'+ |
| | | '<input type="text" id="newestVer" style="width: 200px;height: 24px; border: 1px solid #ccc">'+ |
| | | '<span style="display: none">输入版本号:</span>'+ |
| | | '<input type="text" id="newestVer" style="display: none; width: 200px;height: 24px; border: 1px solid #ccc">'+ |
| | | '</div></div>'; |
| | | |
| | | var cVerContent = '<div style="width:300px; height: 50px;"><div style="margin-top: 20px;margin-left: 8px; margin-right: 8px; text-algin: center;">'+ |
| | |
| | | data:"json = "+JSON.stringify(temp), |
| | | success: function(result){ |
| | | var rs = JSON.parse(result.result); |
| | | //console.log(rs); |
| | | // console.log(rs); |
| | | if(rs.code == 1) { |
| | | var data = rs.data; |
| | | // console.log(data); |
| | | var updateData = checkUpdating(data, all, filename, newestVer, sysType); |
| | | $('#updateIframeData').data('update', updateData.good); // 可更新的设备信息 |
| | | $('#updateIframeData').data('errorUpdate', updateData.bad); // 无法更新的设备信息 |
| | |
| | | if(_all.updatestatusnum != 1) { |
| | | if(_all.fbsid == _rsData.FBSDeviceId && _all.filename == filename) { |
| | | // 检测当前版本号是否为最新 |
| | | var isNewstVer = checkNewestVer(newestVer, _all.version); |
| | | var isSysType = checkSysType(sysType, _all.version); |
| | | var isNewstVer = false; |
| | | var isSysType = true; |
| | | if(!isNewstVer && isSysType) { |
| | | isError = false; |
| | | } |
| | |
| | | rs.good.push(_all); |
| | | } |
| | | } |
| | | |
| | | return rs; |
| | | } |
| | | |