Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
bd291794
authored
2021-02-05 14:27:56 +0800
by
jikai
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
jikai commit
1 parent
54d36ce9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
91 additions
and
137 deletions
src/assets/json/layerTreeData.json
src/assets/json/layers.json
src/components/lineTree/lineTree.vue
src/components/lineTree/tx/importGeo.vue
src/components/lineTree/tx/js/geoUtils.js
src/libs/map/IdentifyUtils.js
src/libs/map/featureUpdate.js
src/libs/map/mapApi.js
src/views/systemTX/map.vue
src/assets/json/layerTreeData.json
View file @
bd29179
[{
"label"
:
"专题树"
,
"id"
:
"1"
,
"type"
:
"layerGroup"
,
"type"
:
"layerGroup"
,
"alpha"
:
100
,
"children"
:[
{
"label"
:
"西安市"
,
"label"
:
"西安市
阎良区
"
,
"id"
:
"1-1"
,
"type"
:
"layerGroup"
,
"alpha"
:
100
,
"children"
:[{
"label"
:
"行政区划"
,
"id"
:
"1-1-1"
,
"
name"
:
"testLayer
"
,
"
type"
:
"layerGroup
"
,
"alpha"
:
100
,
"children"
:[
{
"label"
:
"行政区界限"
,
"id"
:
"1-1-1-1"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"testLayer"
,
"layerId"
:
0
,
"type"
:
"layer"
,
"layerId"
:
20
,
"children"
:
null
},
{
"label"
:
"行政区"
,
"id"
:
"1-1-1-2"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"testLayer"
,
"layerId"
:
1
,
"layerId"
:
19
,
"children"
:
null
}
]
...
...
@@ -38,25 +34,21 @@
{
"label"
:
"地籍分区"
,
"id"
:
"1-1-2"
,
"
name"
:
"djfqLayer
"
,
"
type"
:
"layerGroup
"
,
"alpha"
:
100
,
"children"
:[
{
"label"
:
"地籍区"
,
"id"
:
"1-1-2-1"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"djfqLayer"
,
"layerId"
:
0
,
"layerId"
:
13
,
"children"
:
null
},
{
"label"
:
"地籍子区"
,
"id"
:
"1-1-2-2"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"djfqLayer"
,
"layerId"
:
1
,
"layerId"
:
14
,
"children"
:
null
}
]
...
...
@@ -64,96 +56,77 @@
{
"label"
:
"不动产单元"
,
"id"
:
"1-1-3"
,
"
name"
:
"bdcdyLayer
"
,
"
type"
:
"layerGroup
"
,
"alpha"
:
100
,
"children"
:[
{
"label"
:
"线状定着物"
,
"id"
:
"1-1-3-1"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
0
,
"layerId"
:
7
,
"children"
:
null
},
{
"label"
:
"宗海"
,
"id"
:
"1-1-3-2"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
1
,
"layerId"
:
9
,
"children"
:
null
},
{
"label"
:
"宗地"
,
"id"
:
"1-1-3-3"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
2
,
"layerId"
:
8
,
"children"
:
null
},
{
"label"
:
"林权"
,
"id"
:
"1-1-3-4"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
3
,
"layerId"
:
5
,
"children"
:
null
},
{
"label"
:
"构筑物"
,
"id"
:
"1-1-3-5"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
4
,
"layerId"
:
2
,
"children"
:
null
},
{
"label"
:
"面状定着物"
,
"id"
:
"1-1-3-6"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
5
,
"layerId"
:
6
,
"children"
:
null
},
{
"label"
:
"界址线"
,
"id"
:
"1-1-3-7"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
6
,
"layerId"
:
4
,
"children"
:
null
},
{
"label"
:
"点状定着物"
,
"id"
:
"1-1-3-8"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
7
,
"layerId"
:
1
,
"children"
:
null
},
{
"label"
:
"自然幢"
,
"id"
:
"1-1-3-9"
,
"type"
:
"layer"
,
"alpha"
:
100
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
8
,
"layerId"
:
10
,
"children"
:
null
},
{
"label"
:
"界址点"
,
"id"
:
"1-1-3-10"
,
"type"
:
"layer"
,
"name"
:
"bdcdyLayer"
,
"layerId"
:
9
,
"layerId"
:
4
,
"children"
:
null
}
]
...
...
@@ -161,31 +134,28 @@
{
"label"
:
"自然地理"
,
"id"
:
"1-1-4"
,
"
name"
:
"zrdlLayer
"
,
"
type"
:
"layerGroup
"
,
"alpha"
:
100
,
"children"
:[
{
"label"
:
"辅助面"
,
"id"
:
"1-1-4-1"
,
"type"
:
"layer"
,
"name"
:
"zrdlLayer"
,
"layerId"
:
0
,
"layerId"
:
15
,
"children"
:
null
},
{
"label"
:
"植被"
,
"id"
:
"1-1-4-2"
,
"type"
:
"layer"
,
"name"
:
"zrdlLayer"
,
"layerId"
:
1
,
"layerId"
:
17
,
"children"
:
null
},
{
"label"
:
"水系"
,
"id"
:
"1-1-4-3"
,
"type"
:
"layer"
,
"name"
:
"zrdlLayer"
,
"layerId"
:
2
,
"layerId"
:
16
,
"children"
:
null
}
]
...
...
src/assets/json/layers.json
View file @
bd29179
[{
"layerName"
:
"ZDJBXX"
,
"layerName"
:
"ZDJBXX"
,
"layerLabel"
:
"宗地"
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
BDCDY
/MapServer"
,
"id"
:
2
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
backupService
/MapServer"
,
"id"
:
8
,
"fieldAliases"
:
{
"BSM"
:
"标识码"
,
"YSDM"
:
"要素代码"
,
...
...
@@ -39,8 +39,8 @@
{
"layerName"
:
"ZRZ"
,
"layerLabel"
:
"自然幢"
,
"layerUrl"
:
"http
://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7
/MapServer"
,
"id"
:
9
,
"layerUrl"
:
"http
s://192.168.2.146:6443/arcgis/rest/services/qj/backupService
/MapServer"
,
"id"
:
10
,
"fieldAliases"
:
{
"YSDM"
:
"要素代码"
,
"BDCDYH"
:
"不动产单元号"
,
...
...
@@ -72,8 +72,8 @@
{
"layerName"
:
"DJQ"
,
"layerLabel"
:
"地籍区"
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
DJFQ
/MapServer"
,
"id"
:
1
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
backupService
/MapServer"
,
"id"
:
1
3
,
"fieldAliases"
:
{
"BSM"
:
"标识码"
,
"YSDM"
:
"要素代码"
,
...
...
@@ -84,8 +84,8 @@
{
"layerName"
:
"DJZQ"
,
"layerLabel"
:
"地籍子区"
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
DJFQ
/MapServer"
,
"id"
:
0
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
backupService
/MapServer"
,
"id"
:
14
,
"fieldAliases"
:
{
"BSM"
:
"标识码"
,
"YSDM"
:
"要素代码"
,
...
...
@@ -96,8 +96,8 @@
{
"layerName"
:
"XJZQ"
,
"layerLabel"
:
"行政区"
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
XZQH
/MapServer"
,
"id"
:
1
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
backupService
/MapServer"
,
"id"
:
1
9
,
"fieldAliases"
:
{
"BSM"
:
"标识码"
,
"YSDM"
:
"要素代码"
,
...
...
@@ -109,13 +109,13 @@
{
"layerName"
:
"JZD"
,
"layerLabel"
:
"界址点"
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
BDCDY
/MapServer"
,
"id"
:
9
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
backupService
/MapServer"
,
"id"
:
3
},
{
"layerName"
:
"JZX"
,
"layerLabel"
:
"界址线"
,
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
BDCDY
/MapServer"
,
"id"
:
6
"layerUrl"
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/
backupService
/MapServer"
,
"id"
:
4
}
]
\ No newline at end of file
...
...
src/components/lineTree/lineTree.vue
View file @
bd29179
...
...
@@ -13,18 +13,11 @@
class=
"row-flex-start basic_banner"
:class=
"
{
active_color: item.expand
&&
item.children.length > 0,
lpb_basic_banner:islpb
}"
@click="itemClick(item)"
>
<div
class=
"layer_text nowrap"
@
contextmenu
.
prevent=
"openMenu($event, item)"
>
<i
v-if=
"!islpb"
class=
"iconfont iconguoyou"
></i>
<i
v-if=
"islpb && !item.expand"
class=
"iconfont iconxiala"
></i>
<i
v-if=
"islpb && item.expand"
class=
"iconfont iconxialazhankai"
></i>
{{
item
.
mc
}}
</div>
<div
<div
class=
"layer_text nowrap"
@
contextmenu
.
prevent=
"openMenu($event, item)"
><i
class=
"iconfont iconguoyou"
></i>
{{
item
.
mc
}}
</div><div
class=
"reTree_icon"
:style=
"
{
height: 10 + 'px',
...
...
@@ -32,8 +25,10 @@
}"
:class="{
reTree_default_icon: item.children.length === 0,
reTree_collapse_icon: item.expand
&&
item.children.length > 0,
reTree_expand_icon: !item.expand
&&
item.children.length > 0,
reTree_collapse_icon: !islpb
&&
item.expand
&&
item.children.length > 0,
reTree_expand_icon: !islpb
&&
!item.expand
&&
item.children.length > 0,
lpbTree_collapse_icon: islpb
&&
item.expand
&&
item.children.length > 0,
lpbTree_expand_icon: islpb
&&
!item.expand
&&
item.children.length > 0,
}"
>
</div>
</div>
...
...
@@ -123,7 +118,7 @@
<el-dialog
v-dialogDrag
:close-on-click-modal=
"false"
title=
"导入图形"
:modal=
"false"
custom-class=
"importDialog"
:visible
.
sync=
"improtDialog"
width=
"30%"
@
close=
"closeImportDialog"
>
<import-geo
:property-info=
"zdData"
:timeLine=
"new Date().getTime()"
:geo-info=
"currentClickZdGeo"
@
closeImportDialog=
"closeImportDialog"
></import-geo>
</el-dialog>
<!-- 添加定着物弹框 -->
<!-- 添加定着物弹框 -->
<el-dialog
v-dialogDrag
:close-on-click-modal=
"false"
title=
"新建"
:modal=
"false"
:visible
.
sync=
"dialogVisible"
width=
"48%"
>
<Create
@
closeDialog=
"closeDialog"
:auth=
"true"
:createZrz=
"createZrz"
></Create>
</el-dialog>
...
...
@@ -572,7 +567,6 @@ export default {
this
.
$message
.
warning
(
"不是临时数据,不能导入图形!!!"
);
return
;
}
console
.
log
(
this
.
zdData
);
var
type
=
this
.
zdData
.
type
;
if
(
type
==
"zd"
){
BSM
=
this
.
zdData
.
zdbsm
;
...
...
@@ -580,7 +574,7 @@ export default {
BSM
=
this
.
zdData
.
bsm
;
}
//当确定导入图形是 跳转到图形界面
this
.
queryGeoByBsm
(
BSM
,
type
,
function
(
features
){
this
.
queryGeoByBsm
(
BSM
,
type
,
function
(
features
){
if
(
features
&&
features
.
length
>
0
){
if
(
features
[
0
].
geometry
&&
features
[
0
].
geometry
.
rings
.
length
>
0
){
self
.
$confirm
(
'该条数据有地块信息,是否继续导入?'
,
'提示'
,
{
...
...
src/components/lineTree/tx/importGeo.vue
View file @
bd29179
...
...
@@ -381,7 +381,7 @@ export default {
if
(
valid
){
//选择处理方式
var
value
=
self
.
dealForm
.
method
;
self
.
currntDealGraphic
.
attributes
=
{};
self
.
currntDealGraphic
.
attributes
=
{};
switch
(
value
)
{
case
'1'
:
self
.
currntDealGraphic
.
attributes
.
BGZT
=
1
;
self
.
saveZd
(
self
.
currntDealGraphic
);
break
;
case
"2"
:
self
.
getDifference
(
self
.
currntDealGraphic
,
self
.
overResults
,
self
.
delOverGeo
);
break
;
...
...
@@ -458,9 +458,8 @@ export default {
saveZd
(
graphic
){
var
self
=
this
;
var
points
=
null
,
lines
=
null
,
layer
=
self
.
getLayerByName
(
"ZDJBXX"
);
// var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer");
var
featureUrl
=
layer
.
layerUrl
;
layer
=
self
.
getLayerByName
(
"ZDJBXX"
);
var
featureUrl
=
layer
.
layerUrl
.
replace
(
"MapServer"
,
"FeatureServer"
);
featureUrl
+=
"/"
+
layer
.
id
;
if
(
self
.
geoInfo
){
//替换 生成图像 高亮
...
...
@@ -504,8 +503,8 @@ export default {
graphic
.
attributes
=
attributes
;
self
.
addGraphic
(
featureUrl
,
graphic
,
function
(
res
)
{
var
addRresult
=
res
.
addFeatureResults
[
0
];
//
if(addRresult.objectId){
//
var OBJECTID = addRresult.objectId;
if
(
addRresult
.
objectId
){
var
OBJECTID
=
addRresult
.
objectId
;
if
(
graphic
.
geometry
)
{
points
=
self
.
craetJZPoint
(
graphic
);
self
.
savejzd
(
points
)
...
...
@@ -515,9 +514,9 @@ export default {
self
.
saveJzx
(
lines
);
});
}
self
.
$message
.
success
(
"保存成功!!!"
);
self
.
$message
.
success
(
"保存成功!!!"
);
self
.
goMap
();
//
}
}
});
}
},
...
...
src/components/lineTree/tx/js/geoUtils.js
View file @
bd29179
...
...
@@ -198,7 +198,7 @@ export default {
if
(
!
results
||
results
.
length
==
0
){
callBacFunction
(
true
,
"不在行政区内,请检查空间位置信息!!!"
);
}
for
(
var
i
=
0
;
i
<
results
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
results
.
length
;
i
++
){
var
feature
=
results
[
i
].
feature
;
var
flag
=
geometryEngine
.
intersects
(
polygon
,
feature
.
geometry
);
var
withinFlag
=
geometryEngine
.
within
(
polygon
,
feature
.
geometry
);
...
...
src/libs/map/IdentifyUtils.js
View file @
bd29179
...
...
@@ -10,16 +10,16 @@ export default {
"esri/tasks/support/IdentifyParameters"
]).
then
(([
IdentifyTask
,
IdentifyParameters
IdentifyParameters
])
=>
{
var
identifyTask
=
new
IdentifyTask
({
url
:
url
}),
identifyParameters
=
new
IdentifyParameters
();
identifyParameters
.
geometry
=
geometry
;
identifyParameters
.
geometry
=
geometry
;
if
(
layerIds
){
identifyParameters
.
layerIds
=
layerIds
;
}
}
identifyParameters
.
layerOption
=
layerOption
?
layerOption
:
"all"
;
identifyParameters
.
tolerance
=
tolerance
?
tolerance
:
3
;
identifyParameters
.
mapExtent
=
mapExtent
?
mapExtent
:
geometry
.
extent
;
...
...
src/libs/map/featureUpdate.js
View file @
bd29179
...
...
@@ -22,8 +22,6 @@ export default {
var
featureLayer
=
new
FeatureLayer
({
url
:
url
})
console
.
log
(
featureLayer
);
console
.
log
(
graphic
);
var
saveGraphics
=
[];
if
(
!
Array
.
isArray
(
graphic
)){
graphic
=
[
graphic
];
...
...
@@ -45,10 +43,13 @@ export default {
});
saveGraphics
.
push
(
saveGraphic
);
}
console
.
log
(
saveGraphic
)
featureLayer
.
applyEdits
({
addFeatures
:
saveGraphics
}).
then
(
function
(
res
){
addFeatures
:
saveGraphics
,
// updateFeatures
}).
then
(
function
(
res
){
if
(
callBackFunction
&&
typeof
callBackFunction
==
'function'
){
console
.
log
(
res
);
callBackFunction
(
res
);
}
})
...
...
@@ -149,6 +150,7 @@ export default {
featureLayer
.
applyEdits
({
deleteFeatures
:
delGraphics
}).
then
(
function
(
res
){
console
.
log
(
res
);
if
(
callBackFunction
&&
typeof
callBackFunction
==
'function'
){
callBackFunction
(
res
);
}
...
...
src/libs/map/mapApi.js
View file @
bd29179
import
{
loadCss
,
loadScript
}
from
"esri-loader"
export
function
init
(){
loadScript
({
url
:
"http://192.168.2.146/arcgis_js_api/library/4.17/init.js"
});
loadCss
(
"http://192.168.2.146/arcgis_js_api/library/esri/css/main.css"
);
export
function
init
(){
// loadScript({url:"http://192.168.2.38/4.16/init.js"});
// loadCss("http://192.168.2.38/4.16/esri/themes/light/main.css");
loadScript
({
url
:
"http://192.168.2.146/arcgis_js_api/library/4.17/init.js"
});
loadCss
(
"http://192.168.2.146/arcgis_js_api/library/esri/css/main.css"
);
}
init
();
\ No newline at end of file
...
...
src/views/systemTX/map.vue
View file @
bd29179
...
...
@@ -175,13 +175,9 @@ export default {
sideTools
},
data
(){
return
{
return
{
viewId
:
"testMap"
,
// layerUrl:"http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer",
layerUrl
:
'https://192.168.2.146:6443/arcgis/rest/services/qj/XZQH/MapServer'
,
// 行政区划
bdcdyUrl
:
'https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer'
,
// 不动产单元
djfqUrl
:
'https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer'
,
// 地籍分区
zrdlUrl
:
'https://192.168.2.146:6443/arcgis/rest/services/qj/JCDL/MapServer'
,
// 自然地理
layerUrl
:
"https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer"
,
dialogVisible
:
false
,
selectResLayerId
:
null
,
features
:[],
...
...
@@ -223,37 +219,29 @@ export default {
view
.
ui
.
move
([
"zoom"
],
"bottom-right"
);
loadModules
([
"esri/layers/MapImageLayer"
]).
then
(([
MapImageLayer
])
=>
{
]).
then
(([
MapImageLayer
])
=>
{
var
mapImageLayer
=
new
MapImageLayer
({
url
:
self
.
layerUrl
,
id
:
"testLayer"
,
spatialReference
:
view
.
spatialReference
});
view
.
map
.
add
(
mapImageLayer
,
1
);
let
bdcdyLayer
=
new
MapImageLayer
({
url
:
self
.
bdcdyUrl
,
id
:
"bdcdyLayer"
,
spatialReference
:
view
.
spatialReference
});
view
.
map
.
add
(
bdcdyLayer
);
let
djfqLayer
=
new
MapImageLayer
({
url
:
self
.
djfqUrl
,
id
:
"djfqLayer"
,
visible
:
false
,
spatialReference
:
view
.
spatialReference
});
view
.
map
.
add
(
djfqLayer
);
let
zrdlLayer
=
new
MapImageLayer
({
url
:
self
.
zrdlUrl
,
id
:
"zrdlLayer"
,
visible
:
false
,
spatialReference
:
view
.
spatialReference
spatialReference
:
view
.
spatialReference
,
sublayers
:[
{
id
:
19
,
visible
:
true
},
{
id
:
8
,
visible
:
true
},
{
id
:
10
,
visible
:
true
}
]
});
view
.
map
.
add
(
zrdlLayer
);
view
.
map
.
add
(
mapImageLayer
,
1
);
var
query
=
self
.
$route
.
query
;
if
(
query
&&
JSON
.
stringify
(
query
)
!=
"{}"
){
self
.
addGeoByBsm
(
query
.
bsm
,
query
.
type
,
self
.
viewId
);
...
...
@@ -367,13 +355,12 @@ export default {
self
.
features
=
[];
self
.
resultLayers
=
[];
this
.
heighGraphic
=
null
;
//清除查询图层
//清除查询图层
this
.
clearSearchLayer
(
this
.
viewId
);
this
.
totalResults
=
data
.
length
;
this
.
totalResults
=
data
.
length
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
var
layerId
=
data
[
i
].
layerId
;
var
layer
=
self
.
getLayerById
(
layerId
);
var
layerResult
=
self
.
results
.
filter
(
function
(
item
)
{
return
item
.
layerId
==
layerId
;
})
...
...
Please
register
or
sign in
to post a comment