From 68f7d3ef7494e9eb39e8ec5d3dd00c8bf63cc3e2 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: Wed, 14 May 2025 15:48:35 +0800
Subject: [PATCH] =?UTF-8?q?[1078]=20=E9=80=82=E9=85=8D=E6=96=B0UI?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web/src/api/jtDevice.js | 24 ++
web/src/router/index.js | 2 +-
web/src/store/modules/jtDevice.js | 22 +-
web/src/views/jtDevice/channel/index.vue | 124 +++----
web/src/views/jtDevice/channel/record.vue | 431 +++++++++++-----------
5 files changed, 321 insertions(+), 282 deletions(-)
diff --git a/web/src/api/jtDevice.js b/web/src/api/jtDevice.js
index e2b411a4d..34bea46ba 100644
--- a/web/src/api/jtDevice.js
+++ b/web/src/api/jtDevice.js
@@ -64,3 +64,27 @@ export function queryChannels(params) {
})
}
+export function play(params) {
+ const { phoneNumber, channelId, type } = params
+ return request({
+ method: 'get',
+ url: '/api/jt1078/live/start',
+ params: {
+ phoneNumber: phoneNumber,
+ channelId: channelId,
+ type: type
+ }
+ })
+}
+export function stopPlay(params) {
+ const { phoneNumber, channelId } = params
+ return request({
+ method: 'get',
+ url: '/api/jt1078/live/stop',
+ params: {
+ phoneNumber: phoneNumber,
+ channelId: channelId
+ }
+ })
+}
+
diff --git a/web/src/router/index.js b/web/src/router/index.js
index d57864e96..89f2e90b2 100644
--- a/web/src/router/index.js
+++ b/web/src/router/index.js
@@ -99,7 +99,7 @@ export const constantRoutes = [
meta: { title: '部标设备', icon: 'jtDevice' }
},
{
- path: '/jtDevice/record/:deviceId/:channelDeviceId',
+ path: '/jtDevice/record/:phoneNumber/:channelId',
name: 'JTDeviceRecord',
component: () => import('@/views/jtDevice/channel/record'),
meta: { title: '部标录像' }
diff --git a/web/src/store/modules/jtDevice.js b/web/src/store/modules/jtDevice.js
index 6ae2d4383..bf3c0f0dd 100644
--- a/web/src/store/modules/jtDevice.js
+++ b/web/src/store/modules/jtDevice.js
@@ -1,4 +1,4 @@
-import { deleteDeviceById, queryChannels, queryDeviceById, queryDevices } from '@/api/jtDevice'
+import { deleteDeviceById, play, queryChannels, queryDeviceById, queryDevices, stopPlay } from '@/api/jtDevice'
import { add } from '@/api/user'
import { update } from '@/api/group'
@@ -62,6 +62,26 @@ const actions = {
reject(error)
})
})
+ },
+ play({ commit }, params) {
+ return new Promise((resolve, reject) => {
+ play(params).then(response => {
+ const { data } = response
+ resolve(data)
+ }).catch(error => {
+ reject(error)
+ })
+ })
+ },
+ stopPlay({ commit }, params) {
+ return new Promise((resolve, reject) => {
+ stopPlay(params).then(response => {
+ const { data } = response
+ resolve(data)
+ }).catch(error => {
+ reject(error)
+ })
+ })
}
}
diff --git a/web/src/views/jtDevice/channel/index.vue b/web/src/views/jtDevice/channel/index.vue
index ae84a3d7c..578935577 100755
--- a/web/src/views/jtDevice/channel/index.vue
+++ b/web/src/views/jtDevice/channel/index.vue
@@ -124,6 +124,7 @@