|
@ -5,6 +5,7 @@ |
|
|
<div class="div_search"> |
|
|
<div class="div_search"> |
|
|
|
|
|
|
|
|
<el-select v-model="selAgencyId" |
|
|
<el-select v-model="selAgencyId" |
|
|
|
|
|
size="small" |
|
|
placeholder="请选择或点击区域选择"> |
|
|
placeholder="请选择或点击区域选择"> |
|
|
<el-option @click.native="orgChange(index)" |
|
|
<el-option @click.native="orgChange(index)" |
|
|
v-for="(item,index) in subAgencyArray" |
|
|
v-for="(item,index) in subAgencyArray" |
|
@ -15,21 +16,25 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
<div v-if="selAgencyId && subAgencyArray.length>0"> |
|
|
<div v-if="selAgencyId && subAgencyArray.length>0"> |
|
|
<el-button v-if="showBtn&&!hasPolygon" |
|
|
<el-button v-if="showBtn&&!hasPolygon" |
|
|
|
|
|
size="small" |
|
|
style="margin-left:10px" |
|
|
style="margin-left:10px" |
|
|
type="primary" |
|
|
type="primary" |
|
|
icon="el-icon-plus" |
|
|
icon="el-icon-plus" |
|
|
@click="handleAddPolygon">{{method==='mAddPolygon'?'取消绘制':'绘制区域'}}</el-button> |
|
|
@click="handleAddPolygon">{{method==='mAddPolygon'?'取消绘制':'绘制区域'}}</el-button> |
|
|
<el-button v-if="showBtn&&hasPolygon" |
|
|
<el-button v-if="showBtn&&hasPolygon" |
|
|
|
|
|
size="small" |
|
|
style="margin-left:10px" |
|
|
style="margin-left:10px" |
|
|
type="primary" |
|
|
type="primary" |
|
|
icon="el-icon-edit" |
|
|
icon="el-icon-edit" |
|
|
@click="handleEditPolygon">{{method==='mEditPolygon'?'取消绘制':'重新绘制'}}</el-button> |
|
|
@click="handleEditPolygon">{{method==='mEditPolygon'?'取消绘制':'重新绘制'}}</el-button> |
|
|
<el-button v-if="showBtn&&hasPolygon" |
|
|
<!-- <el-button v-if="showBtn&&hasPolygon" |
|
|
|
|
|
size="small" |
|
|
style="margin-left:10px" |
|
|
style="margin-left:10px" |
|
|
type="primary" |
|
|
type="primary" |
|
|
icon="el-icon-delete" |
|
|
icon="el-icon-delete" |
|
|
@click="handleDelPolygon">删除区域</el-button> |
|
|
@click="handleDelPolygon">删除区域</el-button> --> |
|
|
<el-button v-if="showBtn" |
|
|
<el-button v-if="showBtn" |
|
|
|
|
|
size="small" |
|
|
style="margin-left:10px" |
|
|
style="margin-left:10px" |
|
|
type="primary" |
|
|
type="primary" |
|
|
icon="el-icon-upload2" |
|
|
icon="el-icon-upload2" |
|
@ -42,7 +47,7 @@ |
|
|
<span v-if="showBtn&&hasPolygon"> 经度偏差:</span> |
|
|
<span v-if="showBtn&&hasPolygon"> 经度偏差:</span> |
|
|
<el-input v-if="showBtn&&hasPolygon" |
|
|
<el-input v-if="showBtn&&hasPolygon" |
|
|
resize="none" |
|
|
resize="none" |
|
|
size="mini" |
|
|
size="small" |
|
|
style="width:100px" |
|
|
style="width:100px" |
|
|
placeholder='请输入经度偏差' |
|
|
placeholder='请输入经度偏差' |
|
|
v-model="xOffset"> |
|
|
v-model="xOffset"> |
|
@ -50,7 +55,7 @@ |
|
|
<span v-if="showBtn&&hasPolygon"> 纬度偏差:</span> |
|
|
<span v-if="showBtn&&hasPolygon"> 纬度偏差:</span> |
|
|
<el-input v-if="showBtn&&hasPolygon" |
|
|
<el-input v-if="showBtn&&hasPolygon" |
|
|
resize="none" |
|
|
resize="none" |
|
|
size="mini" |
|
|
size="small" |
|
|
style="width:100px" |
|
|
style="width:100px" |
|
|
placeholder='请输入维度偏差' |
|
|
placeholder='请输入维度偏差' |
|
|
v-model="yOffset"> |
|
|
v-model="yOffset"> |
|
@ -59,7 +64,7 @@ |
|
|
<el-button v-if="showBtn&&hasPolygon" |
|
|
<el-button v-if="showBtn&&hasPolygon" |
|
|
style="margin-left:10px" |
|
|
style="margin-left:10px" |
|
|
type="primary" |
|
|
type="primary" |
|
|
size="mini" |
|
|
size="small" |
|
|
icon="el-icon-folder-add" |
|
|
icon="el-icon-folder-add" |
|
|
@click="handleOffsetOk">保存</el-button> |
|
|
@click="handleOffsetOk">保存</el-button> |
|
|
<!-- <el-button v-if="showBtn" |
|
|
<!-- <el-button v-if="showBtn" |
|
@ -238,7 +243,8 @@ const vueGis = { |
|
|
//手动录入弹出框 |
|
|
//手动录入弹出框 |
|
|
dialogVisible: false, |
|
|
dialogVisible: false, |
|
|
showOffset: false, |
|
|
showOffset: false, |
|
|
polygonManullyString: "POLYGON (( 120.33902844 36.10290786, 120.33928218 36.10292997, 120.33956336 36.10316381, 120.34016675 36.10367715, 120.34044913 36.10391476, 120.34045707 36.10392145, 120.34068696 36.10411489, 120.34103181 36.10436285, 120.34117309 36.10441824, 120.34134613 36.10447927, 120.34164715 36.10465122, 120.34124679 36.10507284, 120.34088128 36.10538902, 120.34076198 36.10549222, 120.34053890 36.10520966, 120.34044967 36.10507284, 120.34030632 36.10494761, 120.34019091 36.10484679, 120.33976558 36.10448095, 120.33966658 36.10439980, 120.33947147 36.10425822, 120.33932037 36.10417613, 120.33913002 36.10411307, 120.33895751 36.10406073, 120.33879451 36.10403693, 120.33864104 36.10403158, 120.33864031 36.10395235, 120.33863211 36.10305897, 120.33902175 36.10290728, 120.33902844 36.10290786))", |
|
|
// polygonManullyString: "POLYGON (( 120.33902844 36.10290786, 120.33928218 36.10292997, 120.33956336 36.10316381, 120.34016675 36.10367715, 120.34044913 36.10391476, 120.34045707 36.10392145, 120.34068696 36.10411489, 120.34103181 36.10436285, 120.34117309 36.10441824, 120.34134613 36.10447927, 120.34164715 36.10465122, 120.34124679 36.10507284, 120.34088128 36.10538902, 120.34076198 36.10549222, 120.34053890 36.10520966, 120.34044967 36.10507284, 120.34030632 36.10494761, 120.34019091 36.10484679, 120.33976558 36.10448095, 120.33966658 36.10439980, 120.33947147 36.10425822, 120.33932037 36.10417613, 120.33913002 36.10411307, 120.33895751 36.10406073, 120.33879451 36.10403693, 120.33864104 36.10403158, 120.33864031 36.10395235, 120.33863211 36.10305897, 120.33902175 36.10290728, 120.33902844 36.10290786))", |
|
|
|
|
|
polygonManullyString: "", |
|
|
polygonStringResult: '', |
|
|
polygonStringResult: '', |
|
|
|
|
|
|
|
|
xOffset: 0, |
|
|
xOffset: 0, |
|
@ -750,11 +756,11 @@ const vueGis = { |
|
|
|
|
|
|
|
|
tempArray.forEach((element, index) => { |
|
|
tempArray.forEach((element, index) => { |
|
|
let aaa = 0 |
|
|
let aaa = 0 |
|
|
debugger |
|
|
|
|
|
if (index % 2 === 0) {//偶数 |
|
|
if (index % 2 === 0) {//偶数 |
|
|
aaa = parseFloat(element) + this.xOffset |
|
|
aaa = parseFloat(element) + parseFloat(this.xOffset) |
|
|
} else { |
|
|
} else { |
|
|
aaa = parseFloat(element) + this.yOffset |
|
|
aaa = parseFloat(element) + parseFloat(this.yOffset) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (index % 2 !== 0) {//奇数 |
|
|
if (index % 2 !== 0) {//奇数 |
|
|