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
70a133a4
Commit
70a133a4
authored
Sep 14, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web配置新增同步地图组件功能
parent
c45f3976
Pipeline
#59968
waiting for manual action with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
index.jsx
src/pages/productCenter/webConfig/index.jsx
+34
-1
No files found.
src/pages/productCenter/webConfig/index.jsx
View file @
70a133a4
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
notification
,
Spin
,
Tabs
}
from
'antd'
;
import
{
notification
,
Spin
,
Tabs
,
Button
}
from
'antd'
;
import
{
getWebModuleTree
,
getWebconfig
,
...
...
@@ -13,6 +13,7 @@ import {
addWebsite
,
editWebsite
,
omsDeleteWebsite
,
SyncMapComponent
,
}
from
'@/services/webConfig/api'
;
import
{
EditTwoTone
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
Modal
from
'antd/lib/modal/Modal'
;
...
...
@@ -104,6 +105,7 @@ const WebConfigPage = props => {
),
].
flat
(
2
);
if
(
!
canceled
.
cancel
)
{
console
.
log
(
websArr
);
setWebs
(
websArr
);
if
(
!
curWeb
)
setCurWeb
(
websArr
[
0
]);
setLoading
(
false
);
...
...
@@ -294,6 +296,26 @@ const WebConfigPage = props => {
updateModuleTree
(
userMode
||
'super'
);
};
const
SyncMap
=
e
=>
{
console
.
log
(
e
);
SyncMapComponent
({
visible
:
e
.
subSystemValue
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'同步成功'
,
});
updateModuleTree
(
userMode
||
'super'
);
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
,
});
}
});
};
const
renderTabPane
=
tabPaneItem
=>
(
<
TabPane
key=
{
tabPaneItem
.
id
}
tab=
{
tabPaneItem
.
text
}
>
<>
...
...
@@ -308,6 +330,17 @@ const WebConfigPage = props => {
>
<
EditTwoTone
/>
查看/编辑网站配置
</
span
>
<
div
style=
{
{
display
:
'inline-block'
,
float
:
'right'
,
marginTop
:
'-15px'
}
}
>
<
strong
style=
{
{
marginRight
:
'15px'
}
}
>
当前网站已存在地图组件数量(
<
span
style=
{
{
color
:
'#1890ff'
}
}
>
{
tabPaneItem
.
existMapComponent
}
</
span
>
<
span
>
/
</
span
>
<
span
>
{
tabPaneItem
.
mapComponent
}
)
</
span
>
</
strong
>
<
Button
type=
"primary"
onClick=
{
()
=>
SyncMap
(
tabPaneItem
)
}
>
同步地图组件
</
Button
>
</
div
>
<
MenuConfig
menu=
{
tabPaneItem
?.
children
.
find
(
w
=>
w
.
menuType
===
'Web4MenuRoot'
)
}
onUpdate=
{
handleUpdateOnMenuChange
}
...
...
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