Browse Source

Merge branch 'dev_shequzhili'

shibei_master
jiangyy 3 years ago
parent
commit
467f97617e
  1. 24
      src/assets/scss/modules/visual/search_1.scss
  2. 11
      src/views/modules/visual/basicinfo/personCategory/index.vue
  3. 11
      src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue
  4. 5
      src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue
  5. 77
      src/views/modules/visual/components/screen-map/index.vue

24
src/assets/scss/modules/visual/search_1.scss

@ -81,6 +81,30 @@
} }
} }
} }
.range-data2 {
::v-deep .el-date-editor {
width: 360px;
position: relative;
.el-range-input {
color: #fff;
background: #06186d;
margin-left: 10px;
}
.el-range-separator {
color: #fff;
}
.el-range__icon {
position: absolute;
right: 5px;
// float: right;
}
.el-input__prefix {
left: unset;
right: 5px;
}
}
}
.one-date{ .one-date{
::v-deep .el-date-editor { ::v-deep .el-date-editor {

11
src/views/modules/visual/basicinfo/personCategory/index.vue

@ -22,6 +22,7 @@
<img src="@/assets/img/shuju/title-tip.png" /> <img src="@/assets/img/shuju/title-tip.png" />
<span>人员类别分析</span> <span>人员类别分析</span>
<div class="search">
<div class="second-select cascader"> <div class="second-select cascader">
<el-cascader class="customer_cascader" <el-cascader class="customer_cascader"
@ -33,7 +34,7 @@
:show-all-levels="false" :show-all-levels="false"
@change="handleChangeAgency"></el-cascader> @change="handleChangeAgency"></el-cascader>
</div> </div>
<div class="second-select "> <div class="second-select range-data2">
<el-date-picker v-model="dateIdShow" <el-date-picker v-model="dateIdShow"
type="date" type="date"
@ -47,6 +48,7 @@
</div> </div>
</div> </div>
</div>
<el-scrollbar style="width: 100%"> <el-scrollbar style="width: 100%">
<div class="warning-box-top"> <div class="warning-box-top">
<div class="top-item" <div class="top-item"
@ -308,3 +310,10 @@ export default {
scoped scoped
></style> ></style>
<style
lang="scss"
src="@/assets/scss/modules/visual/search_1.scss"
scoped
></style>

11
src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue

@ -447,11 +447,11 @@ export default {
// //
loadMap () { loadMap () {
if (this.isfirstInit) { if (this.isfirstInit) {
this.agencyInfo.level = 'agency' // this.agencyInfo.level = 'agency'
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray //mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, this.polygonList, null, this.distributionsList, this.iconUrlArray, null) this.$refs.map.loadMap(this.agencyInfo, this.polygonList, null, this.distributionsList, this.iconUrlArray, null)
} else { } else {
this.$refs.map.refreshMap(this.polygonList, this.distributionsList) this.$refs.map.refreshMap(this.agencyInfo, this.polygonList, this.distributionsList, false)
} }
}, },
@ -613,6 +613,9 @@ export default {
if (!this.agencyInfo.level) { if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street' this.agencyInfo.level = 'street'
} }
if (!this.agencyInfo.agencyLevel) {
this.agencyInfo.agencyLevel = 'street'
}
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
@ -705,7 +708,7 @@ export default {
color: #fff; color: #fff;
} }
.card-left-title::after { .card-left-title::after {
content: ''; content: "";
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 20px; left: 20px;
@ -713,7 +716,7 @@ export default {
height: 12px; height: 12px;
box-sizing: border-box; box-sizing: border-box;
margin-top: -6px; margin-top: -6px;
background: #2865FA; background: #2865fa;
border-radius: 50%; border-radius: 50%;
} }
.card-wr-map { .card-wr-map {

5
src/views/modules/visual/communityGovern/shijianchuli/shijianchulifenxi.vue

@ -635,11 +635,10 @@ export default {
} }
}; };
element.selected = !element.selected // element.selected = !element.selected
isSelected = element.selected // isSelected = element.selected
} else { } else {
element.selected = false element.selected = false
element.label = { element.label = {
show: false, show: false,

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

@ -200,7 +200,9 @@ const vueGis = {
distanceMax: null,// distanceMax: null,//
input_lat: null, input_lat: null,
input_lon: null input_lon: null,
isChangeCenter: true,//
} }
}, },
async mounted () { async mounted () {
@ -228,7 +230,6 @@ const vueGis = {
// //
this.initMap() this.initMap()
if (this.showPolIconLayer) { if (this.showPolIconLayer) {
console.log('showPolIconLayer++++++++++++++++++++++', this.showPolIconLayer) console.log('showPolIconLayer++++++++++++++++++++++', this.showPolIconLayer)
// //
@ -259,15 +260,22 @@ const vueGis = {
}, },
// //:
async refreshMap (mapInfo, polygonArray, iconArrays) { async refreshMap (mapInfo, polygonArray, iconArrays, isChangeCenter) {
this.mapInfo = mapInfo this.mapInfo = mapInfo
this.polygonArray = [] this.polygonArray = []
this.polygonArray = polygonArray this.polygonArray = polygonArray
this.iconArrays = iconArrays this.iconArrays = iconArrays
this.isChangeCenter = isChangeCenter
if (iconSource) {
iconSource.clear() iconSource.clear()
}
if (polygonSource) {
polygonSource.clear() polygonSource.clear()
}
if (polIconSource) {
polIconSource.clear() polIconSource.clear()
}
this.initPolIconLayer() this.initPolIconLayer()
if (this.showPolygonLayer) { if (this.showPolygonLayer) {
@ -287,7 +295,6 @@ const vueGis = {
} }
this.setMapLocation() this.setMapLocation()
// gaodeMapLayer.getSource().changed() // gaodeMapLayer.getSource().changed()
}, },
// //
@ -545,10 +552,56 @@ const vueGis = {
} else { } else {
mapView.setCenter(this.centerPoint); mapView.setCenter(this.centerPoint);
}
if (!this.isChangeCenter) {
return false
} }
mapView.setZoom(this.zoom); // debugger
if (!this.zoom) {
this.setZoom(this.mapInfo.agencyLevel)
}
this.centerPoint = []
//
if (this.center && this.center.length > 0) {
this.centerPoint = this.center
this.centerFlag = 'point'
this.center = []
} else if (polygonLayer.getSource().getFeatures()[0]) {//,
this.centerFlag = 'flag_polygon'
this.centerPoint.push(this.mapInfo.longitude)
this.centerPoint.push(this.mapInfo.latitude)
} else if (this.mapInfo.longitude && this.mapInfo.latitude) {
this.centerPoint.push(this.mapInfo.longitude)
this.centerPoint.push(this.mapInfo.latitude)
this.centerFlag = 'point'
} else {
this.centerPoint = centerPointGlobal
this.centerFlag = 'point'
}
// debugger
if (this.centerFlag === 'flag_parent') {
let parentFeatures = parentLayer.getSource().getFeatures()[0]
let polygon = parentFeatures.getGeometry();
map.getView().fit(polygon, map.getSize());
this.zoom = map.getView().getZoom() - 1
} else if (this.centerFlag === 'flag_polygon') {
let polygonFeatures = polygonLayer.getSource().getFeatures()[0]
let polygon = polygonFeatures.getGeometry();
map.getView().fit(polygon, map.getSize());
this.zoom = map.getView().getZoom() - 1
} else {
mapView.setCenter(this.centerPoint);
}
mapView.setZoom(this.zoom);
}, },
firstCentermap () { firstCentermap () {
@ -608,7 +661,7 @@ const vueGis = {
}) })
}), }),
new Style({ new Style({
// text: createTextStyle(feature) // zty 2022.05.19 // text: createTextStyle(feature) // zhaotongyao 2022.05.19
}) })
]; ];
styles['MultiPolygon'] = styles['Polygon']; styles['MultiPolygon'] = styles['Polygon'];
@ -616,13 +669,13 @@ const vueGis = {
}; };
})(); })();
select = new Select({ // select = new Select({
style: overlayStyle // style: overlayStyle
}); // });
// BUG iconicon使icon ---zhaotongyao 2022.06.01
map.addLayer(polygonLayer) map.addLayer(polygonLayer)
map.addInteraction(select); // map.addInteraction(select);
}, },

Loading…
Cancel
Save