...
|
...
|
@@ -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: '请输入监控点编号',
|
...
|
...
|
|