Commit bc5993c7946bf8162c351996c287d2940fe15a50

Authored by loveumiko
1 parent 01401887

fix: 隐藏GBT81的逻辑和页面展示

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