f43aad33 by 杨威

gis前端excel上传图形功能

1 parent a9de72a5
......@@ -149,9 +149,33 @@ export default {
debugger
},
excelFileSuccess(response, file, fileList){
var self = this;
if(response.success){
var result = response.result;
var points = [];
for(var i = 0;i < result.length;i++){
var point = [];
point[0] = parseFloat(result[i].x);
point[1] = parseFloat(result[i].y);
points.push(point);
}
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 geometry = {
rings:[[points]],
spatialReference:{
wkt:wkt
},
type:"polygon"
}
var graphic = {
attributes:null,
geometry:geometry
}
if(self.propertyInfo.type == "zd"){
self.saveZd(graphic);
}else{
self.saveZRZ(graphic);
}
}else{
this.$message.warning(response.message);
}
......
......@@ -171,7 +171,7 @@
},
methods: {
getData(bsm) {
queryjzd(bsm).then(res => {
queryjzd({glBsm:bsm}).then(res => {
for (let i = 0; i < res.result.length; i++) {
res.result[i]['isCheck'] = false;
res.result[i]['iszb'] = 'readonly';
......