|
|
@@ -105,7 +105,7 @@ function homeGenPage() {
|
|
|
<div class="clearboth apply_button" style="padding-top:50px;">\
|
|
|
<div class="control-label" style="margin-top: 8px;"> </div>\
|
|
|
<div class="controls">\
|
|
|
- <button class="btn_normal_long" id="dm-refresh" onclick="GetTerminalBasicInfo()">\
|
|
|
+ <button class="btn_normal_long" id="dm-refresh" onclick="GetTerminalBasicInfo(true)">\
|
|
|
刷新\
|
|
|
</button>\
|
|
|
</div>\
|
|
|
@@ -124,14 +124,37 @@ function homeGenPage() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function GetTerminalBasicInfo(val) {
|
|
|
+ let req = new Request();
|
|
|
+ req.timeout = 60000
|
|
|
+ RVC.DeviceControlEntityCtrl.QueryHardwareInfo(req, function(ret){
|
|
|
+ if (ret.errorCode === 0) {
|
|
|
+ let result = JSON.parse(ret['{e12a3dc0-3a0b-47c4-a8c3-75190a42ae68}'])
|
|
|
+ $('#terminalNo span').html(result.terminalNo);
|
|
|
+ $('#machineType span').html(result.machineType);
|
|
|
+ $('#deploySite span').html(result.site);
|
|
|
+ $('#softwareVersion span').html(result.termVersion);
|
|
|
+ $('#ip4Address span').html(result.ip[0]);
|
|
|
+ $('#macAddress span').html(result.mac[0]);
|
|
|
+ } else if(typeof val !== 'undefined'){
|
|
|
+ utilStartAlertDialog("获取终端信息失败:" + ErrorCodeStringfy(ret.errorCode));
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
var homeController = (function() {
|
|
|
|
|
|
function initPage() {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
+ var fistTime = true;
|
|
|
|
|
|
function init() {
|
|
|
|
|
|
+ if (fistTime) {
|
|
|
+ fistTime = false;
|
|
|
+ GetTerminalBasicInfo();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return { init: init };
|