Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
726aab0f
Commit
726aab0f
authored
May 06, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '宿主管理优化'
parent
3c09a493
Pipeline
#71888
passed with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
302 additions
and
320 deletions
+302
-320
SortModal.jsx
...tformCenter/gis/schemeConfig/projectMessage/SortModal.jsx
+2
-2
AddModal.jsx
src/pages/platformCenter/hostmanager/gateWay/AddModal.jsx
+40
-74
gateWay.jsx
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
+253
-244
hostmanager.js
src/services/hostmanager/hostmanager.js
+5
-0
api.js
src/services/webConfig/api.js
+2
-0
No files found.
src/pages/platformCenter/gis/schemeConfig/projectMessage/SortModal.jsx
View file @
726aab0f
...
...
@@ -13,14 +13,14 @@ import { Modal, notification } from 'antd';
import
Sortable
from
'sortablejs'
;
import
styles
from
'./SortModal.less'
;
import
DragTable
from
'@/components/DragTable/DragTable'
;
import
{
SortScheme
}
from
'@/services/webConfig/api'
;
import
{
SortScheme
,
SortSchemePost
}
from
'@/services/webConfig/api'
;
const
SortModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
title
,
visible
,
onCancel
,
sortData
}
=
props
;
const
[
orderTable
,
setOrderTable
]
=
useState
([]);
const
[
flowIDs
,
setFlowIDs
]
=
useState
([]);
const
onSumbit
=
()
=>
{
SortScheme
({
sortName
:
flowIDs
.
toString
()
}).
then
(
res
=>
{
SortScheme
Post
({
sortNames
:
flowIDs
}).
then
(
res
=>
{
if
(
res
.
code
===
'0'
)
{
callBackSubmit
();
onCancel
();
...
...
src/pages/platformCenter/hostmanager/gateWay/AddModal.jsx
View file @
726aab0f
...
...
@@ -28,8 +28,7 @@ const AddModal = props => {
useEffect
(()
=>
{
if
(
visible
)
{
if
(
type
===
'edit'
)
{
let
data
=
[
'CityServer'
,
'IOT'
,
'CivData'
,
'GIS'
];
if
(
data
.
indexOf
(
pickItem
.
key
)
!=
-
1
)
{
if
(
pickItem
.
remark
)
{
setHidden
(
true
);
}
let
aa
=
pickItem
.
methods
.
replace
(
/
\s
/g
,
''
);
...
...
@@ -80,7 +79,7 @@ const AddModal = props => {
setCurrent
(
true
);
}
}
else
{
form
.
setFieldsValue
({
IsAuthentication
:
true
});
form
.
setFieldsValue
({
IsAuthentication
:
true
,
Priority
:
1
,
Methods
:
[
'GET'
,
'POST'
]
});
}
}
else
{
setHidden
(
false
);
...
...
@@ -95,11 +94,8 @@ const AddModal = props => {
if
(
validate
)
{
setLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
console
.
log
(
obj
.
IsAuthentication
);
console
.
log
(
obj
.
Priority
);
let
aa
=
obj
.
Methods
.
toString
();
obj
.
Methods
=
aa
.
replace
(
/
\s
/g
,
''
);
console
.
log
(
obj
.
Methods
);
let
data
=
{
UpstreamPathTemplate
:
obj
.
UpstreamPathTemplate
||
null
,
DownstreamPathTemplate
:
obj
.
DownstreamPathTemplate
||
null
,
...
...
@@ -125,65 +121,34 @@ const AddModal = props => {
ReRouteIsCaseSensitive
:
obj
.
ReRouteIsCaseSensitive
||
null
,
DownstreamHttpMethod
:
obj
.
DownstreamHttpMethod
||
null
,
};
console
.
log
(
data
);
if
(
type
===
'add'
)
{
SaveRoutes
([
{
...
data
,
IsEnable
:
1
,
},
])
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
onCancel
();
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'新增成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'新增失败'
,
});
}
})
.
catch
(
err
=>
{
setLoading
(
false
);
});
}
else
{
SaveRoutes
([
{
id
:
pickItem
.
id
,
...
data
,
IsEnable
:
1
,
},
])
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
onCancel
();
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'编辑成功'
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'编辑失败'
,
});
}
})
.
catch
(
err
=>
{
setLoading
(
false
);
});
}
let
str
=
type
===
'add'
?
'新增'
:
'编辑'
;
SaveRoutes
([
{
...
data
,
IsEnable
:
1
,
},
])
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
onCancel
();
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
`
${
str
}
成功`
,
});
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
`
${
str
}
失败`
,
});
}
})
.
catch
(
err
=>
{
setLoading
(
false
);
});
}
});
};
...
...
@@ -274,7 +239,7 @@ const AddModal = props => {
},
]
}
>
<
Input
allowClear
placeholder=
"示例:/{url}"
disabled=
{
hidden
}
/>
<
Input
allowClear
placeholder=
"示例:/{url}"
/>
</
Item
>
<
Item
label=
"上游请求方式"
...
...
@@ -286,7 +251,7 @@ const AddModal = props => {
},
]
}
>
<
Checkbox
.
Group
options=
{
plainOptions
}
style=
{
{
display
:
'flex'
}
}
disabled=
{
hidden
}
/>
<
Checkbox
.
Group
options=
{
plainOptions
}
style=
{
{
display
:
'flex'
}
}
/>
</
Item
>
<
Item
label=
"下游服务地址"
...
...
@@ -302,12 +267,8 @@ const AddModal = props => {
</
Item
>
<
Item
label=
"身份认证"
name=
"IsAuthentication"
>
<
Radio
.
Group
>
<
Radio
value=
{
true
}
disabled=
{
hidden
}
>
开启
</
Radio
>
<
Radio
value=
{
false
}
disabled=
{
hidden
}
>
关闭
</
Radio
>
<
Radio
value=
{
true
}
>
开启
</
Radio
>
<
Radio
value=
{
false
}
>
关闭
</
Radio
>
</
Radio
.
Group
>
</
Item
>
<
Item
...
...
@@ -360,7 +321,12 @@ const AddModal = props => {
name=
"Priority"
labelCol=
{
{
span
:
12
}
}
>
<
InputNumber
min=
{
0
}
max=
{
10
}
defaultValue=
{
0
}
disabled=
{
hidden
}
/>
<
InputNumber
min=
{
0
}
max=
{
10
}
defaultValue=
{
0
}
disabled=
{
pickItem
.
remark
===
'万能模板'
}
/>
</
Item
>
</
Col
>
<
Col
span=
{
16
}
>
...
...
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
View file @
726aab0f
/* eslint-disable indent */
/* eslint-disable no-unused-expressions */
/* eslint-disable no-else-return */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -28,12 +29,15 @@ import {
}
from
'@ant-design/icons'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
styles
from
'./gateWay.less'
;
import
axios
from
'axios'
;
import
{
GetGateWay
,
UpdateGeteWay
,
GetReRoutes
,
GetReRoutesFirst
,
DelRoutes
,
DelRouteByUpUrl
,
GetWayHealthCheck
,
}
from
'@/services/hostmanager/hostmanager'
;
import
{
get
,
PUBLISH_SERVICE
}
from
'@/services/index'
;
import
configuration
from
'../../../../assets/images/icons/消息.svg'
;
...
...
@@ -43,6 +47,7 @@ import CheckModal from './CheckModal';
const
GateConfig
=
()
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
const
[
allLoading
,
setAllLoading
]
=
useState
(
false
);
// 加载
const
[
form
]
=
Form
.
useForm
();
const
[
flag
,
setFlag
]
=
useState
(
1
);
...
...
@@ -63,70 +68,95 @@ const GateConfig = () => {
localStorage
.
setItem
(
'panda-publish'
,
''
);
console
.
log
(
checked
);
if
(
checked
)
{
UpdateGeteWay
({
isUsed
:
checked
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
console
.
log
(
localStorage
.
getItem
(
'token'
));
// localStorage.removeItem('token');
window
.
globalConfig
=
{
...
window
.
globalConfig
,
access_token
:
localStorage
.
getItem
(
'token'
),
hasGateWay
:
true
,
apiGatewayDomain
:
`
${
window
.
location
.
origin
}${
'/PandaCore/GateWay'
}
`
,
};
setFlag
(
flag
+
1
);
message
.
success
(
'设置成功'
);
// const key = 'authrizeFail';
// notification.warning({
// key,
// title: '提示',
// message: '授权失败,即将跳转到登录页',
// duration: 2,
// });
// setTimeout(() => {
// history.push(`/user/login`);
// }, 2000);
const
key
=
'authrizeFail'
;
const
btn
=
(
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
{
notification
.
close
(
key
);
window
.
location
.
href
=
`/${process.env.PUBLIC_PATH || 'civmanage'}/user/login`
;
}
}
>
确定
</
Button
>
);
if
(
!
/
\/
user
\/
login$/
.
test
(
window
.
location
.
pathname
))
{
notification
.
warning
({
key
,
title
:
'提示'
,
message
:
'授权失败,即将跳转到登录页'
,
duration
:
2
,
btn
,
setAllLoading
(
true
);
// axios({
// method: 'get',
// url: `${tableData[0].url}/PandaOMS/OMS/health/get`,
// }).then(res => {
// console.log(res);
// debugger;
// });
GetWayHealthCheck
().
then
(
resData
=>
{
setAllLoading
(
false
);
if
(
resData
.
code
===
0
)
{
UpdateGeteWay
({
isUsed
:
checked
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
console
.
log
(
localStorage
.
getItem
(
'token'
));
// localStorage.removeItem('token');
window
.
globalConfig
=
{
...
window
.
globalConfig
,
access_token
:
localStorage
.
getItem
(
'token'
),
hasGateWay
:
true
,
apiGatewayDomain
:
`
${
window
.
location
.
origin
}${
'/PandaCore/GateWay'
}
`
,
};
setFlag
(
flag
+
1
);
message
.
success
(
'设置成功'
);
// const key = 'authrizeFail';
// notification.warning({
// key,
// title: '提示',
// message: '授权失败,即将跳转到登录页',
// duration: 2,
// });
// setTimeout(() => {
// history.push(`/user/login`);
// }, 2000);
const
key
=
'authrizeFail'
;
const
btn
=
(
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
{
notification
.
close
(
key
);
window
.
location
.
href
=
`/${process.env.PUBLIC_PATH || 'civmanage'}/user/login`
;
}
}
>
确定
</
Button
>
);
if
(
!
/
\/
user
\/
login$/
.
test
(
window
.
location
.
pathname
))
{
notification
.
warning
({
key
,
title
:
'提示'
,
message
:
'授权失败,即将跳转到登录页'
,
duration
:
2
,
btn
,
});
setTimeout
(()
=>
{
window
.
location
.
href
=
`/
${
process
.
env
.
PUBLIC_PATH
||
'civmanage'
}
/user/login`
;
},
2000
);
}
}
else
{
message
.
error
(
'设置失败'
);
}
});
setTimeout
(()
=>
{
localStorage
.
setItem
(
'panda-publish'
,
'getway'
);
setLoading
(
true
);
GetReRoutes
({
UpstreamPathTemplate
:
''
,
key
:
''
,
}).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
setTableData
(
res
.
data
);
}
});
setTimeout
(()
=>
{
window
.
location
.
href
=
`/
${
process
.
env
.
PUBLIC_PATH
||
'civmanage'
}
/user/login`
;
},
2000
);
}
},
0
);
}
else
{
message
.
error
(
'设置失败'
);
message
.
warning
({
content
:
(
<>
万能模板下游服务 [
<
span
style=
{
{
color
:
'#1890ff'
}
}
>
{
tableData
[
0
].
url
}
</
span
>
]
检测不通过,请修复后再开启!
</>
),
style
:
{
marginTop
:
'10vh'
,
},
});
}
});
setTimeout
(()
=>
{
localStorage
.
setItem
(
'panda-publish'
,
'getway'
);
setLoading
(
true
);
GetReRoutes
({
UpstreamPathTemplate
:
''
,
key
:
''
,
}).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
setTableData
(
res
.
data
);
}
});
},
0
);
}
else
{
UpdateGeteWay
({
isUsed
:
checked
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -213,46 +243,13 @@ const GateConfig = () => {
align
:
'center'
,
width
:
150
,
render
:
(
text
,
record
)
=>
{
if
(
record
.
key
===
'CityServer'
)
{
if
(
record
.
remark
)
{
return
(
<
Tooltip
placement=
"top"
title=
{
text
}
>
<
span
>
{
searchStyle1
(
text
)
}{
' '
}
<
Tag
color=
"cyan"
style=
{
{
marginRight
:
'0px'
}
}
>
万能模板
</
Tag
>
</
span
>
</
Tooltip
>
);
}
else
if
(
record
.
key
===
'IOT'
)
{
return
(
<
Tooltip
placement=
"top"
title=
{
text
}
>
<
span
>
{
searchStyle1
(
text
)
}{
' '
}
<
Tag
color=
"purple"
style=
{
{
marginRight
:
'0px'
}
}
>
物联
</
Tag
>
</
span
>
</
Tooltip
>
);
}
else
if
(
record
.
key
===
'CivData'
)
{
return
(
<
Tooltip
placement=
"top"
title=
{
text
}
>
<
span
>
{
searchStyle1
(
text
)
}{
' '
}
<
Tag
color=
"green"
style=
{
{
marginRight
:
'0px'
}
}
>
中台
</
Tag
>
</
span
>
</
Tooltip
>
);
}
else
if
(
record
.
key
===
'GIS'
)
{
return
(
<
Tooltip
placement=
"top"
title=
{
text
}
>
<
span
>
{
searchStyle1
(
text
)
}{
' '
}
<
Tag
color=
"volcano"
style=
{
{
marginRight
:
'0px'
}
}
>
GIS
{
record
.
remark
}
</
Tag
>
</
span
>
</
Tooltip
>
...
...
@@ -273,13 +270,24 @@ const GateConfig = () => {
dataIndex
:
'upstreamPathTemplate'
,
key
:
'upstreamPathTemplate'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
span
>
<
Tooltip
placement=
"top"
title=
{
`上游路由模板:${text}`
}
>
{
window
.
location
.
origin
+
`/PandaCore/GateWay${text}`
}
</
Tooltip
>
</
span
>
),
render
:
(
text
,
record
)
=>
{
let
str
=
window
.
location
.
origin
+
`/PandaCore/GateWay
${
text
}
`
;
let
list
=
str
.
split
(
':'
);
list
[
0
]
=
record
.
downstreamScheme
;
let
data
=
record
.
downstreamScheme
;
list
.
forEach
((
i
,
j
)
=>
{
if
(
j
>
0
)
{
data
=
data
+
':'
+
i
;
}
});
return
(
<
span
>
<
Tooltip
placement=
"top"
title=
{
`上游路由模板:${text}`
}
>
{
data
}
</
Tooltip
>
</
span
>
);
},
},
// {
// title: '上游路由模板',
...
...
@@ -377,41 +385,41 @@ const GateConfig = () => {
align
:
'center'
,
fixed
:
'right'
,
render
:
record
=>
{
if
(
record
.
key
!=
'CityServer'
)
{
return
(
<
Space
size=
"middle"
>
<
Tooltip
title=
"编辑"
>
<
EditTwoTone
onClick=
{
()
=>
edit
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
</
Tooltip
>
{
record
.
key
!=
'IOT'
&&
record
.
key
!=
'CivData'
&&
record
.
key
!=
'GIS'
&&
(
<
Tooltip
title=
"删除"
>
<
Popconfirm
placement=
"bottomRight"
title=
{
<
p
>
即将删除
<
span
>
{
record
.
loginName
}
</
span
>
,是否确认删除?
</
p
>
}
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
dele
(
record
)
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
Tooltip
>
)
}
</
Space
>
);
}
else
{
return
(
<
Space
size=
"middle"
>
<
Tooltip
title=
"查看"
>
<
SearchOutlined
onClick=
{
()
=>
look
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
// if (record.key != 'CityServer') {
return
(
<
Space
size=
"middle"
>
<
Tooltip
title=
"编辑"
>
<
EditTwoTone
onClick=
{
()
=>
edit
(
record
)
}
style=
{
{
fontSize
:
'16px'
}
}
/>
</
Tooltip
>
{
!
record
.
remark
&&
(
<
Tooltip
title=
"删除"
>
<
Popconfirm
placement=
"bottomRight"
title=
{
<
p
>
即将删除
<
span
>
{
record
.
loginName
}
</
span
>
,是否确认删除?
</
p
>
}
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
dele
(
record
)
}
>
<
DeleteOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Popconfirm
>
</
Tooltip
>
</
Space
>
);
}
)
}
</
Space
>
);
// } else {
// return (
// <Space size="middle">
// <Tooltip title="查看">
// <SearchOutlined onClick={() => look(record)} style={{ fontSize: '16px' }} />
// </Tooltip>
// </Space>
// );
// }
},
},
];
...
...
@@ -508,8 +516,8 @@ const GateConfig = () => {
description
:
'默认数据无法删除'
,
});
}
else
{
DelRoute
s
({
Ids
:
e
.
id
,
DelRoute
ByUpUrl
({
upTemplate
:
e
.
upstreamPathTemplate
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
GetReRoutes
({
...
...
@@ -549,124 +557,125 @@ const GateConfig = () => {
return
(
<
div
className=
{
styles
.
gateWay_container
}
>
<
Card
style=
{
{
width
:
'100%'
,
height
:
'calc(100vh - 130px)'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
marginTop
:
'10px'
}
}
>
<
img
src=
{
configuration
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/>
<
span
style=
{
{
marginLeft
:
'10px'
,
fontWeight
:
'bold'
}
}
>
网关配置
</
span
>
</
div
>
<
Divider
/>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
marginBottom
:
'20px'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
div
style=
{
{
marginLeft
:
'35px'
,
}
}
>
网关状态
<
Switch
checkedChildren=
"开启"
unCheckedChildren=
"关闭"
checked=
{
currentConfig
}
onChange=
{
OperateNginx
}
style=
{
{
marginLeft
:
'35px'
}
}
/>
</
div
>
{
console
.
log
(
currentConfig
)
}
<
Spin
spinning=
{
allLoading
}
tip=
"loading"
>
<
Card
style=
{
{
width
:
'100%'
,
height
:
'calc(100vh - 130px)'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
marginTop
:
'10px'
}
}
>
<
img
src=
{
configuration
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/>
<
span
style=
{
{
marginLeft
:
'10px'
,
fontWeight
:
'bold'
}
}
>
网关配置
</
span
>
</
div
>
{
/* {currentConfig ? (
<
Divider
/>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
,
marginBottom
:
'20px'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
div
style=
{
{
marginLeft
:
'35px'
,
}
}
>
网关状态
<
Switch
checkedChildren=
"开启"
unCheckedChildren=
"关闭"
checked=
{
currentConfig
}
onChange=
{
OperateNginx
}
style=
{
{
marginLeft
:
'35px'
}
}
/>
</
div
>
{
console
.
log
(
currentConfig
)
}
</
div
>
{
/* {currentConfig ? (
) : (
<></>
)} */
}
<
div
className=
{
styles
.
head1
}
>
<
span
>
快速搜索上游路由模板:
</
span
>
<
Input
value=
{
searchWord
}
placeholder=
"请输入上游路由模板"
style=
{
{
width
:
200
}
}
onChange=
{
handleSearch
}
/>
<
span
style=
{
{
marginLeft
:
'20px'
}
}
>
快速搜索关键字:
</
span
>
<
Input
value=
{
searchWord1
}
placeholder=
"请输入键值"
style=
{
{
width
:
200
}
}
onChange=
{
handleSearch1
}
/>
<
Button
type=
"primary"
icon=
{
<
SearchOutlined
/>
}
onClick=
{
submitSearch
}
style=
{
{
marginLeft
:
'20px'
}
}
>
搜索
</
Button
>
<
Button
icon=
{
<
SyncOutlined
/>
}
onClick=
{
handleReset
}
style=
{
{
marginLeft
:
'20px'
}
}
>
重置
</
Button
>
<
Button
icon=
{
<
PlusOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
add
}
style=
{
{
verticalAlign
:
'middle'
,
marginTop
:
'-3px'
,
marginLeft
:
'20px'
,
}
}
>
新增
</
Button
>
<
div
className=
{
styles
.
head1
}
>
<
span
>
快速搜索上游路由模板:
</
span
>
<
Input
value=
{
searchWord
}
placeholder=
"请输入上游路由模板"
style=
{
{
width
:
200
}
}
onChange=
{
handleSearch
}
/>
<
span
style=
{
{
marginLeft
:
'20px'
}
}
>
快速搜索关键字:
</
span
>
<
Input
value=
{
searchWord1
}
placeholder=
"请输入键值"
style=
{
{
width
:
200
}
}
onChange=
{
handleSearch1
}
/>
<
Button
type=
"primary"
icon=
{
<
SearchOutlined
/>
}
onClick=
{
submitSearch
}
style=
{
{
marginLeft
:
'20px'
}
}
>
搜索
</
Button
>
<
Button
icon=
{
<
SyncOutlined
/>
}
onClick=
{
handleReset
}
style=
{
{
marginLeft
:
'20px'
}
}
>
重置
</
Button
>
<
Button
icon=
{
<
PlusOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
add
}
style=
{
{
verticalAlign
:
'middle'
,
marginTop
:
'-3px'
,
marginLeft
:
'20px'
,
}
}
>
新增
</
Button
>
</
div
>
</
div
>
</
div
>
{
/* {currentConfig ? (
{
/* {currentConfig ? (
) : (
<></>
)} */
}
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
div
className=
{
styles
.
table
}
>
<
Table
size=
"small"
bordered
rowKey=
{
record
=>
record
.
Id
}
columns=
{
columns
}
dataSource=
{
tableData
}
scroll=
{
{
y
:
'calc(100vh - 380px)'
,
x
:
'max-content'
}
}
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
console
.
log
(
record
);
event
.
stopPropagation
();
if
(
record
.
key
==
'CityServer'
)
{
look
(
record
);
}
else
{
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
div
className=
{
styles
.
table
}
>
<
Table
size=
"small"
bordered
rowKey=
{
record
=>
record
.
Id
}
columns=
{
columns
}
dataSource=
{
tableData
}
scroll=
{
{
y
:
'calc(100vh - 380px)'
,
x
:
'max-content'
}
}
onRow=
{
record
=>
({
onDoubleClick
:
event
=>
{
event
.
stopPropagation
();
// if (record.key == 'CityServer')
{
// look(record);
//
}
else
{
edit
(
record
);
}
},
// 双击
})
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}
}
/>
</
div
>
</
Spin
>
//
}
},
// 双击
})
}
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}
}
/>
</
div
>
</
Spin
>
<
AddModal
visible=
{
addVisible
}
pickItem=
{
pickItem
}
keepData=
{
keepData
}
onCancel=
{
()
=>
setAddVisible
(
false
)
}
type=
{
type
}
callBackSubmit=
{
onSubmit
}
/>
<
CheckModal
visible=
{
checkVisible
}
pickItem=
{
pickItem
}
onCancel=
{
()
=>
setCheckVisible
(
false
)
}
/>
</
Card
>
<
AddModal
visible=
{
addVisible
}
pickItem=
{
pickItem
}
keepData=
{
keepData
}
onCancel=
{
()
=>
setAddVisible
(
false
)
}
type=
{
type
}
callBackSubmit=
{
onSubmit
}
/>
<
CheckModal
visible=
{
checkVisible
}
pickItem=
{
pickItem
}
onCancel=
{
()
=>
setCheckVisible
(
false
)
}
/>
</
Card
>
</
Spin
>
</
div
>
);
};
...
...
src/services/hostmanager/hostmanager.js
View file @
726aab0f
...
...
@@ -80,9 +80,14 @@ export const GetGateWay = param => get(`${PUBLISH_SERVICE}/HostManager/GetGateWa
export
const
UpdateGeteWay
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/UpdateGeteWay`
,
param
);
// 网关配置
// export const GetReRoutesFirst = param => get(`/OcelotSettings/GetReRoutes`, param);
export
const
GetWayHealthCheck
=
param
=>
get
(
`/PandaCore/GateWay/OcelotSettings/HealthCheck`
,
param
);
export
const
GetReRoutes
=
param
=>
get
(
`/PandaCore/GateWay/OcelotSettings/GetReRoutes`
,
param
);
export
const
SaveRoutes
=
param
=>
post
(
`/PandaCore/GateWay/OcelotSettings/SaveRoutes`
,
param
);
export
const
DelRoutes
=
param
=>
get
(
`/PandaCore/GateWay/OcelotSettings/DelRoutes`
,
param
);
export
const
DelRouteByUpUrl
=
param
=>
get
(
`/PandaCore/GateWay/OcelotSettings/DelRouteByUpUrl`
,
param
);
// 代理服务老接口
export
const
GetNginxConfigInfoOLD
=
param
=>
...
...
src/services/webConfig/api.js
View file @
726aab0f
...
...
@@ -337,3 +337,5 @@ export const GetRoleGroups = param => get(`${PUBLISH_SERVICE}/UserCenter/GetRole
export
const
GetWebMenuInfo
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/GetWebMenuInfo`
,
param
);
export
const
SortScheme
=
param
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/SortScheme`
,
param
);
export
const
SortSchemePost
=
param
=>
post
(
`
${
PANDA_GIS
}
/MapLayer/SortSchemePost`
,
param
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment