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
ad6230d5
Commit
ad6230d5
authored
Apr 23, 2021
by
shaoan123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将方案管理制作成卡片形式
parent
d72b3092
Pipeline
#26527
skipped with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
62 deletions
+80
-62
SchemeConfig.less
src/pages/platformCenter/schemeConfig/SchemeConfig.less
+9
-0
AddModal.jsx
...s/platformCenter/schemeConfig/projectMessage/AddModal.jsx
+0
-2
card.jsx
...ormCenter/schemeConfig/projectMessage/components/card.jsx
+58
-0
projectMessage.jsx
...formCenter/schemeConfig/projectMessage/projectMessage.jsx
+9
-44
solutionConfig.jsx
...formCenter/schemeConfig/solutionConfig/solutionConfig.jsx
+4
-16
No files found.
src/pages/platformCenter/schemeConfig/SchemeConfig.less
View file @
ad6230d5
...
...
@@ -96,3 +96,12 @@
.ant-table {
min-height: 15rem !important;
}
.cardsList{
display: flex;
flex-wrap: wrap;
}
.cardItem{
width: 18rem;
height: 18rem;
margin: 0 2rem;
}
src/pages/platformCenter/schemeConfig/projectMessage/AddModal.jsx
View file @
ad6230d5
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Modal
,
Input
,
Select
,
notification
,
Button
}
from
'antd'
;
import
styles
from
'../SchemeConfig.less'
import
{
GetAllConfig
,
GetVectorService
,
...
...
src/pages/platformCenter/schemeConfig/projectMessage/components/card.jsx
0 → 100644
View file @
ad6230d5
import
React
from
'react'
;
import
classnames
from
'classnames'
import
styles
from
'../../SchemeConfig.less'
import
{
Popconfirm
,
notification
}
from
'antd'
;
import
{
unbindSchemeBaseMap
}
from
'@/services/webConfig/api'
;
import
{
CloseOutlined
}
from
'@ant-design/icons'
;
const
CardData
=
props
=>
{
const
{
deletebaseMaps
=
()
=>
{
}
}
=
props
;
//删除瓦片
const
deletebaseMap
=
(
item
,
baseMapItem
)
=>
{
unbindSchemeBaseMap
({
schemename
:
item
.
schemename
,
basemapName
:
baseMapItem
}).
then
(
res
=>
{
if
(
res
.
IsSuccess
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'底图删除成功'
,
});
deletebaseMaps
()
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'底图删除失败'
,
});
}
})
}
return
(
<>
<
div
className=
{
styles
.
mapItem
}
>
<
div
className=
{
classnames
({
[
styles
.
defaultTile
]:
true
,
[
styles
.
activeTile
]:
props
.
baseindex
==
props
.
item
.
defaultBaseMap
,
})
}
>
默认
</
div
>
<
div
className=
{
styles
.
mapText
}
>
{
props
.
baseMapItem
}
</
div
>
<
div
className=
{
styles
.
mapIcon
}
>
<
Popconfirm
title=
"是否删除该底图?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
deletebaseMap
(
props
.
item
,
props
.
baseMapItem
);
}
}
>
<
CloseOutlined
/>
</
Popconfirm
>
</
div
>
</
div
>
</>
)
}
export
default
CardData
src/pages/platformCenter/schemeConfig/projectMessage/projectMessage.jsx
View file @
ad6230d5
...
...
@@ -9,6 +9,7 @@ import {
CloseOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
AddModal
from
'./AddModal'
import
Cards
from
'./components/card'
const
VectorData
=
props
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
tileData
,
setTileData
]
=
useState
([]);
// 页面初始化数据
...
...
@@ -21,8 +22,8 @@ const VectorData = props => {
const
onSubmit
=
prop
=>
{
setVisible
(
false
);
};
const
delConfirm
=
(
record
)
=>
{
console
.
log
(
'record'
,
record
)
const
onDeletebaseMap
=
(
value
)
=>
{
setFlag
(
flag
+
1
)
}
const
handleAdd
=
()
=>
{
setType
(
'schemeAdd'
);
...
...
@@ -81,26 +82,7 @@ const VectorData = props => {
}
})
}
//删除瓦片
const
deletebaseMap
=
(
item
,
baseMapItem
)
=>
{
unbindSchemeBaseMap
({
schemename
:
item
.
schemename
,
basemapName
:
baseMapItem
}).
then
(
res
=>
{
if
(
res
.
IsSuccess
)
{
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
'底图删除成功'
,
});
setFlag
(
flag
+
1
)
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
'底图删除失败'
,
});
}
})
}
return
(
<>
<
div
style=
{
{
width
:
'calc(100vw - 265px)'
}
}
>
...
...
@@ -111,10 +93,10 @@ const VectorData = props => {
新增
</
Button
>
</
div
>
<
Row
>
<
div
className=
{
styles
.
cardsList
}
>
{
tileData
&&
tileData
.
length
?
tileData
.
map
((
item
,
index
)
=>
{
return
<
Col
key=
{
index
}
span=
{
5
}
style=
{
{
marginBottom
:
'1rem'
}
}
>
<
Card
title=
{
<
div
><
span
className=
{
styles
.
schemeName
}
>
方案名
</
span
>
{
item
.
schemename
}
</
div
>
}
extra=
{
<
a
href=
"#"
>
return
<
div
className=
{
styles
.
cardItem
}
key=
{
index
}
span=
{
5
}
offset=
{
2
}
style=
{
{
marginBottom
:
'1rem'
}
}
>
<
Card
title=
{
<
div
><
span
className=
{
styles
.
schemeName
}
>
方案名
</
span
>
{
item
.
schemename
}
</
div
>
}
extra=
{
<
a
href=
"#"
>
<
Popconfirm
title=
"是否删除该方案?"
okText=
"确认"
...
...
@@ -131,30 +113,13 @@ const VectorData = props => {
</
div
>
<
div
style=
{
{
overflowY
:
'scroll'
,
height
:
'5.5rem'
}
}
>
{
item
.
baseMap
&&
item
.
baseMap
.
length
?
item
.
baseMap
.
map
((
baseMapItem
,
baseindex
)
=>
{
return
<
div
key=
{
baseindex
}
className=
{
styles
.
mapItem
}
>
<
div
className=
{
classnames
({
[
styles
.
defaultTile
]:
true
,
[
styles
.
activeTile
]:
baseindex
==
item
.
defaultBaseMap
,
})
}
>
默认
</
div
>
<
div
className=
{
styles
.
mapText
}
>
{
baseMapItem
}
</
div
>
<
div
className=
{
styles
.
mapIcon
}
>
<
Popconfirm
title=
"是否删除该底图?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
deletebaseMap
(
item
,
baseMapItem
);
}
}
>
<
CloseOutlined
/>
</
Popconfirm
>
</
div
>
</
div
>
return
<
Cards
key=
{
baseindex
}
baseMapItem=
{
baseMapItem
}
baseindex=
{
baseindex
}
item=
{
item
}
deletebaseMaps=
{
onDeletebaseMap
}
/>
})
:
''
}
</
div
>
</
Card
>
</
Col
>
</
div
>
})
:
''
}
</
Row
>
</
div
>
<
AddModal
visible=
{
visible
}
onCancel=
{
()
=>
setVisible
(
false
)
}
...
...
src/pages/platformCenter/schemeConfig/solutionConfig/solutionConfig.jsx
View file @
ad6230d5
...
...
@@ -15,6 +15,7 @@ import AddModal from './AddModal'
const
VectorData
=
props
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
schemename
,
setSchemename
]
=
useState
([]);
const
[
initValues
,
setInitValues
]
=
useState
([]);
//角色初始化列表
const
[
record
,
setRecord
]
=
useState
({});
//选中关联角色的方案名
const
[
webCurrent
,
setWebCurrent
]
=
useState
(
0
);
// web列表下标
const
[
handCurrent
,
setHandCurrent
]
=
useState
(
0
);
// hand列表下标
...
...
@@ -60,7 +61,7 @@ const VectorData = props => {
<
Space
>
<
Space
>
<
div
onClick=
{
()
=>
pickRole
(
record
)
}
style=
{
{
cursor
:
'pointer'
}
}
>
<
VisibleRoleModal
onSubmit=
{
onPushSubmit
}
title=
{
"关联角色"
}
operate=
{
<
UserAddOutlined
/>
}
/>
<
VisibleRoleModal
onSubmit=
{
onPushSubmit
}
title=
{
"关联角色"
}
initValues
={
record
.
roles
!=
null
?
record
.
roles
.
split
(","):[]}
operate=
{
<
UserAddOutlined
/>
}
/>
</
div
>
</
Space
>
</
Space
>
...
...
@@ -120,7 +121,7 @@ const VectorData = props => {
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
div
onClick=
{
()
=>
pickRole
(
record
)
}
style=
{
{
cursor
:
'pointer'
}
}
>
<
VisibleRoleModal
onSubmit=
{
onPushSubmit
}
title=
{
"关联角色"
}
operate=
{
<
UserAddOutlined
/>
}
/>
<
VisibleRoleModal
onSubmit=
{
onPushSubmit
}
title=
{
"关联角色"
}
initValues
={
record
.
roles
!=
null
?
record
.
roles
.
split
(","):[]}
operate=
{
<
UserAddOutlined
/>
}
/>
</
div
>
</
Space
>
),
...
...
@@ -174,14 +175,7 @@ const VectorData = props => {
}).
catch
(
err
=>
{
prompt
(
'fail'
,
'网络请求失败'
)
})
}
else
{
notification
.
warning
({
message
:
'提示'
,
duration
:
3
,
description
:
'无选择任何角色'
,
});
setFlag
(
flag
+
1
)
}
...
...
@@ -189,12 +183,6 @@ const VectorData = props => {
//获取角色
const
pickRole
=
(
record
)
=>
{
setRecord
(
record
)
getUserRelationList
({
userID
:
record
[
'schemename'
],
_version
:
9999
}).
then
(
res
=>
{
console
.
log
(
'res'
,
res
);
})
}
//设置web方案
const
onChangeCheck
=
(
e
,
record
,
index
)
=>
{
...
...
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