From 4b6a4e690d938ad84bde6e3fb38618656a3609d8 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 28 Oct 2024 11:03:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=BD=95?= =?UTF-8?q?=E5=83=8F=E6=8E=A7=E5=88=B6(=E5=BC=80=E5=A7=8B/=E5=81=9C?= =?UTF-8?q?=E6=AD=A2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/DeviceList.vue | 4 +- web_src/src/components/channelList.vue | 63 +++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 3 deletions(-) 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 @@ - 更多功能 + 更多 设备录像 云端录像 + + 设备录像控制-开始 + + 设备录像控制-停止 + @@ -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({