Browse Source

房屋调整

shibei_master
jiangyy 3 years ago
parent
commit
30c0b1fa32
  1. 4
      src/views/modules/base/community/community.vue
  2. 40
      src/views/modules/visual/components/screen-map/index.vue

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

@ -269,7 +269,7 @@ export default {
await this.loadOrgData() await this.loadOrgData()
await this.loadTree() await this.loadTree()
await this.loadOpenNode() // await this.loadOpenNode()
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj)
if (this.treeData.length > 0) { if (this.treeData.length > 0) {
@ -347,6 +347,8 @@ export default {
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
this.openNodes = []
this.openNodes.push(data[0].id)
this.treeData = data this.treeData = data
if (!isRefresh && data.length > 0) { if (!isRefresh && data.length > 0) {

40
src/views/modules/visual/components/screen-map/index.vue

@ -32,7 +32,7 @@
class="ol-popup-closer"></a> class="ol-popup-closer"></a>
<div id="popup-content" <div id="popup-content"
class="popup-content"></div> class="popup-content"></div>
<a href="#" <a href="#"
id="popup-goMore" id="popup-goMore"
class="popup-goMore">更多>>>></a> class="popup-goMore">更多>>>></a>
</div> </div>
@ -107,9 +107,9 @@ let polygonColorArray = [
'rgba(183, 185, 0, 0.16)' 'rgba(183, 185, 0, 0.16)'
]; ];
//icon //icon
let createTextStyle = function (feature) { let createTextStyle = function (feature) {
if (iconTextsStyle) { if (iconTextsStyle) {
let iconTextsStyles = { ...iconTextsStyle } let iconTextsStyles = { ...iconTextsStyle }
iconTextsStyles.text = feature.values_ && feature.values_.name || feature.name iconTextsStyles.text = feature.values_ && feature.values_.name || feature.name
@ -224,11 +224,11 @@ const vueGis = {
// iconArrays.forEach(item => { // iconArrays.forEach(item => {
// console.log(item.type, item.urlIndex, item.latitude, item.longitude) // console.log(item.type, item.urlIndex, item.latitude, item.longitude)
// }); // });
// //
this.initMap() this.initMap()
if (this.showPolIconLayer) { if (this.showPolIconLayer) {
console.log('showPolIconLayer++++++++++++++++++++++', this.showPolIconLayer) console.log('showPolIconLayer++++++++++++++++++++++', this.showPolIconLayer)
// //
@ -242,7 +242,7 @@ const vueGis = {
// //
this.loadPolygon() this.loadPolygon()
} }
if (this.showIconLayer) { if (this.showIconLayer) {
//icon //icon
@ -262,14 +262,14 @@ const vueGis = {
// //
async refreshMap (mapInfo, polygonArray, iconArrays) { async refreshMap (mapInfo, polygonArray, iconArrays) {
this.mapInfo = mapInfo this.mapInfo = mapInfo
this.polygonArray = [] this.polygonArray = []
this.polygonArray = polygonArray this.polygonArray = polygonArray
this.iconArrays = iconArrays this.iconArrays = iconArrays
iconSource.clear() iconSource.clear()
polygonSource.clear() polygonSource.clear()
polIconSource.clear() polIconSource.clear()
this.initPolIconLayer() this.initPolIconLayer()
if (this.showPolygonLayer) { if (this.showPolygonLayer) {
this.initPolygonLayer() this.initPolygonLayer()
// //
@ -287,7 +287,7 @@ const vueGis = {
} }
this.setMapLocation() this.setMapLocation()
// gaodeMapLayer.getSource().changed() // gaodeMapLayer.getSource().changed()
}, },
// //
@ -305,7 +305,7 @@ const vueGis = {
oneData = { oneData = {
type: 'Feature', type: 'Feature',
properties: { ...polygonItem }, properties: { ...polygonItem },
geometry: { geometry: {
type: 'Polygon', type: 'Polygon',
@ -345,7 +345,7 @@ const vueGis = {
if (this.showPolIconLayer) { if (this.showPolIconLayer) {
this.loadPolIcon(feature) this.loadPolIcon(feature)
} }
} }
@ -549,9 +549,9 @@ const vueGis = {
} }
mapView.setZoom(this.zoom); mapView.setZoom(this.zoom);
}, },
firstCentermap() { firstCentermap () {
if (this.mapInfo.longitude && this.mapInfo.latitude) { if (this.mapInfo.longitude && this.mapInfo.latitude) {
this.centerPoint = [] this.centerPoint = []
this.centerPoint.push(this.mapInfo.longitude) this.centerPoint.push(this.mapInfo.longitude)
@ -743,14 +743,14 @@ const vueGis = {
this.overlay.getElement().parentNode.parentNode.style.display = 'block' this.overlay.getElement().parentNode.parentNode.style.display = 'block'
content.innerHTML = showData; content.innerHTML = showData;
this.overlay.setPosition(coordinate); this.overlay.setPosition(coordinate);
// overlay x,y // overlay x,y
}, },
// //
handleClosePopup() { handleClosePopup () {
this.overlay.setPosition(undefined); this.overlay.setPosition(undefined);
document.getElementById("popup-closer").blur(); document.getElementById("popup-closer").blur();
return false; return false;
}, },
// //
@ -895,7 +895,7 @@ export default vueGis;
.popup-content { .popup-content {
width: 300px; width: 300px;
} }
.popup-goMore{ .popup-goMore {
margin: 20px 0; margin: 20px 0;
} }
.ol-popup-closer:after { .ol-popup-closer:after {

Loading…
Cancel
Save