Commit 2211c8c9f5f78b256ef4bca57981edb703da57fe

Authored by fengtao
Committed by xp.Huang
1 parent ff522652

fix(src/packages/external/Informations): 修改摄像头组件,select选择框里部分数据为undefined问题

... ... @@ -22,11 +22,13 @@ export interface videoListInterface {
22 22 videoUrl: string
23 23 label: string
24 24 value: string
  25 + sn: string
25 26 }
26 27
27 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 34 export const option = {
... ...
... ... @@ -99,12 +99,15 @@ const handleUpdateTreeValue = (value: string) => {
99 99 const getVideoLists = async (organizationId: string) => {
100 100 const res = await getVideoList({ organizationId })
101 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 113 const getVideoUrlById = async (id: string) => {
... ...