diff --git a/web_src/src/components/DeviceList.vue b/web_src/src/components/DeviceList.vue
index 820f2fc9..5fef49b0 100755
--- a/web_src/src/components/DeviceList.vue
+++ b/web_src/src/components/DeviceList.vue
@@ -347,7 +347,7 @@ export default {
if (res.data.code === 0) {
this.$message.success({
showClose: true,
- message: "布防命令已发送"
+ message: "布防成功"
})
}else {
this.$message.error({
@@ -370,7 +370,7 @@ export default {
if (res.data.code === 0) {
this.$message.success({
showClose: true,
- message: "撤防命令已发送"
+ message: "撤防成功"
})
}else {
this.$message.error({
diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue
index e501263c..ef838771 100755
--- a/web_src/src/components/channelList.vue
+++ b/web_src/src/components/channelList.vue
@@ -139,14 +139,19 @@
{moreClick(command, scope.row)}">
- 更多功能
+ 更多
设备录像
云端录像
+
+ 设备录像控制-开始
+
+ 设备录像控制-停止
+
@@ -338,6 +343,10 @@ export default {
this.queryRecords(itemData)
}else if (command === "cloudRecords") {
this.queryCloudRecords(itemData)
+ }else if (command === "record") {
+ this.startRecord(itemData)
+ }else if (command === "stopRecord") {
+ this.stopRecord(itemData)
}
},
queryRecords: function (itemData) {
@@ -352,6 +361,58 @@ export default {
this.$router.push(`/cloudRecordDetail/rtp/${deviceId}_${channelId}`)
},
+ startRecord: function (itemData) {
+ this.$axios({
+ method: 'get',
+ url: `/api/device/control/record/${this.deviceId}/Record`,
+ params: {
+ channelId: itemData.deviceId
+ }
+ }).then( (res)=> {
+ if (res.data.code === 0) {
+ this.$message.success({
+ showClose: true,
+ message: "开始录像成功"
+ })
+ }else {
+ this.$message.error({
+ showClose: true,
+ message: res.data.msg
+ })
+ }
+ }).catch( (error)=> {
+ this.$message.error({
+ showClose: true,
+ message: error.message
+ })
+ });
+ },
+ stopRecord: function (itemData) {
+ this.$axios({
+ method: 'get',
+ url: `/api/device/control/record/${this.deviceId}/StopRecord`,
+ params: {
+ channelId: itemData.deviceId
+ }
+ }).then( (res)=> {
+ if (res.data.code === 0) {
+ this.$message.success({
+ showClose: true,
+ message: "停止录像成功"
+ })
+ }else {
+ this.$message.error({
+ showClose: true,
+ message: res.data.msg
+ })
+ }
+ }).catch( (error)=> {
+ this.$message.error({
+ showClose: true,
+ message: error.message
+ })
+ });
+ },
stopDevicePush: function (itemData) {
var that = this;
this.$axios({