[1078] 合并新UI

This commit is contained in:
lin 2025-05-15 18:32:03 +08:00
parent 5b89145337
commit 592c1c2b71
14 changed files with 1491 additions and 1139 deletions

View File

@ -3,11 +3,13 @@ package com.genersoft.iot.vmp.jt1078.bean;
import com.genersoft.iot.vmp.jt1078.bean.common.ConfigAttribute;
import com.genersoft.iot.vmp.jt1078.bean.config.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* JT 终端参数设置
*/
@Schema(description = "JT终端参数设置")
@Data
public class JTDeviceConfig {
@ConfigAttribute(id = 0x1, type="Long", description = "终端心跳发送间隔,单位为秒(s)")
@ -247,7 +249,7 @@ public class JTDeviceConfig {
@ConfigAttribute(id = 0x84, type="Short", description = "车牌颜色,值按照JT/T697-7.2014中的规定,未上牌车辆填0")
private Short licensePlateColor;
@ConfigAttribute(id = 0x90, type="Short", description = "GNSS定位模式")
@ConfigAttribute(id = 0x90, type="GnssPositioningMode", description = "GNSS定位模式")
private JTGnssPositioningMode gnssPositioningMode;
@ConfigAttribute(id = 0x91, type="Short", description = "GNSS 波特率,定义如下: 0: 4800, 1:9600, 219200, 3:38400, 4:57600, 5:115200")
@ -288,720 +290,6 @@ public class JTDeviceConfig {
@ConfigAttribute(id = 0x103, type="Integer", description = "CAN总线通道2 上传时间间隔 ,单位为秒(s) ,0 表示不上传")
private Integer canUploadIntervalForChannel2;
public JTAnalyzeAlarmParam getAnalyzeAlarmParam() {
return analyzeAlarmParam;
}
public void setAnalyzeAlarmParam(JTAnalyzeAlarmParam analyzeAlarmParam) {
this.analyzeAlarmParam = analyzeAlarmParam;
}
public Long getKeepaliveInterval() {
return keepaliveInterval;
}
public void setKeepaliveInterval(Long keepaliveInterval) {
this.keepaliveInterval = keepaliveInterval;
}
public Long getTcpResponseTimeout() {
return tcpResponseTimeout;
}
public void setTcpResponseTimeout(Long tcpResponseTimeout) {
this.tcpResponseTimeout = tcpResponseTimeout;
}
public Long getTcpRetransmissionCount() {
return tcpRetransmissionCount;
}
public void setTcpRetransmissionCount(Long tcpRetransmissionCount) {
this.tcpRetransmissionCount = tcpRetransmissionCount;
}
public Long getUdpResponseTimeout() {
return udpResponseTimeout;
}
public void setUdpResponseTimeout(Long udpResponseTimeout) {
this.udpResponseTimeout = udpResponseTimeout;
}
public Long getUdpRetransmissionCount() {
return udpRetransmissionCount;
}
public void setUdpRetransmissionCount(Long udpRetransmissionCount) {
this.udpRetransmissionCount = udpRetransmissionCount;
}
public Long getSmsResponseTimeout() {
return smsResponseTimeout;
}
public void setSmsResponseTimeout(Long smsResponseTimeout) {
this.smsResponseTimeout = smsResponseTimeout;
}
public Long getSmsRetransmissionCount() {
return smsRetransmissionCount;
}
public void setSmsRetransmissionCount(Long smsRetransmissionCount) {
this.smsRetransmissionCount = smsRetransmissionCount;
}
public String getApnMaster() {
return apnMaster;
}
public void setApnMaster(String apnMaster) {
this.apnMaster = apnMaster;
}
public String getDialingUsernameMaster() {
return dialingUsernameMaster;
}
public void setDialingUsernameMaster(String dialingUsernameMaster) {
this.dialingUsernameMaster = dialingUsernameMaster;
}
public String getDialingPasswordMaster() {
return dialingPasswordMaster;
}
public void setDialingPasswordMaster(String dialingPasswordMaster) {
this.dialingPasswordMaster = dialingPasswordMaster;
}
public String getAddressMaster() {
return addressMaster;
}
public void setAddressMaster(String addressMaster) {
this.addressMaster = addressMaster;
}
public String getApnBackup() {
return apnBackup;
}
public void setApnBackup(String apnBackup) {
this.apnBackup = apnBackup;
}
public String getDialingUsernameBackup() {
return dialingUsernameBackup;
}
public void setDialingUsernameBackup(String dialingUsernameBackup) {
this.dialingUsernameBackup = dialingUsernameBackup;
}
public String getDialingPasswordBackup() {
return dialingPasswordBackup;
}
public void setDialingPasswordBackup(String dialingPasswordBackup) {
this.dialingPasswordBackup = dialingPasswordBackup;
}
public String getAddressBackup() {
return addressBackup;
}
public void setAddressBackup(String addressBackup) {
this.addressBackup = addressBackup;
}
public String getAddressIcMaster() {
return addressIcMaster;
}
public void setAddressIcMaster(String addressIcMaster) {
this.addressIcMaster = addressIcMaster;
}
public Long getTcpPortIcMaster() {
return tcpPortIcMaster;
}
public void setTcpPortIcMaster(Long tcpPortIcMaster) {
this.tcpPortIcMaster = tcpPortIcMaster;
}
public Long getUdpPortIcMaster() {
return udpPortIcMaster;
}
public void setUdpPortIcMaster(Long udpPortIcMaster) {
this.udpPortIcMaster = udpPortIcMaster;
}
public String getAddressIcBackup() {
return addressIcBackup;
}
public void setAddressIcBackup(String addressIcBackup) {
this.addressIcBackup = addressIcBackup;
}
public Long getLocationReportingStrategy() {
return locationReportingStrategy;
}
public void setLocationReportingStrategy(Long locationReportingStrategy) {
this.locationReportingStrategy = locationReportingStrategy;
}
public Long getLocationReportingPlan() {
return locationReportingPlan;
}
public void setLocationReportingPlan(Long locationReportingPlan) {
this.locationReportingPlan = locationReportingPlan;
}
public Long getReportingIntervalOffline() {
return reportingIntervalOffline;
}
public void setReportingIntervalOffline(Long reportingIntervalOffline) {
this.reportingIntervalOffline = reportingIntervalOffline;
}
public String getApnSlave() {
return apnSlave;
}
public void setApnSlave(String apnSlave) {
this.apnSlave = apnSlave;
}
public String getDialingUsernameSlave() {
return dialingUsernameSlave;
}
public void setDialingUsernameSlave(String dialingUsernameSlave) {
this.dialingUsernameSlave = dialingUsernameSlave;
}
public String getDialingPasswordSlave() {
return dialingPasswordSlave;
}
public void setDialingPasswordSlave(String dialingPasswordSlave) {
this.dialingPasswordSlave = dialingPasswordSlave;
}
public String getAddressSlave() {
return addressSlave;
}
public void setAddressSlave(String addressSlave) {
this.addressSlave = addressSlave;
}
public Long getReportingIntervalDormancy() {
return reportingIntervalDormancy;
}
public void setReportingIntervalDormancy(Long reportingIntervalDormancy) {
this.reportingIntervalDormancy = reportingIntervalDormancy;
}
public Long getReportingIntervalEmergencyAlarm() {
return reportingIntervalEmergencyAlarm;
}
public void setReportingIntervalEmergencyAlarm(Long reportingIntervalEmergencyAlarm) {
this.reportingIntervalEmergencyAlarm = reportingIntervalEmergencyAlarm;
}
public Long getReportingIntervalDefault() {
return reportingIntervalDefault;
}
public void setReportingIntervalDefault(Long reportingIntervalDefault) {
this.reportingIntervalDefault = reportingIntervalDefault;
}
public Long getReportingDistanceDefault() {
return reportingDistanceDefault;
}
public void setReportingDistanceDefault(Long reportingDistanceDefault) {
this.reportingDistanceDefault = reportingDistanceDefault;
}
public Long getReportingDistanceOffline() {
return reportingDistanceOffline;
}
public void setReportingDistanceOffline(Long reportingDistanceOffline) {
this.reportingDistanceOffline = reportingDistanceOffline;
}
public Long getReportingDistanceDormancy() {
return reportingDistanceDormancy;
}
public void setReportingDistanceDormancy(Long reportingDistanceDormancy) {
this.reportingDistanceDormancy = reportingDistanceDormancy;
}
public Long getReportingDistanceEmergencyAlarm() {
return reportingDistanceEmergencyAlarm;
}
public void setReportingDistanceEmergencyAlarm(Long reportingDistanceEmergencyAlarm) {
this.reportingDistanceEmergencyAlarm = reportingDistanceEmergencyAlarm;
}
public Long getInflectionPointAngle() {
return inflectionPointAngle;
}
public void setInflectionPointAngle(Long inflectionPointAngle) {
this.inflectionPointAngle = inflectionPointAngle;
}
public Integer getFenceRadius() {
return fenceRadius;
}
public void setFenceRadius(Integer fenceRadius) {
this.fenceRadius = fenceRadius;
}
public JTIllegalDrivingPeriods getIllegalDrivingPeriods() {
return illegalDrivingPeriods;
}
public void setIllegalDrivingPeriods(JTIllegalDrivingPeriods illegalDrivingPeriods) {
this.illegalDrivingPeriods = illegalDrivingPeriods;
}
public String getPlatformPhoneNumber() {
return platformPhoneNumber;
}
public void setPlatformPhoneNumber(String platformPhoneNumber) {
this.platformPhoneNumber = platformPhoneNumber;
}
public String getPhoneNumberForReset() {
return phoneNumberForReset;
}
public void setPhoneNumberForReset(String phoneNumberForReset) {
this.phoneNumberForReset = phoneNumberForReset;
}
public String getPhoneNumberForFactoryReset() {
return phoneNumberForFactoryReset;
}
public void setPhoneNumberForFactoryReset(String phoneNumberForFactoryReset) {
this.phoneNumberForFactoryReset = phoneNumberForFactoryReset;
}
public String getPhoneNumberForSms() {
return phoneNumberForSms;
}
public void setPhoneNumberForSms(String phoneNumberForSms) {
this.phoneNumberForSms = phoneNumberForSms;
}
public String getPhoneNumberForReceiveTextAlarm() {
return phoneNumberForReceiveTextAlarm;
}
public void setPhoneNumberForReceiveTextAlarm(String phoneNumberForReceiveTextAlarm) {
this.phoneNumberForReceiveTextAlarm = phoneNumberForReceiveTextAlarm;
}
public Long getPhoneAnsweringPolicy() {
return phoneAnsweringPolicy;
}
public void setPhoneAnsweringPolicy(Long phoneAnsweringPolicy) {
this.phoneAnsweringPolicy = phoneAnsweringPolicy;
}
public Long getLongestCallTimeForPerSession() {
return longestCallTimeForPerSession;
}
public void setLongestCallTimeForPerSession(Long longestCallTimeForPerSession) {
this.longestCallTimeForPerSession = longestCallTimeForPerSession;
}
public Long getLongestCallTimeInMonth() {
return longestCallTimeInMonth;
}
public void setLongestCallTimeInMonth(Long longestCallTimeInMonth) {
this.longestCallTimeInMonth = longestCallTimeInMonth;
}
public String getPhoneNumbersForListen() {
return phoneNumbersForListen;
}
public void setPhoneNumbersForListen(String phoneNumbersForListen) {
this.phoneNumbersForListen = phoneNumbersForListen;
}
public String getPrivilegedSMSNumber() {
return privilegedSMSNumber;
}
public void setPrivilegedSMSNumber(String privilegedSMSNumber) {
this.privilegedSMSNumber = privilegedSMSNumber;
}
public Long getAlarmMaskingWord() {
return alarmMaskingWord;
}
public void setAlarmMaskingWord(Long alarmMaskingWord) {
this.alarmMaskingWord = alarmMaskingWord;
}
public Long getAlarmSendsTextSmsSwitch() {
return alarmSendsTextSmsSwitch;
}
public void setAlarmSendsTextSmsSwitch(Long alarmSendsTextSmsSwitch) {
this.alarmSendsTextSmsSwitch = alarmSendsTextSmsSwitch;
}
public Long getAlarmShootingSwitch() {
return alarmShootingSwitch;
}
public void setAlarmShootingSwitch(Long alarmShootingSwitch) {
this.alarmShootingSwitch = alarmShootingSwitch;
}
public Long getAlarmShootingStorageFlags() {
return alarmShootingStorageFlags;
}
public void setAlarmShootingStorageFlags(Long alarmShootingStorageFlags) {
this.alarmShootingStorageFlags = alarmShootingStorageFlags;
}
public Long getKeySign() {
return KeySign;
}
public void setKeySign(Long keySign) {
KeySign = keySign;
}
public Long getMaxSpeed() {
return maxSpeed;
}
public void setMaxSpeed(Long maxSpeed) {
this.maxSpeed = maxSpeed;
}
public Long getOverSpeedDuration() {
return overSpeedDuration;
}
public void setOverSpeedDuration(Long overSpeedDuration) {
this.overSpeedDuration = overSpeedDuration;
}
public Long getContinuousDrivingTimeThreshold() {
return continuousDrivingTimeThreshold;
}
public void setContinuousDrivingTimeThreshold(Long continuousDrivingTimeThreshold) {
this.continuousDrivingTimeThreshold = continuousDrivingTimeThreshold;
}
public Long getCumulativeDrivingTimeThresholdForTheDay() {
return cumulativeDrivingTimeThresholdForTheDay;
}
public void setCumulativeDrivingTimeThresholdForTheDay(Long cumulativeDrivingTimeThresholdForTheDay) {
this.cumulativeDrivingTimeThresholdForTheDay = cumulativeDrivingTimeThresholdForTheDay;
}
public Long getMinimumBreakTime() {
return minimumBreakTime;
}
public void setMinimumBreakTime(Long minimumBreakTime) {
this.minimumBreakTime = minimumBreakTime;
}
public Long getMaximumParkingTime() {
return maximumParkingTime;
}
public void setMaximumParkingTime(Long maximumParkingTime) {
this.maximumParkingTime = maximumParkingTime;
}
public Integer getOverSpeedWarningDifference() {
return overSpeedWarningDifference;
}
public void setOverSpeedWarningDifference(Integer overSpeedWarningDifference) {
this.overSpeedWarningDifference = overSpeedWarningDifference;
}
public Integer getDrowsyDrivingWarningDifference() {
return drowsyDrivingWarningDifference;
}
public void setDrowsyDrivingWarningDifference(Integer drowsyDrivingWarningDifference) {
this.drowsyDrivingWarningDifference = drowsyDrivingWarningDifference;
}
public JTCollisionAlarmParams getCollisionAlarmParams() {
return collisionAlarmParams;
}
public void setCollisionAlarmParams(JTCollisionAlarmParams collisionAlarmParams) {
this.collisionAlarmParams = collisionAlarmParams;
}
public Integer getRolloverAlarm() {
return rolloverAlarm;
}
public void setRolloverAlarm(Integer rolloverAlarm) {
this.rolloverAlarm = rolloverAlarm;
}
public JTCameraTimer getCameraTimer() {
return cameraTimer;
}
public void setCameraTimer(JTCameraTimer cameraTimer) {
this.cameraTimer = cameraTimer;
}
public Long getQualityForVideo() {
return qualityForVideo;
}
public void setQualityForVideo(Long qualityForVideo) {
this.qualityForVideo = qualityForVideo;
}
public Long getBrightness() {
return brightness;
}
public void setBrightness(Long brightness) {
this.brightness = brightness;
}
public Long getContrastRatio() {
return contrastRatio;
}
public void setContrastRatio(Long contrastRatio) {
this.contrastRatio = contrastRatio;
}
public Long getSaturation() {
return saturation;
}
public void setSaturation(Long saturation) {
this.saturation = saturation;
}
public Long getChroma() {
return chroma;
}
public void setChroma(Long chroma) {
this.chroma = chroma;
}
public Long getMileage() {
return mileage;
}
public void setMileage(Long mileage) {
this.mileage = mileage;
}
public Integer getProvincialId() {
return provincialId;
}
public void setProvincialId(Integer provincialId) {
this.provincialId = provincialId;
}
public Integer getCityId() {
return cityId;
}
public void setCityId(Integer cityId) {
this.cityId = cityId;
}
public String getLicensePlate() {
return licensePlate;
}
public void setLicensePlate(String licensePlate) {
this.licensePlate = licensePlate;
}
public Short getLicensePlateColor() {
return licensePlateColor;
}
public void setLicensePlateColor(Short licensePlateColor) {
this.licensePlateColor = licensePlateColor;
}
public JTGnssPositioningMode getGnssPositioningMode() {
return gnssPositioningMode;
}
public void setGnssPositioningMode(JTGnssPositioningMode gnssPositioningMode) {
this.gnssPositioningMode = gnssPositioningMode;
}
public Short getGnssBaudRate() {
return gnssBaudRate;
}
public void setGnssBaudRate(Short gnssBaudRate) {
this.gnssBaudRate = gnssBaudRate;
}
public Short getGnssOutputFrequency() {
return gnssOutputFrequency;
}
public void setGnssOutputFrequency(Short gnssOutputFrequency) {
this.gnssOutputFrequency = gnssOutputFrequency;
}
public Long getGnssCollectionFrequency() {
return gnssCollectionFrequency;
}
public void setGnssCollectionFrequency(Long gnssCollectionFrequency) {
this.gnssCollectionFrequency = gnssCollectionFrequency;
}
public Short getGnssDataUploadMethod() {
return gnssDataUploadMethod;
}
public void setGnssDataUploadMethod(Short gnssDataUploadMethod) {
this.gnssDataUploadMethod = gnssDataUploadMethod;
}
public Long getGnssDataUploadMethodUnit() {
return gnssDataUploadMethodUnit;
}
public void setGnssDataUploadMethodUnit(Long gnssDataUploadMethodUnit) {
this.gnssDataUploadMethodUnit = gnssDataUploadMethodUnit;
}
public Long getCanCollectionTimeForChannel1() {
return canCollectionTimeForChannel1;
}
public void setCanCollectionTimeForChannel1(Long canCollectionTimeForChannel1) {
this.canCollectionTimeForChannel1 = canCollectionTimeForChannel1;
}
public Integer getCanUploadIntervalForChannel1() {
return canUploadIntervalForChannel1;
}
public void setCanUploadIntervalForChannel1(Integer canUploadIntervalForChannel1) {
this.canUploadIntervalForChannel1 = canUploadIntervalForChannel1;
}
public Long getCanCollectionTimeForChannel2() {
return canCollectionTimeForChannel2;
}
public void setCanCollectionTimeForChannel2(Long canCollectionTimeForChannel2) {
this.canCollectionTimeForChannel2 = canCollectionTimeForChannel2;
}
public Integer getCanUploadIntervalForChannel2() {
return canUploadIntervalForChannel2;
}
public void setCanUploadIntervalForChannel2(Integer canUploadIntervalForChannel2) {
this.canUploadIntervalForChannel2 = canUploadIntervalForChannel2;
}
public JTVideoParam getVideoParam() {
return videoParam;
}
public void setVideoParam(JTVideoParam videoParam) {
this.videoParam = videoParam;
}
public JTChannelListParam getChannelListParam() {
return channelListParam;
}
public void setChannelListParam(JTChannelListParam channelListParam) {
this.channelListParam = channelListParam;
}
public JTChannelParam getChannelParam() {
return channelParam;
}
public void setChannelParam(JTChannelParam channelParam) {
this.channelParam = channelParam;
}
public JTAlarmRecordingParam getAlarmRecordingParam() {
return alarmRecordingParam;
}
public void setAlarmRecordingParam(JTAlarmRecordingParam alarmRecordingParam) {
this.alarmRecordingParam = alarmRecordingParam;
}
public JTVideoAlarmBit getVideoAlarmBit() {
return videoAlarmBit;
}
public void setVideoAlarmBit(JTVideoAlarmBit videoAlarmBit) {
this.videoAlarmBit = videoAlarmBit;
}
public JTAwakenParam getAwakenParam() {
return awakenParam;
}
public void setAwakenParam(JTAwakenParam awakenParam) {
this.awakenParam = awakenParam;
}
@Override
public String toString() {
return "JTDeviceConfig{" +

View File

@ -40,7 +40,7 @@ public class Jt808Decoder extends ByteToMessageDecoder {
@Override
protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
Session session = ctx.channel().attr(Session.KEY).get();
log.info("> {} hex:{}", session, ByteBufUtil.hexDump(in));
log.debug("> {} hex:{}", session, ByteBufUtil.hexDump(in));
try {
ByteBuf buf = unEscapeAndCheck(in);

View File

@ -26,7 +26,7 @@ public class Jt808Encoder extends MessageToByteEncoder<Rs> {
List<ByteBuf> encodeList = Jt808EncoderCmd.encode(msg, session, session.nextSerialNo());
if(encodeList!=null && !encodeList.isEmpty()){
for (ByteBuf byteBuf : encodeList) {
log.info("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));
log.debug("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));
out.writeBytes(byteBuf);
}
}

View File

@ -34,7 +34,7 @@ public class Jt808EncoderCmd extends MessageToByteEncoder<Cmd> {
List<ByteBuf> encodeList = encode(msg, session, cmd.getPackageNo().intValue());
if (encodeList != null && !encodeList.isEmpty()) {
for (ByteBuf byteBuf : encodeList) {
log.info("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));
log.debug("< {} hex:{}", session, ByteBufUtil.hexDump(byteBuf));
out.writeBytes(byteBuf);
}
}

View File

@ -131,6 +131,7 @@ public class J0104 extends Re {
JTChannelListParam channelListParam = JTChannelListParam.decode(buf);
Method methodForChannelListParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTChannelListParam.class);
methodForChannelListParam.invoke(deviceConfig, channelListParam);
continue;
case "ChannelParam":
JTChannelParam channelParam = JTChannelParam.decode(buf);
Method methodForChannelParam = deviceConfig.getClass().getDeclaredMethod("set" + StringUtils.capitalize(field.getName()), JTChannelParam.class);
@ -157,7 +158,7 @@ public class J0104 extends Re {
methodForAwakenParam.invoke(deviceConfig, awakenParamParam);
continue;
default:
System.err.println(field.getGenericType().getTypeName());
System.err.println(field.getGenericType().getTypeName());
continue;
}
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {

View File

@ -240,8 +240,8 @@ public class jt1078PlayServiceImpl implements Ijt1078PlayService {
dynamicTask.startDelay(playKey, () -> {
log.info("[1078-点播] 超时, phoneNumber {} channelId {}", phoneNumber, channelId);
for (CommonCallback<WVPResult<StreamInfo>> errorCallback : errorCallbacks) {
errorCallback.run(new WVPResult<>(InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getCode(),
InviteErrorCode.ERROR_FOR_SIGNALLING_TIMEOUT.getMsg(), null));
errorCallback.run(new WVPResult<>(InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getCode(),
InviteErrorCode.ERROR_FOR_STREAM_TIMEOUT.getMsg(), null));
}
mediaServerService.closeRTPServer(mediaServer, stream);
subscribe.removeSubscribe(hook);

View File

@ -139,4 +139,77 @@ export function fillLight(params) {
}
})
}
export function queryRecordList(params) {
const { phoneNumber, channelId, startTime, endTime } = params
return request({
method: 'get',
url: '/api/jt1078/record/list',
params: {
phoneNumber: phoneNumber,
channelId: channelId,
startTime: startTime,
endTime: endTime
}
})
}
export function startPlayback(params) {
const { phoneNumber, channelId, startTime, endTime, type, rate, playbackType, playbackSpeed } = params
return request({
method: 'get',
url: '/api/jt1078/playback/start/',
params: {
phoneNumber: phoneNumber,
channelId: channelId,
startTime: startTime,
endTime: endTime,
type: type,
rate: rate,
playbackType: playbackType,
playbackSpeed: playbackSpeed
}
})
}
export function controlPlayback(params) {
const { phoneNumber, channelId, command, playbackSpeed, time } = params
return request({
method: 'get',
url: '/api/jt1078/playback/control',
params: {
phoneNumber: phoneNumber,
channelId: channelId,
command: command,
playbackSpeed: playbackSpeed,
time: time
}
})
}
export function stopPlayback(params) {
const { phoneNumber, channelId, streamId } = params
return request({
method: 'get',
url: '/api/jt1078/playback/stop/',
params: {
phoneNumber: phoneNumber,
channelId: channelId,
streamId: streamId
}
})
}
export function queryConfig(phoneNumber) {
return request({
method: 'get',
url: `/api/jt1078/config`,
params: {
phoneNumber: phoneNumber
}
})
}
export function setConfig(data) {
return request({
method: 'post',
url: `/api/jt1078/set-config`,
data: data
})
}

View File

@ -1,12 +1,12 @@
import {
add,
addChannel, deleteDevice,
deleteDeviceById, fillLight,
addChannel, controlPlayback, deleteDevice,
fillLight,
play, ptz,
queryChannels,
queryChannels, queryConfig,
queryDeviceById,
queryDevices,
stopPlay, update,
queryDevices, queryRecordList, setConfig, startPlayback,
stopPlay, stopPlayback, update,
updateChannel, wiper
} from '@/api/jtDevice'
@ -140,6 +140,66 @@ const actions = {
reject(error)
})
})
},
queryConfig({ commit }, phoneNumber) {
return new Promise((resolve, reject) => {
queryConfig(phoneNumber).then(response => {
const { data } = response
resolve(data)
}).catch(error => {
reject(error)
})
})
},
setConfig({ commit }, data) {
return new Promise((resolve, reject) => {
setConfig(data).then(response => {
const { data } = response
resolve(data)
}).catch(error => {
reject(error)
})
})
},
queryRecordList({ commit }, params) {
return new Promise((resolve, reject) => {
queryRecordList(params).then(response => {
const { data } = response
resolve(data)
}).catch(error => {
reject(error)
})
})
},
startPlayback({ commit }, params) {
return new Promise((resolve, reject) => {
startPlayback(params).then(response => {
const { data } = response
resolve(data)
}).catch(error => {
reject(error)
})
})
},
controlPlayback({ commit }, params) {
return new Promise((resolve, reject) => {
controlPlayback(params).then(response => {
const { data } = response
resolve(data)
}).catch(error => {
reject(error)
})
})
},
stopPlayback({ commit }, params) {
return new Promise((resolve, reject) => {
stopPlayback(params).then(response => {
const { data } = response
resolve(data)
}).catch(error => {
reject(error)
})
})
}
}

View File

@ -250,7 +250,7 @@ export default {
queryCloudRecords: function(itemData) {
const deviceId = this.device.phoneNumber
const channelId = itemData.channelId
this.$router.push(`/cloudRecord/detail/rtp/${deviceId}_${channelId}`)
this.$router.push(`/cloudRecord/detail/rtp/jt_${deviceId}_${channelId}`)
},
stopDevicePush: function(itemData) {
this.$store.dispatch('jtDevice/stopPlay', {

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,485 @@
<template>
<div style="width: 100%">
<div class="page-header">
<div class="page-title">
<el-page-header content="部标录像" @back="goBack" />
</div>
</div>
<el-container>
<el-aside width="300px">
<div class="record-list-box-box">
<el-date-picker v-model="chooseDate" size="mini" type="date" value-format="yyyy-MM-dd" placeholder="日期" @change="dateChange()" />
<div v-loading="recordsLoading" class="record-list-box" :style="recordListStyle">
<ul v-if="detailFiles.length >0" class="infinite-list record-list">
<li v-for="item in detailFiles" class="infinite-list-item record-list-item">
<el-tag v-if="chooseFile !== item" @click="checkedFile(item)">
<i class="el-icon-video-camera" />
{{ moment(item.startTime).format('HH:mm:ss') }}-{{ moment(item.endTime).format('HH:mm:ss') }}
</el-tag>
<el-tag v-if="chooseFile === item" type="danger">
<i class="el-icon-video-camera" />
{{ moment(item.startTime).format('HH:mm:ss') }}-{{ moment(item.endTime).format('HH:mm:ss') }}
</el-tag>
<i style="color: #409EFF;margin-left: 5px;" class="el-icon-download" @click="downloadRecord(item)" />
</li>
</ul>
</div>
<div v-if="detailFiles.length ==0" size="mini" class="record-list-no-val">暂无数据</div>
</div>
</el-aside>
<el-main style="padding-bottom: 10px;">
<div class="playBox" :style="playerStyle">
<player
ref="recordVideoPlayer"
:video-url="videoUrl"
:error="videoError"
:message="videoError"
:has-audio="hasAudio"
style="max-height: 100%"
fluent
autoplay
live
/>
</div>
<div class="player-option-box">
<div>
<el-button-group>
<el-time-picker
v-model="timeRange"
size="mini"
is-range
align="left"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围"
@change="timePickerChange"
/>
</el-button-group>
<el-button-group>
<el-button size="mini" class="iconfont icon-zanting" title="开始" @click="control(0, 0)" />
<el-button size="mini" class="iconfont icon-kaishi" title="暂停" @click="control(1, 0)" />
<el-button size="mini" class="iconfont icon-stop" title="结束" @click="control(2, 0)" />
<el-dropdown size="mini" title="播放倍速" @command="scale">
<el-button size="mini">
快进/快退 <i class="el-icon-arrow-down el-icon--right" />
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[3, 1]">正常快进</el-dropdown-item>
<el-dropdown-item :command="[3, 2]">2倍速快进</el-dropdown-item>
<el-dropdown-item :command="[3, 4]">4倍速快进</el-dropdown-item>
<el-dropdown-item :command="[3, 8]">8倍速快进</el-dropdown-item>
<el-dropdown-item :command="[3, 16]">16倍速快进</el-dropdown-item>
<el-dropdown-item :command="[4, 1]">正常快退</el-dropdown-item>
<el-dropdown-item :command="[4, 2]">2倍速快退</el-dropdown-item>
<el-dropdown-item :command="[4, 4]">4倍速快退</el-dropdown-item>
<el-dropdown-item :command="[4, 8]">8倍速快退</el-dropdown-item>
<el-dropdown-item :command="[4, 16]">16倍速快退</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button size="mini" class="iconfont icon-xiazai1" title="下载选定录像" @click="downloadRecord()" />
<el-button v-if="sliderMIn === 0 && sliderMax === 86400" size="mini" class="iconfont icon-slider" title="放大滑块" @click="setSliderFit()" />
<el-button v-if="sliderMIn !== 0 || sliderMax !== 86400" size="mini" class="iconfont icon-slider-right" title="恢复滑块" @click="setSliderFit()" />
</el-button-group>
</div>
<el-slider
id="playtimeSlider"
v-model="playTime"
class="playtime-slider"
:disabled="detailFiles.length === 0"
:min="sliderMIn"
:max="sliderMax"
:range="true"
:format-tooltip="playTimeFormat"
:marks="playTimeSliderMarks"
@change="playTimeChange"
/>
<div class="slider-val-box">
<div v-for="item of detailFiles" class="slider-val" :style="'width:' + getDataWidth(item) + '%; left:' + getDataLeft(item) + '%'" />
</div>
</div>
</el-main>
</el-container>
</div>
</template>
<script>
import player from '../../common/jessibuca.vue'
import moment from 'moment'
export default {
name: 'App',
components: {
player
},
data() {
return {
phoneNumber: this.$route.params.phoneNumber,
channelId: this.$route.params.channelId,
recordsLoading: false,
streamId: '',
hasAudio: false,
detailFiles: [],
chooseDate: null,
videoUrl: null,
chooseFile: null,
streamInfo: null,
app: null,
mediaServerId: null,
ssrc: null,
sliderMIn: 0,
sliderMax: 86400,
autoPlay: true,
taskUpdate: null,
tabVal: 'running',
recordListStyle: {
height: this.winHeight + 'px',
overflow: 'auto',
margin: '10px auto 10px auto'
},
playerStyle: {
'margin': '0 auto 20px auto',
'height': this.winHeight + 'px'
},
winHeight: window.innerHeight - 240,
playTime: null,
timeRange: null,
startTime: null,
endTime: null,
playTimeSliderMarks: {
0: '00:00',
3600: '01:00',
7200: '02:00',
10800: '03:00',
14400: '04:00',
18000: '05:00',
21600: '06:00',
25200: '07:00',
28800: '08:00',
32400: '09:00',
36000: '10:00',
39600: '11:00',
43200: '12:00',
46800: '13:00',
50400: '14:00',
54000: '15:00',
57600: '16:00',
61200: '17:00',
64800: '18:00',
68400: '19:00',
72000: '20:00',
75600: '21:00',
79200: '22:00',
82800: '23:00',
86400: '24:00'
}
}
},
computed: {
},
mounted() {
this.recordListStyle.height = this.winHeight + 'px'
this.playerStyle['height'] = this.winHeight + 'px'
this.chooseDate = moment().format('YYYY-MM-DD')
this.dateChange()
window.addEventListener('beforeunload', this.stopPlayRecord)
},
destroyed() {
this.$destroy('recordVideoPlayer')
window.removeEventListener('beforeunload', this.stopPlayRecord)
},
methods: {
dateChange() {
if (!this.chooseDate) {
return
}
this.setTime(this.chooseDate + ' 00:00:00', this.chooseDate + ' 23:59:59')
this.recordsLoading = true
this.detailFiles = []
this.$store.dispatch('jtDevice/queryRecordList', {
phoneNumber: this.phoneNumber,
channelId: this.channelId,
startTime: this.startTime,
endTime: this.endTime
})
.then((data) => {
this.detailFiles = data
})
.catch((e) => {
console.log(e)
})
.finally(() => {
this.recordsLoading = false
})
},
moment: function(v) {
return moment(v)
},
setTime: function(startTime, endTime) {
this.startTime = startTime
this.endTime = endTime
const start = (new Date(this.startTime).getTime() - new Date(this.chooseDate + ' 00:00:00').getTime()) / 1000
const end = (new Date(this.endTime).getTime() - new Date(this.chooseDate + ' 00:00:00').getTime()) / 1000
console.log(start)
console.log(end)
this.playTime = [start, end]
this.timeRange = [startTime, endTime]
},
videoError: function(e) {
console.log('播放器错误:' + JSON.stringify(e))
},
checkedFile(file) {
this.chooseFile = file
this.setTime(file.startTime, file.endTime)
//
this.playRecord()
},
playRecord: function() {
if (this.streamId !== '') {
this.stopPlayRecord(() => {
this.streamId = ''
this.playRecord()
})
} else {
this.$store.dispatch('jtDevice/startPlayback', {
phoneNumber: this.phoneNumber,
channelId: this.channelId,
startTime: this.startTime,
endTime: this.endTime,
type: 0,
rate: 0,
playbackType: 0,
playbackSpeed: 0
})
.then((data) => {
this.streamInfo = data
this.app = this.streamInfo.app
this.streamId = this.streamInfo.stream
this.mediaServerId = this.streamInfo.mediaServerId
this.ssrc = this.streamInfo.ssrc
this.videoUrl = this.getUrlByStreamInfo()
this.hasAudio = this.streamInfo.tracks && this.streamInfo.tracks.length > 1
})
}
},
control(command, playbackSpeed, time) {
this.$store.dispatch('jtDevice/controlPlayback', {
phoneNumber: this.phoneNumber,
channelId: this.channelId,
command: command,
playbackSpeed: playbackSpeed,
time: time
})
},
scale(command) {
this.control(command[0], command[1])
},
downloadRecord: function(row) {
const baseUrl = window.baseUrl ? window.baseUrl : ''
const downloadFile = ((process.env.NODE_ENV === 'development') ? process.env.BASE_API : baseUrl) +
`/api/jt1078/playback/download?phoneNumber=${this.phoneNumber}&channelId=${this.channelId}&startTime=${row.startTime}&endTime=${row.endTime}` +
`&alarmSign=${row.alarmSign}&mediaType=${row.mediaType}&streamType=${row.streamType}&storageType=${row.storageType}`
console.log(downloadFile)
const x = new XMLHttpRequest()
x.open('GET', downloadFile, true)
x.responseType = 'blob'
x.onload = (e) => {
const url = window.URL.createObjectURL(x.response)
const a = document.createElement('a')
a.href = url
a.download = this.phoneNumber + '-' + this.channelId + '.mp4'
a.click()
}
x.send()
},
stopPlayRecord: function(callback) {
console.log('停止录像回放')
if (this.streamId !== '') {
this.$refs['recordVideoPlayer'].pause()
this.videoUrl = ''
this.$store.dispatch('jtDevice/stopPlayback', {
phoneNumber: this.phoneNumber,
channelId: this.channelId,
streamId: this.streamId
})
.then(function(res) {
if (callback) callback()
})
}
},
getDataWidth(item) {
const timeForFile = this.getTimeForFile(item)
const result = (timeForFile[2]) / ((this.sliderMax - this.sliderMIn) * 1000)
return result * 100
},
getDataLeft(item) {
const timeForFile = this.getTimeForFile(item)
const differenceTime = timeForFile[0].getTime() - new Date(this.chooseDate + ' 00:00:00').getTime()
return parseFloat((differenceTime - this.sliderMIn * 1000) / ((this.sliderMax - this.sliderMIn) * 1000)) * 100
},
getUrlByStreamInfo() {
if (location.protocol === 'https:') {
this.videoUrl = this.streamInfo['wss_flv']
} else {
this.videoUrl = this.streamInfo['ws_flv']
}
return this.videoUrl
},
timePickerChange: function(val) {
this.setTime(val[0], val[1])
},
playTimeChange(val) {
console.log(val)
const startTimeStr = moment(new Date(this.chooseDate + ' 00:00:00').getTime() + val[0] * 1000).format('YYYY-MM-DD HH:mm:ss')
const endTimeStr = moment(new Date(this.chooseDate + ' 00:00:00').getTime() + val[1] * 1000).format('YYYY-MM-DD HH:mm:ss')
this.setTime(startTimeStr, endTimeStr)
this.playRecord()
},
setSliderFit() {
if (this.sliderMIn === 0 && this.sliderMax === 86400) {
if (this.detailFiles.length > 0) {
const timeForFile = this.getTimeForFile(this.detailFiles[0])
const lastTimeForFile = this.getTimeForFile(this.detailFiles[this.detailFiles.length - 1])
const timeNum = timeForFile[0].getTime() - new Date(this.chooseDate + ' ' + '00:00:00').getTime()
const lastTimeNum = lastTimeForFile[1].getTime() - new Date(this.chooseDate + ' ' + '00:00:00').getTime()
this.playTime = parseInt(timeNum / 1000)
this.sliderMIn = parseInt(timeNum / 1000 - timeNum / 1000 % (60 * 60))
this.sliderMax = parseInt(lastTimeNum / 1000 - lastTimeNum / 1000 % (60 * 60)) + 60 * 60
this.playTime = [this.sliderMIn, this.sliderMax]
}
} else {
this.sliderMIn = 0
this.sliderMax = 86400
}
},
getTimeForFile(file) {
const startTime = new Date(file.startTime)
const endTime = new Date(file.endTime)
return [startTime, endTime, endTime.getTime() - startTime.getTime()]
},
playTimeFormat(val) {
const h = parseInt(val / 3600)
const m = parseInt((val - h * 3600) / 60)
const s = parseInt(val - h * 3600 - m * 60)
let hStr = h
let mStr = m
let sStr = s
if (h < 10) {
hStr = '0' + hStr
}
if (m < 10) {
mStr = '0' + mStr; s
}
if (s < 10) {
sStr = '0' + sStr
}
return hStr + ':' + mStr + ':' + sStr
},
goBack() {
//
if (this.streamId !== '') {
this.stopPlayRecord(() => {
this.streamId = ''
})
}
window.history.go(-1)
}
}
}
</script>
<style>
.el-slider__runway {
background-color:rgba(206, 206, 206, 0.47) !important;
}
.el-slider__bar {
background-color: rgba(153, 153, 153, 0) !important;
}
.playtime-slider {
position: relative;
z-index: 100;
}
.data-picker-true{
}
.data-picker-true:after{
content: "";
position: absolute;
width: 4px;
height: 4px;
background-color: #606060;
border-radius: 4px;
left: 45%;
top: 74%;
}
.data-picker-false{
}
.slider-val-box{
height: 6px;
position: relative;
top: -22px;
}
.slider-val{
height: 6px;
background-color: #007CFF;
position: absolute;
}
.record-list-box-box{
width: 250px;
float: left;
}
.record-list-box{
overflow: auto;
width: 220px;
list-style: none;
padding: 0;
margin: 0;
margin-top: 0px;
padding: 1rem 0;
background-color: #FFF;
margin-top: 10px;
}
.record-list{
list-style: none;
padding: 0;
margin: 0;
background-color: #FFF;
}
.record-list-no-val {
position: absolute;
color: #9f9f9f;
top: 50%;
left: 110px;
}
.record-list-item{
padding: 0;
margin: 0;
margin: 0.5rem 0;
cursor: pointer;
}
.record-list-option {
width: 10px;
float: left;
margin-top: 39px;
}
.player-option-box{
padding: 0 20px;
}
</style>

View File

@ -1,31 +1,43 @@
<template>
<div id="device" class="app-container">
<deviceList v-show="deviceId === null" @show-channel="showChannelList" />
<channelList v-if="deviceId !== null" :device-id="deviceId" @show-device="showDevice" />
<deviceList v-show="show === 'device'" @show-channel="showChannelList" @show-param="showParam" />
<channelList v-if="show === 'channel'" :device-id="deviceId" @show-device="showDevice" />
<deviceParam v-if="show === 'param'" :phone-number="phoneNumber" @show-device="showDevice" />
</div>
</template>
<script>
import deviceList from './list.vue'
import channelList from './channel/index.vue'
import deviceParam from './jtDeviceParam.vue'
export default {
name: 'Device',
components: {
deviceList,
channelList
channelList,
deviceParam
},
data() {
return {
deviceId: null
show: 'device',
deviceId: null,
phoneNumber: null
}
},
methods: {
showChannelList: function(deviceId) {
this.deviceId = deviceId
this.show = 'channel'
},
showParam: function(phoneNumber) {
this.phoneNumber = phoneNumber
this.show = 'param'
},
showDevice: function() {
this.deviceId = null
this.phoneNumber = null
this.show = 'device'
}
}
}

View File

@ -0,0 +1,339 @@
<template>
<div id="jtDeviceParam" style="width: 100%">
<div class="page-header">
<div class="page-title">
<el-page-header content="终端参数" @back="showDevice" />
</div>
</div>
<el-container v-loading="isLoading" style="height: 82vh; overflow: auto">
<el-main style="padding: 5px; background-color: #ffffff;">
<el-divider content-position="center">通讯参数</el-divider>
<el-form ref="form" size="mini" :rules="rules" :model="form" label-width="240px" style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;">
<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>
<el-divider content-position="center">服务器参数</el-divider>
<el-form ref="form" size="mini" :rules="rules" :model="form" label-width="240px" style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;">
<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-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-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-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>
<el-divider content-position="center">位置汇报</el-divider>
<el-form ref="form" size="mini" :rules="rules" :model="form" label-width="240px" style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;">
<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>
<el-divider content-position="center">电话号码</el-divider>
<el-form ref="form" size="mini" :rules="rules" :model="form" label-width="240px" style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;">
<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>
<el-divider content-position="center">报警参数</el-divider>
<el-form ref="form" size="mini" :rules="rules" :model="form" label-width="240px" style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;">
<el-form-item label="报警屏蔽字(TODO)" prop="alarmMaskingWord">
<el-input v-model="form.alarmMaskingWord" clearable />
</el-form-item>
<el-form-item label="报警发送文本 SMS 开关(TODO)" prop="alarmSendsTextSmsSwitch">
<el-input v-model="form.alarmSendsTextSmsSwitch" clearable />
</el-form-item>
<el-form-item label="报警拍摄开关(TODO)" prop="alarmShootingSwitch">
<el-input v-model="form.alarmShootingSwitch" clearable />
</el-form-item>
<el-form-item label="报警拍摄存储标志(TODO)" prop="alarmShootingStorageFlags">
<el-input v-model="form.alarmShootingStorageFlags" clearable />
</el-form-item>
<el-form-item label="关键标志(TODO)" prop="KeySign">
<el-input v-model="form.KeySign" clearable />
</el-form-item>
<el-form-item label="电子围栏半径(米)" prop="fenceRadius">
<el-input v-model="form.fenceRadius" clearable />
</el-form-item>
</el-form>
<el-divider content-position="center">行驶参数</el-divider>
<el-form ref="form" size="mini" :rules="rules" :model="form" label-width="240px" style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;">
<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>
<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>
<el-form-item label="侧翻报警参数-侧翻角度(度)" prop="rolloverAlarm">
<el-input v-model="form.rolloverAlarm" clearable />
</el-form-item>
</el-form>
<el-divider content-position="center">定时拍照控制</el-divider>
<el-form ref="form" size="mini" :rules="rules" :model="form" label-width="240px" style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;">
<el-form-item label="定时拍照开关-通道1" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.switchForChannel1" />
</el-form-item>
<el-form-item label="定时拍照开关-通道2" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.switchForChannel2" />
</el-form-item>
<el-form-item label="定时拍照开关-通道3" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.switchForChannel3" />
</el-form-item>
<el-form-item label="定时拍照开关-通道4" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.switchForChannel4" />
</el-form-item>
<el-form-item label="定时拍照开关-通道5" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.switchForChannel5" />
</el-form-item>
<el-form-item label="定时拍照存储-通道1" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.storageFlagsForChannel1" />
</el-form-item>
<el-form-item label="定时拍照存储-通道2" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.storageFlagsForChannel2" />
</el-form-item>
<el-form-item label="定时拍照存储-通道3" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.storageFlagsForChannel3" />
</el-form-item>
<el-form-item label="定时拍照存储-通道4" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.storageFlagsForChannel4" />
</el-form-item>
<el-form-item label="定时拍照存储-通道5" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.storageFlagsForChannel5" />
</el-form-item>
<el-form-item label="定时时间间隔" prop="timeInterval">
<el-input v-model="form.timeInterval" clearable />
</el-form-item>
<el-form-item label="定时时间单位" prop="rolloverAlarm">
<el-switch v-model="form.cameraTimer.timeUnit" active-text="" inactive-text="" />
</el-form-item>
</el-form>
<div style="float: right;">
<el-button type="primary" @click="onSubmit">确认</el-button>
<el-button @click="showDevice">取消</el-button>
</div>
</el-main>
</el-container>
</div>
</template>
<script>
export default {
name: 'JTDeviceParam',
components: {
},
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() {
this.$store.dispatch('jtDevice/setConfig', {
phoneNumber: this.phoneNumber,
config: this.form
})
.then((data) => {
this.$message.success({
showClose: true,
message: '保存成功'
})
})
},
showDevice: function() {
this.$emit('show-device')
}
}
}
</script>

View File

@ -3,8 +3,8 @@
<el-form :inline="true" size="mini">
<el-form-item>
<el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="add">新设备</el-button>
<el-button icon="el-icon-info" style="margin-right: 1rem;" @click="showInfo()">接入信息
</el-button></el-form-item>
<el-button icon="el-icon-info" style="margin-right: 1rem;" @click="showInfo()">接入信息</el-button>
</el-form-item>
<el-form-item style="float: right;">
<el-button
icon="el-icon-refresh-right"
@ -84,8 +84,8 @@
终端参数</el-dropdown-item>
<!-- <el-dropdown-item command="attribute" v-bind:disabled="!scope.row.status">-->
<!-- 终端属性</el-dropdown-item>-->
<el-dropdown-item command="connection" :disabled="!scope.row.status">
终端连接</el-dropdown-item>
<!-- <el-dropdown-item command="connection" :disabled="!scope.row.status">-->
<!-- 终端连接</el-dropdown-item>-->
<!-- <el-dropdown-item command="linkDetection" v-bind:disabled="!scope.row.status" >-->
<!-- 链路检测</el-dropdown-item>-->
<!-- <el-dropdown-item command="position" v-bind:disabled="!scope.row.status" >-->
@ -213,6 +213,9 @@ export default {
console.log(row)
this.$emit('show-channel', row.id)
},
showParam: function(row) {
this.$emit('show-param', row.phoneNumber)
},
add: function() {
this.$refs.deviceEdit.openDialog(null, () => {
this.$refs.deviceEdit.close()
@ -226,7 +229,7 @@ export default {
},
moreClick: function(command, itemData) {
if (command === 'params') {
this.$router.push(`/jtDeviceParams/${itemData.phoneNumber}`)
this.showParam(itemData)
} else if (command === 'connection') {
// this.queryCloudRecords(itemData)
} else {