diff --git a/src/views/realTimeMonitor/components/setAppDialog.vue b/src/views/realTimeMonitor/components/setAppDialog.vue index 1a88394..780fce8 100644 --- a/src/views/realTimeMonitor/components/setAppDialog.vue +++ b/src/views/realTimeMonitor/components/setAppDialog.vue @@ -509,31 +509,52 @@ export default { console.log(res.data); console.log(JSON.parse(res.data.data)); const resultData = JSON.parse(res.data.data); - const resultContent = JSON.parse( - decodeURIComponent(escape(window.atob(resultData.content))) - ); - console.log(resultContent); + if (resultData.hasOwnProperty("content")) { + const resultContent = JSON.parse( + decodeURIComponent(escape(window.atob(resultData.content))) + ); + console.log(resultContent); - this.appForm.channels = resultContent.channels; //装置通道数,程序默认值为4 - this.appForm.packetSize = resultContent.packetSize; //图像数据分包大小 - this.appForm.timeForKeepingLogs = - resultContent.timeForKeepingLogs / 86400; //效范围:1*86400(含)-45*86400(含) 不设置的默认值为 15*86400 - this.appForm.timeForKeepingPhotos = - resultContent.timeForKeepingPhotos / 86400; //有效范围:1*86400(含)-45*86400(含) 不设置的默认值为 15*86400 - this.appForm.imgQuality = resultContent.imgQuality; //图像质量 - this.appForm.heartbeat = resultContent.heartbeat; //心跳周期 - this.appForm.upgradePacketBase = resultContent.upgradePacketBase; //升级报文中,子包起始号 一般可设置的值是 0或者1 - this.appForm.protocol = resultContent.protocol; // 规约(湖南、浙江 ...) 修改后需重启 - this.appForm.networkProtocol = resultContent.networkProtocol; // 网络协议 0: tcp 1 udp 修改后需重启 - // this.appForm.network = resultContent.network; // 使用的网络, 暂时不做配置 - this.appForm.CMDID = resultContent.CMDID; // 装置编号 修改后需重启 - this.appForm.server = resultContent.server; // CMA 服务器ip 修改后需重启 - this.appForm.port = resultContent.port; // CMA服务器端口 1025-65535 修改后需重启 - this.appForm.model = resultContent.model; // 装置型号 - this.appForm.equipName = resultContent.equipName; // 装置名称 - this.appForm.bsManufacturer = resultContent.bsManufacturer; // 生产厂家 - this.appForm.productionDate = resultContent.productionDate * 1000; // 生产日期 - this.appForm.workStatusTimes = resultContent.workStatusTimes; // 生产日期 + this.appForm.channels = resultContent.channels; //装置通道数,程序默认值为4 + this.appForm.packetSize = resultContent.packetSize; //图像数据分包大小 + this.appForm.timeForKeepingLogs = + resultContent.timeForKeepingLogs / 86400; //效范围:1*86400(含)-45*86400(含) 不设置的默认值为 15*86400 + this.appForm.timeForKeepingPhotos = + resultContent.timeForKeepingPhotos / 86400; //有效范围:1*86400(含)-45*86400(含) 不设置的默认值为 15*86400 + this.appForm.imgQuality = resultContent.imgQuality; //图像质量 + this.appForm.heartbeat = resultContent.heartbeat; //心跳周期 + this.appForm.upgradePacketBase = resultContent.upgradePacketBase; //升级报文中,子包起始号 一般可设置的值是 0或者1 + this.appForm.protocol = resultContent.protocol; // 规约(湖南、浙江 ...) 修改后需重启 + this.appForm.networkProtocol = resultContent.networkProtocol; // 网络协议 0: tcp 1 udp 修改后需重启 + // this.appForm.network = resultContent.network; // 使用的网络, 暂时不做配置 + this.appForm.CMDID = resultContent.CMDID; // 装置编号 修改后需重启 + this.appForm.server = resultContent.server; // CMA 服务器ip 修改后需重启 + this.appForm.port = resultContent.port; // CMA服务器端口 1025-65535 修改后需重启 + this.appForm.model = resultContent.model; // 装置型号 + this.appForm.equipName = resultContent.equipName; // 装置名称 + this.appForm.bsManufacturer = resultContent.bsManufacturer; // 生产厂家 + this.appForm.productionDate = resultContent.productionDate * 1000; // 生产日期 + this.appForm.workStatusTimes = resultContent.workStatusTimes; // 生产日期 + } else { + this.appForm.channels = 4; //装置通道数,程序默认值为4 + this.appForm.packetSize = 2048; //图像数据分包大小 + this.appForm.timeForKeepingLogs = 15; //效范围:1*86400(含)-45*86400(含) 不设置的默认值为 15*86400 + this.appForm.timeForKeepingPhotos = 15; //有效范围:1*86400(含)-45*86400(含) 不设置的默认值为 15*86400 + this.appForm.imgQuality = ""; //图像质量 + this.appForm.heartbeat = 10; //心跳周期 + this.appForm.upgradePacketBase = 0; //升级报文中,子包起始号 一般可设置的值是 0或者1 + this.appForm.protocol = this.areaData.protocol; // 规约(湖南、浙江 ...) 修改后需重启 + this.appForm.networkProtocol = 0; // 网络协议 0: tcp 1 udp 修改后需重启 + // this.appForm.network = resultContent.network; // 使用的网络, 暂时不做配置 + this.appForm.CMDID = this.areaData.cmdid; // 装置编号 修改后需重启 + this.appForm.server = ""; // CMA 服务器ip 修改后需重启 + this.appForm.port = ""; // CMA服务器端口 1025-65535 修改后需重启 + this.appForm.model = ""; // 装置型号 + this.appForm.equipName = ""; // 装置名称 + this.appForm.bsManufacturer = ""; // 生产厂家 + this.appForm.productionDate = ""; // 生产日期 + this.appForm.productionDate = 3; // 工作状态报周期 + } this.$message({ duration: 1500, diff --git a/src/views/realTimeMonitor/components/setChannelDialog.vue b/src/views/realTimeMonitor/components/setChannelDialog.vue index 64e4ec8..f0c1fc3 100644 --- a/src/views/realTimeMonitor/components/setChannelDialog.vue +++ b/src/views/realTimeMonitor/components/setChannelDialog.vue @@ -37,7 +37,7 @@ > @@ -99,33 +99,30 @@ - -
- - - - - + + + + (毫秒) @@ -134,7 +131,7 @@
- +
@@ -146,7 +143,7 @@ > - - +
- - - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + +