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
3e6b5f15
authored
2020-12-09 16:15:47 +0800
by
zhaoqian
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
0f9daf12
d6ec1003
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
18 deletions
src/components/lineTree/lineTree.vue
src/components/lineTree/tx/js/geoUtils.js
src/views/Home.vue
src/views/systemTX/map.vue
src/views/systemTX/mapWeight/js/mapLayerManager.js
src/components/lineTree/lineTree.vue
View file @
3e6b5f1
...
...
@@ -460,8 +460,8 @@ export default {
//导出文本文件
exportText
(){
var
self
=
this
;
var
BSM
=
this
.
zdData
.
zdbsm
;
var
type
=
this
.
zdData
.
type
;
var
BSM
=
type
==
'zdt'
?
this
.
zdData
.
zdbsm
:
this
.
zdData
.
bsm
;
this
.
queryGeoByBsm
(
BSM
,
type
,
function
(
features
){
if
(
features
&&
features
.
length
>
0
){
var
data
=
features
[
0
];
...
...
@@ -489,8 +489,8 @@ export default {
//导出shp文件
exportToShp
(){
var
self
=
this
;
var
BSM
=
this
.
zdData
.
zdbsm
;
var
type
=
this
.
zdData
.
type
;
var
BSM
=
type
==
'zdt'
?
this
.
zdData
.
zdbsm
:
this
.
zdData
.
bsm
;
this
.
queryGeoByBsm
(
BSM
,
type
,
function
(
features
){
if
(
features
&&
features
.
length
>
0
){
var
data
=
JSON
.
stringify
(
features
[
0
]);
...
...
@@ -509,8 +509,8 @@ export default {
//导出excel
exportExcel
(){
var
self
=
this
;
var
BSM
=
this
.
zdData
.
zdbsm
;
var
type
=
this
.
zdData
.
type
;
var
BSM
=
type
==
'zdt'
?
this
.
zdData
.
zdbsm
:
this
.
zdData
.
bsm
;
this
.
queryGeoByBsm
(
BSM
,
type
,
function
(
features
)
{
if
(
features
&&
features
.
length
>
0
)
{
var
data
=
features
[
0
];
...
...
@@ -549,6 +549,14 @@ export default {
},
//图形定位
postionToMap
(){
var
type
=
this
.
zdData
.
type
;
var
BSM
=
type
==
'zdt'
?
this
.
zdData
.
zdbsm
:
this
.
zdData
.
bsm
;
if
(
this
.
$route
.
path
==
"/viewMap"
){
//定位到当前空间位置
// TODO 这个方法只是为了支撑功能
this
.
postionToThisGeo
(
BSM
,
type
);
return
;
}
var
curretRouterInfo
=
{
path
:
this
.
$route
.
path
,
query
:
this
.
$route
.
query
...
...
@@ -557,8 +565,8 @@ export default {
this
.
$router
.
push
({
path
:
"/viewMap"
,
query
:
{
bsm
:
this
.
zdData
.
zdbsm
,
type
:
t
his
.
zdData
.
type
?
'zd'
:
'zrz'
bsm
:
BSM
,
type
:
t
ype
}
});
},
...
...
src/components/lineTree/tx/js/geoUtils.js
View file @
3e6b5f1
...
...
@@ -9,7 +9,7 @@ import {loadModules} from "esri-loader"
import
featureUpdate
from
"@libs/map/featureUpdate"
;
import
arcgisParser
from
'terraformer-arcgis-parser'
import
wktParse
from
'terraformer-wkt-parser'
import
{
maps
}
from
'@/libs/map/mapUtils'
export
default
{
data
(){
...
...
@@ -158,6 +158,18 @@ export default {
}*/
return
arcgisParser
.
convert
(
primitive
)
},
postionToThisGeo
(
bsm
,
type
){
var
view
=
maps
[
"testMap"
];
var
layer
=
view
.
map
.
findLayerById
(
"highlightLayer"
);
if
(
layer
){
var
graphics
=
layer
.
graphics
;
if
(
graphics
.
length
>
0
&&
graphics
.
items
[
0
].
attributes
.
BSM
==
bsm
){
view
.
extent
=
graphics
.
items
[
0
].
geometry
.
extent
;
}
}
else
{
this
.
$message
.
warning
(
"暂无图形信息!!!"
);
}
},
//导入空间图形是 先判断数据是否跨界
geoJoint
(
geometry
,
callBacFunction
){
var
self
=
this
;
...
...
src/views/Home.vue
View file @
3e6b5f1
...
...
@@ -68,7 +68,8 @@ export default {
},
provide
(){
return
{
getRightTree
:
this
.
getRightTree
getRightTree
:
this
.
getRightTree
,
getRightTreeByZrzbsm
:
this
.
getRightTreeByZrzbsm
}
},
data
()
{
...
...
src/views/systemTX/map.vue
View file @
3e6b5f1
...
...
@@ -56,6 +56,7 @@ import layers from '@/assets/json/layers.json'
import
findTask
from
'@/libs/map/findTask'
export
default
{
inject
:[
'getRightTree'
,
'getRightTreeByZrzbsm'
],
components
:{
EsriMap
,
MapTools
...
...
@@ -75,10 +76,16 @@ export default {
},
mixins
:[
mapLayerManager
,
findTask
],
mounted
(){
var
query
=
this
.
$route
.
query
;
if
(
query
&&
JSON
.
stringify
(
query
)
!=
"{}"
){
this
.
addGeoByBsm
(
query
.
bsm
,
query
.
type
,
this
.
viewId
);
}
var
query
=
self
.
$route
.
query
;
if
(
query
&&
JSON
.
stringify
(
query
)
!=
"{}"
){
//self.addGeoByBsm(query.bsm,query.type,self.viewId);
if
(
query
.
type
==
'zd'
){
this
.
getRightTree
(
query
.
bsm
)
}
else
if
(
query
.
type
==
'zrz'
){
this
.
getRightTreeByZrzbsm
(
query
.
bsm
);
}
}
},
methods
:{
addLayer
(){
...
...
@@ -108,6 +115,10 @@ export default {
}]
});
view
.
map
.
add
(
mapImageLayer
,
1
);
var
query
=
self
.
$route
.
query
;
if
(
query
&&
JSON
.
stringify
(
query
)
!=
"{}"
){
self
.
addGeoByBsm
(
query
.
bsm
,
query
.
type
,
self
.
viewId
);
}
}).
catch
(
err
=>
{
throw
(
err
);
})
...
...
@@ -115,9 +126,14 @@ export default {
//缩放至
toMap
(
attr
){
var
self
=
this
;
this
.
extentToGraphic
(
attr
,
this
.
heighGraphic
,
this
.
viewId
,
function
()
{
self
.
heighGraphic
=
attr
;
});
if
(
attr
.
geometry
){
this
.
extentToGraphic
(
attr
,
this
.
heighGraphic
,
this
.
viewId
,
function
()
{
self
.
heighGraphic
=
attr
;
});
}
else
{
this
.
$message
.
warning
(
"没有图形信息!!"
)
}
},
//图层选择事件
selectLayerChange
(){
...
...
src/views/systemTX/mapWeight/js/mapLayerManager.js
View file @
3e6b5f1
...
...
@@ -56,7 +56,7 @@ export default {
var
graphic
=
features
[
0
];
graphic
.
symbol
=
symbol
;
layer
.
add
(
graphic
);
view
.
center
=
graphic
.
geometry
.
extent
.
center
;
view
.
extent
=
graphic
.
geometry
.
extent
;
}).
catch
(
err
=>
{
thow
(
err
);
})
...
...
@@ -91,8 +91,11 @@ export default {
var
symbol
=
graphicSymbol
.
fillSymbol
.
highlightSymbol
;
var
features
=
searchResult
[
i
].
features
;
for
(
var
j
=
0
;
j
<
features
.
length
;
j
++
){
features
[
j
].
symbol
=
symbol
;
layer
.
add
(
features
[
j
]);
if
(
features
[
j
].
geometry
){
features
[
j
].
symbol
=
symbol
;
layer
.
add
(
features
[
j
]);
}
}
}
}).
catch
(
err
=>
{
...
...
@@ -108,7 +111,7 @@ export default {
}
feature
.
symbol
=
highlightSymbol
;
var
view
=
maps
[
viewId
];
view
.
center
=
feature
.
geometry
.
type
==
'point'
?
feature
.
geometry
:
feature
.
geometry
.
extent
.
center
;
feature
.
geometry
.
type
==
'point'
?
view
.
center
=
feature
.
geometry
:
view
.
extent
=
feature
.
geometry
.
extent
;
if
(
callBackFunction
&&
typeof
callBackFunction
==
'function'
){
callBackFunction
();
}
...
...
Please
register
or
sign in
to post a comment