Commit 0c14c69f307afc2221a9fa16268c0b2d9103c0d4
Merge branch 'local_dev_latest' into 'main_dev'
fix(src/packages/external/Informations): 修改摄像头组件,select选择框里部分数据为undefined问题 See merge request yunteng/thingskit-view!199
Showing
2 changed files
with
13 additions
and
8 deletions
@@ -22,11 +22,13 @@ export interface videoListInterface { | @@ -22,11 +22,13 @@ export interface videoListInterface { | ||
22 | videoUrl: string | 22 | videoUrl: string |
23 | label: string | 23 | label: string |
24 | value: string | 24 | value: string |
25 | + sn: string | ||
25 | } | 26 | } |
26 | 27 | ||
27 | export enum AccessMode { | 28 | export enum AccessMode { |
28 | - ManuallyEnter = 0, | ||
29 | - Streaming = 1 | 29 | + ManuallyEnter = 0, //手动输入 |
30 | + Streaming = 1, //流媒体 | ||
31 | + GBT28181 = 2 //GBT28181 | ||
30 | } | 32 | } |
31 | 33 | ||
32 | export const option = { | 34 | export const option = { |
@@ -99,12 +99,15 @@ const handleUpdateTreeValue = (value: string) => { | @@ -99,12 +99,15 @@ const handleUpdateTreeValue = (value: string) => { | ||
99 | const getVideoLists = async (organizationId: string) => { | 99 | const getVideoLists = async (organizationId: string) => { |
100 | const res = await getVideoList({ organizationId }) | 100 | const res = await getVideoList({ organizationId }) |
101 | if (!res) return | 101 | if (!res) return |
102 | - videoOptions.value = res?.data?.map((item: videoListInterface) => ({ | ||
103 | - label: item.name, | ||
104 | - value: item.accessMode === AccessMode.Streaming ? item.id : item.videoUrl, | ||
105 | - id: item.id, | ||
106 | - accessMode: item.accessMode | ||
107 | - })) | 102 | + videoOptions.value = res?.data?.map((item: videoListInterface) => { |
103 | + if(item.accessMode === AccessMode.GBT28181) return 0; | ||
104 | + return { | ||
105 | + label: item.name, | ||
106 | + value: item.accessMode === AccessMode.Streaming ? item.id : item.videoUrl, | ||
107 | + id: item.id, | ||
108 | + accessMode: item.accessMode | ||
109 | + } | ||
110 | + }).filter(Boolean) | ||
108 | } | 111 | } |
109 | 112 | ||
110 | const getVideoUrlById = async (id: string) => { | 113 | const getVideoUrlById = async (id: string) => { |