Commit 6d542bbc authored by 皮倩雯's avatar 皮倩雯

fix: '修改视频平台添加功能'

parent 7cda0c2d
Pipeline #48057 skipped with stages
...@@ -20,10 +20,10 @@ const maintenance = () => { ...@@ -20,10 +20,10 @@ const maintenance = () => {
title: '业务名称', title: '业务名称',
dataIndex: 'businessName', dataIndex: 'businessName',
key: 'businessName', key: 'businessName',
width: 100, width: 200,
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 100, maxWidth: 200,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
...@@ -99,10 +99,10 @@ const maintenance = () => { ...@@ -99,10 +99,10 @@ const maintenance = () => {
title: '反馈名称', title: '反馈名称',
dataIndex: 'feedbackName', dataIndex: 'feedbackName',
key: 'feedbackName', key: 'feedbackName',
width: 100, width: 200,
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 100, maxWidth: 200,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
...@@ -120,7 +120,7 @@ const maintenance = () => { ...@@ -120,7 +120,7 @@ const maintenance = () => {
title: '台账过滤条件', title: '台账过滤条件',
dataIndex: 'filterCondition', dataIndex: 'filterCondition',
key: 'filterCondition', key: 'filterCondition',
width: 200, width: 150,
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 200, maxWidth: 200,
...@@ -157,10 +157,10 @@ const maintenance = () => { ...@@ -157,10 +157,10 @@ const maintenance = () => {
title: '执行角色', title: '执行角色',
dataIndex: 'doRole', dataIndex: 'doRole',
key: 'doRole', key: 'doRole',
width: 300, width: 350,
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 300, maxWidth: 350,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Description: * @Description:
* @Author: leizhe * @Author: leizhe
* @Date: 2022-04-06 11:38:46 * @Date: 2022-04-06 11:38:46
* @LastEditTime: 2022-04-15 09:56:38 * @LastEditTime: 2022-04-15 16:45:47
* @LastEditors: leizhe * @LastEditors: leizhe
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -33,6 +33,7 @@ import { ...@@ -33,6 +33,7 @@ import {
DownLoadModelType, DownLoadModelType,
GetBasicInfo, GetBasicInfo,
DownLoadModelTypeSingle, DownLoadModelTypeSingle,
Export,
} from '@/services/drawBoardManage/api'; } from '@/services/drawBoardManage/api';
import { import {
FormOutlined, FormOutlined,
...@@ -83,12 +84,14 @@ const DrawBoardManage = () => { ...@@ -83,12 +84,14 @@ const DrawBoardManage = () => {
const { Search } = Input; const { Search } = Input;
const [keepId, setKeepId] = useState(''); const [keepId, setKeepId] = useState('');
const [total, setTotal] = useState(''); const [total, setTotal] = useState('');
const [page, setPage] = useState(1);
const setRowClassName = record => (record.id === selectColor.id ? styles.clickRowStyle : ''); const setRowClassName = record => (record.id === selectColor.id ? styles.clickRowStyle : '');
useEffect(() => { useEffect(() => {
if (pickItem) { if (pickItem) {
updateTableData(pickItem.name, searchWord); updateTableData(pickItem.name, searchWord);
} }
setPage(1);
}, [pickItem]); }, [pickItem]);
useEffect(() => { useEffect(() => {
...@@ -362,7 +365,7 @@ const DrawBoardManage = () => { ...@@ -362,7 +365,7 @@ const DrawBoardManage = () => {
<Tooltip title="删除"> <Tooltip title="删除">
<DeleteOutlined <DeleteOutlined
onClick={() => ondelete(record)} onClick={() => ondelete(record)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#e86060' }}
/> />
</Tooltip> </Tooltip>
</Space> </Space>
...@@ -600,6 +603,7 @@ const DrawBoardManage = () => { ...@@ -600,6 +603,7 @@ const DrawBoardManage = () => {
message.warning('请先选择导出的数据'); message.warning('请先选择导出的数据');
} else { } else {
window.location.href = DownLoadModelType({ modelList: selectedRowKeys.toString() }); window.location.href = DownLoadModelType({ modelList: selectedRowKeys.toString() });
// window.location.href = Export({ Ids: selectedRowKeys.toString() });
} }
}; };
...@@ -716,10 +720,8 @@ const DrawBoardManage = () => { ...@@ -716,10 +720,8 @@ const DrawBoardManage = () => {
> >
<div> <div>
<span style={{ width: '200px', display: 'inline-block' }}> <span style={{ width: '200px', display: 'inline-block' }}>
{pickItem.name}(已选{selectedRowKeys.length}/共{total}条) {pickItem ? pickItem.name : '全部类型'}(已选{selectedRowKeys.length}条)
</span> </span>
</div>
<div>
<span style={{ lineHeight: '32px' }}>模型检索:</span> <span style={{ lineHeight: '32px' }}>模型检索:</span>
<Search <Search
style={{ width: 260 }} style={{ width: 260 }}
...@@ -729,6 +731,8 @@ const DrawBoardManage = () => { ...@@ -729,6 +731,8 @@ const DrawBoardManage = () => {
enterButton enterButton
value={searchWord} value={searchWord}
/> />
</div>
<div>
<Button <Button
type="primary" type="primary"
icon={<PlusOutlined />} icon={<PlusOutlined />}
...@@ -745,7 +749,7 @@ const DrawBoardManage = () => { ...@@ -745,7 +749,7 @@ const DrawBoardManage = () => {
> >
删除 删除
</Button> </Button>
{/* <Button <Button
type="primary" type="primary"
icon={<UploadOutlined />} icon={<UploadOutlined />}
onClick={importFile} onClick={importFile}
...@@ -760,7 +764,7 @@ const DrawBoardManage = () => { ...@@ -760,7 +764,7 @@ const DrawBoardManage = () => {
style={{ marginLeft: '20px' }} style={{ marginLeft: '20px' }}
> >
导出 导出
</Button> */} </Button>
</div> </div>
</div> </div>
<Table <Table
...@@ -794,6 +798,10 @@ const DrawBoardManage = () => { ...@@ -794,6 +798,10 @@ const DrawBoardManage = () => {
defaultPageSize: 10, defaultPageSize: 10,
showQuickJumper: true, showQuickJumper: true,
showSizeChanger: true, showSizeChanger: true,
current: page,
onChange: (page, pageSize) => {
setPage(page);
},
}} }}
/> />
</div> </div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Description: * @Description:
* @Author: leizhe * @Author: leizhe
* @Date: 2022-04-07 10:23:26 * @Date: 2022-04-07 10:23:26
* @LastEditTime: 2022-04-14 14:23:42 * @LastEditTime: 2022-04-15 14:44:54
* @LastEditors: leizhe * @LastEditors: leizhe
*/ */
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
...@@ -31,7 +31,7 @@ const EditModal = props => { ...@@ -31,7 +31,7 @@ const EditModal = props => {
const submitEdit = () => { const submitEdit = () => {
console.log(addForm.getFieldValue('name')); console.log(addForm.getFieldValue('name'));
console.log(addForm.getFieldValue('type')); console.log(addForm.getFieldValue('type'));
if (addForm.getFieldValue('name')) { if (addForm.getFieldValue('name') && addForm.getFieldValue('type')) {
Edit({ Edit({
id: pickItem.id, id: pickItem.id,
Name: addForm.getFieldValue('name'), Name: addForm.getFieldValue('name'),
...@@ -57,9 +57,14 @@ const EditModal = props => { ...@@ -57,9 +57,14 @@ const EditModal = props => {
.catch(err => { .catch(err => {
message.error(err); message.error(err);
}); });
} else { } else if (!addForm.getFieldValue('name')) {
notification.warning({ notification.warning({
message: '模板类型名称不能为空', message: '画板名称不能为空',
duration: 2,
});
} else if (!addForm.getFieldValue('type')) {
notification.warning({
message: '画板类型不能为空',
duration: 2, duration: 2,
}); });
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Description: * @Description:
* @Author: leizhe * @Author: leizhe
* @Date: 2022-04-06 11:39:53 * @Date: 2022-04-06 11:39:53
* @LastEditTime: 2022-04-14 17:26:54 * @LastEditTime: 2022-04-15 15:35:27
* @LastEditors: leizhe * @LastEditors: leizhe
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -396,10 +396,8 @@ const ModelFileManage = () => { ...@@ -396,10 +396,8 @@ const ModelFileManage = () => {
> >
<div> <div>
<span style={{ width: '200px', display: 'inline-block' }}> <span style={{ width: '200px', display: 'inline-block' }}>
(已选{selectedRowKeys.length}/共{total}条) (已选{selectedRowKeys.length}/共{total}条)
</span> </span>
</div>
<div>
<span style={{ lineHeight: '32px' }}>画板检索:</span> <span style={{ lineHeight: '32px' }}>画板检索:</span>
<Search <Search
style={{ width: 260 }} style={{ width: 260 }}
...@@ -417,6 +415,8 @@ const ModelFileManage = () => { ...@@ -417,6 +415,8 @@ const ModelFileManage = () => {
> >
重置 重置
</Button> </Button>
</div>
<div>
<Button <Button
type="primary" type="primary"
icon={<DeleteOutlined />} icon={<DeleteOutlined />}
......
/* eslint-disable indent */
/* eslint-disable prettier/prettier */
/* eslint-disable default-case */
/* eslint-disable react/jsx-no-undef */
import React, { useEffect, useState } from 'react';
import { Form, Modal, Row, Col, Input, Select, notification } from 'antd';
import { addInsertVideoConfig, editInsertVideoConfig } from '@/services/videoManger/videoManger';
const AddModal = props => {
const { callBackSubmit = () => {}, visible, onCancel, type, type1, kind, obj } = props;
const [form] = Form.useForm();
const { Item } = Form;
const { TextArea } = Input;
const [Type, setType] = useState('');
const [selectChange, setSelectChange] = useState('轻应用');
const [selectChange1, setSelectChange1] = useState('否');
const [selectChange2, setSelectChange2] = useState('主码流');
const [configurationType, setConfigurationType] = useState('1');
const onChange = value => {
setSelectChange(value);
};
const onChange1 = value => {
setSelectChange1(value);
};
const onChange2 = value => {
setSelectChange2(value);
};
useEffect(() => {
form.setFieldsValue({ VideoManufacturer: type });
setType(type);
}, [visible]);
const onSubmit = () => {
form.validateFields().then(validate => {
if (validate) {
let getValue = form.getFieldsValue();
console.log(getValue);
if (getValue.PlayModel === undefined) {
getValue.PlayModel = '轻应用';
}
if (getValue.PlayZeroChannel === undefined) {
getValue.PlayZeroChannel = '否';
}
if (getValue.StreamType === undefined) {
getValue.StreamType = '主码流';
}
getValue.VideoManufacturer = Type;
addInsertVideoConfig(getValue).then(res => {
if (res.msg === 'Ok') {
form.resetFields();
callBackSubmit();
notification.success({
message: '提示',
duration: 3,
description: '新增成功',
});
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
});
}
});
};
const selectChangeCheck = value => {
if (value == 1) {
setType('萤石云');
} else if (value == 2) {
setType('海康');
} else if (value == 3) {
setType('海康1.2');
} else if (value == 4) {
setType('海康NVR');
} else if (value == 5) {
setType('大华');
} else if (value == 6) {
setType('海康ISC');
}
};
return (
<Modal
visible={visible}
title={<span style={{ fontSize: '18px' }}>新增配置</span>}
width="1000px"
destroyOnClose
maskClosable={false}
onCancel={onCancel}
onOk={onSubmit}
>
<p style={{ fontSize: '16px', marginLeft: '16px' }}>基本信息</p>
<Form
form={form}
labelCol={{ span: 7 }}
style={{ height: '25rem', overflowY: 'scroll' }}
autocomplete="off"
>
<Row>
<Col span={11}>
<Item
label="名称"
name="Name"
rules={[
{
required: true,
message: '请输入名称',
},
]}
>
<Input placeholder="请输入名称" maxLength="20px" />
</Item>
</Col>
<Col span={12}>
<span
style={{
position: 'absolute',
left: '12%',
top: '9%',
color: 'red',
fontSize: '16px',
}}
>
*
</span>
<Item
name="VideoManufacturer"
label="视频厂商"
rules={[{ required: true, message: '不能为空' }]}
>
<Select value={Type} onChange={selectChangeCheck}>
<Option value="1">萤石云</Option>
<Option value="2">海康</Option>
<Option value="3">海康1.2</Option>
<Option value="4">海康NVR</Option>
<Option value="5">大华</Option>
<Option value="6">海康ISC</Option>
</Select>
</Item>
</Col>
{(() => {
switch (Type) {
case '萤石云':
return (
<>
<Col span={11}>
<Item
label="登录名"
name="LoginName"
rules={[
{
required: true,
message: '请输入登录名',
},
]}
>
<Input placeholder="账户登录名" maxLength="100px" />
</Item>
</Col>
<Col span={12}>
<Item
label="登录密码"
name="LoginPwd"
rules={[
{
required: true,
message: '请输入登录密码',
},
]}
>
<Input.Password placeholder="请输入登录密码" />
</Item>
</Col>
<Col span={11}>
<Item
label="设备编码"
name="EquipmentCode"
rules={[
{
required: true,
message: '请输入设备编码',
},
]}
>
<Input placeholder="设备台账对应设备编码字段" />
</Item>
</Col>
<Col span={12}>
<Item
label="通道ID"
name="PassageId"
rules={[
{
required: true,
message: '请输入通道ID',
},
]}
>
<Input placeholder="视频设备通道ID" />
</Item>
</Col>
<Col span={24}>
<p style={{ fontSize: '16px', marginLeft: '16px' }}>萤石云</p>
</Col>
<Col span={11}>
<Item
label="视频路径"
name="VideoPath"
rules={[
{
required: true,
message: '请输入视频路径',
},
]}
>
<TextArea placeholder="视频Rtmp路径,请使用英文逗号分隔" />
</Item>
</Col>
<Col span={12}>
<Item
label="HLS路径"
name="HLSPath"
rules={[
{
required: true,
message: '请输入HLS路径',
},
]}
>
<TextArea placeholder="视频HLS路径,请使用英文逗号分隔" />
</Item>
</Col>
<Col span={11}>
<Item
label="设备序列号"
name="EquipmentNumber"
rules={[
{
required: true,
message: '请输入设备序列号',
},
]}
>
<Input placeholder="视频设备序列号" />
</Item>
</Col>
<Col span={12}>
<Item label="刻录机名称" name="RecorderName">
<Input placeholder="刻录机名称" />
</Item>
</Col>
<Col span={11}>
<Item label="默认播放方式" name="PlayModel">
<Select defaultValue="轻应用" value={selectChange} onChange={onChange}>
<Option value="轻应用">轻应用</Option>
<Option value="直播流">直播流</Option>
</Select>
</Item>
</Col>
<Col span={12}>
<Item label="默认通道ID" name="DefaultPassageId">
<Input placeholder="默认通道ID" />
</Item>
</Col>
</>
);
case '海康':
return (
<>
<Col span={11}>
<Item
label="登录名"
name="LoginName"
rules={[
{
required: true,
message: '请输入登录名',
},
]}
>
<Input placeholder="账户登录名" maxLength="100px" />
</Item>
</Col>
<Col span={12}>
<Item
label="登录密码"
name="LoginPwd"
rules={[
{
required: true,
message: '请输入登录密码',
},
]}
>
<Input.Password placeholder="请输入登录密码" />
</Item>
</Col>
<Col span={11}>
<Item
label="设备编码"
name="EquipmentCode"
rules={[
{
required: true,
message: '请输入设备编码',
},
]}
>
<Input placeholder="设备台账对应设备编码字段" />
</Item>
</Col>
<Col span={12}>
<Item
label="通道ID"
name="PassageId"
rules={[
{
required: true,
message: '请输入通道ID',
},
]}
>
<Input placeholder="视频设备通道ID" />
</Item>
</Col>
<Col span={24}>
<p style={{ fontSize: '16px', marginLeft: '16px' }}>海康</p>
</Col>
<Col span={11}>
<Item
label="登录IP"
name="LoginIp"
rules={[
{
required: true,
message: '请输入登录ID',
},
]}
>
<Input placeholder="登录ID" />
</Item>
</Col>
<Col span={12}>
<span
style={{
position: 'absolute',
left: '9%',
top: '9%',
color: 'red',
fontSize: '16px',
}}
>
*
</span>
<Item
label="播放零通道"
name="PlayZeroChannel"
rules={[
{
validator: (__rule, value) => {
if (form.getFieldsValue().PlayZeroChannel == '') {
return Promise.reject('请输入设备端口');
}
return Promise.resolve();
},
},
]}
>
<Select defaultValue="否" value={selectChange1} onChange={onChange1}>
<Option value="否"></Option>
<Option value="是"></Option>
</Select>
</Item>
</Col>
<Col span={11}>
<Item
label="设备端口"
name="EquipmentPort"
rules={[
{
required: true,
message: '请输入设备端口',
},
]}
>
<Input placeholder="设备端口" />
</Item>
</Col>
<Col span={12}>
<Item
label="视频端口"
name="VideoPort"
rules={[
{
required: true,
message: '请输入视频端口',
},
]}
>
<Input placeholder="视频端口" />
</Item>
</Col>
<Col span={11}>
<Item
label="媒体流端口"
name="StreamingMediaPort"
rules={[
{
required: true,
message: '请输入媒体流端口',
},
]}
>
<Input placeholder="媒体流端口" />
</Item>
</Col>
<Col span={12}>
<span
style={{
position: 'absolute',
left: '12%',
top: '9%',
color: 'red',
fontSize: '16px',
}}
>
*
</span>
<Item
label="码流类型"
name="StreamType"
rules={[
{
validator: (_rule, value) => {
if (form.getFieldsValue().StreamType == '') {
return Promise.reject('请选择码流类型');
}
return Promise.resolve();
},
},
]}
>
<Select defaultValue="主码流" value={selectChange2} onChange={onChange2}>
<Option value="主码流">主码流</Option>
<Option value="子码流">子码流</Option>
</Select>
</Item>
</Col>
<Col span={11}>
<Item
label="视频名称"
name="VideoName"
rules={[
{
required: true,
message: '请输入视频名称',
},
]}
>
<Input placeholder="视频名称" />
</Item>
</Col>
<Col span={12}>
<Item label="刻录机名称" name="RecorderName">
<Input placeholder="刻录机名称" />
</Item>
</Col>
<Col span={11}>
<Item label="默认通道ID" name="DefaultPassageId">
<Input placeholder="默认通道ID" />
</Item>
</Col>
</>
);
case '海康1.2':
return (
<>
<Col span={11}>
<Item
label="设备编码"
name="EquipmentCode"
rules={[
{
required: true,
message: '请输入设备编码',
},
]}
>
<Input placeholder="设备台账对应设备编码字段" />
</Item>
</Col>
<Col span={12}>
<Item
label="通道ID"
name="PassageId"
rules={[
{
required: true,
message: '请输入通道ID',
},
]}
>
<TextArea placeholder="视频监控点ID,请用英文逗好分隔" />
</Item>
</Col>
<Col span={24}>
<p style={{ fontSize: '16px', marginLeft: '16px' }}>海康1.2</p>
</Col>
<Col span={11}>
<Item
label="设备序列号"
name="EquipmentNumber"
rules={[
{
required: true,
message: '请输入设备序列号',
},
]}
>
<Input placeholder="视频设备序列号" />
</Item>
</Col>
<Col span={12}>
<Item label="刻录机名称" name="RecorderName">
<Input placeholder="刻录机名称" />
</Item>
</Col>
<Col span={11}>
<Item
label="视频名称"
name="VideoName"
rules={[
{
required: true,
message: '请输入视频名称',
},
]}
>
<Input placeholder="视频监控点名称" />
</Item>
</Col>
<Col span={12}>
<Item label="默认通道ID" name="DefaultPassageId">
<TextArea placeholder="默认视频监控点ID,请用英文逗好分隔" />
</Item>
</Col>
<Col span={11}>
<Item
label="视频服务地址"
name="VideoPath"
rules={[
{
required: true,
message: '请输入视频名称',
},
]}
>
<Input placeholder="视频服务地址" />
</Item>
</Col>
</>
);
case '海康NVR':
return (
<>
<Col span={11}>
<Item
label="设备编码"
name="EquipmentCode"
rules={[
{
required: true,
message: '请输入设备编码',
},
]}
>
<Input placeholder="设备台账对应设备编码字段" />
</Item>
</Col>
<Col span={12}>
<Item
label="通道ID"
name="PassageId"
rules={[
{
required: true,
message: '请输入通道ID',
},
]}
>
<TextArea placeholder="视频监控点ID,请用英文逗好分隔" />
</Item>
</Col>
<Col span={24}>
<p style={{ fontSize: '16px', marginLeft: '16px' }}>海康NVR</p>
</Col>
<Col span={11}>
<Item
label="视频流地址"
name="HLSPath"
rules={[
{
required: true,
message: '请输入视频流地址',
},
]}
>
<TextArea placeholder="视频流地址" />
</Item>
</Col>
<Col span={12}>
<Item label="刻录机名称" name="RecorderName">
<Input placeholder="刻录机名称" />
</Item>
</Col>
<Col span={11}>
<Item
label="视频名称"
name="VideoName"
rules={[
{
required: true,
message: '请输入视频名称',
},
]}
>
<Input placeholder="视频监控点名称" />
</Item>
</Col>
<Col span={12}>
<Item label="默认通道ID" name="DefaultPassageId">
<TextArea placeholder="默认视频监控点ID,请用英文逗好分隔" />
</Item>
</Col>
<Col span={11}>
<Item
label="视频服务地址"
name="VideoPath"
rules={[
{
required: true,
message: '请输入视频名称',
},
]}
>
<Input placeholder="视频服务地址" />
</Item>
</Col>
</>
);
case '大华':
return (
<>
<Col span={11}>
<Item
label="设备编码"
name="EquipmentCode"
rules={[
{
required: true,
message: '请输入设备编码',
},
]}
>
<Input placeholder="设备台账对应设备编码字段" />
</Item>
</Col>
<Col span={12}>
<Item
label="通道ID"
name="PassageId"
rules={[
{
required: true,
message: '请输入通道ID',
},
]}
>
<TextArea placeholder="视频监控点ID,请用英文逗好分隔" />
</Item>
</Col>
<Col span={24}>
<p style={{ fontSize: '16px', marginLeft: '16px' }}>大华</p>
</Col>
<Col span={11}>
<Item
label="登录IP"
name="LoginIp"
rules={[
{
required: true,
message: '请输入登录ID',
},
]}
>
<Input placeholder="登录ID" />
</Item>
</Col>
<Col span={12}>
<Item
label="设备端口"
name="EquipmentPort"
rules={[
{
required: true,
message: '请输入设备端口',
},
]}
>
<Input placeholder="设备端口" />
</Item>
</Col>
<Col span={11}>
<Item
label="视频名称"
name="VideoName"
rules={[
{
required: true,
message: '请输入视频名称',
},
]}
>
<Input placeholder="视频监控点名称" />
</Item>
</Col>
<Col span={12}>
<Item
label="默认通道ID"
name="DefaultPassageId"
rules={[
{
required: true,
message: '请输入默认通道ID',
},
]}
>
<TextArea placeholder="默认视频监控点ID,请用英文逗好分隔" />
</Item>
</Col>
<Col span={11}>
<Item
label="视频服务地址"
name="VideoPath"
rules={[
{
required: true,
message: '请输入视频名称',
},
]}
>
<Input placeholder="视频服务地址" />
</Item>
</Col>
</>
);
case '海康ISC':
return (
<>
<Col span={11}>
<Item
label="登录名"
name="LoginName"
rules={[
{
required: true,
message: '请输入登录名',
},
]}
>
<Input placeholder="账户登录名" maxLength="100px" />
</Item>
</Col>
<Col span={12}>
<Item
label="登录密码"
name="LoginPwd"
rules={[
{
required: true,
message: '请输入登录密码',
},
]}
>
<Input.Password placeholder="请输入登录密码" />
</Item>
</Col>
<Col span={11}>
<Item
label="设备编码"
name="EquipmentCode"
rules={[
{
required: true,
message: '请输入设备编码',
},
]}
>
<Input placeholder="设备台账对应设备编码字段" />
</Item>
</Col>
<Col span={12}>
<Item
label="通道ID"
name="PassageId"
rules={[
{
required: true,
message: '请输入通道ID',
},
]}
>
<TextArea placeholder="视频监控点ID,请用英文逗好分隔" />
</Item>
</Col>
<Col span={24}>
<p style={{ fontSize: '16px', marginLeft: '16px' }}>海康ISC</p>
</Col>
<Col span={11}>
<Item
label="登录IP"
name="LoginIp"
rules={[
{
required: true,
message: '请输入登录ID',
},
]}
>
<Input placeholder="登录ID" />
</Item>
</Col>
<Col span={12}>
<Item
label="视频端口"
name="VideoPort"
rules={[
{
required: true,
message: '请输入视频端口',
},
]}
>
<Input placeholder="视频端口" />
</Item>
</Col>
<Col span={11}>
<Item
label="视频名称"
name="VideoName"
rules={[
{
required: true,
message: '请输入视频名称',
},
]}
>
<Input placeholder="视频监控点名称" />
</Item>
</Col>
<Col span={12}>
<span
style={{
position: 'absolute',
left: '12%',
top: '9%',
color: 'red',
fontSize: '16px',
}}
>
*
</span>
<Item
label="码流类型"
name="StreamType"
rules={[
{
validator: (_rule, value) => {
if (form.getFieldsValue().StreamType == '') {
return Promise.reject('请选择码流类型');
}
return Promise.resolve();
},
},
]}
>
<Select defaultValue="主码流" value={selectChange2} onChange={onChange2}>
<Option value="主码流">主码流</Option>
<Option value="子码流">子码流</Option>
</Select>
</Item>
</Col>
<Col span={11}>
<Item label="默认通道ID" name="DefaultPassageId">
<TextArea placeholder="默认视频监控点ID,请用英文逗好分隔" />
</Item>
</Col>
</>
);
}
})()}
</Row>
</Form>
</Modal>
);
};
export default AddModal;
...@@ -34,6 +34,7 @@ import CheckModal from './CheckModal'; ...@@ -34,6 +34,7 @@ import CheckModal from './CheckModal';
import VideoModal from './VideoModal'; import VideoModal from './VideoModal';
import DHModal from './DHModal'; import DHModal from './DHModal';
import HKModal from './HKModal'; import HKModal from './HKModal';
import AddAllModal from './AddAllModal';
const videoManager = () => { const videoManager = () => {
const [configurationType, setConfigurationType] = useState('1'); const [configurationType, setConfigurationType] = useState('1');
...@@ -54,6 +55,7 @@ const videoManager = () => { ...@@ -54,6 +55,7 @@ const videoManager = () => {
const [addDHVisible, setAddDHVisible] = useState(false); const [addDHVisible, setAddDHVisible] = useState(false);
const [addHKVisible, setAddHKVisible] = useState(false); const [addHKVisible, setAddHKVisible] = useState(false);
const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式 const [showSearchStyle, setShowSearchStyle] = useState(false); // 是否显示模糊查询样式
const [addAllVisible, setAddAllVisible] = useState(false);
const columns = [ const columns = [
{ {
...@@ -398,11 +400,15 @@ const videoManager = () => { ...@@ -398,11 +400,15 @@ const videoManager = () => {
} else { } else {
setAddVisible(true); setAddVisible(true);
} }
setKind('add'); setKind('add');
}; };
const addAll = () => {
setAddAllVisible(true);
};
const onSubmit = () => { const onSubmit = () => {
setAddAllVisible(false);
setAddDHVisible(false); setAddDHVisible(false);
setAddHKVisible(false); setAddHKVisible(false);
setAddVisible(false); setAddVisible(false);
...@@ -446,7 +452,7 @@ const videoManager = () => { ...@@ -446,7 +452,7 @@ const videoManager = () => {
> >
重置 重置
</Button> </Button>
<Button {/* <Button
icon={<PlusOutlined className={styles.icon} />} icon={<PlusOutlined className={styles.icon} />}
onClick={addVideo} onClick={addVideo}
style={{ style={{
...@@ -456,6 +462,17 @@ const videoManager = () => { ...@@ -456,6 +462,17 @@ const videoManager = () => {
}} }}
> >
新增 新增
</Button> */}
<Button
icon={<PlusOutlined className={styles.icon} />}
onClick={addAll}
style={{
float: 'right',
verticalAlign: 'middle',
// marginTop: '-3px',
}}
>
新增
</Button> </Button>
</Col> </Col>
</Row> </Row>
...@@ -521,6 +538,19 @@ const videoManager = () => { ...@@ -521,6 +538,19 @@ const videoManager = () => {
obj={obj} obj={obj}
callBackSubmit={onSubmit} callBackSubmit={onSubmit}
/> />
<AddAllModal
visible={addAllVisible}
onCancel={() => {
setAddAllVisible(false);
}}
okText="确认"
cancelText="取消"
type={type}
type1={type1}
kind={kind}
obj={obj}
callBackSubmit={onSubmit}
/>
<CheckModal <CheckModal
visible={checkVisible} visible={checkVisible}
onCancel={() => { onCancel={() => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: leizhe * @Author: leizhe
* @Date: 2022-04-06 17:28:30 * @Date: 2022-04-06 17:28:30
* @LastEditTime: 2022-04-15 09:56:47 * @LastEditTime: 2022-04-15 15:08:11
* @LastEditors: leizhe * @LastEditors: leizhe
*/ */
import { get, post, postForm, PUBLISH_SERVICE, WebSERVICE } from '@/services/index'; import { get, post, postForm, PUBLISH_SERVICE, WebSERVICE } from '@/services/index';
...@@ -42,3 +42,5 @@ export const GetBasicInfo = param => get(`${PUBLISH_SERVICE}/HostManager/GetBasi ...@@ -42,3 +42,5 @@ export const GetBasicInfo = param => get(`${PUBLISH_SERVICE}/HostManager/GetBasi
export const DownLoadModelTypeSingle = query => export const DownLoadModelTypeSingle = query =>
`${PUBLISH_SERVICE}/ModelType/DownLoadModelTypeSingle?modeId=${query.modeId}`; `${PUBLISH_SERVICE}/ModelType/DownLoadModelTypeSingle?modeId=${query.modeId}`;
export const Export = query => `${WebSERVICE}/Models/Models/Export?Ids=${query.Ids}`;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment