[1078] 优化终端参数查询和设置
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.genersoft.iot.vmp.jt1078.bean;
|
||||
|
||||
import com.genersoft.iot.vmp.jt1078.bean.config.JTDeviceSubConfig;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -8,14 +11,12 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "报警标志")
|
||||
public class JTAlarmSign {
|
||||
public class JTAlarmSign implements JTDeviceSubConfig {
|
||||
|
||||
@Schema(description = "紧急报警,触动报警开关后触发")
|
||||
private boolean urgent;
|
||||
|
||||
@Schema(description = "超速报警")
|
||||
private boolean alarmSpeeding;
|
||||
|
||||
@Schema(description = "疲劳驾驶报警")
|
||||
private boolean alarmTired;
|
||||
@Schema(description = "危险驾驶行为报警")
|
||||
@@ -43,7 +44,7 @@ public class JTAlarmSign {
|
||||
@Schema(description = "疲劳驾驶预警")
|
||||
private boolean warningTired;
|
||||
@Schema(description = "违规行驶报警")
|
||||
private boolean alarmwrong;
|
||||
private boolean alarmWrong;
|
||||
@Schema(description = "胎压预警")
|
||||
private boolean warningTirePressure;
|
||||
@Schema(description = "右转盲区异常报警")
|
||||
@@ -78,7 +79,7 @@ public class JTAlarmSign {
|
||||
public JTAlarmSign() {
|
||||
}
|
||||
|
||||
public JTAlarmSign(int alarmSignInt) {
|
||||
public JTAlarmSign(long alarmSignInt) {
|
||||
if (alarmSignInt == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -98,7 +99,7 @@ public class JTAlarmSign {
|
||||
this.alarmIcFault = (alarmSignInt >>> 12 & 1) == 1;
|
||||
this.warningSpeeding = (alarmSignInt >>> 13 & 1) == 1;
|
||||
this.warningTired = (alarmSignInt >>> 14 & 1) == 1;
|
||||
this.alarmwrong = (alarmSignInt >>> 15 & 1) == 1;
|
||||
this.alarmWrong = (alarmSignInt >>> 15 & 1) == 1;
|
||||
this.warningTirePressure = (alarmSignInt >>> 16 & 1) == 1;
|
||||
this.alarmBlindZone = (alarmSignInt >>> 17 & 1) == 1;
|
||||
this.alarmDrivingTimeout = (alarmSignInt >>> 18 & 1) == 1;
|
||||
@@ -116,6 +117,113 @@ public class JTAlarmSign {
|
||||
this.warningRollover = (alarmSignInt >>> 30 & 1) == 1;
|
||||
}
|
||||
|
||||
public static JTAlarmSign decode(ByteBuf byteBuf) {
|
||||
long alarmSignByte = byteBuf.readUnsignedInt();
|
||||
return new JTAlarmSign(alarmSignByte);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteBuf encode() {
|
||||
// 限定容量 避免影响后续占位
|
||||
ByteBuf byteBuf = Unpooled.buffer();
|
||||
long alarmSignValue = 0;
|
||||
if (urgent) {
|
||||
alarmSignValue = alarmSignValue | 1;
|
||||
}
|
||||
if (alarmSpeeding) {
|
||||
alarmSignValue = alarmSignValue | 1 << 1;
|
||||
}
|
||||
if (alarmTired) {
|
||||
alarmSignValue = alarmSignValue | 1 << 2;
|
||||
}
|
||||
if (alarmDangerous) {
|
||||
alarmSignValue = alarmSignValue | 1 << 3;
|
||||
}
|
||||
if (alarmGnssFault) {
|
||||
alarmSignValue = alarmSignValue | 1 << 4;
|
||||
}
|
||||
if (alarmGnssBreak) {
|
||||
alarmSignValue = alarmSignValue | 1 << 5;
|
||||
}
|
||||
if (alarmGnssShortCircuited) {
|
||||
alarmSignValue = alarmSignValue | 1 << 6;
|
||||
}
|
||||
if (alarmUnderVoltage) {
|
||||
alarmSignValue = alarmSignValue | 1 << 7;
|
||||
}
|
||||
if (alarmPowerOff) {
|
||||
alarmSignValue = alarmSignValue | 1 << 8;
|
||||
}
|
||||
if (alarmLCD) {
|
||||
alarmSignValue = alarmSignValue | 1 << 9;
|
||||
}
|
||||
if (alarmTtsFault) {
|
||||
alarmSignValue = alarmSignValue | 1 << 10;
|
||||
}
|
||||
if (alarmCameraFault) {
|
||||
alarmSignValue = alarmSignValue | 1 << 11;
|
||||
}
|
||||
if (alarmIcFault) {
|
||||
alarmSignValue = alarmSignValue | 1 << 12;
|
||||
}
|
||||
if (warningSpeeding) {
|
||||
alarmSignValue = alarmSignValue | 1 << 13;
|
||||
}
|
||||
if (warningTired) {
|
||||
alarmSignValue = alarmSignValue | 1 << 14;
|
||||
}
|
||||
if (alarmWrong) {
|
||||
alarmSignValue = alarmSignValue | 1 << 15;
|
||||
}
|
||||
if (warningTirePressure) {
|
||||
alarmSignValue = alarmSignValue | 1 << 16;
|
||||
}
|
||||
if (alarmBlindZone) {
|
||||
alarmSignValue = alarmSignValue | 1 << 17;
|
||||
}
|
||||
if (alarmDrivingTimeout) {
|
||||
alarmSignValue = alarmSignValue | 1 << 18;
|
||||
}
|
||||
if (alarmParkingTimeout) {
|
||||
alarmSignValue = alarmSignValue | 1 << 19;
|
||||
}
|
||||
if (alarmRegion) {
|
||||
alarmSignValue = alarmSignValue | 1 << 20;
|
||||
}
|
||||
if (alarmRoute) {
|
||||
alarmSignValue = alarmSignValue | 1 << 21;
|
||||
}
|
||||
if (alarmTravelTime) {
|
||||
alarmSignValue = alarmSignValue | 1 << 22;
|
||||
}
|
||||
if (alarmRouteDeviation) {
|
||||
alarmSignValue = alarmSignValue | 1 << 23;
|
||||
}
|
||||
if (alarmVSS) {
|
||||
alarmSignValue = alarmSignValue | 1 << 24;
|
||||
}
|
||||
if (alarmOil) {
|
||||
alarmSignValue = alarmSignValue | 1 << 25;
|
||||
}
|
||||
if (alarmStolen) {
|
||||
alarmSignValue = alarmSignValue | 1 << 26;
|
||||
}
|
||||
if (alarmIllegalIgnition) {
|
||||
alarmSignValue = alarmSignValue | 1 << 27;
|
||||
}
|
||||
if (alarmIllegalDisplacement) {
|
||||
alarmSignValue = alarmSignValue | 1 << 28;
|
||||
}
|
||||
if (alarmRollover) {
|
||||
alarmSignValue = alarmSignValue | 1 << 29;
|
||||
}
|
||||
if (warningRollover) {
|
||||
alarmSignValue = alarmSignValue | 1 << 30;
|
||||
}
|
||||
byteBuf.writeLong(alarmSignValue);
|
||||
return byteBuf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "状态报警标志位:" +
|
||||
@@ -134,7 +242,7 @@ public class JTAlarmSign {
|
||||
"\n 道路运输证IC卡模块故障报警:" + (alarmIcFault?"开":"关") +
|
||||
"\n 超速预警:" + (warningSpeeding?"开":"关") +
|
||||
"\n 疲劳驾驶预警:" + (warningTired?"开":"关") +
|
||||
"\n 违规行驶报警:" + (alarmwrong?"开":"关") +
|
||||
"\n 违规行驶报警:" + (alarmWrong ?"开":"关") +
|
||||
"\n 胎压预警:" + (warningTirePressure?"开":"关") +
|
||||
"\n 右转盲区异常报警:" + (alarmBlindZone?"开":"关") +
|
||||
"\n 当天累计驾驶超时报警:" + (alarmDrivingTimeout?"开":"关") +
|
||||
@@ -152,4 +260,5 @@ public class JTAlarmSign {
|
||||
"\n 侧翻预警:" + (warningRollover?"开":"关") +
|
||||
"\n ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class JTDeviceConfig {
|
||||
private Long udpRetransmissionCount;
|
||||
|
||||
@ConfigAttribute(id = 0x6, type="Long", description = "SMS 消息应答超时时间,单位为秒(s)")
|
||||
private Long smsResponseTimeout;
|
||||
private Long smsResponseTimeout;
|
||||
|
||||
@ConfigAttribute(id = 0x7, type="Long", description = "SMS 消息重传次数")
|
||||
private Long smsRetransmissionCount;
|
||||
@@ -150,20 +150,20 @@ public class JTDeviceConfig {
|
||||
@ConfigAttribute(id = 0x49, type="String", description = "监管平台特权短信号码")
|
||||
private String privilegedSMSNumber;
|
||||
|
||||
@ConfigAttribute(id = 0x50, type="Long", description = "报警屏蔽字 ,与位置信息汇报消息中的报警标志相对应 ,相应位为 1 则相应报警被屏蔽")
|
||||
private Long alarmMaskingWord;
|
||||
@ConfigAttribute(id = 0x50, type="AlarmSign", description = "报警屏蔽字 ,与位置信息汇报消息中的报警标志相对应 ,相应位为 1 则相应报警被屏蔽")
|
||||
private JTAlarmSign alarmMaskingWord;
|
||||
|
||||
@ConfigAttribute(id = 0x51, type="Long", description = "报警发送文本 SMS 开关 , 与位置信息汇报消息中的报警标志相对 应 ,相应位为1 则相应报警时发送文本 SMS")
|
||||
private Long alarmSendsTextSmsSwitch;
|
||||
@ConfigAttribute(id = 0x51, type="AlarmSign", description = "报警发送文本 SMS 开关 , 与位置信息汇报消息中的报警标志相对 应 ,相应位为1 则相应报警时发送文本 SMS")
|
||||
private JTAlarmSign alarmSendsTextSmsSwitch;
|
||||
|
||||
@ConfigAttribute(id = 0x52, type="Long", description = "报警拍摄开关 ,与位置信息汇报消息中的报警标志相对应 ,相应位为 1 则相应报警时摄像头拍摄")
|
||||
private Long alarmShootingSwitch;
|
||||
@ConfigAttribute(id = 0x52, type="AlarmSign", description = "报警拍摄开关 ,与位置信息汇报消息中的报警标志相对应 ,相应位为 1 则相应报警时摄像头拍摄")
|
||||
private JTAlarmSign alarmShootingSwitch;
|
||||
|
||||
@ConfigAttribute(id = 0x53, type="Long", description = "报警拍摄存储标志 ,与位置信息汇报消息中的报警标志相对应 ,相应 位为1 则对相应报警时拍的照片进行存储 ,否则实时上传")
|
||||
private Long alarmShootingStorageFlags;
|
||||
@ConfigAttribute(id = 0x53, type="AlarmSign", description = "报警拍摄存储标志 ,与位置信息汇报消息中的报警标志相对应 ,相应 位为1 则对相应报警时拍的照片进行存储 ,否则实时上传")
|
||||
private JTAlarmSign alarmShootingStorageFlags;
|
||||
|
||||
@ConfigAttribute(id = 0x54, type="Long", description = "关键标志 ,与位置信息汇报消息中的报警标志相对应 ,相应位为 1 则 对相应报警为关键报警")
|
||||
private Long KeySign;
|
||||
@ConfigAttribute(id = 0x54, type="AlarmSign", description = "关键标志 ,与位置信息汇报消息中的报警标志相对应 ,相应位为 1 则 对相应报警为关键报警")
|
||||
private JTAlarmSign KeySign;
|
||||
|
||||
@ConfigAttribute(id = 0x55, type="Long", description = "最高速度 ,单位为千米每小时(km/h)")
|
||||
private Long maxSpeed;
|
||||
|
||||
@@ -71,9 +71,9 @@ public class JTPositionBaseInfo {
|
||||
log.error("[位置基本信息] 解码失败,长度不足: {}", buf.readableBytes());
|
||||
return positionInfo;
|
||||
}
|
||||
positionInfo.setAlarmSign(new JTAlarmSign(buf.readInt()));
|
||||
positionInfo.setAlarmSign(new JTAlarmSign(buf.readUnsignedInt()));
|
||||
|
||||
positionInfo.setStatus(new JTStatus(buf.readInt()));
|
||||
positionInfo.setStatus(new JTStatus(buf.readUnsignedInt()));
|
||||
|
||||
positionInfo.setLatitude(buf.readInt() * 0.000001D);
|
||||
positionInfo.setLongitude(buf.readInt() * 0.000001D);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class JTStatus {
|
||||
public JTStatus() {
|
||||
}
|
||||
|
||||
public JTStatus(int statusInt) {
|
||||
public JTStatus(long statusInt) {
|
||||
if (statusInt == 0) {
|
||||
return;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class JTStatus {
|
||||
this.positionEncryption = (statusInt >>> 5 & 1) == 1;
|
||||
this.warningFrontCrash = (statusInt >>> 6 & 1) == 1;
|
||||
this.warningShifting = (statusInt >>> 7 & 1) == 1;
|
||||
this.load = (statusInt >>> 8 & 3);
|
||||
this.load = (int)(statusInt >>> 8 & 3);
|
||||
this.oilWayBreak = (statusInt >>> 10 & 1) == 1;
|
||||
this.circuitBreak = (statusInt >>> 11 & 1) == 1;
|
||||
this.doorLocking = (statusInt >>> 12 & 1) == 1;
|
||||
|
||||
@@ -29,6 +29,9 @@ public class JTChannelParam implements JTDeviceSubConfig {
|
||||
ByteBuf byteBuf = Unpooled.buffer();
|
||||
byteBuf.writeByte(jtAloneChanelList.size());
|
||||
for (JTAloneChanel jtAloneChanel : jtAloneChanelList) {
|
||||
if (jtAloneChanel == null) {
|
||||
continue;
|
||||
}
|
||||
byteBuf.writeBytes(jtAloneChanel.encode());
|
||||
}
|
||||
return byteBuf;
|
||||
|
||||
@@ -2,10 +2,12 @@ package com.genersoft.iot.vmp.jt1078.bean.config;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 违规行驶时段范围 ,精确到分
|
||||
*/
|
||||
@Data
|
||||
public class JTVideoParam implements JTDeviceSubConfig{
|
||||
/**
|
||||
* 实时流编码模式
|
||||
@@ -92,103 +94,6 @@ public class JTVideoParam implements JTDeviceSubConfig{
|
||||
*/
|
||||
private int audioEnable;
|
||||
|
||||
|
||||
public int getLiveStreamCodeRateType() {
|
||||
return liveStreamCodeRateType;
|
||||
}
|
||||
|
||||
public void setLiveStreamCodeRateType(int liveStreamCodeRateType) {
|
||||
this.liveStreamCodeRateType = liveStreamCodeRateType;
|
||||
}
|
||||
|
||||
public int getLiveStreamResolving() {
|
||||
return liveStreamResolving;
|
||||
}
|
||||
|
||||
public void setLiveStreamResolving(int liveStreamResolving) {
|
||||
this.liveStreamResolving = liveStreamResolving;
|
||||
}
|
||||
|
||||
public int getLiveStreamIInterval() {
|
||||
return liveStreamIInterval;
|
||||
}
|
||||
|
||||
public void setLiveStreamIInterval(int liveStreamIInterval) {
|
||||
this.liveStreamIInterval = liveStreamIInterval;
|
||||
}
|
||||
|
||||
public int getLiveStreamFrameRate() {
|
||||
return liveStreamFrameRate;
|
||||
}
|
||||
|
||||
public void setLiveStreamFrameRate(int liveStreamFrameRate) {
|
||||
this.liveStreamFrameRate = liveStreamFrameRate;
|
||||
}
|
||||
|
||||
public long getLiveStreamCodeRate() {
|
||||
return liveStreamCodeRate;
|
||||
}
|
||||
|
||||
public void setLiveStreamCodeRate(long liveStreamCodeRate) {
|
||||
this.liveStreamCodeRate = liveStreamCodeRate;
|
||||
}
|
||||
|
||||
public int getStorageStreamCodeRateType() {
|
||||
return storageStreamCodeRateType;
|
||||
}
|
||||
|
||||
public void setStorageStreamCodeRateType(int storageStreamCodeRateType) {
|
||||
this.storageStreamCodeRateType = storageStreamCodeRateType;
|
||||
}
|
||||
|
||||
public int getStorageStreamResolving() {
|
||||
return storageStreamResolving;
|
||||
}
|
||||
|
||||
public void setStorageStreamResolving(int storageStreamResolving) {
|
||||
this.storageStreamResolving = storageStreamResolving;
|
||||
}
|
||||
|
||||
public int getStorageStreamIInterval() {
|
||||
return storageStreamIInterval;
|
||||
}
|
||||
|
||||
public void setStorageStreamIInterval(int storageStreamIInterval) {
|
||||
this.storageStreamIInterval = storageStreamIInterval;
|
||||
}
|
||||
|
||||
public int getStorageStreamFrameRate() {
|
||||
return storageStreamFrameRate;
|
||||
}
|
||||
|
||||
public void setStorageStreamFrameRate(int storageStreamFrameRate) {
|
||||
this.storageStreamFrameRate = storageStreamFrameRate;
|
||||
}
|
||||
|
||||
public long getStorageStreamCodeRate() {
|
||||
return storageStreamCodeRate;
|
||||
}
|
||||
|
||||
public void setStorageStreamCodeRate(long storageStreamCodeRate) {
|
||||
this.storageStreamCodeRate = storageStreamCodeRate;
|
||||
}
|
||||
|
||||
public JTOSDConfig getOsd() {
|
||||
return osd;
|
||||
}
|
||||
|
||||
public void setOsd(JTOSDConfig osd) {
|
||||
this.osd = osd;
|
||||
}
|
||||
|
||||
public int getAudioEnable() {
|
||||
return audioEnable;
|
||||
}
|
||||
|
||||
public void setAudioEnable(int audioEnable) {
|
||||
this.audioEnable = audioEnable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteBuf encode() {
|
||||
ByteBuf byteBuf = Unpooled.buffer();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.genersoft.iot.vmp.jt1078.proc.request;
|
||||
|
||||
import com.genersoft.iot.vmp.jt1078.annotation.MsgId;
|
||||
import com.genersoft.iot.vmp.jt1078.bean.JTAlarmSign;
|
||||
import com.genersoft.iot.vmp.jt1078.bean.JTDeviceConfig;
|
||||
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
|
||||
import com.genersoft.iot.vmp.jt1078.bean.config.*;
|
||||
@@ -157,6 +158,11 @@ public class J0104 extends Re {
|
||||
Method methodForAwakenParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTAwakenParam.class);
|
||||
methodForAwakenParam.invoke(deviceConfig, awakenParamParam);
|
||||
continue;
|
||||
case "AlarmSign":
|
||||
JTAlarmSign alarmSign = JTAlarmSign.decode(buf);
|
||||
Method methodForAlarmSign = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTAlarmSign.class);
|
||||
methodForAlarmSign.invoke(deviceConfig, alarmSign);
|
||||
continue;
|
||||
default:
|
||||
System.err.println(field.getGenericType().getTypeName());
|
||||
continue;
|
||||
|
||||
@@ -96,11 +96,12 @@ public class J8103 extends Rs {
|
||||
case "VideoAlarmBit":
|
||||
case "AnalyzeAlarmParam":
|
||||
case "AwakenParam":
|
||||
case "AlarmSign":
|
||||
field.setAccessible(true);
|
||||
JTDeviceSubConfig subConfig = (JTDeviceSubConfig)field.get(config);
|
||||
ByteBuf bytesForIllegalDrivingPeriods = subConfig.encode();
|
||||
buffer.writeByte(bytesForIllegalDrivingPeriods.readableBytes());
|
||||
buffer.writeBytes(bytesForIllegalDrivingPeriods);
|
||||
ByteBuf byteBuf = subConfig.encode();
|
||||
buffer.writeByte(byteBuf.readableBytes());
|
||||
buffer.writeBytes(byteBuf);
|
||||
continue;
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
||||
85
web/src/views/jtDevice/deviceParam/alarm.vue
Executable file
85
web/src/views/jtDevice/deviceParam/alarm.vue
Executable file
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div style="height: calc(100vh - 260px); overflow: auto">
|
||||
<el-form ref="form" :model="form" label-width="240px" style="width: 90%; margin: 0 auto; ">
|
||||
<el-form-item label="报警屏蔽字" prop="alarmMaskingWord">
|
||||
<alarmSign v-model="form.alarmMaskingWord"></alarmSign>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警发送文本SMS开关" prop="alarmSendsTextSmsSwitch">
|
||||
<alarmSign v-model="form.alarmSendsTextSmsSwitch"></alarmSign>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警拍摄开关" prop="alarmShootingSwitch">
|
||||
<alarmSign v-model="form.alarmShootingSwitch"></alarmSign>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警拍摄存储标志" prop="alarmShootingStorageFlags">
|
||||
<alarmSign v-model="form.alarmShootingStorageFlags"></alarmSign>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键标志" prop="KeySign">
|
||||
<alarmSign v-model="form.KeySign"></alarmSign>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子围栏半径(米)" prop="fenceRadius">
|
||||
<el-input v-model="form.fenceRadius" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<p style="text-align: right">
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
<el-button @click="showDevice">取消</el-button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import alarmSign from './alarmSign.vue'
|
||||
|
||||
export default {
|
||||
name: 'communication',
|
||||
components: {
|
||||
alarmSign
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
alarmMaskingWord: {},
|
||||
alarmSendsTextSmsSwitch: {},
|
||||
alarmShootingSwitch: {},
|
||||
alarmShootingStorageFlags: {},
|
||||
KeySign: {}
|
||||
},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.$emit('submit', this.form)
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
133
web/src/views/jtDevice/deviceParam/alarmSign.vue
Executable file
133
web/src/views/jtDevice/deviceParam/alarmSign.vue
Executable file
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<el-checkbox label="紧急报警" v-model="form.urgent" @change="change"></el-checkbox>
|
||||
<el-checkbox label="超速报警" v-model="form.alarmSpeeding" @change="change"></el-checkbox>
|
||||
<el-checkbox label="疲劳驾驶报警" v-model="form.alarmTired" @change="change"></el-checkbox>
|
||||
<el-checkbox label="危险驾驶行为报警" v-model="form.alarmDangerous" @change="change"></el-checkbox>
|
||||
<el-checkbox label="GNSS模块发生故障报警" v-model="form.alarmGnssFault" @change="change"></el-checkbox>
|
||||
<el-checkbox label="GNSS天线未接或被剪断报警" v-model="form.alarmGnssBreak" @change="change"></el-checkbox>
|
||||
<el-checkbox label="GNSS天线短路报警" v-model="form.alarmGnssShortCircuited" @change="change"></el-checkbox>
|
||||
<el-checkbox label="终端主电源欠压报警" v-model="form.alarmUnderVoltage" @change="change"></el-checkbox>
|
||||
<el-checkbox label="终端主电源掉电报警" v-model="form.alarmPowerOff" @change="change"></el-checkbox>
|
||||
<el-checkbox label="终端LCD或显示器故障报警" v-model="form.alarmLCD" @change="change"></el-checkbox>
|
||||
<el-checkbox label="TTS模块故障报警" v-model="form.alarmTtsFault" @change="change"></el-checkbox>
|
||||
<el-checkbox label="摄像头故障报警" v-model="form.alarmCameraFault" @change="change"></el-checkbox>
|
||||
<el-checkbox label="IC卡模块故障报警" v-model="form.alarmIcFault" @change="change"></el-checkbox>
|
||||
<el-checkbox label="超速预警" v-model="form.warningSpeeding" @change="change"></el-checkbox>
|
||||
<el-checkbox label="疲劳驾驶预警" v-model="form.warningTired" @change="change"></el-checkbox>
|
||||
<el-checkbox label="违规行驶报警" v-model="form.alarmWrong" @change="change"></el-checkbox>
|
||||
<el-checkbox label="胎压预警" v-model="form.warningTirePressure" @change="change"></el-checkbox>
|
||||
<el-checkbox label="右转盲区异常报警" v-model="form.alarmBlindZone" @change="change"></el-checkbox>
|
||||
<el-checkbox label="当天累计驾驶超时报警" v-model="form.alarmDrivingTimeout" @change="change"></el-checkbox>
|
||||
<el-checkbox label="超时停车报警" v-model="form.alarmParkingTimeout" @change="change"></el-checkbox>
|
||||
<el-checkbox label="进出区域报警" v-model="form.alarmRegion" @change="change"></el-checkbox>
|
||||
<el-checkbox label="进出路线报警" v-model="form.alarmRoute" @change="change"></el-checkbox>
|
||||
<el-checkbox label="路段行驶时间不足/过长报警" v-model="form.alarmTravelTime" @change="change"></el-checkbox>
|
||||
<el-checkbox label="路线偏离报警" v-model="form.alarmRouteDeviation" @change="change"></el-checkbox>
|
||||
<el-checkbox label="车辆VSS故障" v-model="form.alarmVSS" @change="change"></el-checkbox>
|
||||
<el-checkbox label="车辆油量异常报警" v-model="form.alarmOil" @change="change"></el-checkbox>
|
||||
<el-checkbox label="车辆被盗报警" v-model="form.alarmStolen" @change="change"></el-checkbox>
|
||||
<el-checkbox label="车辆非法点火报警" v-model="form.alarmIllegalIgnition" @change="change"></el-checkbox>
|
||||
<el-checkbox label="车辆非法位移报警" v-model="form.alarmIllegalDisplacement" @change="change"></el-checkbox>
|
||||
<el-checkbox label="碰撞侧翻报警" v-model="form.alarmRollover" @change="change"></el-checkbox>
|
||||
<el-checkbox label="侧翻预警" v-model="form.warningRollover" @change="change"></el-checkbox>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'communication',
|
||||
components: {
|
||||
},
|
||||
model: {
|
||||
prop: 'fatherValue',
|
||||
event: 'change'
|
||||
},
|
||||
props: {
|
||||
fatherValue: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
urgent: false,
|
||||
alarmSpeeding: false,
|
||||
alarmTired: false,
|
||||
alarmDangerous: false,
|
||||
alarmGnssFault: false,
|
||||
alarmGnssBreak: false,
|
||||
alarmGnssShortCircuited: false,
|
||||
alarmUnderVoltage: false,
|
||||
alarmPowerOff: false,
|
||||
alarmLCD: false,
|
||||
alarmTtsFault: false,
|
||||
alarmCameraFault: false,
|
||||
alarmIcFault: false,
|
||||
warningSpeeding: false,
|
||||
warningTired: false,
|
||||
alarmWrong: false,
|
||||
warningTirePressure: false,
|
||||
alarmBlindZone: false,
|
||||
alarmDrivingTimeout: false,
|
||||
alarmParkingTimeout: false,
|
||||
alarmRegion: false,
|
||||
alarmRoute: false,
|
||||
alarmTravelTime: false,
|
||||
alarmRouteDeviation: false,
|
||||
alarmVSS: false,
|
||||
alarmOil: false,
|
||||
alarmStolen: false,
|
||||
alarmIllegalIgnition: false,
|
||||
alarmIllegalDisplacement: false,
|
||||
alarmRollover: false,
|
||||
warningRollover: false
|
||||
},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (this.fatherValue !== null) {
|
||||
this.form.urgent = this.fatherValue.urgent || false
|
||||
this.form.alarmSpeeding = this.fatherValue.alarmSpeeding || false
|
||||
this.form.alarmTired = this.fatherValue.alarmTired || false
|
||||
this.form.alarmDangerous = this.fatherValue.alarmDangerous || false
|
||||
this.form.alarmGnssFault = this.fatherValue.alarmGnssFault || false
|
||||
this.form.alarmGnssBreak = this.fatherValue.alarmGnssBreak || false
|
||||
this.form.alarmGnssShortCircuited = this.fatherValue.alarmGnssShortCircuited || false
|
||||
this.form.alarmUnderVoltage = this.fatherValue.alarmUnderVoltage || false
|
||||
this.form.alarmPowerOff = this.fatherValue.alarmPowerOff || false
|
||||
this.form.alarmLCD = this.fatherValue.alarmLCD || false
|
||||
this.form.alarmTtsFault = this.fatherValue.alarmTtsFault || false
|
||||
this.form.alarmCameraFault = this.fatherValue.alarmCameraFault || false
|
||||
this.form.alarmIcFault = this.fatherValue.alarmIcFault || false
|
||||
this.form.warningSpeeding = this.fatherValue.warningSpeeding || false
|
||||
this.form.warningTired = this.fatherValue.warningTired || false
|
||||
this.form.alarmWrong = this.fatherValue.alarmWrong || false
|
||||
this.form.warningTirePressure = this.fatherValue.warningTirePressure || false
|
||||
this.form.alarmBlindZone = this.fatherValue.alarmBlindZone || false
|
||||
this.form.alarmDrivingTimeout = this.fatherValue.alarmDrivingTimeout || false
|
||||
this.form.alarmParkingTimeout = this.fatherValue.alarmParkingTimeout || false
|
||||
this.form.alarmRegion = this.fatherValue.alarmRegion || false
|
||||
this.form.alarmRoute = this.fatherValue.alarmRoute || false
|
||||
this.form.alarmTravelTime = this.fatherValue.alarmTravelTime || false
|
||||
this.form.alarmRouteDeviation = this.fatherValue.alarmRouteDeviation || false
|
||||
this.form.alarmVSS = this.fatherValue.alarmVSS || false
|
||||
this.form.alarmOil = this.fatherValue.alarmOil || false
|
||||
this.form.alarmStolen = this.fatherValue.alarmStolen || false
|
||||
this.form.alarmIllegalIgnition = this.fatherValue.alarmIllegalIgnition || false
|
||||
this.form.alarmIllegalDisplacement = this.fatherValue.alarmIllegalDisplacement || false
|
||||
this.form.alarmRollover = this.fatherValue.alarmRollover || false
|
||||
this.form.warningRollover = this.fatherValue.warningRollover || false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change() {
|
||||
this.$emit('change', this.form)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
83
web/src/views/jtDevice/deviceParam/cameraTimer.vue
Executable file
83
web/src/views/jtDevice/deviceParam/cameraTimer.vue
Executable file
@@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div style="height: calc(100vh - 260px);">
|
||||
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto">
|
||||
<el-form-item label="定时拍照" prop="rolloverAlarm">
|
||||
<el-checkbox label="通道1" v-model="form.cameraTimer.switchForChannel1"></el-checkbox>
|
||||
<el-checkbox label="通道2" v-model="form.cameraTimer.switchForChannel2"></el-checkbox>
|
||||
<el-checkbox label="通道3" v-model="form.cameraTimer.switchForChannel3"></el-checkbox>
|
||||
<el-checkbox label="通道4" v-model="form.cameraTimer.switchForChannel4"></el-checkbox>
|
||||
<el-checkbox label="通道5" v-model="form.cameraTimer.switchForChannel5"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="定时拍照存储" prop="rolloverAlarm">
|
||||
<el-checkbox label="通道1" v-model="form.cameraTimer.storageFlagsForChannel1"></el-checkbox>
|
||||
<el-checkbox label="通道2" v-model="form.cameraTimer.storageFlagsForChannel2"></el-checkbox>
|
||||
<el-checkbox label="通道3" v-model="form.cameraTimer.storageFlagsForChannel3"></el-checkbox>
|
||||
<el-checkbox label="通道4" v-model="form.cameraTimer.storageFlagsForChannel4"></el-checkbox>
|
||||
<el-checkbox label="通道5" v-model="form.cameraTimer.storageFlagsForChannel5"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="定时时间单位" prop="rolloverAlarm">
|
||||
<el-radio-group v-model="form.cameraTimer.timeUnit">
|
||||
<el-radio :label="true">分</el-radio>
|
||||
<el-radio :label="false">秒</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="定时时间间隔" prop="timeInterval">
|
||||
<el-input v-model="form.cameraTimer.timeInterval" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<p style="text-align: right">
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
<el-button @click="showDevice">取消</el-button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'communication',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.$emit('submit', this.form)
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
80
web/src/views/jtDevice/deviceParam/communication.vue
Executable file
80
web/src/views/jtDevice/deviceParam/communication.vue
Executable file
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div style="height: calc(100vh - 260px);">
|
||||
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto">
|
||||
<el-form-item label="心跳发送间隔(秒)" prop="keepaliveInterval">
|
||||
<el-input v-model="form.keepaliveInterval" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="TCP消息应答超时(秒)" prop="tcpResponseTimeout">
|
||||
<el-input v-model="form.tcpResponseTimeout" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="TCP消息重传次数" prop="tcpRetransmissionCount">
|
||||
<el-input v-model="form.tcpRetransmissionCount" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="UDP消息应答超时时间(秒)" prop="udpResponseTimeout">
|
||||
<el-input v-model="form.udpResponseTimeout" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="UDP消息重传次数" prop="udpRetransmissionCount">
|
||||
<el-input v-model="form.udpRetransmissionCount" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="SMS 消息应答超时时间(秒)" prop="smsResponseTimeout">
|
||||
<el-input v-model="form.smsResponseTimeout" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="SMS 消息重传次数" prop="smsRetransmissionCount">
|
||||
<el-input v-model="form.smsRetransmissionCount" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<p style="text-align: right">
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
<el-button @click="showDevice">取消</el-button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'communication',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.$emit('submit', this.form)
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
101
web/src/views/jtDevice/deviceParam/driving.vue
Executable file
101
web/src/views/jtDevice/deviceParam/driving.vue
Executable file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div style="height: calc(100vh - 260px);">
|
||||
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto">
|
||||
<el-form-item v-if="form.illegalDrivingPeriods" label="违规行驶时段-开始时间(HH:mm)" prop="illegalDrivingPeriods">
|
||||
<el-input v-model="form.illegalDrivingPeriods.startTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.illegalDrivingPeriods" label="违规行驶时段-结束时间(HH:mm)" prop="illegalDrivingPeriods">
|
||||
<el-input v-model="form.illegalDrivingPeriods.endTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="最高速度(千米每小时)" prop="topSpeed">
|
||||
<el-input v-model="form.topSpeed" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="超速持续时间(秒)" prop="overSpeedDuration">
|
||||
<el-input v-model="form.overSpeedDuration" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="连续驾驶时间门限(秒)" prop="continuousDrivingTimeThreshold">
|
||||
<el-input v-model="form.continuousDrivingTimeThreshold" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="当天累计驾驶时间门限(秒)" prop="cumulativeDrivingTimeThresholdForTheDay">
|
||||
<el-input v-model="form.cumulativeDrivingTimeThresholdForTheDay" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="最小休息时间(秒)" prop="minimumBreakTime">
|
||||
<el-input v-model="form.minimumBreakTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="最长停车时间(秒)" prop="maximumParkingTime">
|
||||
<el-input v-model="form.maximumParkingTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="超速预警差值(1/10 千米每小时)" prop="overSpeedWarningDifference">
|
||||
<el-input v-model="form.overSpeedWarningDifference" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="疲劳驾驶预警差值(秒)" prop="drowsyDrivingWarningDifference">
|
||||
<el-input v-model="form.drowsyDrivingWarningDifference" clearable />
|
||||
</el-form-item>
|
||||
<div v-if="form.collisionAlarmParams">
|
||||
<el-form-item label="碰撞报警-碰撞时间(毫秒)" prop="collisionAlarmParamsCollisionAlarmTime">
|
||||
<el-input v-model="form.collisionAlarmParams.collisionAlarmTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="碰撞报警-碰撞加速度(0.1g)" prop="collisionAlarmParamsCollisionAcceleration">
|
||||
<el-input v-model="form.collisionAlarmParams.collisionAcceleration" clearable />
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item label="侧翻报警参数-侧翻角度(度)" prop="rolloverAlarm">
|
||||
<el-input v-model="form.rolloverAlarm" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<p style="text-align: right">
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
<el-button @click="showDevice">取消</el-button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'communication',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.$emit('submit', this.form)
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
106
web/src/views/jtDevice/deviceParam/index.vue
Executable file
106
web/src/views/jtDevice/deviceParam/index.vue
Executable file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<div id="jtDeviceParam" style="width: 100%">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<el-page-header content="终端参数" @back="showDevice" />
|
||||
</div>
|
||||
</div>
|
||||
<el-tabs tab-position="left" style="height: calc(100vh - 164px); padding: 20px">
|
||||
<el-tab-pane label="通讯参数">
|
||||
<communication :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></communication>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="服务器">
|
||||
<server :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></server>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="位置汇报">
|
||||
<position :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></position>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="电话号码">
|
||||
<phoneNumber :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></phoneNumber>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报警参数">
|
||||
<alarm :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></alarm>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="行驶参数">
|
||||
<driving :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></driving>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="定时拍照">
|
||||
<cameraTimer :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></cameraTimer>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="音视频">
|
||||
<media :phone-number="phoneNumber" @submit="onSubmit" @show-device="showDevice"></media>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import communication from './communication.vue'
|
||||
import server from './server.vue'
|
||||
import position from './position.vue'
|
||||
import phoneNumber from './phoneNumber.vue'
|
||||
import alarm from './alarm.vue'
|
||||
import driving from './driving.vue'
|
||||
import cameraTimer from './cameraTimer.vue'
|
||||
import media from './media.vue'
|
||||
|
||||
export default {
|
||||
name: 'JTDeviceParam',
|
||||
components: {
|
||||
communication, server, position, phoneNumber, alarm, driving, cameraTimer, media
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
collisionAlarmParams: {},
|
||||
illegalDrivingPeriods: {},
|
||||
cameraTimer: {}
|
||||
},
|
||||
rules: {
|
||||
deviceId: [{ required: true, message: '请输入设备编号', trigger: 'blur' }]
|
||||
},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function(data) {
|
||||
this.$store.dispatch('jtDevice/setConfig', {
|
||||
phoneNumber: this.phoneNumber,
|
||||
config: data
|
||||
})
|
||||
.then((data) => {
|
||||
this.$message.success({
|
||||
showClose: true,
|
||||
message: '保存成功'
|
||||
})
|
||||
})
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
101
web/src/views/jtDevice/deviceParam/media.vue
Executable file
101
web/src/views/jtDevice/deviceParam/media.vue
Executable file
@@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div style="height: calc(100vh - 260px);">
|
||||
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto">
|
||||
<el-form-item v-if="form.illegalDrivingPeriods" label="违规行驶时段-开始时间(HH:mm)" prop="illegalDrivingPeriods">
|
||||
<el-input v-model="form.illegalDrivingPeriods.startTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.illegalDrivingPeriods" label="违规行驶时段-结束时间(HH:mm)" prop="illegalDrivingPeriods">
|
||||
<el-input v-model="form.illegalDrivingPeriods.endTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="最高速度(千米每小时)" prop="topSpeed">
|
||||
<el-input v-model="form.topSpeed" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="超速持续时间(秒)" prop="overSpeedDuration">
|
||||
<el-input v-model="form.overSpeedDuration" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="连续驾驶时间门限(秒)" prop="continuousDrivingTimeThreshold">
|
||||
<el-input v-model="form.continuousDrivingTimeThreshold" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="当天累计驾驶时间门限(秒)" prop="cumulativeDrivingTimeThresholdForTheDay">
|
||||
<el-input v-model="form.cumulativeDrivingTimeThresholdForTheDay" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="最小休息时间(秒)" prop="minimumBreakTime">
|
||||
<el-input v-model="form.minimumBreakTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="最长停车时间(秒)" prop="maximumParkingTime">
|
||||
<el-input v-model="form.maximumParkingTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="超速预警差值(1/10 千米每小时)" prop="overSpeedWarningDifference">
|
||||
<el-input v-model="form.overSpeedWarningDifference" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="疲劳驾驶预警差值(秒)" prop="drowsyDrivingWarningDifference">
|
||||
<el-input v-model="form.drowsyDrivingWarningDifference" clearable />
|
||||
</el-form-item>
|
||||
<div v-if="form.collisionAlarmParams">
|
||||
<el-form-item label="碰撞报警-碰撞时间(毫秒)" prop="collisionAlarmParamsCollisionAlarmTime">
|
||||
<el-input v-model="form.collisionAlarmParams.collisionAlarmTime" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="碰撞报警-碰撞加速度(0.1g)" prop="collisionAlarmParamsCollisionAcceleration">
|
||||
<el-input v-model="form.collisionAlarmParams.collisionAcceleration" clearable />
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item label="侧翻报警参数-侧翻角度(度)" prop="rolloverAlarm">
|
||||
<el-input v-model="form.rolloverAlarm" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<p style="text-align: right">
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
<el-button @click="showDevice">取消</el-button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'communication',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.$emit('submit', this.form)
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
89
web/src/views/jtDevice/deviceParam/phoneNumber.vue
Executable file
89
web/src/views/jtDevice/deviceParam/phoneNumber.vue
Executable file
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div style="height: calc(100vh - 260px);">
|
||||
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto">
|
||||
<el-form-item label="监控平台电话号码" prop="platformPhoneNumber">
|
||||
<el-input v-model="form.platformPhoneNumber" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="复位电话号码" prop="phoneNumberForFactoryReset">
|
||||
<el-input v-model="form.phoneNumberForFactoryReset" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="监控平台SMS电话号码" prop="phoneNumberForSms">
|
||||
<el-input v-model="form.phoneNumberForSms" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="接收终端SMS文本报警号码" prop="phoneNumberForReceiveTextAlarm">
|
||||
<el-input v-model="form.phoneNumberForReceiveTextAlarm" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="终端电话接听策略" prop="locationReportingStrategy">
|
||||
<el-select v-model="form.locationReportingStrategy" style="float: left; width: 100%">
|
||||
<el-option label="自动接听" :value="0">定时汇报</el-option>
|
||||
<el-option label="ACC ON时自动接听 ,OFF时手动接听" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="每次最长通话时间(秒)" prop="longestCallTimeForPerSession">
|
||||
<el-input v-model="form.longestCallTimeForPerSession" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="当月最长通话时间(秒)" prop="longestCallTimeInMonth">
|
||||
<el-input v-model="form.longestCallTimeInMonth" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="监听电话号码" prop="phoneNumbersForListen">
|
||||
<el-input v-model="form.phoneNumbersForListen" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="监管平台特权短信号码" prop="privilegedSMSNumber">
|
||||
<el-input v-model="form.privilegedSMSNumber" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<p style="text-align: right">
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
<el-button @click="showDevice">取消</el-button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'communication',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.$emit('submit', this.form)
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
99
web/src/views/jtDevice/deviceParam/position.vue
Executable file
99
web/src/views/jtDevice/deviceParam/position.vue
Executable file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div style="height: calc(100vh - 260px);">
|
||||
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto">
|
||||
<el-form-item label="汇报策略" prop="locationReportingStrategy">
|
||||
<el-select v-model="form.locationReportingStrategy" style="float: left; width: 100%">
|
||||
<el-option label="定时汇报" :value="0">定时汇报</el-option>
|
||||
<el-option label="定距汇报" :value="1" />
|
||||
<el-option label="定时和定距汇报" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="汇报方案" prop="locationReportingPlan">
|
||||
<el-select v-model="form.locationReportingPlan" style="float: left; width: 100%">
|
||||
<el-option label="根据ACC状态" :value="0" />
|
||||
<el-option label="登录状态和ACC状态" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="驾驶员未登录汇报时间间隔(秒)" prop="reportingIntervalOffline">
|
||||
<el-input v-model="form.reportingIntervalOffline" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="休眠时汇报时间间隔(秒)" prop="reportingIntervalDormancy">
|
||||
<el-input v-model="form.reportingIntervalDormancy" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急报警时汇报时间间隔(秒)" prop="reportingIntervalEmergencyAlarm">
|
||||
<el-input v-model="form.reportingIntervalEmergencyAlarm" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="缺省时间汇报间隔(秒)" prop="reportingIntervalDefault">
|
||||
<el-input v-model="form.reportingIntervalDefault" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="缺省距离汇报间隔(米)" prop="reportingDistanceDefault">
|
||||
<el-input v-model="form.reportingDistanceDefault" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="驾驶员未登录汇报距离间隔(米)" prop="reportingDistanceOffline">
|
||||
<el-input v-model="form.reportingDistanceOffline" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="休眠时汇报距离间隔(米)" prop="reportingDistanceDormancy">
|
||||
<el-input v-model="form.reportingDistanceDormancy" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="紧急报警时汇报距离间隔(米)" prop="reportingDistanceEmergencyAlarm">
|
||||
<el-input v-model="form.reportingDistanceEmergencyAlarm" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="拐点补传角度(度,小于180)" prop="inflectionPointAngle">
|
||||
<el-input v-model="form.inflectionPointAngle" clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<p style="text-align: right">
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
<el-button @click="showDevice">取消</el-button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'communication',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.$emit('submit', this.form)
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
116
web/src/views/jtDevice/deviceParam/server.vue
Executable file
116
web/src/views/jtDevice/deviceParam/server.vue
Executable file
@@ -0,0 +1,116 @@
|
||||
<template>
|
||||
<div style="width: 100%;">
|
||||
<div style="height: calc(100vh - 260px); overflow: auto">
|
||||
<el-form ref="form" :model="form" label-width="240px" style="width: 50%; margin: 0 auto; ">
|
||||
<el-divider content-position="center">主服务器</el-divider>
|
||||
<el-form-item label="APN(主)" prop="apnMaster">
|
||||
<el-input v-model="form.apnMaster" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="无线通信拨号用户名(主)" prop="dialingUsernameMaster">
|
||||
<el-input v-model="form.dialingUsernameMaster" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="无线通信拨号密码(主)" prop="dialingPasswordMaster">
|
||||
<el-input v-model="form.dialingPasswordMaster" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="IP或域名(主)" prop="addressMaster">
|
||||
<el-input v-model="form.addressMaster" clearable />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-divider content-position="center">备份服务器</el-divider>
|
||||
<el-form-item label="APN(备)" prop="apnBackup">
|
||||
<el-input v-model="form.apnBackup" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="无线通信拨号用户名(备)" prop="dialingUsernameBackup">
|
||||
<el-input v-model="form.dialingUsernameBackup" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="无线通信拨号密码(备)" prop="dialingPasswordBackup">
|
||||
<el-input v-model="form.dialingPasswordBackup" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="IP或域名(备)" prop="addressBackup">
|
||||
<el-input v-model="form.addressBackup" clearable />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-divider content-position="center">从服务器</el-divider>
|
||||
<el-form-item label="APN(从)" prop="apnBackup">
|
||||
<el-input v-model="form.apnBackup" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="无线通信拨号用户名(从)" prop="dialingUsernameSlave">
|
||||
<el-input v-model="form.dialingUsernameSlave" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="无线通信拨号密码(从)" prop="dialingPasswordSlave">
|
||||
<el-input v-model="form.dialingPasswordSlave" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="IP或域名(从)" prop="addressSlave">
|
||||
<el-input v-model="form.addressSlave" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-divider content-position="center">IC卡认证服务器</el-divider>
|
||||
<el-form-item label="IC卡认证服务器IP(主)" prop="addressIcMaster">
|
||||
<el-input v-model="form.addressIcMaster" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="IC卡认证服务器IP(备)" prop="addressIcMaster">
|
||||
<el-input v-model="form.addressIcBackup" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="IC卡认证服务器TCP端口" prop="tcpPortIcMaster">
|
||||
<el-input v-model="form.tcpPortIcMaster" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="IC卡认证服务器UDP端口" prop="udpPortIcMaster">
|
||||
<el-input v-model="form.udpPortIcMaster" clearable />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
<p style="text-align: right">
|
||||
<el-button type="primary" @click="onSubmit">确认</el-button>
|
||||
<el-button @click="showDevice">取消</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'server',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
phoneNumber: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
initData: function() {
|
||||
this.isLoading = true
|
||||
this.$store.dispatch('jtDevice/queryConfig', this.phoneNumber)
|
||||
.then((data) => {
|
||||
this.form = data
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
onSubmit: function() {
|
||||
this.$emit('submit', this.form)
|
||||
},
|
||||
showDevice: function() {
|
||||
this.$emit('show-device')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -9,7 +9,7 @@
|
||||
<script>
|
||||
import deviceList from './list.vue'
|
||||
import channelList from './channel/index.vue'
|
||||
import deviceParam from './jtDeviceParam.vue'
|
||||
import deviceParam from './deviceParam/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'JTDevice',
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
文本下发</el-dropdown-item>
|
||||
<el-dropdown-item command="telephoneCallback" v-bind:disabled="!scope.row.status" >
|
||||
电话回拨</el-dropdown-item>
|
||||
<el-dropdown-item command="setPhoneBook" v-bind:disabled="!scope.row.status" >
|
||||
设置电话本</el-dropdown-item>
|
||||
<!-- <el-dropdown-item command="setPhoneBook" v-bind:disabled="!scope.row.status" >-->
|
||||
<!-- 设置电话本</el-dropdown-item>-->
|
||||
<el-dropdown-item command="driverInfo" v-bind:disabled="!scope.row.status" >
|
||||
驾驶员信息</el-dropdown-item>
|
||||
<el-dropdown-item command="reset" v-bind:disabled="!scope.row.status" >
|
||||
|
||||
Reference in New Issue
Block a user