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 @@