87098caf by yuanbo

增加注释

1 parent e8276252
......@@ -157,6 +157,12 @@ export default {
}
},
methods: {
/**
* @description: txtFileChange
* @param {*} file
* @param {*} fileList
* @author: renchao
*/
txtFileChange (file, fileList) {
var self = this;
var fileReader = new FileReader();
......@@ -170,6 +176,11 @@ export default {
self.analysisTextFile(content);
}
},
/**
* @description: analysisTextFile
* @param {*} content
* @author: renchao
*/
analysisTextFile (content) {
var index = content.indexOf("[地块坐标]"),
geoInfos = content.substr(index),
......@@ -225,6 +236,13 @@ export default {
this.txtZd.name = "";
this.txtResultDialog = true;
},
/**
* @description: shpFileSuccess
* @param {*} response
* @param {*} file
* @param {*} fileList
* @author: renchao
*/
shpFileSuccess (response, file, fileList) {
var self = this;
if (response.success) {
......@@ -234,9 +252,23 @@ export default {
this.$message.warning(response.message);
}
},
/**
* @description: cadFileSuccess
* @param {*} response
* @param {*} file
* @param {*} fileList
* @author: renchao
*/
cadFileSuccess (response, file, fileList) {
},
/**
* @description: excelFileSuccess
* @param {*} response
* @param {*} file
* @param {*} fileList
* @author: renchao
*/
excelFileSuccess (response, file, fileList) {
var self = this;
if (response.success) {
......@@ -265,7 +297,11 @@ export default {
this.$message.warning(response.message);
}
},
//文本文档导入
/**
* @description: 文本文档导入
* @param {*} formName
* @author: renchao
*/
submitTxtForm (formName) {
var self = this;
this.$refs[formName].validate((valid) => {
......@@ -286,6 +322,11 @@ export default {
}
})
},
/**
* @description: txtChange
* @param {*} value
* @author: renchao
*/
txtChange (value) {
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]]";
var graphics = this.txtResult.filter(item => {
......@@ -298,7 +339,11 @@ export default {
}
this.addOverLayer(graphic.geometry, []);
},
//校验空间完整性
/**
* @description: 校验空间完整性
* @param {*} graphic
* @author: renchao
*/
checkGeo (graphic) {
var self = this;
//校验完整性 直接调用空间方法 提交空间表
......@@ -331,7 +376,11 @@ export default {
}
});
},
//选择处理方式
/**
* @description: 选择处理方式
* @param {*} formName
* @author: renchao
*/
submitDealForm (formName) {
var self = this;
this.$refs[formName].validate((valid) => {
......@@ -351,7 +400,11 @@ export default {
}
})
},
//裁剪自己在保存
/**
* @description: 裁剪自己在保存
* @param {*} geometry
* @author: renchao
*/
delOverGeo (geometry) {
if (!this.currntDealGraphic.attributes) {
this.currntDealGraphic.attributes = {};
......@@ -363,7 +416,11 @@ export default {
}
this.saveZd(this.currntDealGraphic);
},
//裁剪别的在保存
/**
* @description: 裁剪别的在保存
* @param {*} results
* @author: renchao
*/
delOtherGeo (results) {
//执行编辑操作
var layer = this.getLayerByName("ZDJBXX");
......@@ -372,7 +429,12 @@ export default {
this.updateGraphic(featureUrl, results);
this.saveZd(this.currntDealGraphic);
},
//下载文档模板
/**
* @description: 下载文档模板
* @param {*} url
* @param {*} fileName
* @author: renchao
*/
downloadFile (url, fileName) {
let link = document.createElement("a");
link.style.display = "none";
......@@ -382,7 +444,11 @@ export default {
link.click();
document.body.removeChild(link);
},
//导入
/**
* @description: 导入
* @param {*} fileName
* @author: renchao
*/
submitForm (formName) {
//校验完整性 直接调用空间方法 提交空间表
var self = this;
......@@ -405,6 +471,12 @@ export default {
}
});
},
/**
* @description: dealOverData
* @param {*} results
* @param {*} graphic
* @author: renchao
*/
dealOverData (results, graphic) {
this.overResults = results;
this.currntDealGraphic = graphic;
......@@ -412,6 +484,11 @@ export default {
this.txtResultDialog = false;
this.dealDialog = true;
},
/**
* @description: saveZd
* @param {*} graphic
* @author: renchao
*/
saveZd (graphic) {
var self = this;
var points = null, lines = null,
......@@ -477,6 +554,11 @@ export default {
});
}
},
/**
* @description: savejzd
* @param {*} points
* @author: renchao
*/
savejzd (points) {
var savePoints = []
for (var i = 0; i < points.length; i++) {
......@@ -500,6 +582,11 @@ export default {
//保存空间数据
},
/**
* @description: saveJzx
* @param {*} lines
* @author: renchao
*/
saveJzx (lines) {
var jzxLines = [];
for (var i = 0; i < lines.length; i++) {
......@@ -526,6 +613,11 @@ export default {
// });
//保存空间数据表
},
/**
* @description: saveZRZ
* @param {*} graphic
* @author: renchao
*/
saveZRZ (graphic) {
var self = this;
var layer = null;
......@@ -559,7 +651,10 @@ export default {
});
}
},
//操作成功不需要跳转地图 (直接定位新导入的图形)
/**
* @description: 操作成功不需要跳转地图 (直接定位新导入的图形)
* @author: renchao
*/
goMap () {
var bsm = "", type = this.propertyInfo.type;
if (type == "zd") {
......@@ -574,7 +669,10 @@ export default {
//TODO 定位当前新导入的图形
this.addGeoByBsm(bsm, type, "testMap");
},
//取消
/**
* @description: 取消
* @author: renchao
*/
cancel () {
this.zdForm.zdBsm = "";
this.currentClickZd = null;
......@@ -582,14 +680,20 @@ export default {
// 清空当前图层上显示的图形
this.clearOverLayer();
},
//取消文本选择的弹出框
/**
* @description: 取消文本选择的弹出框
* @author: renchao
*/
cancelTxtForm () {
this.txtZd.name = "";
this.txtResultDialog = false;
// 清空当前图层上显示的图形
this.clearOverLayer();
},
//取消导入处理的结果
/**
* @description: 取消导入处理的结果
* @author: renchao
*/
cancelDealForm () {
this.dealForm.method = "";
this.dealDialog = false;
......@@ -597,7 +701,10 @@ export default {
// 清空当前图层上显示的图形
this.clearOverLayer();
},
//宗地选择发生改变
/**
* @description: 宗地选择发生改变
* @author: renchao
*/
zdChange (value) {
this.zdForm.zdBsm = value.XMMC;
this.currentClickZd = value;
......@@ -660,4 +767,4 @@ export default {
width: 100%;
text-align: center;
}
</style>
\ No newline at end of file
</style>
......
......@@ -605,7 +605,6 @@ export default {
}
});
},
//清空当前图层
/**
* @description: 清空当前图层
* @param {*} viewId
......