调整ptzType字段名称

pull/1384/head
648540858 2024-03-18 17:41:49 +08:00
parent bfafe45b26
commit 97dc926b28
3 changed files with 20 additions and 20 deletions

View File

@ -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() {

View File

@ -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);
}

View File

@ -100,9 +100,9 @@
<span v-show="!scope.row.edit">{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column prop="ptztype" label="云台类型" min-width="100">
<el-table-column prop="ptzType" label="云台类型" min-width="100">
<template v-slot:default="scope">
<el-select v-show="scope.row.edit" v-model="scope.row.ptztype"
<el-select v-show="scope.row.edit" v-model="scope.row.ptzType"
placeholder="云台类型" filterable>
<el-option
v-for="(value, key) in ptzTypes"
@ -111,7 +111,7 @@
:value="key"
/>
</el-select>
<div v-show="!scope.row.edit">{{ scope.row.ptztypeText }}</div>
<div v-show="!scope.row.edit">{{ scope.row.ptzTypeText }}</div>
</template>
</el-table-column>
<el-table-column label="开启音频" min-width="100">
@ -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) {