Commit 97dc926b282575de59ba1e97c567c9b890936927
1 parent
bfafe45b
调整ptzType字段名称
Showing
3 changed files
with
20 additions
and
20 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java
| @@ -142,13 +142,13 @@ public class DeviceChannel { | @@ -142,13 +142,13 @@ public class DeviceChannel { | ||
| 142 | * 云台类型 | 142 | * 云台类型 |
| 143 | */ | 143 | */ |
| 144 | @Schema(description = "云台类型") | 144 | @Schema(description = "云台类型") |
| 145 | - private int PTZType; | 145 | + private int ptzType; |
| 146 | 146 | ||
| 147 | /** | 147 | /** |
| 148 | * 云台类型描述字符串 | 148 | * 云台类型描述字符串 |
| 149 | */ | 149 | */ |
| 150 | @Schema(description = "云台类型描述字符串") | 150 | @Schema(description = "云台类型描述字符串") |
| 151 | - private String PTZTypeText; | 151 | + private String ptzTypeText; |
| 152 | 152 | ||
| 153 | /** | 153 | /** |
| 154 | * 创建时间 | 154 | * 创建时间 |
| @@ -266,23 +266,23 @@ public class DeviceChannel { | @@ -266,23 +266,23 @@ public class DeviceChannel { | ||
| 266 | this.deviceId = deviceId; | 266 | this.deviceId = deviceId; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | - public void setPTZType(int PTZType) { | ||
| 270 | - this.PTZType = PTZType; | ||
| 271 | - switch (PTZType) { | 269 | + public void setPtzType(int ptzType) { |
| 270 | + this.ptzType = ptzType; | ||
| 271 | + switch (ptzType) { | ||
| 272 | case 0: | 272 | case 0: |
| 273 | - this.PTZTypeText = "未知"; | 273 | + this.ptzTypeText = "未知"; |
| 274 | break; | 274 | break; |
| 275 | case 1: | 275 | case 1: |
| 276 | - this.PTZTypeText = "球机"; | 276 | + this.ptzTypeText = "球机"; |
| 277 | break; | 277 | break; |
| 278 | case 2: | 278 | case 2: |
| 279 | - this.PTZTypeText = "半球"; | 279 | + this.ptzTypeText = "半球"; |
| 280 | break; | 280 | break; |
| 281 | case 3: | 281 | case 3: |
| 282 | - this.PTZTypeText = "固定枪机"; | 282 | + this.ptzTypeText = "固定枪机"; |
| 283 | break; | 283 | break; |
| 284 | case 4: | 284 | case 4: |
| 285 | - this.PTZTypeText = "遥控枪机"; | 285 | + this.ptzTypeText = "遥控枪机"; |
| 286 | break; | 286 | break; |
| 287 | } | 287 | } |
| 288 | } | 288 | } |
| @@ -448,15 +448,15 @@ public class DeviceChannel { | @@ -448,15 +448,15 @@ public class DeviceChannel { | ||
| 448 | } | 448 | } |
| 449 | 449 | ||
| 450 | public int getPTZType() { | 450 | public int getPTZType() { |
| 451 | - return PTZType; | 451 | + return ptzType; |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | public String getPTZTypeText() { | 454 | public String getPTZTypeText() { |
| 455 | - return PTZTypeText; | 455 | + return ptzTypeText; |
| 456 | } | 456 | } |
| 457 | 457 | ||
| 458 | public void setPTZTypeText(String PTZTypeText) { | 458 | public void setPTZTypeText(String PTZTypeText) { |
| 459 | - this.PTZTypeText = PTZTypeText; | 459 | + this.ptzTypeText = PTZTypeText; |
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | public boolean isStatus() { | 462 | public boolean isStatus() { |
src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java
| @@ -568,14 +568,14 @@ public class XmlUtil { | @@ -568,14 +568,14 @@ public class XmlUtil { | ||
| 568 | String ptzTypeFromInfo = XmlUtil.getText(info, "PTZType"); | 568 | String ptzTypeFromInfo = XmlUtil.getText(info, "PTZType"); |
| 569 | if(!ObjectUtils.isEmpty(ptzTypeFromInfo)){ | 569 | if(!ObjectUtils.isEmpty(ptzTypeFromInfo)){ |
| 570 | try { | 570 | try { |
| 571 | - deviceChannel.setPTZType(Integer.parseInt(ptzTypeFromInfo)); | 571 | + deviceChannel.setPtzType(Integer.parseInt(ptzTypeFromInfo)); |
| 572 | }catch (NumberFormatException e){ | 572 | }catch (NumberFormatException e){ |
| 573 | logger.warn("[xml解析] 从通道数据info中获取PTZType失败: {}", ptzTypeFromInfo); | 573 | logger.warn("[xml解析] 从通道数据info中获取PTZType失败: {}", ptzTypeFromInfo); |
| 574 | } | 574 | } |
| 575 | } | 575 | } |
| 576 | } else { | 576 | } else { |
| 577 | try { | 577 | try { |
| 578 | - deviceChannel.setPTZType(Integer.parseInt(ptzType)); | 578 | + deviceChannel.setPtzType(Integer.parseInt(ptzType)); |
| 579 | }catch (NumberFormatException e){ | 579 | }catch (NumberFormatException e){ |
| 580 | logger.warn("[xml解析] 从通道数据中获取PTZType失败: {}", ptzType); | 580 | logger.warn("[xml解析] 从通道数据中获取PTZType失败: {}", ptzType); |
| 581 | } | 581 | } |
web_src/src/components/channelList.vue
| @@ -100,9 +100,9 @@ | @@ -100,9 +100,9 @@ | ||
| 100 | <span v-show="!scope.row.edit">{{ scope.row.location }}</span> | 100 | <span v-show="!scope.row.edit">{{ scope.row.location }}</span> |
| 101 | </template> | 101 | </template> |
| 102 | </el-table-column> | 102 | </el-table-column> |
| 103 | - <el-table-column prop="ptztype" label="云台类型" min-width="100"> | 103 | + <el-table-column prop="ptzType" label="云台类型" min-width="100"> |
| 104 | <template v-slot:default="scope"> | 104 | <template v-slot:default="scope"> |
| 105 | - <el-select v-show="scope.row.edit" v-model="scope.row.ptztype" | 105 | + <el-select v-show="scope.row.edit" v-model="scope.row.ptzType" |
| 106 | placeholder="云台类型" filterable> | 106 | placeholder="云台类型" filterable> |
| 107 | <el-option | 107 | <el-option |
| 108 | v-for="(value, key) in ptzTypes" | 108 | v-for="(value, key) in ptzTypes" |
| @@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
| 111 | :value="key" | 111 | :value="key" |
| 112 | /> | 112 | /> |
| 113 | </el-select> | 113 | </el-select> |
| 114 | - <div v-show="!scope.row.edit">{{ scope.row.ptztypeText }}</div> | 114 | + <div v-show="!scope.row.edit">{{ scope.row.ptzTypeText }}</div> |
| 115 | </template> | 115 | </template> |
| 116 | </el-table-column> | 116 | </el-table-column> |
| 117 | <el-table-column label="开启音频" min-width="100"> | 117 | <el-table-column label="开启音频" min-width="100"> |
| @@ -312,7 +312,7 @@ export default { | @@ -312,7 +312,7 @@ export default { | ||
| 312 | that.total = res.data.data.total; | 312 | that.total = res.data.data.total; |
| 313 | that.deviceChannelList = res.data.data.list; | 313 | that.deviceChannelList = res.data.data.list; |
| 314 | that.deviceChannelList.forEach(e => { | 314 | that.deviceChannelList.forEach(e => { |
| 315 | - e.ptztype = e.ptztype + ""; | 315 | + e.ptzType = e.ptzType + ""; |
| 316 | that.$set(e, "edit", false); | 316 | that.$set(e, "edit", false); |
| 317 | that.$set(e, "location", ""); | 317 | that.$set(e, "location", ""); |
| 318 | if (e.longitude && e.latitude) { | 318 | if (e.longitude && e.latitude) { |
| @@ -460,7 +460,7 @@ export default { | @@ -460,7 +460,7 @@ export default { | ||
| 460 | this.total = res.data.data.total; | 460 | this.total = res.data.data.total; |
| 461 | this.deviceChannelList = res.data.data.list; | 461 | this.deviceChannelList = res.data.data.list; |
| 462 | this.deviceChannelList.forEach(e => { | 462 | this.deviceChannelList.forEach(e => { |
| 463 | - e.ptztype = e.ptztype + ""; | 463 | + e.ptzType = e.ptzType + ""; |
| 464 | this.$set(e, "edit", false); | 464 | this.$set(e, "edit", false); |
| 465 | this.$set(e, "location", ""); | 465 | this.$set(e, "location", ""); |
| 466 | if (e.longitude && e.latitude) { | 466 | if (e.longitude && e.latitude) { |