|
@@ -81,13 +81,13 @@ function onblurAddr(IPType){
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-let timeout=60000;
|
|
|
|
|
-let timeoutFn= setTimeout(function(){
|
|
|
|
|
- $('#loadContent').fadeOut('slow')
|
|
|
|
|
- let tips = '请求超时'
|
|
|
|
|
- ModalStyle(tips,'pathN')
|
|
|
|
|
- console.log('timeoutFn---->')
|
|
|
|
|
-},timeout)
|
|
|
|
|
|
|
+let timeout=6000;
|
|
|
|
|
+// let timeoutFn= setTimeout(function(){
|
|
|
|
|
+// $('#loadContent').fadeOut('slow')
|
|
|
|
|
+// let tips = '请求超时'
|
|
|
|
|
+// ModalStyle(tips,'pathN')
|
|
|
|
|
+// console.log('timeoutFn---setTimeout->')
|
|
|
|
|
+// },timeout)
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @description: 下载集中配置
|
|
* @description: 下载集中配置
|
|
@@ -98,9 +98,6 @@ let timeoutFn= setTimeout(function(){
|
|
|
function downLoad(){
|
|
function downLoad(){
|
|
|
let req = new Request(),reqIn ={};
|
|
let req = new Request(),reqIn ={};
|
|
|
let data = document.getElementsByTagName('input');
|
|
let data = document.getElementsByTagName('input');
|
|
|
-
|
|
|
|
|
- // reqIn.sSettingServer = data['configAddr'].value;
|
|
|
|
|
- // reqIn.nSettingPort = Number( data['configPoint'].value)
|
|
|
|
|
reqIn.strAddr = data['configAddr'].value;
|
|
reqIn.strAddr = data['configAddr'].value;
|
|
|
reqIn.nPort = Number( data['configPoint'].value)
|
|
reqIn.nPort = Number( data['configPoint'].value)
|
|
|
req.timeout = 60000
|
|
req.timeout = 60000
|
|
@@ -109,7 +106,14 @@ function downLoad(){
|
|
|
let IsNull = RegExpNull(reqIn)
|
|
let IsNull = RegExpNull(reqIn)
|
|
|
if(IsNull) return false
|
|
if(IsNull) return false
|
|
|
$('#loadContent').fadeIn('slow')
|
|
$('#loadContent').fadeIn('slow')
|
|
|
- timeoutFn
|
|
|
|
|
|
|
+ // timeoutFn
|
|
|
|
|
+ let timeoutFn= setTimeout(function(){
|
|
|
|
|
+ $('#loadContent').fadeOut('slow')
|
|
|
|
|
+ let tips = '请求超时'
|
|
|
|
|
+ ModalStyle(tips,'pathN')
|
|
|
|
|
+ console.log('timeoutFn--downLoad-setTimeout222->')
|
|
|
|
|
+ },timeout)
|
|
|
|
|
+
|
|
|
logEvent("CenterSettingService->downLoad");
|
|
logEvent("CenterSettingService->downLoad");
|
|
|
|
|
|
|
|
// InitializerService.DownloadCenterSetting(req, (ret)=> {
|
|
// InitializerService.DownloadCenterSetting(req, (ret)=> {
|
|
@@ -141,8 +145,14 @@ function downLoad(){
|
|
|
* @return:
|
|
* @return:
|
|
|
*/
|
|
*/
|
|
|
function ReadCenterConfig(readType,readConfig){
|
|
function ReadCenterConfig(readType,readConfig){
|
|
|
- $('#loadContent').fadeIn('slow')
|
|
|
|
|
- timeoutFn
|
|
|
|
|
|
|
+ $('#loadContent').fadeIn('slow');
|
|
|
|
|
+ let timeoutFn= setTimeout(function(){
|
|
|
|
|
+ $('#loadContent').fadeOut('slow')
|
|
|
|
|
+ let tips = '请求超时'
|
|
|
|
|
+ ModalStyle(tips,'pathN')
|
|
|
|
|
+ console.log('timeoutFn--ReadCenterConfig-setTimeout222->')
|
|
|
|
|
+ },timeout)
|
|
|
|
|
+
|
|
|
let req = new Request(),reqIn ={};
|
|
let req = new Request(),reqIn ={};
|
|
|
if(readType==='access'){
|
|
if(readType==='access'){
|
|
|
req.entityName = 'AccessAuthorization'
|
|
req.entityName = 'AccessAuthorization'
|
|
@@ -157,14 +167,14 @@ function ReadCenterConfig(readType,readConfig){
|
|
|
req.reserved4 = ''
|
|
req.reserved4 = ''
|
|
|
req.timeout = 60000
|
|
req.timeout = 60000
|
|
|
logEvent("DeviceControlService->ReadCenterConfigStr");
|
|
logEvent("DeviceControlService->ReadCenterConfigStr");
|
|
|
- console.log('DeviceControlService----')
|
|
|
|
|
|
|
+
|
|
|
DeviceControlService.ReadCenterConfigStr(req, function(ret) {
|
|
DeviceControlService.ReadCenterConfigStr(req, function(ret) {
|
|
|
logEvent("ReadCenterConfigStr ret: "+JSON.stringify(ret));
|
|
logEvent("ReadCenterConfigStr ret: "+JSON.stringify(ret));
|
|
|
|
|
+ console.log('ReadCenterConfigStr----',ret)
|
|
|
if(ret){
|
|
if(ret){
|
|
|
$('#loadContent').fadeOut('slow');
|
|
$('#loadContent').fadeOut('slow');
|
|
|
clearTimeout(timeoutFn)
|
|
clearTimeout(timeoutFn)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
|
|
|
if(ret.errorCode ===0){
|
|
if(ret.errorCode ===0){
|
|
|
let result = JSON.parse(ret['{e12a3dc0-3a0b-47c4-a8c3-75190a42ae68}'] )
|
|
let result = JSON.parse(ret['{e12a3dc0-3a0b-47c4-a8c3-75190a42ae68}'] )
|
|
@@ -181,12 +191,13 @@ function ReadCenterConfig(readType,readConfig){
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
}else{
|
|
|
- let tips ='读取集中配置失败'
|
|
|
|
|
|
|
+ let tips ='读取集中配置失败'+ret.errorCode.toString(16)
|
|
|
if(readConfig==='readConfig'){
|
|
if(readConfig==='readConfig'){
|
|
|
ModalStyle(tips,'pathN')
|
|
ModalStyle(tips,'pathN')
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -228,7 +239,13 @@ function ResetRSA(){
|
|
|
let IsNull = RegExpNull(reqIn)
|
|
let IsNull = RegExpNull(reqIn)
|
|
|
if(IsNull) return false
|
|
if(IsNull) return false
|
|
|
$('#loadContent').fadeIn('slow')
|
|
$('#loadContent').fadeIn('slow')
|
|
|
- timeoutFn
|
|
|
|
|
|
|
+ // timeoutFn
|
|
|
|
|
+ let timeoutFn= setTimeout(function(){
|
|
|
|
|
+ $('#loadContent').fadeOut('slow')
|
|
|
|
|
+ let tips = '请求超时'
|
|
|
|
|
+ ModalStyle(tips,'pathN')
|
|
|
|
|
+ console.log('timeoutFn--ReadCenterConfig-setTimeout222->')
|
|
|
|
|
+ },timeout)
|
|
|
logEvent("InitializerService->InitializeNew");
|
|
logEvent("InitializerService->InitializeNew");
|
|
|
|
|
|
|
|
//重置密钥
|
|
//重置密钥
|