Showing
7 changed files
with
18 additions
and
42 deletions
... | ... | @@ -52,10 +52,9 @@ |
52 | 52 | |
53 | 53 | const setSources = (url: string, fingerprintResult: GetResult) => { |
54 | 54 | const flag = isRtspProtocol(url); |
55 | - console.log(flag, fingerprintResult, getFlvPlayUrl); | |
56 | 55 | options.sources = [ |
57 | 56 | { |
58 | - src: 'https://abc-iview-mediapackagestreams-2.akamaized.net/out/v1/6e1cc6d25ec0480ea099a5399d73bc4b/index.m3u8', | |
57 | + src: flag ? getFlvPlayUrl(url, fingerprintResult.visitorId) : url, | |
59 | 58 | type: getVideoTypeByUrl(url), |
60 | 59 | }, |
61 | 60 | ]; | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | @open-gateway-device="handleOpenGatewayDevice" |
17 | 17 | /> |
18 | 18 | </TabPane> |
19 | - <TabPane v-if="!isTransportType" key="modelOfMatter" tab="物模型数据"> | |
19 | + <TabPane key="modelOfMatter" tab="物模型数据"> | |
20 | 20 | <ModelOfMatter :deviceDetail="deviceDetail" /> |
21 | 21 | </TabPane> |
22 | 22 | <!-- <TabPane key="2" tab="实时数据" v-if="deviceDetail?.deviceType !== 'GATEWAY'"> |
... | ... | @@ -28,38 +28,30 @@ |
28 | 28 | <!-- <TabPane key="5" tab="命令下发" v-if="deviceDetail?.deviceType !== 'SENSOR'"> |
29 | 29 | <CommandIssuance :deviceDetail="deviceDetail" /> |
30 | 30 | </TabPane> --> |
31 | - <TabPane v-if="!isTransportType" key="3" tab="告警"><Alarm :id="deviceDetail.id" /></TabPane> | |
32 | - <TabPane | |
33 | - key="4" | |
34 | - tab="子设备" | |
35 | - v-if="deviceDetail?.deviceType === 'GATEWAY' && !isTransportType" | |
36 | - > | |
31 | + <TabPane key="3" tab="告警"><Alarm :id="deviceDetail.id" /></TabPane> | |
32 | + <TabPane key="4" tab="子设备" v-if="deviceDetail?.deviceType === 'GATEWAY'"> | |
37 | 33 | <ChildDevice |
38 | 34 | :fromId="deviceDetail?.tbDeviceId" |
39 | 35 | @openTbDeviceDetail="handleOpenTbDeviceDetail" |
40 | 36 | /> |
41 | 37 | </TabPane> |
42 | - <TabPane v-if="!isTransportType" key="7" tab="命令下发记录"> | |
38 | + <TabPane key="7" tab="命令下发记录"> | |
43 | 39 | <CommandRecord :deviceDetail="deviceDetail" :fromId="deviceDetail?.tbDeviceId" /> |
44 | 40 | </TabPane> |
45 | 41 | <!-- 网关设备并且场家是TBox --> |
46 | 42 | <TabPane |
47 | 43 | key="6" |
48 | 44 | tab="TBox" |
49 | - v-if=" | |
50 | - deviceDetail?.deviceType === 'GATEWAY' && | |
51 | - deviceDetail?.brand == 'TBox' && | |
52 | - !isTransportType | |
53 | - " | |
45 | + v-if="deviceDetail?.deviceType === 'GATEWAY' && deviceDetail?.brand == 'TBox'" | |
54 | 46 | > |
55 | 47 | <TBoxDetail :deviceDetail="deviceDetail" /> |
56 | 48 | </TabPane> |
57 | 49 | <!-- 网关设备并且是TBox --> |
58 | 50 | |
59 | - <TabPane v-if="!isTransportType" key="eventManage" tab="事件管理"> | |
51 | + <TabPane key="eventManage" tab="事件管理"> | |
60 | 52 | <EventManage :tbDeviceId="deviceDetail.tbDeviceId" /> |
61 | 53 | </TabPane> |
62 | - <TabPane v-if="!isTransportType" key="task" tab="任务"> | |
54 | + <TabPane key="task" tab="任务"> | |
63 | 55 | <Task :tbDeviceId="deviceDetail.tbDeviceId" /> |
64 | 56 | </TabPane> |
65 | 57 | <!-- <TabPane v-if="false" key="videoChannel" tab="视频通道"> |
... | ... | @@ -116,7 +108,7 @@ |
116 | 108 | const isTransportType = ref<Boolean>(false); //获取产品是不是GB/T 28181 |
117 | 109 | // 详情回显 |
118 | 110 | const [register] = useDrawerInner(async (data) => { |
119 | - const { id, transportType, deviceType } = data; | |
111 | + const { id, transportType, deviceType } = data || {}; | |
120 | 112 | isTransportType.value = |
121 | 113 | transportType == 'GB/T28181' && deviceType == 'DIRECT_CONNECTION' ? true : false; |
122 | 114 | // 设备详情 | ... | ... |
... | ... | @@ -38,7 +38,6 @@ |
38 | 38 | |
39 | 39 | const getOptions = computed(() => { |
40 | 40 | const { options, withToken } = props; |
41 | - console.log(props, 'props'); | |
42 | 41 | |
43 | 42 | const defaultOptions: VideoJsPlayerOptions & Recordable = { |
44 | 43 | language: 'zh', |
... | ... | @@ -95,8 +94,6 @@ |
95 | 94 | }; |
96 | 95 | |
97 | 96 | const handleControl = (action: number, direction: string) => { |
98 | - console.log(direction); | |
99 | - | |
100 | 97 | const organizationId = getId(); |
101 | 98 | controlling({ cameralndexCode: organizationId, action, command: direction }); |
102 | 99 | }; |
... | ... | @@ -107,29 +104,21 @@ |
107 | 104 | init(); |
108 | 105 | await nextTick(); |
109 | 106 | // isPlay.value = unref(videoPlayInstance)?.paused(); |
110 | - console.log(unref(isPlay), 'isPlay'); | |
111 | - videoPlayInstance.value?.on('loadedmetadata', () => { | |
112 | - console.log('视频长度'); | |
113 | - }); | |
107 | + videoPlayInstance.value?.on('loadedmetadata', () => {}); | |
114 | 108 | videoPlayInstance.value?.on('waiting', () => { |
115 | 109 | isPlay.value = false; |
116 | - console.log('视频加载中'); | |
117 | 110 | }); |
118 | 111 | videoPlayInstance.value?.on('play', () => { |
119 | 112 | isPlay.value = true; |
120 | - console.log('视频开始播放'); | |
121 | 113 | }); |
122 | 114 | videoPlayInstance.value?.on('playing', () => { |
123 | 115 | isPlay.value = true; |
124 | - console.log('正在播放'); | |
125 | 116 | }); |
126 | 117 | videoPlayInstance.value?.on('pause', () => { |
127 | 118 | isPlay.value = false; |
128 | - console.log('暂停播放'); | |
129 | 119 | }); |
130 | 120 | videoPlayInstance.value?.on('ended', () => { |
131 | 121 | isPlay.value = false; |
132 | - console.log('结束播放'); | |
133 | 122 | }); |
134 | 123 | }); |
135 | 124 | ... | ... |
... | ... | @@ -58,15 +58,12 @@ |
58 | 58 | id, |
59 | 59 | }, |
60 | 60 | ]; |
61 | - | |
62 | - console.log(options.sources, 'options'); | |
63 | 61 | }; |
64 | 62 | |
65 | 63 | const { getResult } = useFingerprint(); |
66 | 64 | const [register] = useModalInner( |
67 | 65 | async (data: { record: CameraModel | StreamingManageRecord }) => { |
68 | 66 | const { record } = data; |
69 | - console.log(record, 'record'); | |
70 | 67 | const result = await getResult(); |
71 | 68 | fingerprintResult.value = result; |
72 | 69 | if (record.accessMode === AccessMode.ManuallyEnter) { | ... | ... |
... | ... | @@ -145,12 +145,12 @@ |
145 | 145 | } |
146 | 146 | }; |
147 | 147 | const handleStepNext = (e, data) => { |
148 | - const { deviceType } = unref(DevConStRef)?.getFieldsValue() || {}; | |
148 | + // const { deviceType } = unref(DevConStRef)?.getFieldsValue() || {}; | |
149 | 149 | if (e) { |
150 | 150 | current.value++; |
151 | 151 | unref(isUpdate) |
152 | - ? unref(TransConStRef)?.editOrAddTransportTypeStatus(true, deviceType) | |
153 | - : unref(TransConStRef)?.editOrAddTransportTypeStatus(false, deviceType); | |
152 | + ? unref(TransConStRef)?.editOrAddTransportTypeStatus(true) | |
153 | + : unref(TransConStRef)?.editOrAddTransportTypeStatus(false); | |
154 | 154 | } else { |
155 | 155 | setTransConfEditFormData(data); |
156 | 156 | } | ... | ... |
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | const getSnmpVal = await snmpRef.value?.getFormData(); |
143 | 143 | const getTcpVal = await tcpRef.value?.getFormData(); |
144 | 144 | step2Data.transportConfiguration = { |
145 | - type: isMqttType.value, | |
145 | + // type: isMqttType.value, | |
146 | 146 | ...getMqttVal, |
147 | 147 | ...getCoapVal, |
148 | 148 | ...getLwm2mVal, |
... | ... | @@ -153,7 +153,7 @@ |
153 | 153 | return step2Data; |
154 | 154 | }; |
155 | 155 | |
156 | - const editOrAddTransportTypeStatus = (status: boolean, deviceType?: string) => { | |
156 | + const editOrAddTransportTypeStatus = (status: boolean) => { | |
157 | 157 | const options = [ |
158 | 158 | { label: '默认', value: 'DEFAULT' }, |
159 | 159 | { label: 'MQTT', value: 'MQTT' }, |
... | ... | @@ -165,9 +165,9 @@ |
165 | 165 | // if (deviceType == 'DIRECT_CONNECTION') { |
166 | 166 | // options.push({ label: 'GB/T 28181', value: 'GB/T28181' });//暂时隐藏 GBT 28181写完放出来 |
167 | 167 | // } |
168 | - if (deviceType != 'DIRECT_CONNECTION' && isMqttType.value == 'GB/T28181') { | |
169 | - setFieldsValue({ transportType: null }); | |
170 | - } | |
168 | + // if (deviceType != 'DIRECT_CONNECTION' && isMqttType.value == 'GB/T28181') { | |
169 | + // setFieldsValue({ transportType: null }); | |
170 | + // } | |
171 | 171 | updateSchema({ |
172 | 172 | field: 'transportType', |
173 | 173 | componentProps: { | ... | ... |