Commit 2fa05fe73956b4b6b6abd26b0344772b43ed632c

Authored by loveumiko
1 parent 92b5c14e

fix: 隐藏GBT28181的界面和逻辑

... ... @@ -4,9 +4,7 @@ import { FormSchema as QFormSchema, useComponentRegister } from '/@/components/F
4 4 import { CameraVideoUrl, CameraMaxLength } from '/@/utils/rules';
5 5 import { h } from 'vue';
6 6 import SnHelpMessage from './SnHelpMessage.vue';
7   -import { DeviceTypeEnum } from '/@/api/device/model/deviceModel';
8 7 import { OrgTreeSelect } from '../../common/OrgTreeSelect';
9   -import { findDictItemByCode } from '/@/api/system/dict';
10 8 import { FileItem } from '/@/components/Form/src/components/ApiUpload.vue';
11 9 import { createImgPreview } from '/@/components/Preview';
12 10 import { uploadThumbnail } from '/@/api/configuration/center/configurationCenter';
... ... @@ -47,16 +45,6 @@ export enum MediaType {
47 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 49 export const columns: BasicColumn[] = [
62 50 {
... ... @@ -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 179 field: 'brand',
230 180 label: '视频厂家',
231 181 component: 'Input',
... ... @@ -271,9 +221,7 @@ export const formSchema: QFormSchema[] = [
271 221 label: '流媒体配置',
272 222 component: 'Select',
273 223 ifShow({ values }) {
274   - return (
275   - values.accessMode === AccessMode.Streaming && values.streamingType != streamingType.GBT
276   - );
  224 + return values.accessMode === AccessMode.Streaming;
277 225 },
278 226 slot: 'videoPlatformIdSlot',
279 227 componentProps: {
... ... @@ -286,9 +234,7 @@ export const formSchema: QFormSchema[] = [
286 234 component: 'RadioGroup',
287 235 defaultValue: StreamType.MASTER,
288 236 ifShow({ values }) {
289   - return (
290   - values.accessMode === AccessMode.Streaming && values.streamingType != streamingType.GBT
291   - );
  237 + return values.accessMode === AccessMode.Streaming;
292 238 },
293 239 componentProps: {
294 240 placeholder: '请选择码流',
... ... @@ -306,9 +252,7 @@ export const formSchema: QFormSchema[] = [
306 252 component: 'RadioGroup',
307 253 defaultValue: PlayProtocol.HTTP,
308 254 ifShow({ values }) {
309   - return (
310   - values.accessMode === AccessMode.Streaming && values.streamingType != streamingType.GBT
311   - );
  255 + return values.accessMode === AccessMode.Streaming;
312 256 },
313 257 helpMessage: ['平台使用https的hls协议,需联系海康开放平台专家支持。'],
314 258 componentProps: {
... ... @@ -326,9 +270,7 @@ export const formSchema: QFormSchema[] = [
326 270 component: 'Input',
327 271 rules: [...CameraVideoUrl, { required: true, message: '摄像头编号是必填项' }],
328 272 ifShow({ values }) {
329   - return (
330   - values.accessMode === AccessMode.Streaming && values.streamingType != streamingType.GBT
331   - );
  273 + return values.accessMode === AccessMode.Streaming;
332 274 },
333 275 componentProps: {
334 276 placeholder: '请输入监控点编号',
... ...
... ... @@ -62,7 +62,7 @@
62 62 <TabPane v-if="!isTransportType" key="task" tab="任务">
63 63 <Task :tbDeviceId="deviceDetail.tbDeviceId" />
64 64 </TabPane>
65   - <TabPane key="videoChannel" tab="视频通道">
  65 + <TabPane v-if="false" key="videoChannel" tab="视频通道">
66 66 <VideoChannel :deviceDetail="deviceDetail" :fromId="deviceDetail?.tbDeviceId" />
67 67 </TabPane>
68 68 </Tabs>
... ...
... ... @@ -84,7 +84,6 @@
84 84
85 85 //播放/暂停
86 86 const handleClick = () => {
87   - console.log('播放/暂停');
88 87 unref(isPlay) && unref(videoPlayInstance)?.pause();
89 88 !unref(isPlay) && unref(videoPlayInstance)?.play();
90 89 };
... ... @@ -102,12 +101,13 @@
102 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 106 onMounted(async () => {
108 107 init();
109 108 await nextTick();
110 109 // isPlay.value = unref(videoPlayInstance)?.paused();
  110 + console.log(unref(isPlay), 'isPlay');
111 111 videoPlayInstance.value?.on('loadedmetadata', () => {
112 112 console.log('视频长度');
113 113 });
... ...
... ... @@ -162,9 +162,9 @@
162 162 // { label: 'SNMP', value: 'SNMP' },
163 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 168 if (deviceType != 'DIRECT_CONNECTION' && isMqttType.value == 'GB/T28181') {
169 169 setFieldsValue({ transportType: null });
170 170 }
... ...