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