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
51c90761
Commit
51c90761
authored
Sep 28, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '元数据'
parent
59262a79
Pipeline
#61152
passed with stages
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
243 additions
and
9 deletions
+243
-9
index.jsx
src/components/ExpendableTree/index.jsx
+4
-1
AddModal.jsx
src/pages/bsmanager/workOrder/incident/AddModal.jsx
+10
-3
SchemeConfig.less
src/pages/platformCenter/gis/schemeConfig/SchemeConfig.less
+20
-0
MeteDataModal.jsx
...tformCenter/gis/schemeConfig/VectorData/MeteDataModal.jsx
+175
-0
VectorData.jsx
...platformCenter/gis/schemeConfig/VectorData/VectorData.jsx
+17
-2
VectorPreviewModal.jsx
...Center/gis/schemeConfig/VectorData/VectorPreviewModal.jsx
+3
-3
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+4
-0
gis.js
src/services/gis/gis.js
+10
-0
No files found.
src/components/ExpendableTree/index.jsx
View file @
51c90761
...
@@ -19,8 +19,11 @@ export default props => {
...
@@ -19,8 +19,11 @@ export default props => {
const
[
epKeys
,
setEpKeys
]
=
useState
([
expandedKeys
]);
const
[
epKeys
,
setEpKeys
]
=
useState
([
expandedKeys
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
expandedKeys
);
console
.
log
(
expandedKeys
);
console
.
log
(
selectedKeys
);
if
(
!
expandedKeys
||
expandedKeys
==
null
)
{
setEpKeys
([
'0-0'
]);
}
else
{
setEpKeys
([
expandedKeys
]);
setEpKeys
([
expandedKeys
]);
}
},
[
expandedKeys
]);
},
[
expandedKeys
]);
const
handleExpand
=
(
keys
,
{
expanded
,
node
})
=>
{
const
handleExpand
=
(
keys
,
{
expanded
,
node
})
=>
{
...
...
src/pages/bsmanager/workOrder/incident/AddModal.jsx
View file @
51c90761
...
@@ -992,12 +992,19 @@ const AddModal = props => {
...
@@ -992,12 +992,19 @@ const AddModal = props => {
arr
.
push
(
item
.
fieldName
);
arr
.
push
(
item
.
fieldName
);
});
});
}
}
console
.
log
(
tempObj
)
if
(
aa
.
length
>
0
){
if
(
aa
.
length
>
0
){
tempObj
.
内置字段
=
[...
aa
];
tempObj
.
内置字段
=
[...
aa
];
}
}
console
.
log
(
tempObj
);
let
list
=
{}
return
tempObj
;
Object
.
keys
(
tempObj
).
forEach
(
i
=>
{
console
.
log
(
i
)
if
(
tempObj
[
i
].
length
>
0
){
console
.
log
(
tempObj
[
i
])
list
[
i
]
=
[...
tempObj
[
i
]]
}
})
console
.
log
(
list
)
return
list
;
};
};
const
groupArr
=
(
initialArr
,
name
)
=>
{
const
groupArr
=
(
initialArr
,
name
)
=>
{
...
...
src/pages/platformCenter/gis/schemeConfig/SchemeConfig.less
View file @
51c90761
...
@@ -186,6 +186,26 @@
...
@@ -186,6 +186,26 @@
border-bottom: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
}
}
}
}
.titleText {
width: 700px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.title1 {
display: flex;
align-items: center;
width: 100%;
}
// .solutionConfig {
// .solutionConfig {
// height: calc(100% - 30px);
// height: calc(100% - 30px);
// }
// }
.treeHeight{
.ant-tree-list-holder {
overflow: auto;
height: 638px !important;
}
}
.clickRowStyle {
background: #cfe7fd;
}
src/pages/platformCenter/gis/schemeConfig/VectorData/MeteDataModal.jsx
0 → 100644
View file @
51c90761
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
Spin
,
notification
,
Table
,
Modal
,
Tooltip
}
from
'antd'
;
import
{
ApartmentOutlined
,
PartitionOutlined
}
from
'@ant-design/icons'
;
import
Tree
from
'@/components/ExpendableTree'
;
import
{
GetLayerList
,
GetMetaDataPreview
,
GetLayerMetaDataPreview
}
from
'@/services/gis/gis'
;
import
{
set
}
from
'lodash'
;
import
styles
from
'../SchemeConfig.less'
;
const
MeteDataModal
=
props
=>
{
const
{
metaData
,
visible
,
onCancel
}
=
props
;
const
[
currentMeta
,
setCurrentMeta
]
=
useState
([]);
const
[
metedataList
,
setMetedataList
]
=
useState
([]);
const
[
isLoading
,
setIsLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
expendKey
,
setExpendKey
]
=
useState
(
''
);
// 保存默认展开项
const
[
recored
,
setRecored
]
=
useState
(
''
);
const
setRowClassName
=
e
=>
(
e
.
layerID
===
recored
.
layerID
?
styles
.
clickRowStyle
:
''
);
useEffect
(()
=>
{
if
(
visible
)
{
getMeteData
();
}
else
{
setMetedataList
([]);
setCurrentMeta
([]);
}
},
[
visible
]);
const
getMeteData
=
()
=>
{
GetLayerList
({
serviceName
:
metaData
.
GISServerProjectName
}).
then
(
res
=>
{
if
(
res
.
success
)
{
getTree
();
setMetedataList
(
res
.
root
);
setRecored
(
res
.
root
[
0
]);
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
message
,
});
}
});
};
const
getTree
=
()
=>
{
setLoading
(
true
);
GetMetaDataPreview
({
serviceName
:
metaData
.
GISServerProjectName
}).
then
(
res
=>
{
console
.
log
(
res
);
setExpendKey
(
'0-0'
);
setLoading
(
false
);
setCurrentMeta
(
res
);
});
};
const
columns
=
[
{
title
:
'图层'
,
dataIndex
:
'layerName'
,
width
:
150
,
key
:
'layerName'
,
},
];
// 渲染机构树
const
mapTree
=
org
=>
{
const
haveChildren
=
Array
.
isArray
(
org
.
children
)
&&
org
.
children
.
length
>
0
;
return
{
title
:
(
<
div
className=
{
styles
.
title1
}
>
<
span
className=
{
styles
.
titleText
}
>
{
org
.
children
.
length
==
0
?
(
<
span
/>
)
:
(
<
PartitionOutlined
style=
{
{
fontSize
:
'14px'
,
color
:
'#1890FF'
}
}
/>
)
}
<
span
style=
{
{
marginLeft
:
'5px'
}
}
>
<
Tooltip
placement=
"left"
title=
{
org
.
text
}
overlayStyle=
{
{
maxWidth
:
800
,
maxHeight
:
900
,
overflowY
:
'scroll'
,
overflowX
:
'hidden'
,
}
}
>
{
org
.
text
}
</
Tooltip
>
</
span
>
</
span
>
</
div
>
),
key
:
org
.
id
,
// 判断它是否存在子集,若果存在就进行再次进行遍历操作,知道不存在子集便对其他的元素进行操作
children
:
haveChildren
?
org
.
children
.
map
(
i
=>
mapTree
(
i
))
:
[],
};
};
const
onSelect
=
e
=>
{
console
.
log
(
e
);
setRecored
(
e
);
setLoading
(
true
);
if
(
e
.
layerID
!=
null
)
{
GetLayerMetaDataPreview
({
serviceName
:
metaData
.
GISServerProjectName
,
layerID
:
e
.
layerID
,
}).
then
(
res
=>
{
setLoading
(
false
);
setCurrentMeta
(
res
);
});
}
else
{
getTree
();
}
};
const
onSubmit
=
()
=>
{};
return
(
<
Modal
visible=
{
visible
}
title=
{
metaData
?
`${metaData.ServiceName}的元数据`
:
'元数据'
}
bodyStyle=
{
{
width
:
'100%'
,
height
:
'650px'
}
}
style=
{
{
top
:
50
,
borderRadius
:
'20px'
}
}
width=
"1050px"
cancelText=
"取消"
okText=
"确认"
{
...
props
}
onOk=
{
()
=>
onSubmit
()
}
>
<
div
className=
{
styles
.
treeHeight
}
>
<
Spin
spinning=
{
isLoading
}
>
<
div
style=
{
{
width
:
'1000px'
,
height
:
'640px'
,
display
:
'flex'
}
}
>
<
div
style=
{
{
width
:
'300px'
}
}
>
<
Table
onRow=
{
record
=>
({
onClick
:
e
=>
{
onSelect
(
record
);
},
// 点击行
})
}
bordered
rowClassName=
{
setRowClassName
}
pagination=
{
false
}
style=
{
{
width
:
'300px'
}
}
columns=
{
columns
}
dataSource=
{
metedataList
}
size=
"small"
scroll=
{
{
y
:
'600px'
,
}
}
/>
</
div
>
<
Spin
spinning=
{
loading
}
>
<
div
style=
{
{
display
:
'inline-block'
,
border
:
'1px solid #f0f0f0'
,
width
:
'700px'
,
}
}
>
<
Tree
showIcon=
"true"
blockNode
defaultExpandAll
autoExpandParent
treeData=
{
currentMeta
.
map
(
t
=>
mapTree
(
t
))
}
// selectedKeys={[menuID]}
expandedKeys=
{
currentMeta
[
0
]
&&
currentMeta
[
0
].
id
}
/>
</
div
>
</
Spin
>
</
div
>
</
Spin
>
</
div
>
</
Modal
>
);
};
export
default
MeteDataModal
;
src/pages/platformCenter/gis/schemeConfig/VectorData/VectorData.jsx
View file @
51c90761
...
@@ -9,11 +9,13 @@ import {
...
@@ -9,11 +9,13 @@ import {
}
from
'@/services/webConfig/api'
;
}
from
'@/services/webConfig/api'
;
import
AddModal
from
'./AddModal'
;
import
AddModal
from
'./AddModal'
;
import
PreviewModal
from
'./VectorPreviewModal'
;
import
PreviewModal
from
'./VectorPreviewModal'
;
import
MeteDataModal
from
'./MeteDataModal'
;
const
VectorData
=
props
=>
{
const
VectorData
=
props
=>
{
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
// 弹窗显示
const
[
tileData
,
setTileData
]
=
useState
([]);
// table表格数据
const
[
tileData
,
setTileData
]
=
useState
([]);
// table表格数据
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
visible
,
setVisible
]
=
useState
(
false
);
// 弹窗
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
// 预览弹窗
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
// 预览弹窗
const
[
meteDataVisible
,
setMeteDataVisible
]
=
useState
(
false
);
// 预览弹窗
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
flag
,
setFlag
]
=
useState
(
0
);
// 更新list
const
[
loading
,
setLoading
]
=
useState
([]);
// 更新状态
const
[
loading
,
setLoading
]
=
useState
([]);
// 更新状态
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
const
[
type
,
setType
]
=
useState
(
''
);
// 弹窗类型
...
@@ -47,8 +49,8 @@ const VectorData = props => {
...
@@ -47,8 +49,8 @@ const VectorData = props => {
},
},
{
{
title
:
'发布时间'
,
title
:
'发布时间'
,
dataIndex
:
'
p
ublishTime'
,
dataIndex
:
'
P
ublishTime'
,
key
:
'
p
ublishTime'
,
key
:
'
P
ublishTime'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
...
@@ -56,6 +58,9 @@ const VectorData = props => {
...
@@ -56,6 +58,9 @@ const VectorData = props => {
align
:
'center'
,
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
(
render
:
(
text
,
record
,
index
)
=>
(
<
Space
>
<
Space
>
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
metadata
(
record
)
}
>
元数据
</
Button
>
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
previewMetaData
(
record
,
index
)
}
>
<
Button
type=
"primary"
size=
"small"
onClick=
{
()
=>
previewMetaData
(
record
,
index
)
}
>
预览
预览
</
Button
>
</
Button
>
...
@@ -132,6 +137,11 @@ const VectorData = props => {
...
@@ -132,6 +137,11 @@ const VectorData = props => {
setPreviewVisible
(
true
);
setPreviewVisible
(
true
);
};
};
const
metadata
=
record
=>
{
setCurrentMetaData
(
record
);
setMeteDataVisible
(
true
);
};
const
solutionName
=
()
=>
{
const
solutionName
=
()
=>
{
getSolutionList
({
getSolutionList
({
_version
:
9999
,
_version
:
9999
,
...
@@ -236,6 +246,11 @@ const VectorData = props => {
...
@@ -236,6 +246,11 @@ const VectorData = props => {
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
onCancel=
{
()
=>
setPreviewVisible
(
false
)
}
metaData=
{
currentMetaData
}
metaData=
{
currentMetaData
}
/>
/>
<
MeteDataModal
visible=
{
meteDataVisible
}
onCancel=
{
()
=>
setMeteDataVisible
(
false
)
}
metaData=
{
currentMetaData
}
/>
</
Spin
>
</
Spin
>
</
div
>
</
div
>
</>
</>
...
...
src/pages/platformCenter/gis/schemeConfig/VectorData/VectorPreviewModal.jsx
View file @
51c90761
...
@@ -22,7 +22,7 @@ const VectorPreviewModal = props => {
...
@@ -22,7 +22,7 @@ const VectorPreviewModal = props => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
document
.
getElementById
(
'map-container'
))
{
if
(
document
.
getElementById
(
'map-container'
))
{
if
(
!
mapID
.
current
)
{
if
(
!
mapID
.
current
)
{
//1.加载底图
//
1.加载底图
let
m
=
new
window
.
AMap
.
Map
(
'map-container'
);
let
m
=
new
window
.
AMap
.
Map
(
'map-container'
);
mapID
.
current
=
m
;
mapID
.
current
=
m
;
}
}
...
@@ -55,7 +55,7 @@ const VectorPreviewModal = props => {
...
@@ -55,7 +55,7 @@ const VectorPreviewModal = props => {
metaData
.
GISServerProjectName
metaData
.
GISServerProjectName
}
/GeoServerProxy/wms`
,
}
/GeoServerProxy/wms`
,
blend
:
false
,
blend
:
false
,
params
:
params
,
params
,
zooms
:
[
2
,
20
],
zooms
:
[
2
,
20
],
};
};
let
wms
=
new
window
.
AMap
.
TileLayer
.
WMS
(
wmsOption
);
let
wms
=
new
window
.
AMap
.
TileLayer
.
WMS
(
wmsOption
);
...
@@ -109,7 +109,7 @@ const VectorPreviewModal = props => {
...
@@ -109,7 +109,7 @@ const VectorPreviewModal = props => {
backgroundColor
:
'white'
,
backgroundColor
:
'white'
,
}
}
}
}
>
>
<
ReactJson
src=
{
currentMeta
}
/>
{
/* <ReactJson src={currentMeta} /> */
}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
51c90761
...
@@ -28,6 +28,8 @@ import {
...
@@ -28,6 +28,8 @@ import {
EditOutlined
,
EditOutlined
,
DeleteOutlined
,
DeleteOutlined
,
UserAddOutlined
,
UserAddOutlined
,
WindowsOutlined
,
IeOutlined
,
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
import
{
setMenuToRole
,
setMenuToRole
,
...
@@ -246,6 +248,8 @@ const SiteManage = () => {
...
@@ -246,6 +248,8 @@ const SiteManage = () => {
if
(
item
.
type
===
'mobile'
)
{
if
(
item
.
type
===
'mobile'
)
{
item
.
icon
=
<
MobileOutlined
/>;
item
.
icon
=
<
MobileOutlined
/>;
// newArr[0] = item;
// newArr[0] = item;
}
else
if
(
item
.
visibleValue
==
'CS'
)
{
item
.
icon
=
<
WindowsOutlined
/>;
}
else
{
}
else
{
item
.
icon
=
<
DesktopOutlined
/>;
item
.
icon
=
<
DesktopOutlined
/>;
}
}
...
...
src/services/gis/gis.js
View file @
51c90761
...
@@ -8,3 +8,13 @@ export const GetMetaData = param => get(`${PANDA_GIS}/${param.mapServerName}`);
...
@@ -8,3 +8,13 @@ export const GetMetaData = param => get(`${PANDA_GIS}/${param.mapServerName}`);
export
const
GetMetaDataNew
=
param
=>
get
(
`
${
CITY_SERVICE
}
/MapServer.svc/
${
param
}
`
);
export
const
GetMetaDataNew
=
param
=>
get
(
`
${
CITY_SERVICE
}
/MapServer.svc/
${
param
}
`
);
// 获取mapsetting配置
// 获取mapsetting配置
export
const
GetWebSiteConfig
=
param
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/LayerSetting`
,
param
);
export
const
GetWebSiteConfig
=
param
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/LayerSetting`
,
param
);
// 获取图层列表
export
const
GetLayerList
=
param
=>
get
(
`
${
PANDA_GIS
}
/MetaData/D_GetLayerList`
,
param
);
// 查看元数据
export
const
GetMetaDataPreview
=
param
=>
get
(
`
${
PANDA_GIS
}
/MetaData/D_GetMetaDataPreview`
,
param
);
// 查看图层元数据
export
const
GetLayerMetaDataPreview
=
param
=>
get
(
`
${
PANDA_GIS
}
/MetaData/D_GetLayerMetaDataPreview`
,
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