Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
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
e8276252
authored
2023-07-19 17:13:06 +0800
by
yuanbo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加注释
1 parent
383736e0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
14 deletions
src/components/lineTree/tx/js/exportUtils.js
src/components/lineTree/tx/js/geoUtils.js
src/components/lineTree/tx/js/exportUtils.js
View file @
e827625
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:24:24
*/
export
default
{
methods
:{
/**
* @description: downloadTxt
* @param {*} text
* @param {*} fileName
* @author: renchao
*/
downloadTxt
(
text
,
fileName
){
let
element
=
document
.
createElement
(
'a'
)
element
.
setAttribute
(
'href'
,
'data:text/plain;charset=utf-8,'
+
encodeURIComponent
(
text
))
...
...
@@ -8,6 +18,11 @@ export default {
element
.
style
.
display
=
'none'
element
.
click
()
},
/**
* @description: createTextContent
* @param {*} jzdInfo
* @author: renchao
*/
createTextContent
(
jzdInfo
){
var
textContent
=
""
;
for
(
var
i
=
0
;
i
<
jzdInfo
.
length
;
i
++
){
...
...
src/components/lineTree/tx/js/geoUtils.js
View file @
e827625
/*
* 图形相关的操作 js
* */
* @Description: 图形相关的操作 js
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:24:24
*/
import
layers
from
'@/api/json/layers.json'
import
queryUtils
from
"@/utils/map/queryUtils"
;
import
identifyUtils
from
'@/utils/map/IdentifyUtils'
...
...
@@ -19,6 +20,11 @@ export default {
}
},
methods
:
{
/**
* @description: getLayerByName
* @param {*} name
* @author: renchao
*/
getLayerByName
(
name
)
{
for
(
var
i
=
0
;
i
<
layers
.
length
;
i
++
)
{
if
(
layers
[
i
].
layerName
==
name
)
{
...
...
@@ -27,6 +33,14 @@ export default {
}
return
null
;
},
/**
* @description: queryGeoByBsm
* @param {*} name
* @param {*} type
* @param {*} callBackFunction
* @param {*} outSpatialReference
* @author: renchao
*/
queryGeoByBsm
(
bsm
,
type
,
callBackFunction
,
outSpatialReference
)
{
var
layer
=
null
;
if
(
type
==
'zd'
)
{
...
...
@@ -48,13 +62,23 @@ export default {
}
});
},
//生成介质点
/**
* @description: 生成介质点
* @param {*} graphic
* @author: renchao
*/
craetJZPoint
(
graphic
)
{
var
geomtry
=
graphic
.
geometry
,
rings
=
geomtry
.
rings
[
0
];
var
pointInfos
=
[];
this
.
getPointByRings
(
rings
,
pointInfos
);
return
pointInfos
;
},
/**
* @description: getPointByRings
* @param {*} rings
* @param {*} pointInfos
* @author: renchao
*/
getPointByRings
(
rings
,
pointInfos
)
{
for
(
var
i
=
0
;
i
<
rings
.
length
;
i
++
)
{
var
children
=
rings
[
i
];
...
...
@@ -70,7 +94,12 @@ export default {
}
}
},
//生成介质线
/**
* @description: 生成介质线
* @param {*} graphic
* @param {*} callBackFunction
* @author: renchao
*/
createJZLine
(
graphic
,
callBackFunction
)
{
var
self
=
this
;
loadModules
([
...
...
@@ -151,7 +180,11 @@ export default {
throw
(
err
);
})
},
//wkt转换成arcgis
/**
* @description: wkt转换成arcgis
* @param {*} wkt
* @author: renchao
*/
parseWktToArc
(
wkt
)
{
var
primitive
=
wktParse
.
parse
(
wkt
);
/*if(primitive.type == "MultiPolygon"){
...
...
@@ -159,6 +192,12 @@ export default {
}*/
return
arcgisParser
.
convert
(
primitive
)
},
/**
* @description: postionToThisGeo
* @param {*} bsm
* @param {*} type
* @author: renchao
*/
postionToThisGeo
(
bsm
,
type
)
{
var
view
=
maps
[
"testMap"
];
var
layer
=
view
.
map
.
findLayerById
(
"highlightLayer"
);
...
...
@@ -173,7 +212,12 @@ export default {
this
.
$message
.
success
(
"暂无图形信息!!!"
);
}
},
//导入空间图形是 先判断数据是否跨界
/**
* @description: 导入空间图形是 先判断数据是否跨界
* @param {*} geometry
* @param {*} callBacFunction
* @author: renchao
*/
geoJoint
(
geometry
,
callBacFunction
)
{
var
self
=
this
;
loadModules
([
...
...
@@ -222,7 +266,15 @@ export default {
throw
(
err
);
})
},
//保存或者编辑属性信息
/**
* @description: 保存或者编辑属性信息
* @param {*} bsm
* @param {*} type
* @param {*} attributes
* @param {*} callBackFunction
* @param {*} ydybsm
* @author: renchao
*/
updAttributes
(
bsm
,
type
,
attributes
,
callBackFunction
,
ydybsm
)
{
var
layer
=
null
;
if
(
type
==
'zd'
)
{
...
...
@@ -252,7 +304,13 @@ export default {
}
});
},
//叠加分析 同一个图层的叠加分析
/**
* @description: 叠加分析 同一个图层的叠加分析
* @param {*} bsm
* @param {*} graphic
* @param {*} callBacFunction
* @author: renchao
*/
zdOverAnalys
(
bsm
,
graphic
,
callBacFunction
)
{
var
self
=
this
;
loadModules
([
...
...
@@ -281,7 +339,12 @@ export default {
throw
(
err
);
})
},
//添加添加元素和覆盖的元素到地图上
/**
* @description: addOverLayer
* @param {*} geometry
* @param {*} results
* @author: renchao
*/
addOverLayer
(
geometry
,
results
)
{
var
view
=
maps
[
"testMap"
];
loadModules
([
...
...
@@ -336,6 +399,10 @@ export default {
})
},
/**
* @description: clearOverLayer
* @author: renchao
*/
clearOverLayer
()
{
var
view
=
maps
[
"testMap"
];
var
layer
=
view
.
map
.
findLayerById
(
"overLayer"
);
...
...
@@ -343,7 +410,13 @@ export default {
layer
.
removeAll
();
}
},
//自然幢叠加分析 不能跨宗地 图层本身的叠加分析
/**
* @description: 自然幢叠加分析 不能跨宗地 图层本身的叠加分析
* @param {*} bsm
* @param {*} graphic
* @param {*} callBacFunction
* @author: renchao
*/
zrzOverAnalys
(
bsm
,
graphic
,
callBacFunction
)
{
var
self
=
this
;
loadModules
([
...
...
@@ -396,7 +469,13 @@ export default {
console
.
log
(
err
);
})
},
//去除重叠部分
/**
* @description: 去除重叠部分
* @param {*} inputGraphic
* @param {*} subGraphic
* @param {*} callBackFuncton
* @author: renchao
*/
getDifference
(
inputGraphic
,
subGraphic
,
callBackFuncton
)
{
loadModules
([
"esri/geometry/Polygon"
,
...
...
@@ -420,7 +499,14 @@ export default {
console
.
log
(
err
);
})
},
//业务处理 先用query方法 查询将所有属性查询 在做空间裁剪
/**
* @description: 业务处理 先用query方法 查询将所有属性查询 在做空间裁剪
* @param {*} subGraphics
* @param {*} currntGraphic
* @param {*} callBackFunction
* @param {*} flag
* @author: renchao
*/
getResultsDif
(
subGraphics
,
currntGraphic
,
callBackFunction
,
flag
)
{
var
self
=
this
;
loadModules
([
...
...
@@ -459,6 +545,13 @@ export default {
})
},
/**
* @description: addGeoByBsm
* @param {*} bsm
* @param {*} type
* @param {*} viewId
* @author: renchao
*/
addGeoByBsm
(
bsm
,
type
,
viewId
)
{
var
self
=
this
;
var
layer
=
null
;
...
...
@@ -513,6 +606,11 @@ export default {
});
},
//清空当前图层
/**
* @description: 清空当前图层
* @param {*} viewId
* @author: renchao
*/
clearHighlightLayer
(
viewId
)
{
var
view
=
maps
[
viewId
];
var
layer
=
view
.
map
.
findLayerById
(
"highlightLayer"
);
...
...
Please
register
or
sign in
to post a comment