From 43a49e95fb0f8789cc97be9e25e141b9196ea85c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=99=E8=B6=85?=
<54933585+sun-chaochao@users.noreply.github.com>
Date: Tue, 1 Aug 2023 15:38:24 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=86=E9=A2=91=E9=A2=84=E7=BD=AE?=
=?UTF-8?q?=E7=82=B9=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* refactor: 预置点位
* fix: 修改预置点位
---
src/api/media/channel.ts | 3 +
src/components/Player/mediaTool.less | 2 +-
src/components/Player/mediaTool.vue | 2 +-
src/router/index.ts | 4 +-
src/router/menu.ts | 5 +
.../media/Device/Channel/Live/Preset.vue | 200 ++++++++++++
src/views/media/Device/Channel/Live/Share.vue | 61 ++++
.../media/Device/Channel/Live/index.less | 34 ++-
src/views/media/Device/Channel/Live/index.vue | 289 ++++++++++++------
.../media/Device/Channel/Share/index.vue | 30 ++
10 files changed, 517 insertions(+), 113 deletions(-)
create mode 100644 src/views/media/Device/Channel/Live/Preset.vue
create mode 100644 src/views/media/Device/Channel/Live/Share.vue
create mode 100644 src/views/media/Device/Channel/Share/index.vue
diff --git a/src/api/media/channel.ts b/src/api/media/channel.ts
index 06b80f65..a24cd0e4 100644
--- a/src/api/media/channel.ts
+++ b/src/api/media/channel.ts
@@ -67,4 +67,7 @@ export default {
// 播放云端回放
playbackStart: (recordId: string) => server.get(`/media/record/${recordId}.mp4`),
+
+ // 设备预置位相关接口
+ opFunction: (deviceId: string, functionId: string, data?: any) => server.post(`/device/invoked/${deviceId}/function/${functionId}`, data)
}
\ No newline at end of file
diff --git a/src/components/Player/mediaTool.less b/src/components/Player/mediaTool.less
index 68edb215..8428448f 100644
--- a/src/components/Player/mediaTool.less
+++ b/src/components/Player/mediaTool.less
@@ -44,7 +44,7 @@
justify-content: center;
width: 45%;
height: 45%;
- font-size: 30px;
+ // font-size: 30px;
background-color: #fff;
border-radius: 50%;
transform: translate(-50%, -50%) rotateZ(-45deg);
diff --git a/src/components/Player/mediaTool.vue b/src/components/Player/mediaTool.vue
index 83f0b315..b206a16b 100644
--- a/src/components/Player/mediaTool.vue
+++ b/src/components/Player/mediaTool.vue
@@ -39,7 +39,7 @@
diff --git a/src/router/index.ts b/src/router/index.ts
index 09f14d0e..0f4ff104 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,5 +1,5 @@
import { createRouter, createWebHashHistory } from 'vue-router'
-import menus, { AccountCenterBindPath, InitHomePath, InitLicense, LoginPath, OauthPath } from './menu'
+import menus, { AccountCenterBindPath, InitHomePath, InitLicense, LoginPath, OauthPath, VideoSharePath } from './menu'
import { cleanToken, getToken } from '@/utils/comm'
import { useUserInfo } from '@/store/userInfo'
import { useSystem } from '@/store/system'
@@ -15,7 +15,7 @@ const router = createRouter({
})
const filterPath = [ InitHomePath ]
-const noTokenPath = [ AccountCenterBindPath, OauthPath, InitLicense ]
+const noTokenPath = [ AccountCenterBindPath, OauthPath, InitLicense, VideoSharePath ]
router.beforeEach((to, from, next) => {
// TODO 切换路由取消请求
diff --git a/src/router/menu.ts b/src/router/menu.ts
index 7f7c7614..34605154 100644
--- a/src/router/menu.ts
+++ b/src/router/menu.ts
@@ -5,6 +5,7 @@ export const InitLicense = '/init-license'
export const NotificationSubscriptionCode = 'message-subscribe'
export const NotificationRecordCode = 'account/NotificationRecord'
export const OauthPath = '/oauth'
+export const VideoSharePath = '/media/device/Share'
export const AccountMenu = {
path: '/account',
@@ -86,5 +87,9 @@ export default [
},
component: () => import('@/views/oauth/WeChat.vue')
},
+ {
+ path: VideoSharePath,
+ component: () => import('@/views/media/Device/Channel/Share/index.vue')
+ },
AccountMenu
]
\ No newline at end of file
diff --git a/src/views/media/Device/Channel/Live/Preset.vue b/src/views/media/Device/Channel/Live/Preset.vue
new file mode 100644
index 00000000..338ca1dd
--- /dev/null
+++ b/src/views/media/Device/Channel/Live/Preset.vue
@@ -0,0 +1,200 @@
+
+
+
+
+ 设置
+
+
+ 删除
+ 调用
+
+
+
+
+
+
+
+ {{ record[column.dataIndex] }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/media/Device/Channel/Live/Share.vue b/src/views/media/Device/Channel/Live/Share.vue
new file mode 100644
index 00000000..416e1537
--- /dev/null
+++ b/src/views/media/Device/Channel/Live/Share.vue
@@ -0,0 +1,61 @@
+
+
+
+
+ 复制下方链接,分享{{ data.name }}视频界面
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/media/Device/Channel/Live/index.less b/src/views/media/Device/Channel/Live/index.less
index e8e0b3f6..b2e2221e 100644
--- a/src/views/media/Device/Channel/Live/index.less
+++ b/src/views/media/Device/Channel/Live/index.less
@@ -1,22 +1,21 @@
.media-live {
display: flex;
- .live-player-tools {
- flex-basis: 230px;
+ // .live-player-tools {
+ // flex-basis: 300px;
- .direction-item {
- font-size: 30px !important;
- }
+ // .direction-item {
+ // font-size: 30px !important;
+ // }
- .zoom-item {
- font-size: 20px !important;
- }
- }
+ // .zoom-item {
+ // font-size: 20px !important;
+ // }
+ // }
.media-live-video {
position: relative;
- flex-grow: 1;
- width: 0;
+ flex: 1;
.media-tool {
position: absolute;
@@ -50,9 +49,20 @@
}
}
}
+
+ .media-live-actions {
+ width: 300px;
+ margin-left: 10px;
+
+ .actions-tool {
+ padding: 0 40px 5px 40px;
+ }
+ }
}
.media-live-tool {
display: flex;
- margin-top: 24px;
+ margin-bottom: 24px;
+ justify-content: space-between;
+ align-items: center;
}
diff --git a/src/views/media/Device/Channel/Live/index.vue b/src/views/media/Device/Channel/Live/index.vue
index 27d292e1..176940af 100644
--- a/src/views/media/Device/Channel/Live/index.vue
+++ b/src/views/media/Device/Channel/Live/index.vue
@@ -3,49 +3,82 @@
+
+
+
+