87098caf by yuanbo

增加注释

1 parent e8276252
...@@ -157,6 +157,12 @@ export default { ...@@ -157,6 +157,12 @@ export default {
157 } 157 }
158 }, 158 },
159 methods: { 159 methods: {
160 /**
161 * @description: txtFileChange
162 * @param {*} file
163 * @param {*} fileList
164 * @author: renchao
165 */
160 txtFileChange (file, fileList) { 166 txtFileChange (file, fileList) {
161 var self = this; 167 var self = this;
162 var fileReader = new FileReader(); 168 var fileReader = new FileReader();
...@@ -170,6 +176,11 @@ export default { ...@@ -170,6 +176,11 @@ export default {
170 self.analysisTextFile(content); 176 self.analysisTextFile(content);
171 } 177 }
172 }, 178 },
179 /**
180 * @description: analysisTextFile
181 * @param {*} content
182 * @author: renchao
183 */
173 analysisTextFile (content) { 184 analysisTextFile (content) {
174 var index = content.indexOf("[地块坐标]"), 185 var index = content.indexOf("[地块坐标]"),
175 geoInfos = content.substr(index), 186 geoInfos = content.substr(index),
...@@ -225,6 +236,13 @@ export default { ...@@ -225,6 +236,13 @@ export default {
225 this.txtZd.name = ""; 236 this.txtZd.name = "";
226 this.txtResultDialog = true; 237 this.txtResultDialog = true;
227 }, 238 },
239 /**
240 * @description: shpFileSuccess
241 * @param {*} response
242 * @param {*} file
243 * @param {*} fileList
244 * @author: renchao
245 */
228 shpFileSuccess (response, file, fileList) { 246 shpFileSuccess (response, file, fileList) {
229 var self = this; 247 var self = this;
230 if (response.success) { 248 if (response.success) {
...@@ -234,9 +252,23 @@ export default { ...@@ -234,9 +252,23 @@ export default {
234 this.$message.warning(response.message); 252 this.$message.warning(response.message);
235 } 253 }
236 }, 254 },
255 /**
256 * @description: cadFileSuccess
257 * @param {*} response
258 * @param {*} file
259 * @param {*} fileList
260 * @author: renchao
261 */
237 cadFileSuccess (response, file, fileList) { 262 cadFileSuccess (response, file, fileList) {
238 263
239 }, 264 },
265 /**
266 * @description: excelFileSuccess
267 * @param {*} response
268 * @param {*} file
269 * @param {*} fileList
270 * @author: renchao
271 */
240 excelFileSuccess (response, file, fileList) { 272 excelFileSuccess (response, file, fileList) {
241 var self = this; 273 var self = this;
242 if (response.success) { 274 if (response.success) {
...@@ -265,7 +297,11 @@ export default { ...@@ -265,7 +297,11 @@ export default {
265 this.$message.warning(response.message); 297 this.$message.warning(response.message);
266 } 298 }
267 }, 299 },
268 //文本文档导入 300 /**
301 * @description: 文本文档导入
302 * @param {*} formName
303 * @author: renchao
304 */
269 submitTxtForm (formName) { 305 submitTxtForm (formName) {
270 var self = this; 306 var self = this;
271 this.$refs[formName].validate((valid) => { 307 this.$refs[formName].validate((valid) => {
...@@ -286,6 +322,11 @@ export default { ...@@ -286,6 +322,11 @@ export default {
286 } 322 }
287 }) 323 })
288 }, 324 },
325 /**
326 * @description: txtChange
327 * @param {*} value
328 * @author: renchao
329 */
289 txtChange (value) { 330 txtChange (value) {
290 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]]"; 331 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]]";
291 var graphics = this.txtResult.filter(item => { 332 var graphics = this.txtResult.filter(item => {
...@@ -298,7 +339,11 @@ export default { ...@@ -298,7 +339,11 @@ export default {
298 } 339 }
299 this.addOverLayer(graphic.geometry, []); 340 this.addOverLayer(graphic.geometry, []);
300 }, 341 },
301 //校验空间完整性 342 /**
343 * @description: 校验空间完整性
344 * @param {*} graphic
345 * @author: renchao
346 */
302 checkGeo (graphic) { 347 checkGeo (graphic) {
303 var self = this; 348 var self = this;
304 //校验完整性 直接调用空间方法 提交空间表 349 //校验完整性 直接调用空间方法 提交空间表
...@@ -331,7 +376,11 @@ export default { ...@@ -331,7 +376,11 @@ export default {
331 } 376 }
332 }); 377 });
333 }, 378 },
334 //选择处理方式 379 /**
380 * @description: 选择处理方式
381 * @param {*} formName
382 * @author: renchao
383 */
335 submitDealForm (formName) { 384 submitDealForm (formName) {
336 var self = this; 385 var self = this;
337 this.$refs[formName].validate((valid) => { 386 this.$refs[formName].validate((valid) => {
...@@ -351,7 +400,11 @@ export default { ...@@ -351,7 +400,11 @@ export default {
351 } 400 }
352 }) 401 })
353 }, 402 },
354 //裁剪自己在保存 403 /**
404 * @description: 裁剪自己在保存
405 * @param {*} geometry
406 * @author: renchao
407 */
355 delOverGeo (geometry) { 408 delOverGeo (geometry) {
356 if (!this.currntDealGraphic.attributes) { 409 if (!this.currntDealGraphic.attributes) {
357 this.currntDealGraphic.attributes = {}; 410 this.currntDealGraphic.attributes = {};
...@@ -363,7 +416,11 @@ export default { ...@@ -363,7 +416,11 @@ export default {
363 } 416 }
364 this.saveZd(this.currntDealGraphic); 417 this.saveZd(this.currntDealGraphic);
365 }, 418 },
366 //裁剪别的在保存 419 /**
420 * @description: 裁剪别的在保存
421 * @param {*} results
422 * @author: renchao
423 */
367 delOtherGeo (results) { 424 delOtherGeo (results) {
368 //执行编辑操作 425 //执行编辑操作
369 var layer = this.getLayerByName("ZDJBXX"); 426 var layer = this.getLayerByName("ZDJBXX");
...@@ -372,7 +429,12 @@ export default { ...@@ -372,7 +429,12 @@ export default {
372 this.updateGraphic(featureUrl, results); 429 this.updateGraphic(featureUrl, results);
373 this.saveZd(this.currntDealGraphic); 430 this.saveZd(this.currntDealGraphic);
374 }, 431 },
375 //下载文档模板 432 /**
433 * @description: 下载文档模板
434 * @param {*} url
435 * @param {*} fileName
436 * @author: renchao
437 */
376 downloadFile (url, fileName) { 438 downloadFile (url, fileName) {
377 let link = document.createElement("a"); 439 let link = document.createElement("a");
378 link.style.display = "none"; 440 link.style.display = "none";
...@@ -382,7 +444,11 @@ export default { ...@@ -382,7 +444,11 @@ export default {
382 link.click(); 444 link.click();
383 document.body.removeChild(link); 445 document.body.removeChild(link);
384 }, 446 },
385 //导入 447 /**
448 * @description: 导入
449 * @param {*} fileName
450 * @author: renchao
451 */
386 submitForm (formName) { 452 submitForm (formName) {
387 //校验完整性 直接调用空间方法 提交空间表 453 //校验完整性 直接调用空间方法 提交空间表
388 var self = this; 454 var self = this;
...@@ -405,6 +471,12 @@ export default { ...@@ -405,6 +471,12 @@ export default {
405 } 471 }
406 }); 472 });
407 }, 473 },
474 /**
475 * @description: dealOverData
476 * @param {*} results
477 * @param {*} graphic
478 * @author: renchao
479 */
408 dealOverData (results, graphic) { 480 dealOverData (results, graphic) {
409 this.overResults = results; 481 this.overResults = results;
410 this.currntDealGraphic = graphic; 482 this.currntDealGraphic = graphic;
...@@ -412,6 +484,11 @@ export default { ...@@ -412,6 +484,11 @@ export default {
412 this.txtResultDialog = false; 484 this.txtResultDialog = false;
413 this.dealDialog = true; 485 this.dealDialog = true;
414 }, 486 },
487 /**
488 * @description: saveZd
489 * @param {*} graphic
490 * @author: renchao
491 */
415 saveZd (graphic) { 492 saveZd (graphic) {
416 var self = this; 493 var self = this;
417 var points = null, lines = null, 494 var points = null, lines = null,
...@@ -477,6 +554,11 @@ export default { ...@@ -477,6 +554,11 @@ export default {
477 }); 554 });
478 } 555 }
479 }, 556 },
557 /**
558 * @description: savejzd
559 * @param {*} points
560 * @author: renchao
561 */
480 savejzd (points) { 562 savejzd (points) {
481 var savePoints = [] 563 var savePoints = []
482 for (var i = 0; i < points.length; i++) { 564 for (var i = 0; i < points.length; i++) {
...@@ -500,6 +582,11 @@ export default { ...@@ -500,6 +582,11 @@ export default {
500 //保存空间数据 582 //保存空间数据
501 583
502 }, 584 },
585 /**
586 * @description: saveJzx
587 * @param {*} lines
588 * @author: renchao
589 */
503 saveJzx (lines) { 590 saveJzx (lines) {
504 var jzxLines = []; 591 var jzxLines = [];
505 for (var i = 0; i < lines.length; i++) { 592 for (var i = 0; i < lines.length; i++) {
...@@ -526,6 +613,11 @@ export default { ...@@ -526,6 +613,11 @@ export default {
526 // }); 613 // });
527 //保存空间数据表 614 //保存空间数据表
528 }, 615 },
616 /**
617 * @description: saveZRZ
618 * @param {*} graphic
619 * @author: renchao
620 */
529 saveZRZ (graphic) { 621 saveZRZ (graphic) {
530 var self = this; 622 var self = this;
531 var layer = null; 623 var layer = null;
...@@ -559,7 +651,10 @@ export default { ...@@ -559,7 +651,10 @@ export default {
559 }); 651 });
560 } 652 }
561 }, 653 },
562 //操作成功不需要跳转地图 (直接定位新导入的图形) 654 /**
655 * @description: 操作成功不需要跳转地图 (直接定位新导入的图形)
656 * @author: renchao
657 */
563 goMap () { 658 goMap () {
564 var bsm = "", type = this.propertyInfo.type; 659 var bsm = "", type = this.propertyInfo.type;
565 if (type == "zd") { 660 if (type == "zd") {
...@@ -574,7 +669,10 @@ export default { ...@@ -574,7 +669,10 @@ export default {
574 //TODO 定位当前新导入的图形 669 //TODO 定位当前新导入的图形
575 this.addGeoByBsm(bsm, type, "testMap"); 670 this.addGeoByBsm(bsm, type, "testMap");
576 }, 671 },
577 //取消 672 /**
673 * @description: 取消
674 * @author: renchao
675 */
578 cancel () { 676 cancel () {
579 this.zdForm.zdBsm = ""; 677 this.zdForm.zdBsm = "";
580 this.currentClickZd = null; 678 this.currentClickZd = null;
...@@ -582,14 +680,20 @@ export default { ...@@ -582,14 +680,20 @@ export default {
582 // 清空当前图层上显示的图形 680 // 清空当前图层上显示的图形
583 this.clearOverLayer(); 681 this.clearOverLayer();
584 }, 682 },
585 //取消文本选择的弹出框 683 /**
684 * @description: 取消文本选择的弹出框
685 * @author: renchao
686 */
586 cancelTxtForm () { 687 cancelTxtForm () {
587 this.txtZd.name = ""; 688 this.txtZd.name = "";
588 this.txtResultDialog = false; 689 this.txtResultDialog = false;
589 // 清空当前图层上显示的图形 690 // 清空当前图层上显示的图形
590 this.clearOverLayer(); 691 this.clearOverLayer();
591 }, 692 },
592 //取消导入处理的结果 693 /**
694 * @description: 取消导入处理的结果
695 * @author: renchao
696 */
593 cancelDealForm () { 697 cancelDealForm () {
594 this.dealForm.method = ""; 698 this.dealForm.method = "";
595 this.dealDialog = false; 699 this.dealDialog = false;
...@@ -597,7 +701,10 @@ export default { ...@@ -597,7 +701,10 @@ export default {
597 // 清空当前图层上显示的图形 701 // 清空当前图层上显示的图形
598 this.clearOverLayer(); 702 this.clearOverLayer();
599 }, 703 },
600 //宗地选择发生改变 704 /**
705 * @description: 宗地选择发生改变
706 * @author: renchao
707 */
601 zdChange (value) { 708 zdChange (value) {
602 this.zdForm.zdBsm = value.XMMC; 709 this.zdForm.zdBsm = value.XMMC;
603 this.currentClickZd = value; 710 this.currentClickZd = value;
......
...@@ -605,7 +605,6 @@ export default { ...@@ -605,7 +605,6 @@ export default {
605 } 605 }
606 }); 606 });
607 }, 607 },
608 //清空当前图层
609 /** 608 /**
610 * @description: 清空当前图层 609 * @description: 清空当前图层
611 * @param {*} viewId 610 * @param {*} viewId
......