From 97dc926b282575de59ba1e97c567c9b890936927 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 18 Mar 2024 17:41:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4ptzType=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/gb28181/bean/DeviceChannel.java | 26 +++++++++---------- .../iot/vmp/gb28181/utils/XmlUtil.java | 4 +-- web_src/src/components/channelList.vue | 10 +++---- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java index d58abcb3..43a5d48e 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java @@ -142,13 +142,13 @@ public class DeviceChannel { * 云台类型 */ @Schema(description = "云台类型") - private int PTZType; + private int ptzType; /** * 云台类型描述字符串 */ @Schema(description = "云台类型描述字符串") - private String PTZTypeText; + private String ptzTypeText; /** * 创建时间 @@ -266,23 +266,23 @@ public class DeviceChannel { this.deviceId = deviceId; } - public void setPTZType(int PTZType) { - this.PTZType = PTZType; - switch (PTZType) { + public void setPtzType(int ptzType) { + this.ptzType = ptzType; + switch (ptzType) { case 0: - this.PTZTypeText = "未知"; + this.ptzTypeText = "未知"; break; case 1: - this.PTZTypeText = "球机"; + this.ptzTypeText = "球机"; break; case 2: - this.PTZTypeText = "半球"; + this.ptzTypeText = "半球"; break; case 3: - this.PTZTypeText = "固定枪机"; + this.ptzTypeText = "固定枪机"; break; case 4: - this.PTZTypeText = "遥控枪机"; + this.ptzTypeText = "遥控枪机"; break; } } @@ -448,15 +448,15 @@ public class DeviceChannel { } public int getPTZType() { - return PTZType; + return ptzType; } public String getPTZTypeText() { - return PTZTypeText; + return ptzTypeText; } public void setPTZTypeText(String PTZTypeText) { - this.PTZTypeText = PTZTypeText; + this.ptzTypeText = PTZTypeText; } public boolean isStatus() { diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java index 9de1ef2b..70702bb6 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java @@ -568,14 +568,14 @@ public class XmlUtil { String ptzTypeFromInfo = XmlUtil.getText(info, "PTZType"); if(!ObjectUtils.isEmpty(ptzTypeFromInfo)){ try { - deviceChannel.setPTZType(Integer.parseInt(ptzTypeFromInfo)); + deviceChannel.setPtzType(Integer.parseInt(ptzTypeFromInfo)); }catch (NumberFormatException e){ logger.warn("[xml解析] 从通道数据info中获取PTZType失败: {}", ptzTypeFromInfo); } } } else { try { - deviceChannel.setPTZType(Integer.parseInt(ptzType)); + deviceChannel.setPtzType(Integer.parseInt(ptzType)); }catch (NumberFormatException e){ logger.warn("[xml解析] 从通道数据中获取PTZType失败: {}", ptzType); } diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue index 24f49468..a62805be 100755 --- a/web_src/src/components/channelList.vue +++ b/web_src/src/components/channelList.vue @@ -100,9 +100,9 @@ {{ scope.row.location }} - + - - {{ scope.row.ptztypeText }} + {{ scope.row.ptzTypeText }} @@ -312,7 +312,7 @@ export default { that.total = res.data.data.total; that.deviceChannelList = res.data.data.list; that.deviceChannelList.forEach(e => { - e.ptztype = e.ptztype + ""; + e.ptzType = e.ptzType + ""; that.$set(e, "edit", false); that.$set(e, "location", ""); if (e.longitude && e.latitude) { @@ -460,7 +460,7 @@ export default { this.total = res.data.data.total; this.deviceChannelList = res.data.data.list; this.deviceChannelList.forEach(e => { - e.ptztype = e.ptztype + ""; + e.ptzType = e.ptzType + ""; this.$set(e, "edit", false); this.$set(e, "location", ""); if (e.longitude && e.latitude) {