Merge branch 'master' of http://yun.pashanhoo.com:9090/renchao/CadastralSystem
Showing
5 changed files
with
33 additions
and
17 deletions
... | @@ -219,9 +219,9 @@ export function exportShp(data) { | ... | @@ -219,9 +219,9 @@ export function exportShp(data) { |
219 | 219 | ||
220 | export function exportExcel(data) { | 220 | export function exportExcel(data) { |
221 | return request({ | 221 | return request({ |
222 | url:"/tx/excelGeo/exportExcelp", | 222 | url:"/tx/excelGeo/exportExcel", |
223 | method:"post", | 223 | method:"post", |
224 | params:data | 224 | data:data |
225 | }) | 225 | }) |
226 | } | 226 | } |
227 | 227 | ... | ... |
... | @@ -162,6 +162,7 @@ export default { | ... | @@ -162,6 +162,7 @@ export default { |
162 | dzVisible:false, | 162 | dzVisible:false, |
163 | //宗地权属状态 | 163 | //宗地权属状态 |
164 | zdQszt:null, | 164 | zdQszt:null, |
165 | wkt:"PROJCS[\"XADFZBX\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",0.0],PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]" | ||
165 | }; | 166 | }; |
166 | }, | 167 | }, |
167 | watch: { | 168 | watch: { |
... | @@ -512,7 +513,7 @@ export default { | ... | @@ -512,7 +513,7 @@ export default { |
512 | var type = this.zdData.type; | 513 | var type = this.zdData.type; |
513 | var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; | 514 | var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; |
514 | this.queryGeoByBsm(BSM,type,function (features){ | 515 | this.queryGeoByBsm(BSM,type,function (features){ |
515 | if(features && features.length > 0){ | 516 | if(features && features.length > 0 && features[0].geometry.rings.length > 0){ |
516 | var data = features[0]; | 517 | var data = features[0]; |
517 | var jzdInfo = self.craetJZPoint(data); | 518 | var jzdInfo = self.craetJZPoint(data); |
518 | var textCotent = ""; | 519 | var textCotent = ""; |
... | @@ -533,7 +534,7 @@ export default { | ... | @@ -533,7 +534,7 @@ export default { |
533 | } | 534 | } |
534 | self.downloadTxt(textCotent,"outPut.txt"); | 535 | self.downloadTxt(textCotent,"outPut.txt"); |
535 | } | 536 | } |
536 | }); | 537 | },{wkt:this.wkt}); |
537 | }, | 538 | }, |
538 | //导出shp文件 | 539 | //导出shp文件 |
539 | exportToShp(){ | 540 | exportToShp(){ |
... | @@ -541,7 +542,7 @@ export default { | ... | @@ -541,7 +542,7 @@ export default { |
541 | var type = this.zdData.type; | 542 | var type = this.zdData.type; |
542 | var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; | 543 | var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; |
543 | this.queryGeoByBsm(BSM,type,function (features){ | 544 | this.queryGeoByBsm(BSM,type,function (features){ |
544 | if(features && features.length > 0){ | 545 | if(features && features.length > 0 && features[0].geometry.rings.length > 0) { |
545 | var data = JSON.stringify(features[0]); | 546 | var data = JSON.stringify(features[0]); |
546 | window.location.href = "/api/tx/shpUtils/writeShp?strObj="+encodeURI(data) | 547 | window.location.href = "/api/tx/shpUtils/writeShp?strObj="+encodeURI(data) |
547 | /* exportShp({ | 548 | /* exportShp({ |
... | @@ -552,7 +553,7 @@ export default { | ... | @@ -552,7 +553,7 @@ export default { |
552 | }else{ | 553 | }else{ |
553 | self.$message.warning("暂无空间信息!!!!"); | 554 | self.$message.warning("暂无空间信息!!!!"); |
554 | } | 555 | } |
555 | }); | 556 | },{wkt:this.wkt}); |
556 | }, | 557 | }, |
557 | //导出excel | 558 | //导出excel |
558 | exportExcel(){ | 559 | exportExcel(){ |
... | @@ -560,7 +561,7 @@ export default { | ... | @@ -560,7 +561,7 @@ export default { |
560 | var type = this.zdData.type; | 561 | var type = this.zdData.type; |
561 | var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; | 562 | var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; |
562 | this.queryGeoByBsm(BSM,type,function (features) { | 563 | this.queryGeoByBsm(BSM,type,function (features) { |
563 | if (features && features.length > 0) { | 564 | if (features && features.length > 0 && features[0].geometry.rings.length > 0) { |
564 | var data = features[0]; | 565 | var data = features[0]; |
565 | var jzdInfo = self.craetJZPoint(data); | 566 | var jzdInfo = self.craetJZPoint(data); |
566 | var submitData = []; | 567 | var submitData = []; |
... | @@ -574,15 +575,15 @@ export default { | ... | @@ -574,15 +575,15 @@ export default { |
574 | submitData.push(obj); | 575 | submitData.push(obj); |
575 | } | 576 | } |
576 | exportExcel(submitData).then((res) => { | 577 | exportExcel(submitData).then((res) => { |
577 | if (res.status == 200) { | 578 | if (res.code == 200) { |
578 | var path = res.data.result; | 579 | var path = res.result; |
579 | window.location.href = "/api/tx/excelGeo/download?filePath=" + encodeURI(path); | 580 | window.location.href = "/api/tx/excelGeo/download?filePath=" + encodeURI(path); |
580 | } | 581 | } |
581 | }); | 582 | }); |
582 | }else { | 583 | }else { |
583 | self.$message.warning("还没有空间信息!!!!") | 584 | self.$message.warning("还没有空间信息!!!!") |
584 | } | 585 | } |
585 | }) | 586 | },{wkt:this.wkt}) |
586 | }, | 587 | }, |
587 | //导出CAD | 588 | //导出CAD |
588 | exportCad(){ | 589 | exportCad(){ | ... | ... |
... | @@ -236,10 +236,10 @@ export default { | ... | @@ -236,10 +236,10 @@ export default { |
236 | return; | 236 | return; |
237 | } | 237 | } |
238 | //this.$emit("closeImportDialog"); | 238 | //this.$emit("closeImportDialog"); |
239 | var features = [],attributes = {},points = []; | 239 | var features = [],attributes = {},points = [],j = 1; |
240 | for(var i =1;i < geoList.length;i++){ | 240 | for(var i =1;i < geoList.length;i++){ |
241 | var rowData = geoList[i]; | 241 | var rowData = geoList[i]; |
242 | if(rowData.indexOf("J") != -1 && rowData.indexOf("J") == 0){ | 242 | if((rowData.indexOf("J") != -1 && rowData.indexOf("J") == 0)||(rowData.indexOf("j") != -1 && rowData.indexOf("j") == 0)){ |
243 | //解析坐标点信息 | 243 | //解析坐标点信息 |
244 | var pointInfo = rowData.split(","); | 244 | var pointInfo = rowData.split(","); |
245 | var point = [parseFloat(pointInfo[2]),parseFloat(pointInfo[3])]; | 245 | var point = [parseFloat(pointInfo[2]),parseFloat(pointInfo[3])]; |
... | @@ -249,7 +249,7 @@ export default { | ... | @@ -249,7 +249,7 @@ export default { |
249 | var graphic = { | 249 | var graphic = { |
250 | attributes:JSON.parse(JSON.stringify(attributes)), | 250 | attributes:JSON.parse(JSON.stringify(attributes)), |
251 | geometry:{ | 251 | geometry:{ |
252 | rings:[[points]] | 252 | rings:[points] |
253 | } | 253 | } |
254 | } | 254 | } |
255 | features.push(graphic); | 255 | features.push(graphic); |
... | @@ -258,7 +258,12 @@ export default { | ... | @@ -258,7 +258,12 @@ export default { |
258 | attributes = {}; | 258 | attributes = {}; |
259 | points = [] | 259 | points = [] |
260 | var info = rowData.split(","); | 260 | var info = rowData.split(","); |
261 | attributes.name = info[3]; | 261 | if(info[3] || info[3] == 'null'){ |
262 | attributes.name = '地块'+j; | ||
263 | j++ | ||
264 | }else { | ||
265 | attributes.name = info[3]; | ||
266 | } | ||
262 | } | 267 | } |
263 | } | 268 | } |
264 | if(points.length > 0){ | 269 | if(points.length > 0){ |
... | @@ -302,7 +307,7 @@ export default { | ... | @@ -302,7 +307,7 @@ export default { |
302 | } | 307 | } |
303 | var wkt = "PROJCS[\"XADFZBX\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",0.0],PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]"; | 308 | var wkt = "PROJCS[\"XADFZBX\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",0.0],PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]"; |
304 | var geometry = { | 309 | var geometry = { |
305 | rings:[[points]], | 310 | rings:[points], |
306 | spatialReference:{ | 311 | spatialReference:{ |
307 | wkt:wkt | 312 | wkt:wkt |
308 | }, | 313 | }, | ... | ... |
... | @@ -27,7 +27,7 @@ export default { | ... | @@ -27,7 +27,7 @@ export default { |
27 | } | 27 | } |
28 | return null; | 28 | return null; |
29 | }, | 29 | }, |
30 | queryGeoByBsm(bsm, type, callBackFunction) { | 30 | queryGeoByBsm(bsm, type, callBackFunction,outSpatialReference) { |
31 | var layer = null; | 31 | var layer = null; |
32 | if (type == 'zd') { | 32 | if (type == 'zd') { |
33 | layer = this.getLayerByName("ZDJBXX"); | 33 | layer = this.getLayerByName("ZDJBXX"); |
... | @@ -41,7 +41,7 @@ export default { | ... | @@ -41,7 +41,7 @@ export default { |
41 | console.log("没有找到图层,不能查询"); | 41 | console.log("没有找到图层,不能查询"); |
42 | return; | 42 | return; |
43 | } | 43 | } |
44 | queryUtils.methods.queryByWhere(layer.layerUrl+"/"+layer.id, {"BSM": bsm}, null, true, null, null, function (res) { | 44 | queryUtils.methods.queryByWhere(layer.layerUrl+"/"+layer.id, {"BSM": bsm}, null, true, null, outSpatialReference, function (res) { |
45 | var features = res.features; | 45 | var features = res.features; |
46 | if (callBackFunction && typeof callBackFunction == 'function') { | 46 | if (callBackFunction && typeof callBackFunction == 'function') { |
47 | callBackFunction(features); | 47 | callBackFunction(features); |
... | @@ -281,11 +281,13 @@ export default { | ... | @@ -281,11 +281,13 @@ export default { |
281 | var view = maps["testMap"]; | 281 | var view = maps["testMap"]; |
282 | loadModules([ | 282 | loadModules([ |
283 | "esri/Graphic", | 283 | "esri/Graphic", |
284 | "esri/geometry/Polygon", | ||
284 | "esri/layers/GraphicsLayer", | 285 | "esri/layers/GraphicsLayer", |
285 | "esri/geometry/geometryEngineAsync", | 286 | "esri/geometry/geometryEngineAsync", |
286 | "esri/geometry/Extent" | 287 | "esri/geometry/Extent" |
287 | ]).then(([ | 288 | ]).then(([ |
288 | Graphic, | 289 | Graphic, |
290 | Polygon, | ||
289 | GraphicsLayer, | 291 | GraphicsLayer, |
290 | geometryEngineAsync, | 292 | geometryEngineAsync, |
291 | Extent | 293 | Extent | ... | ... |
... | @@ -7,6 +7,7 @@ | ... | @@ -7,6 +7,7 @@ |
7 | <el-button type="primary" title="放大" icon="iconfont iconlakuangfangda" @click="zoomOut"></el-button> | 7 | <el-button type="primary" title="放大" icon="iconfont iconlakuangfangda" @click="zoomOut"></el-button> |
8 | <el-button type="primary" title="缩小" icon="iconfont iconlakuangsuoxiao" @click="zoomIn"></el-button> | 8 | <el-button type="primary" title="缩小" icon="iconfont iconlakuangsuoxiao" @click="zoomIn"></el-button> |
9 | <el-button type="primary" title="点选" icon="iconfont iconchaxunshuxing" @click="info"></el-button> | 9 | <el-button type="primary" title="点选" icon="iconfont iconchaxunshuxing" @click="info"></el-button> |
10 | <el-button type="primary" title="缓冲区分析" icon="iconfont iconqingchu" @click="bufferAnalysis"></el-button> | ||
10 | <el-button type="primary" title="清除" icon="iconfont iconqingchu" @click="clear"></el-button> | 11 | <el-button type="primary" title="清除" icon="iconfont iconqingchu" @click="clear"></el-button> |
11 | </el-button-group> | 12 | </el-button-group> |
12 | 13 | ||
... | @@ -96,6 +97,10 @@ export default { | ... | @@ -96,6 +97,10 @@ export default { |
96 | throw (err); | 97 | throw (err); |
97 | }) | 98 | }) |
98 | }); | 99 | }); |
100 | }, | ||
101 | //缓冲区分析 | ||
102 | bufferAnalysis(){ | ||
103 | |||
99 | } | 104 | } |
100 | 105 | ||
101 | } | 106 | } |
... | @@ -104,5 +109,8 @@ export default { | ... | @@ -104,5 +109,8 @@ export default { |
104 | } | 109 | } |
105 | </script> | 110 | </script> |
106 | <style lang="less" scoped> | 111 | <style lang="less" scoped> |
112 | .tools{ | ||
113 | position: relative; | ||
114 | } | ||
107 | 115 | ||
108 | </style> | 116 | </style> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment