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

fix: '宿主管理配置优化'

parent b9b5b7ef
Pipeline #67136 passed with stages
...@@ -229,10 +229,15 @@ const AddModal = props => { ...@@ -229,10 +229,15 @@ const AddModal = props => {
{ {
validator: (rule, value) => { validator: (rule, value) => {
let aa = form.getFieldValue().UpstreamPathTemplate; let aa = form.getFieldValue().UpstreamPathTemplate;
console.log(aa.startsWith('/')); console.log(aa);
console.log(aa.indexOf('/PandaCore/GateWay'));
if (!aa.startsWith('/')) { if (!aa.startsWith('/')) {
return Promise.reject('必须以/开头'); return Promise.reject('必须以/开头');
} }
if (aa.indexOf('/PandaCore/GateWay') != -1) {
return Promise.reject('无需添加/PandaCore/GateWay');
}
return Promise.resolve(); return Promise.resolve();
}, },
}, },
...@@ -245,7 +250,7 @@ const AddModal = props => { ...@@ -245,7 +250,7 @@ const AddModal = props => {
<Input <Input
allowClear allowClear
style={{ width: '100%' }} style={{ width: '100%' }}
placeholder="示例:/PandaOMS/PandaOMS/{url}" placeholder="示例:/CivData/{url}"
disabled={hidden} disabled={hidden}
/> />
</Item> </Item>
......
...@@ -383,22 +383,24 @@ const GateConfig = () => { ...@@ -383,22 +383,24 @@ const GateConfig = () => {
<Tooltip title="编辑"> <Tooltip title="编辑">
<EditTwoTone onClick={() => edit(record)} style={{ fontSize: '16px' }} /> <EditTwoTone onClick={() => edit(record)} style={{ fontSize: '16px' }} />
</Tooltip> </Tooltip>
<Tooltip title="删除"> {record.key != 'IOT' && record.key != 'CivData' && record.key != 'GIS' && (
<Popconfirm <Tooltip title="删除">
placement="bottomRight" <Popconfirm
title={ placement="bottomRight"
<p> title={
即将删除 <span>{record.loginName}</span> <p>
,是否确认删除? 即将删除 <span>{record.loginName}</span>
</p> ,是否确认删除?
} </p>
okText="确认" }
cancelText="取消" okText="确认"
onConfirm={() => dele(record)} cancelText="取消"
> onConfirm={() => dele(record)}
<DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} /> >
</Popconfirm> <DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} />
</Tooltip> </Popconfirm>
</Tooltip>
)}
</Space> </Space>
); );
} else { } else {
......
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