Commit a22038d8 authored by 皮倩雯's avatar 皮倩雯

fix: '解决宿主管理物联配置,消息配置bug'

parent de6008e8
Pipeline #43258 passed with stages
in 6 minutes 37 seconds
...@@ -95,6 +95,7 @@ const IotConfig = () => { ...@@ -95,6 +95,7 @@ const IotConfig = () => {
const PingIot1 = () => { const PingIot1 = () => {
setLoading(true); setLoading(true);
let aa = form.getFieldsValue().IotAddress; let aa = form.getFieldsValue().IotAddress;
console.log(aa);
PingIOTPlatform({ PingIOTPlatform({
ip: aa, ip: aa,
}).then(res => { }).then(res => {
...@@ -148,25 +149,40 @@ const IotConfig = () => { ...@@ -148,25 +149,40 @@ const IotConfig = () => {
</div> </div>
<Divider /> <Divider />
<Form.Item <Form.Item
style={{ marginLeft: '20px' }} style={{ marginLeft: '20px', marginBottom: '0px' }}
label="服务地址(平台)" // label="服务地址(平台)"
name="IotAddress" // name="IotAddress"
rules={[ // rules={[
{ // {
required: true, // required: true,
pattern: new RegExp( // pattern: new RegExp(
/^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])$/, // /^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])$/,
'g', // 'g',
), // ),
message: '请输入正确的IP例如:192.168.12.231', // message: '请输入正确的IP例如:192.168.12.231',
}, // },
]} // ]}
> >
<div style={{ display: 'flex', justifyContent: 'flex-start' }}> <div style={{ display: 'flex', justifyContent: 'flex-start' }}>
<Input <Form.Item
style={{ width: '300px', marginLeft: '15px' }} label="服务地址(平台)"
placeholder="请输入服务地址" name="IotAddress"
/> rules={[
{
required: true,
pattern: new RegExp(
/^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])$/,
'g',
),
message: '请输入正确的IP例如:192.168.12.231',
},
]}
>
<Input
style={{ width: '300px', marginLeft: '15px' }}
placeholder="请输入服务地址"
/>
</Form.Item>
<span style={{ display: show1 }}> <span style={{ display: show1 }}>
<img <img
src={Yes} src={Yes}
......
...@@ -137,35 +137,50 @@ const MessageConfig = () => { ...@@ -137,35 +137,50 @@ const MessageConfig = () => {
</div> </div>
<Divider /> <Divider />
<Form.Item <Form.Item
style={{ marginLeft: '20px' }} style={{ marginLeft: '20px', marginBottom: '0px' }}
label="服务地址(平台)" // label="服务地址(平台)"
name="messageAddress" // name="messageAddress"
rules={[ // rules={[
{ // {
required: true, // required: true,
pattern: new RegExp( // pattern: new RegExp(
/^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(:\d*)$/, // /^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(:\d*)$/,
'g', // 'g',
), // ),
message: '请输入正确的IP例如:192.168.12.231:8231', // message: '请输入正确的IP例如:192.168.12.231:8231',
}, // },
]} // ]}
> >
<div style={{ display: 'flex', justifyContent: 'flex-start' }}> <div style={{ display: 'flex', justifyContent: 'flex-start' }}>
<Input <Form.Item
style={{ width: '300px', marginLeft: '15px' }} label="服务地址(平台)"
placeholder="请输入服务地址" name="messageAddress"
/> rules={[
{
required: true,
pattern: new RegExp(
/^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(:\d*)$/,
'g',
),
message: '请输入正确的IP例如:192.168.12.231:8231',
},
]}
>
<Input
style={{ width: '300px', marginLeft: '15px' }}
placeholder="请输入服务地址"
/>
</Form.Item>
<span style={{ display: show1 }}> <span style={{ display: show1 }}>
<img <img
src={Yes} src={Yes}
style={{ height: '24px', marginLeft: '26px', marginTop: '10px' }} style={{ height: '24px', marginLeft: '26px', marginTop: '5px' }}
alt="" alt=""
/> />
</span> </span>
<span style={{ display: show2 }}> <span style={{ display: show2 }}>
<CloseCircleFilled <CloseCircleFilled
style={{ fontSize: '24px', marginLeft: '26px', marginTop: '10px' }} style={{ fontSize: '24px', marginLeft: '26px', marginTop: '5px' }}
/> />
</span> </span>
</div> </div>
......
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