all = roleService.getAll();
@@ -35,8 +34,8 @@ class RoleServiceImplTest {
Role role = new Role();
role.setName("test+" + i);
role.setAuthority("adadadda");
- role.setCreateTime(format.format(System.currentTimeMillis()));
- role.setUpdateTime(format.format(System.currentTimeMillis()));
+ role.setCreateTime(DateUtil.getNow());
+ role.setUpdateTime(DateUtil.getNow());
roleService.add(role);
}
}
diff --git a/src/test/java/com/genersoft/iot/vmp/service/impl/UserServiceImplTest.java b/src/test/java/com/genersoft/iot/vmp/service/impl/UserServiceImplTest.java
index 41148706..3f902dc4 100644
--- a/src/test/java/com/genersoft/iot/vmp/service/impl/UserServiceImplTest.java
+++ b/src/test/java/com/genersoft/iot/vmp/service/impl/UserServiceImplTest.java
@@ -1,17 +1,14 @@
package com.genersoft.iot.vmp.service.impl;
-import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
-import com.genersoft.iot.vmp.service.IDeviceAlarmService;
import com.genersoft.iot.vmp.service.IUserService;
import com.genersoft.iot.vmp.storager.dao.dto.Role;
import com.genersoft.iot.vmp.storager.dao.dto.User;
+import com.genersoft.iot.vmp.utils.DateUtil;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
-import java.text.SimpleDateFormat;
-import java.util.Date;
import java.util.List;
@@ -22,7 +19,6 @@ class UserServiceImplTest {
@Resource
private IUserService userService;
- SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@org.junit.jupiter.api.Test
void getAllUser() {
@@ -42,8 +38,8 @@ class UserServiceImplTest {
Role role = new Role();
role.setId(1);
user.setRole(role);
- user.setCreateTime(format.format(System.currentTimeMillis()));
- user.setUpdateTime(format.format(System.currentTimeMillis()));
+ user.setCreateTime(DateUtil.getNow());
+ user.setUpdateTime(DateUtil.getNow());
userService.addUser(user);
}
}
@@ -62,7 +58,7 @@ class UserServiceImplTest {
Role role = new Role();
role.setId(2);
user.setRole(role);
- user.setUpdateTime(format.format(System.currentTimeMillis()));
+ user.setUpdateTime(DateUtil.getNow());
userService.updateUsers(user);
}
diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue
index 7e0637c4..21223ce1 100644
--- a/web_src/src/components/channelList.vue
+++ b/web_src/src/components/channelList.vue
@@ -237,14 +237,16 @@ export default {
that.initData();
}, 1000)
- } else {
+ }else{
that.$message.error(res.data.msg);
}
}).catch(function (e) {
+ that.isLoging = false;
+ that.$message.error("请求超时");
});
},
queryRecords: function (itemData) {
- var format = moment().format("YYYY-M-D");
+ var format = moment().format("yyyy-MM-DD");
let deviceId = this.deviceId;
let channelId = itemData.channelId;
this.$refs.devicePlayer.openDialog("record", deviceId, channelId, {date: format})
diff --git a/web_src/src/components/control.vue b/web_src/src/components/control.vue
index a0b2834f..b8b3e344 100644
--- a/web_src/src/components/control.vue
+++ b/web_src/src/components/control.vue
@@ -576,7 +576,7 @@ export default {
let that = this;
this.$axios({
method: 'get',
- url: '/zlm/' + that.mediaServerChoose + '/index/api/kick_session&id=' + id
+ url: '/zlm/' + that.mediaServerChoose + '/index/api/kick_session?id=' + id
}).then(function (res) {
that.getAllSession();
that.$message({
diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue
index f0b45125..43a929c5 100644
--- a/web_src/src/components/dialog/devicePlayer.vue
+++ b/web_src/src/components/dialog/devicePlayer.vue
@@ -33,10 +33,100 @@
资源地址:
-
-
-
+
+
+
+ 更多地址
+
+
+
+ FLV:
+ {{ streamInfo.flv }}
+
+
+ FLV(https):
+ {{ streamInfo.https_flv }}
+
+
+ FLV(ws):
+ {{ streamInfo.ws_flv }}
+
+
+ FLV(wss):
+ {{ streamInfo.wss_flv }}
+
+
+ FMP4:
+ {{ streamInfo.fmp4 }}
+
+
+ FMP4(https):
+ {{ streamInfo.https_fmp4 }}
+
+
+ FMP4(ws):
+ {{ streamInfo.ws_fmp4 }}
+
+
+ FMP4(wss):
+ {{ streamInfo.wss_fmp4 }}
+
+
+ HLS:
+ {{ streamInfo.hls }}
+
+
+ HLS(https):
+ {{ streamInfo.https_hls }}
+
+
+ HLS(ws):
+ {{ streamInfo.ws_hls }}
+
+
+ HLS(wss):
+ {{ streamInfo.wss_hls }}
+
+
+ TS:
+ {{ streamInfo.ts }}
+
+
+ TS(https):
+ {{ streamInfo.https_ts }}
+
+
+ TS(ws):
+ {{ streamInfo.ws_ts }}
+
+
+ TS(wss):
+ {{ streamInfo.wss_ts }}
+
+
+ RTC:
+ {{ streamInfo.rtc }}
+
+
+ RTMP:
+ {{ streamInfo.rtmp }}
+
+
+ RTMPS:
+ {{ streamInfo.rtmps }}
+
+
+ RTSP:
+ {{ streamInfo.rtsp }}
+
+
+ RTSPS:
+ {{ streamInfo.rtsps }}
+
+
+
+
@@ -117,27 +207,27 @@
- 预置位编号
+ 预置位编号
设置
调用
删除
- 巡航速度
+ 巡航速度
设置
- 停留时间
+ 停留时间
设置
- 巡航组编号
+ 巡航组编号
添加点
删除点
删除组
巡航
- 扫描速度
+ 扫描速度
设置
- 扫描组编号
+ 扫描组编号
左边界
右边界
@@ -174,6 +264,7 @@
+
@@ -244,6 +335,7 @@ export default {
seekTime: 0,
recordStartTime: 0,
showTimeText: "00:00:00",
+ streamInfo: null,
};
},
methods: {
@@ -306,6 +398,7 @@ export default {
console.log(val)
},
play: function (streamInfo, hasAudio) {
+ this.streamInfo = streamInfo;
this.hasAudio = hasAudio;
this.isLoging = false;
// this.videoUrl = streamInfo.rtc;
@@ -453,9 +546,19 @@ export default {
method: 'get',
url: '/api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + startTime + '&endTime=' + endTime
}).then(function (res) {
- // 处理时间信息
- that.videoHistory.searchHistoryResult = res.data.recordList;
- that.recordsLoading = false;
+ console.log(res)
+ if(res.data.code === 0) {
+ // 处理时间信息
+ that.videoHistory.searchHistoryResult = res.data.data.recordList;
+ that.recordsLoading = false;
+ }else {
+ this.$message({
+ showClose: true,
+ message: res.data.msg,
+ type: "error",
+ });
+ }
+
}).catch(function (e) {
console.log(e.message);
// that.videoHistory.searchHistoryResult = falsificationData.recordData;
@@ -636,6 +739,14 @@ export default {
console.log(resultArray)
return resultArray;
},
+ copyUrl: function (dropdownItem){
+ console.log(dropdownItem)
+ this.$copyText(dropdownItem).then((e)=> {
+ this.$message.success("成功拷贝到粘贴板");
+ }, (e)=> {
+
+ })
+ },
gbPlay(){
console.log('前端控制:播放');
this.$axios({
@@ -671,8 +782,13 @@ export default {
this.$axios({
method: 'get',
url: `/api/playback/seek/${this.streamId }/` + Math.floor(this.seekTime * val / 100000)
- }).then(function (res) {});
- }
+ }).then( (res)=> {
+ setTimeout(()=>{
+ this.$refs.videoPlayer.play(this.videoUrl)
+ }, 600)
+ });
+ },
+
}
};
diff --git a/web_src/src/components/dialog/recordDownload.vue b/web_src/src/components/dialog/recordDownload.vue
index 6b7ca1f6..c50e4ce1 100644
--- a/web_src/src/components/dialog/recordDownload.vue
+++ b/web_src/src/components/dialog/recordDownload.vue
@@ -172,6 +172,7 @@ export default {
isEnd: true,
}
}).then((res) => {
+ console.log(res)
if (res.data.code == 0) {
this.percentage = parseFloat(res.data.data.percentage)*100
if (res.data.data[0].percentage === '1') {