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
e45a7f6d
Commit
e45a7f6d
authored
May 06, 2021
by
shaoan123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化gis配置模块
parent
73d07fda
Pipeline
#27003
skipped with stages
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
23 deletions
+31
-23
SchemeConfig.less
src/pages/platformCenter/schemeConfig/SchemeConfig.less
+7
-2
TileConfig.jsx
...ges/platformCenter/schemeConfig/TileConfig/TileConfig.jsx
+4
-2
VectorData.jsx
...ges/platformCenter/schemeConfig/VectorData/VectorData.jsx
+3
-1
card.jsx
...ormCenter/schemeConfig/projectMessage/components/card.jsx
+1
-1
projectMessage.jsx
...formCenter/schemeConfig/projectMessage/projectMessage.jsx
+3
-1
solutionConfig.jsx
...formCenter/schemeConfig/solutionConfig/solutionConfig.jsx
+13
-16
No files found.
src/pages/platformCenter/schemeConfig/SchemeConfig.less
View file @
e45a7f6d
.container{
.container{
width: 100%;
width: 100%;
height: calc(100vh - 100px) ;
background-color: #ffffff;
background-color: #ffffff;
display: flex;
display: flex;
padding: 0.8rem;
padding: 0.8rem;
.ant-table-thead tr th {
.ant-table-thead tr th {
font-weight: 600;
font-weight: 600;
...
@@ -102,6 +103,9 @@
...
@@ -102,6 +103,9 @@
}
}
.cardItem{
.cardItem{
width: 18rem;
width: 18rem;
height:
18
rem;
height:
26
rem;
margin: 0 2rem;
margin: 0 2rem;
}
}
.solutionConfig{
}
\ No newline at end of file
src/pages/platformCenter/schemeConfig/TileConfig/TileConfig.jsx
View file @
e45a7f6d
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
}
from
'antd'
;
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
,
Modal
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
styles
from
'../SchemeConfig.less'
import
{
import
{
GetAllConfig
,
GetAllConfig
,
...
@@ -163,6 +163,7 @@ const TileData = props => {
...
@@ -163,6 +163,7 @@ const TileData = props => {
return
(
return
(
<>
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
handleAdd
();
...
@@ -191,6 +192,7 @@ const TileData = props => {
...
@@ -191,6 +192,7 @@ const TileData = props => {
formObj=
{
formObj
}
formObj=
{
formObj
}
baseMap
=
{
baseMap
}
baseMap
=
{
baseMap
}
/>
/>
</
Spin
>
</>
</>
)
)
}
}
...
...
src/pages/platformCenter/schemeConfig/VectorData/VectorData.jsx
View file @
e45a7f6d
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
}
from
'antd'
;
import
{
Space
,
Table
,
Button
,
Popconfirm
,
notification
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
styles
from
'../SchemeConfig.less'
import
{
import
{
...
@@ -194,6 +194,7 @@ const VectorData = props => {
...
@@ -194,6 +194,7 @@ const VectorData = props => {
return
(
return
(
<>
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
<
Button
type=
"primary"
onClick=
{
()
=>
{
handleAdd
();
handleAdd
();
...
@@ -227,6 +228,7 @@ const VectorData = props => {
...
@@ -227,6 +228,7 @@ const VectorData = props => {
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
metaData=
{
currentMetaData
}
metaData=
{
currentMetaData
}
/>
/>
</
Spin
>
</>
</>
)
)
}
}
...
...
src/pages/platformCenter/schemeConfig/projectMessage/components/card.jsx
View file @
e45a7f6d
...
@@ -145,7 +145,7 @@ const CardData = props => {
...
@@ -145,7 +145,7 @@ const CardData = props => {
<
div
className=
{
styles
.
schemeItem
}
><
span
className=
{
styles
.
schemeName
}
>
瓦片
</
span
>
<
div
className=
{
styles
.
schemeItem
}
><
span
className=
{
styles
.
schemeName
}
>
瓦片
</
span
>
<
Button
className=
{
styles
.
schemeBtn
}
onClick=
{
()
=>
addTile
(
props
.
item
)
}
>
<
PlusOutlined
/>
添加瓦片
</
Button
>
<
Button
className=
{
styles
.
schemeBtn
}
onClick=
{
()
=>
addTile
(
props
.
item
)
}
>
<
PlusOutlined
/>
添加瓦片
</
Button
>
</
div
>
</
div
>
<
div
style=
{
{
overflowY
:
'scroll'
,
height
:
'5.5
rem'
}
}
>
<
div
style=
{
{
overflowY
:
'scroll'
,
maxHeight
:
'11.4
rem'
}
}
>
{
props
.
item
.
baseMap
&&
props
.
item
.
baseMap
.
length
?
props
.
item
.
baseMap
.
map
((
baseMapItem
,
baseindex
)
=>
{
{
props
.
item
.
baseMap
&&
props
.
item
.
baseMap
.
length
?
props
.
item
.
baseMap
.
map
((
baseMapItem
,
baseindex
)
=>
{
return
<
div
className=
{
styles
.
mapItem
}
key=
{
baseindex
}
>
return
<
div
className=
{
styles
.
mapItem
}
key=
{
baseindex
}
>
<
div
className=
{
classnames
({
<
div
className=
{
classnames
({
...
...
src/pages/platformCenter/schemeConfig/projectMessage/projectMessage.jsx
View file @
e45a7f6d
import
{
Button
}
from
'antd'
;
import
{
Button
,
Spin
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'../SchemeConfig.less'
import
styles
from
'../SchemeConfig.less'
import
{
import
{
...
@@ -48,6 +48,7 @@ const VectorData = props => {
...
@@ -48,6 +48,7 @@ const VectorData = props => {
};
};
return
(
return
(
<>
<>
<
Spin
tip=
"loading..."
spinning=
{
treeLoading
}
>
<
div
style=
{
{
width
:
'calc(100vw - 265px)'
}
}
>
<
div
style=
{
{
width
:
'calc(100vw - 265px)'
}
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
div
className=
{
styles
.
tileBtn
}
>
<
Button
type=
"primary"
onClick=
{
()
=>
{
<
Button
type=
"primary"
onClick=
{
()
=>
{
...
@@ -72,6 +73,7 @@ const VectorData = props => {
...
@@ -72,6 +73,7 @@ const VectorData = props => {
formObj=
{
formObj
}
formObj=
{
formObj
}
/>
/>
</
div
>
</
div
>
</
Spin
>
</>
</>
)
)
}
}
...
...
src/pages/platformCenter/schemeConfig/solutionConfig/solutionConfig.jsx
View file @
e45a7f6d
...
@@ -15,7 +15,6 @@ import AddModal from './AddModal'
...
@@ -15,7 +15,6 @@ import AddModal from './AddModal'
const
VectorData
=
props
=>
{
const
VectorData
=
props
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
schemename
,
setSchemename
]
=
useState
([]);
const
[
schemename
,
setSchemename
]
=
useState
([]);
const
[
initValues
,
setInitValues
]
=
useState
([]);
//角色初始化列表
const
[
record
,
setRecord
]
=
useState
({});
//选中关联角色的方案名
const
[
record
,
setRecord
]
=
useState
({});
//选中关联角色的方案名
const
[
webCurrent
,
setWebCurrent
]
=
useState
(
0
);
// web列表下标
const
[
webCurrent
,
setWebCurrent
]
=
useState
(
0
);
// web列表下标
const
[
handCurrent
,
setHandCurrent
]
=
useState
(
0
);
// hand列表下标
const
[
handCurrent
,
setHandCurrent
]
=
useState
(
0
);
// hand列表下标
...
@@ -25,11 +24,8 @@ const VectorData = props => {
...
@@ -25,11 +24,8 @@ const VectorData = props => {
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
handStatus
,
setHandStatus
]
=
useState
([]);
// 更新状态
const
[
handStatus
,
setHandStatus
]
=
useState
([]);
// 更新状态
const
[
webStatus
,
setWebStatus
]
=
useState
([]);
// 更新状态
const
[
webStatus
,
setWebStatus
]
=
useState
([]);
// 更新状态
const
[
webIndex
,
setWebIndex
]
=
useState
(
0
);
// web默认选中状态
const
[
handIndex
,
setHandIndex
]
=
useState
(
0
);
// 手持默认选中状态
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
checkLoading
,
setCheckLoading
]
=
useState
(
false
)
const
[
checkLoading
,
setCheckLoading
]
=
useState
(
false
)
const
[
solutionNames
,
setSolutionNames
]
=
useState
(
''
);
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
[
formObj
,
setFormObj
]
=
useState
({
user
:
'admin'
,
password
:
'geoserver'
});
const
columns
=
[
const
columns
=
[
{
{
...
@@ -39,9 +35,9 @@ const VectorData = props => {
...
@@ -39,9 +35,9 @@ const VectorData = props => {
render
:
(
text
,
record
,
index
)
=>
(
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Space
>
<
Checkbox
<
Checkbox
checked=
{
webStatus
[
index
+
webCurrent
*
3
]
}
checked=
{
webStatus
[
index
+
webCurrent
*
5
]
}
onChange=
{
e
=>
{
onChange=
{
e
=>
{
onChangeCheck
(
e
,
record
,
index
+
webCurrent
*
3
);
onChangeCheck
(
e
,
record
,
index
+
webCurrent
*
5
);
}
}
}
}
/>
/>
</
Space
>
</
Space
>
...
@@ -100,9 +96,9 @@ const VectorData = props => {
...
@@ -100,9 +96,9 @@ const VectorData = props => {
render
:
(
text
,
record
,
index
)
=>
(
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Space
>
<
Checkbox
<
Checkbox
checked=
{
handStatus
[
index
+
handCurrent
*
3
]
}
checked=
{
handStatus
[
index
+
handCurrent
*
5
]
}
onChange=
{
e
=>
{
onChange=
{
e
=>
{
onChangeHand
(
e
,
record
,
index
+
handCurrent
*
3
);
onChangeHand
(
e
,
record
,
index
+
handCurrent
*
5
);
}
}
}
}
/>
/>
</
Space
>
</
Space
>
...
@@ -167,7 +163,7 @@ const VectorData = props => {
...
@@ -167,7 +163,7 @@ const VectorData = props => {
SetServiceConfig
(
query
).
then
(
res
=>
{
SetServiceConfig
(
query
).
then
(
res
=>
{
if
(
res
.
IsSuccess
)
{
if
(
res
.
IsSuccess
)
{
prompt
(
'success'
,
'关联角色成功'
)
prompt
(
'success'
,
'关联角色成功'
)
setFlag
(
flag
+
1
)
}
}
else
{
else
{
prompt
(
'fail'
,
'关联角色失败'
)
prompt
(
'fail'
,
'关联角色失败'
)
...
@@ -175,7 +171,7 @@ const VectorData = props => {
...
@@ -175,7 +171,7 @@ const VectorData = props => {
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
prompt
(
'fail'
,
'网络请求失败'
)
prompt
(
'fail'
,
'网络请求失败'
)
})
})
setFlag
(
flag
+
1
)
}
}
...
@@ -412,7 +408,7 @@ const VectorData = props => {
...
@@ -412,7 +408,7 @@ const VectorData = props => {
},
[
flag
]);
},
[
flag
]);
// 获取瓦片数据配置数据
// 获取瓦片数据配置数据
const
renderTile
=
()
=>
{
const
renderTile
=
()
=>
{
set
TreeLoading
(
true
);
set
CheckLoading
(
true
)
//查询手持方案
//查询手持方案
var
schemeConfigQueryRequest
=
GetAllConfig
({
var
schemeConfigQueryRequest
=
GetAllConfig
({
terminalType
:
'phone'
,
terminalType
:
'phone'
,
...
@@ -429,7 +425,6 @@ const VectorData = props => {
...
@@ -429,7 +425,6 @@ const VectorData = props => {
res
[
0
].
Result
.
map
((
item
,
index
)
=>
{
res
[
0
].
Result
.
map
((
item
,
index
)
=>
{
if
(
item
.
isDefault
)
{
if
(
item
.
isDefault
)
{
arr
.
push
(
true
)
arr
.
push
(
true
)
setHandIndex
(
index
)
}
else
{
}
else
{
arr
.
push
(
false
)
arr
.
push
(
false
)
}
}
...
@@ -446,7 +441,6 @@ const VectorData = props => {
...
@@ -446,7 +441,6 @@ const VectorData = props => {
res
[
1
].
Result
.
map
((
item
,
index
)
=>
{
res
[
1
].
Result
.
map
((
item
,
index
)
=>
{
if
(
item
.
type
===
"pipenet"
)
{
if
(
item
.
type
===
"pipenet"
)
{
arr
.
push
(
true
)
arr
.
push
(
true
)
setWebIndex
(
index
)
}
else
{
}
else
{
arr
.
push
(
false
)
arr
.
push
(
false
)
}
}
...
@@ -456,6 +450,9 @@ const VectorData = props => {
...
@@ -456,6 +450,9 @@ const VectorData = props => {
setWebData
(
res
[
1
].
Result
)
setWebData
(
res
[
1
].
Result
)
setWebStatus
(
arr
)
setWebStatus
(
arr
)
}
}
setCheckLoading
(
false
)
}).
catch
(
e
=>
{
setCheckLoading
(
false
)
})
})
};
};
...
@@ -465,7 +462,7 @@ const VectorData = props => {
...
@@ -465,7 +462,7 @@ const VectorData = props => {
return
(
return
(
<>
<>
<
Spin
tip=
"loading..."
spinning=
{
checkLoading
}
>
<
Spin
tip=
"loading..."
spinning=
{
checkLoading
}
>
<
div
>
<
div
className=
{
styles
.
solutionConfig
}
>
<
div
>
<
div
>
<
Divider
orientation=
"left"
><
div
className=
{
styles
.
divider
}
>
Web
<
PlusOutlined
<
Divider
orientation=
"left"
><
div
className=
{
styles
.
divider
}
>
Web
<
PlusOutlined
onClick=
{
()
=>
{
addType
(
'add'
)
}
}
onClick=
{
()
=>
{
addType
(
'add'
)
}
}
...
@@ -477,7 +474,7 @@ const VectorData = props => {
...
@@ -477,7 +474,7 @@ const VectorData = props => {
pagination=
{
{
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
defaultPageSize
:
3
,
defaultPageSize
:
5
,
onChange
:
(
value
)
=>
{
onChange
:
(
value
)
=>
{
setWebCurrent
(
value
-
1
)
setWebCurrent
(
value
-
1
)
}
}
...
@@ -500,7 +497,7 @@ const VectorData = props => {
...
@@ -500,7 +497,7 @@ const VectorData = props => {
pagination=
{
{
pagination=
{
{
showTotal
:
(
total
,
range
)
=>
showTotal
:
(
total
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
`第${range[0]}-${range[1]} 条/共 ${total} 条`
,
defaultPageSize
:
3
,
defaultPageSize
:
10
,
onChange
:
(
value
)
=>
{
onChange
:
(
value
)
=>
{
setHandCurrent
(
value
-
1
)
setHandCurrent
(
value
-
1
)
}
}
...
...
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