Browse Source

地图配置bug修改

feature
jiangyy 4 years ago
parent
commit
b49dbe72e0
  1. 1
      src/views/modules/base/community/buildForm.vue
  2. 1
      src/views/modules/base/community/buildTable.vue
  3. 4
      src/views/modules/base/community/communityForm.vue
  4. 1
      src/views/modules/base/community/communityTable.vue
  5. 42
      src/views/modules/workSys/mapConfig.vue

1
src/views/modules/base/community/buildForm.vue

@ -277,6 +277,7 @@ export default {
this.setMarker(lat, lng)
},
resetData () {
this.keyWords = ''
this.buildingId = '' //ID
this.dataForm = {
agencyId: '', // ID

1
src/views/modules/base/community/buildTable.vue

@ -207,6 +207,7 @@ export default {
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},

4
src/views/modules/base/community/communityForm.vue

@ -126,8 +126,7 @@
label-width="150px"
style="display: block">
<el-input class="item_width_1"
maxlength="50"
show-word-limit
maxlength="10"
placeholder="请输入小区名称"
v-model="propertyForm.name">
</el-input>
@ -401,6 +400,7 @@ export default {
}
},
resetData () {
this.keyWords = ''
this.neighborHoodId = '' //ID
this.dataForm = {
neighborHoodName: '', // 50

1
src/views/modules/base/community/communityTable.vue

@ -214,6 +214,7 @@ export default {
},
diaClose () {
this.$refs.ref_form.resetData()
this.formShow = false
},

42
src/views/modules/workSys/mapConfig.vue

@ -22,11 +22,11 @@
type="primary"
icon="el-icon-edit"
@click="handleEditPolygon">{{method==='mEditPolygon'?'取消绘制':'重新绘制'}}</el-button>
<el-button v-if="showBtn&&hasPolygon"
<!-- <el-button v-if="showBtn&&hasPolygon"
style="margin-left:10px"
type="primary"
icon="el-icon-delete"
@click="handleDelPolygon">删除区域</el-button>
@click="handleDelPolygon">删除区域</el-button> -->
</div>
<div class="div_back">
@ -47,9 +47,6 @@
<script>
import 'ol/ol.css'
import { Map, View } from 'ol'
import { ZoomSlider, Zoom } from 'ol/control.js';
import ImageLayer from 'ol/layer/Image.js';
import Static from 'ol/source/ImageStatic.js';
import TileLayer from 'ol/layer/Tile.js';
import XYZ from 'ol/source/XYZ.js';
import VectorLayer from 'ol/layer/Vector.js';
@ -64,7 +61,6 @@ import Draw from 'ol/interaction/Draw.js';
import { mapGetters } from "vuex";
import { Loading } from 'element-ui'; //Loading
import { requestPost } from "@/js/dai/request";
import { transform } from 'ol/proj'
import { altKeyOnly, click, pointerMove } from 'ol/events/condition';
@ -192,7 +188,7 @@ const vueGis = {
},
//
// isRefreshView:
async refreshMap (isRefreshView) {
//
await this.loadOrgData()
@ -326,7 +322,9 @@ const vueGis = {
//feature
selectFeature (e) {
console.log(e)
// console.log(e)
if (this.method === undefined || this.method === '') {
this.selAgencyId = e.selected[0].id_
this.subAgencyArray.forEach((element, index) => {
if (element.id === e.selected[0].id_) {
@ -335,11 +333,13 @@ const vueGis = {
}
});
}
},
//
toSubAgency (e) {
console.log(e)
if (this.method != 'mAddPolygon' && this.level != 'neighborHood') {
//
this.subAgencyArray.forEach(item => {
@ -580,6 +580,7 @@ const vueGis = {
type: "Polygon"
});
map.addInteraction(draw);
draw.on('drawend', feature => {
this.polygonCoor = feature.feature.values_.geometry.flatCoordinates
@ -590,10 +591,28 @@ const vueGis = {
if (this.polygonCoor.length > 0) {
coorString = coorString.substring(0, coorString.length - 1)
}
console.log(coorString)
if (this.method === 'mEditPolygon') {
this.$confirm("是否确认覆盖原有区域?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.addPolygon(coorString)
})
.catch(err => {
this.loadPolygon(this.subAgencyArray)
});
} else {
this.addPolygon(coorString)
}
this.method = ""
map.removeInteraction(draw);
this.addPolygon(coorString)
});
},
@ -625,6 +644,7 @@ const vueGis = {
},
//
async delPolygon () {
const url = "/gov/org/agency/mapdelarea"

Loading…
Cancel
Save