Commit 2fa05fe73956b4b6b6abd26b0344772b43ed632c

Authored by loveumiko
1 parent 92b5c14e

fix: 隐藏GBT28181的界面和逻辑

@@ -4,9 +4,7 @@ import { FormSchema as QFormSchema, useComponentRegister } from '/@/components/F @@ -4,9 +4,7 @@ import { FormSchema as QFormSchema, useComponentRegister } from '/@/components/F
4 import { CameraVideoUrl, CameraMaxLength } from '/@/utils/rules'; 4 import { CameraVideoUrl, CameraMaxLength } from '/@/utils/rules';
5 import { h } from 'vue'; 5 import { h } from 'vue';
6 import SnHelpMessage from './SnHelpMessage.vue'; 6 import SnHelpMessage from './SnHelpMessage.vue';
7 -import { DeviceTypeEnum } from '/@/api/device/model/deviceModel';  
8 import { OrgTreeSelect } from '../../common/OrgTreeSelect'; 7 import { OrgTreeSelect } from '../../common/OrgTreeSelect';
9 -import { findDictItemByCode } from '/@/api/system/dict';  
10 import { FileItem } from '/@/components/Form/src/components/ApiUpload.vue'; 8 import { FileItem } from '/@/components/Form/src/components/ApiUpload.vue';
11 import { createImgPreview } from '/@/components/Preview'; 9 import { createImgPreview } from '/@/components/Preview';
12 import { uploadThumbnail } from '/@/api/configuration/center/configurationCenter'; 10 import { uploadThumbnail } from '/@/api/configuration/center/configurationCenter';
@@ -47,16 +45,6 @@ export enum MediaType { @@ -47,16 +45,6 @@ export enum MediaType {
47 M3U8 = 'm3u8', 45 M3U8 = 'm3u8',
48 } 46 }
49 47
50 -const streamingTypeList = [  
51 - { label: 'GBT-28181', value: 'GBT-28181' },  
52 - { label: '其他', value: 'other' },  
53 -];  
54 -  
55 -export enum streamingType {  
56 - GBT = 'GBT-28181',  
57 - OTHER = 'other',  
58 -}  
59 -  
60 // 表格列数据 48 // 表格列数据
61 export const columns: BasicColumn[] = [ 49 export const columns: BasicColumn[] = [
62 { 50 {
@@ -188,44 +176,6 @@ export const formSchema: QFormSchema[] = [ @@ -188,44 +176,6 @@ export const formSchema: QFormSchema[] = [
188 }, 176 },
189 }, 177 },
190 { 178 {
191 - field: 'streamingType',  
192 - label: '流媒体类型',  
193 - component: 'Select',  
194 - ifShow({ values }) {  
195 - return values.accessMode == AccessMode.Streaming;  
196 - },  
197 - componentProps() {  
198 - return {  
199 - placeholder: '请选择流媒体类型',  
200 - defaultValue: streamingType.OTHER,  
201 - options: streamingTypeList,  
202 - };  
203 - },  
204 - },  
205 - {  
206 - field: 'device',  
207 - label: '设备选择',  
208 - ifShow({ values }) {  
209 - return values.streamingType == streamingType.GBT;  
210 - },  
211 - component: 'ApiSelect',  
212 - componentProps() {  
213 - return {  
214 - api: findDictItemByCode,  
215 - params: {  
216 - dictCode: 'device_type',  
217 - },  
218 - valueField: 'itemValue',  
219 - labelField: 'itemText',  
220 - placeholder: '请选择设备类型',  
221 - onChange: (value: DeviceTypeEnum) => {  
222 - console.log(value, 'value');  
223 - },  
224 - getPopupContainer: () => document.body,  
225 - };  
226 - },  
227 - },  
228 - {  
229 field: 'brand', 179 field: 'brand',
230 label: '视频厂家', 180 label: '视频厂家',
231 component: 'Input', 181 component: 'Input',
@@ -271,9 +221,7 @@ export const formSchema: QFormSchema[] = [ @@ -271,9 +221,7 @@ export const formSchema: QFormSchema[] = [
271 label: '流媒体配置', 221 label: '流媒体配置',
272 component: 'Select', 222 component: 'Select',
273 ifShow({ values }) { 223 ifShow({ values }) {
274 - return (  
275 - values.accessMode === AccessMode.Streaming && values.streamingType != streamingType.GBT  
276 - ); 224 + return values.accessMode === AccessMode.Streaming;
277 }, 225 },
278 slot: 'videoPlatformIdSlot', 226 slot: 'videoPlatformIdSlot',
279 componentProps: { 227 componentProps: {
@@ -286,9 +234,7 @@ export const formSchema: QFormSchema[] = [ @@ -286,9 +234,7 @@ export const formSchema: QFormSchema[] = [
286 component: 'RadioGroup', 234 component: 'RadioGroup',
287 defaultValue: StreamType.MASTER, 235 defaultValue: StreamType.MASTER,
288 ifShow({ values }) { 236 ifShow({ values }) {
289 - return (  
290 - values.accessMode === AccessMode.Streaming && values.streamingType != streamingType.GBT  
291 - ); 237 + return values.accessMode === AccessMode.Streaming;
292 }, 238 },
293 componentProps: { 239 componentProps: {
294 placeholder: '请选择码流', 240 placeholder: '请选择码流',
@@ -306,9 +252,7 @@ export const formSchema: QFormSchema[] = [ @@ -306,9 +252,7 @@ export const formSchema: QFormSchema[] = [
306 component: 'RadioGroup', 252 component: 'RadioGroup',
307 defaultValue: PlayProtocol.HTTP, 253 defaultValue: PlayProtocol.HTTP,
308 ifShow({ values }) { 254 ifShow({ values }) {
309 - return (  
310 - values.accessMode === AccessMode.Streaming && values.streamingType != streamingType.GBT  
311 - ); 255 + return values.accessMode === AccessMode.Streaming;
312 }, 256 },
313 helpMessage: ['平台使用https的hls协议,需联系海康开放平台专家支持。'], 257 helpMessage: ['平台使用https的hls协议,需联系海康开放平台专家支持。'],
314 componentProps: { 258 componentProps: {
@@ -326,9 +270,7 @@ export const formSchema: QFormSchema[] = [ @@ -326,9 +270,7 @@ export const formSchema: QFormSchema[] = [
326 component: 'Input', 270 component: 'Input',
327 rules: [...CameraVideoUrl, { required: true, message: '摄像头编号是必填项' }], 271 rules: [...CameraVideoUrl, { required: true, message: '摄像头编号是必填项' }],
328 ifShow({ values }) { 272 ifShow({ values }) {
329 - return (  
330 - values.accessMode === AccessMode.Streaming && values.streamingType != streamingType.GBT  
331 - ); 273 + return values.accessMode === AccessMode.Streaming;
332 }, 274 },
333 componentProps: { 275 componentProps: {
334 placeholder: '请输入监控点编号', 276 placeholder: '请输入监控点编号',
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <TabPane v-if="!isTransportType" key="task" tab="任务"> 62 <TabPane v-if="!isTransportType" key="task" tab="任务">
63 <Task :tbDeviceId="deviceDetail.tbDeviceId" /> 63 <Task :tbDeviceId="deviceDetail.tbDeviceId" />
64 </TabPane> 64 </TabPane>
65 - <TabPane key="videoChannel" tab="视频通道"> 65 + <TabPane v-if="false" key="videoChannel" tab="视频通道">
66 <VideoChannel :deviceDetail="deviceDetail" :fromId="deviceDetail?.tbDeviceId" /> 66 <VideoChannel :deviceDetail="deviceDetail" :fromId="deviceDetail?.tbDeviceId" />
67 </TabPane> 67 </TabPane>
68 </Tabs> 68 </Tabs>
@@ -84,7 +84,6 @@ @@ -84,7 +84,6 @@
84 84
85 //播放/暂停 85 //播放/暂停
86 const handleClick = () => { 86 const handleClick = () => {
87 - console.log('播放/暂停');  
88 unref(isPlay) && unref(videoPlayInstance)?.pause(); 87 unref(isPlay) && unref(videoPlayInstance)?.pause();
89 !unref(isPlay) && unref(videoPlayInstance)?.play(); 88 !unref(isPlay) && unref(videoPlayInstance)?.play();
90 }; 89 };
@@ -102,12 +101,13 @@ @@ -102,12 +101,13 @@
102 controlling({ cameralndexCode: organizationId, action, command: direction }); 101 controlling({ cameralndexCode: organizationId, action, command: direction });
103 }; 102 };
104 103
105 - const isPlay = ref<Boolean | null | undefined>(true); 104 + const isPlay = ref<Boolean | null | undefined>(false);
106 105
107 onMounted(async () => { 106 onMounted(async () => {
108 init(); 107 init();
109 await nextTick(); 108 await nextTick();
110 // isPlay.value = unref(videoPlayInstance)?.paused(); 109 // isPlay.value = unref(videoPlayInstance)?.paused();
  110 + console.log(unref(isPlay), 'isPlay');
111 videoPlayInstance.value?.on('loadedmetadata', () => { 111 videoPlayInstance.value?.on('loadedmetadata', () => {
112 console.log('视频长度'); 112 console.log('视频长度');
113 }); 113 });
@@ -162,9 +162,9 @@ @@ -162,9 +162,9 @@
162 // { label: 'SNMP', value: 'SNMP' }, 162 // { label: 'SNMP', value: 'SNMP' },
163 { label: 'TCP/UDP', value: 'TCP' }, 163 { label: 'TCP/UDP', value: 'TCP' },
164 ]; 164 ];
165 - if (deviceType == 'DIRECT_CONNECTION') {  
166 - options.push({ label: 'GB/T 28181', value: 'GB/T28181' });  
167 - } 165 + // if (deviceType == 'DIRECT_CONNECTION') {
  166 + // options.push({ label: 'GB/T 28181', value: 'GB/T28181' });//暂时隐藏 GBT 28181写完放出来
  167 + // }
168 if (deviceType != 'DIRECT_CONNECTION' && isMqttType.value == 'GB/T28181') { 168 if (deviceType != 'DIRECT_CONNECTION' && isMqttType.value == 'GB/T28181') {
169 setFieldsValue({ transportType: null }); 169 setFieldsValue({ transportType: null });
170 } 170 }