-
-
-
搜索
-
+
+
+
+ {{runAgency.name}} {{">"}}
+
+ {{orgData.name}}
+
@@ -98,11 +106,9 @@ const vueGis = {
name: 'HomeMap',
data () {
return {
- method: "",//绘制方法
centerPoint: [],//中心点位置
zoom: 14,//缩放范围:区14
minZoom: 1,//最小缩放
- isMapLoaded: false,//地图是否加载完毕
orgData: {},//当前组织对象
orgId: '',
@@ -120,7 +126,11 @@ const vueGis = {
//下钻层级记录
runNum: 0,
- runAgency: [],
+ runAgency: [
+ {
+ name: '111'
+ }
+ ],
}
},
@@ -139,26 +149,8 @@ const vueGis = {
},
methods: {
- //查询
- handleSearch (index) {
-
- this.selAgencyIndex = index
-
- selectedFeatures.clear()
- if (index || index === 0) {
- this.showBtn = true
- this.selAgency = this.subAgencyArray[index]
- if (this.selAgency.coordinates) {
- this.hasPolygon = true
- this.highlightPolygon()
- } else {
- this.hasPolygon = false
- }
-
- } else {
- this.showBtn = false
- }
+ handleSearch () {
},
@@ -178,19 +170,6 @@ const vueGis = {
}
},
- //高亮某个标注
- highlightPolygon () {
-
- let features = polygonSource.getFeatures()
- features.forEach(element => {
-
- if (element.id_ === this.selAgencyId) {
-
- selectedFeatures.push(element)
- }
- });
-
- },
//返回上一级组织
handleBack () {
@@ -222,7 +201,6 @@ const vueGis = {
if (code === 0) {
this.orgData = data
- this.runAgency.push(data)
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children
@@ -310,24 +288,24 @@ const vueGis = {
//下钻到下一级
toSubAgency (e) {
console.log(e)
- if (this.method != 'mAddPolygon' && this.level != 'neighborHood') {
- //下钻到下一级
- this.subAgencyArray.forEach(item => {
- if (item.id === e.selected[0].id_) {
- this.selPolygonId = item.id
- this.selPolygon = item
- this.orgId = item.id
- this.orgLevel = item.level
- }
- });
+ //下钻到下一级
+ this.subAgencyArray.forEach(item => {
+ if (item.id === e.selected[0].id_) {
+ this.selPolygonId = item.id
+ this.selPolygon = item
+ this.orgId = item.id
+ this.orgLevel = item.level
+
+ }
+ });
+
+ this.runNum++
+ this.runAgency.push(this.selPolygon)
+ this.selAgencyIndex = 0
+ this.refreshMap(true)
- this.runNum++
- this.runAgency.push(this.selPolygon)
- this.selAgencyIndex = 0
- this.refreshMap(true)
- }
},
//设置地图定位的中心点和缩放级别
@@ -407,6 +385,7 @@ const vueGis = {
polygonSource = new VectorSource({
//features: (new GeoJSON()).readFeatures(geojsonObject)
});
+ debugger
polygonLayer = new VectorLayer({
source: polygonSource,
@@ -445,12 +424,6 @@ const vueGis = {
style: overlayStyle
});
- selectAltClick = new Select({
- condition: function (mapBrowserEvent) {
- return click(mapBrowserEvent) && altKeyOnly(mapBrowserEvent);
- },
- });
-
selectedFeatures = select.getFeatures();
map.addLayer(polygonLayer)
@@ -458,12 +431,10 @@ const vueGis = {
map.addInteraction(selectAltClick);
select.on('select', e => {
- this.selectFeature(e)
- });
- selectAltClick.on('select', e => {
this.toSubAgency(e)
});
+
},
@@ -527,7 +498,27 @@ const vueGis = {
export default vueGis;
-
+
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/modules/workSys/mapConfig.vue b/src/views/modules/workSys/mapConfig.vue
index 05a56381a..fdf19ef8c 100644
--- a/src/views/modules/workSys/mapConfig.vue
+++ b/src/views/modules/workSys/mapConfig.vue
@@ -735,7 +735,9 @@ export default vueGis;
.div_map {
width: 100%;
}
+
+
\ No newline at end of file
+
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
index 2601dc232..1d028ff35 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -3,7 +3,7 @@
*/
const IS_PROD = ['production', 'test'].includes(process.env.NODE_ENV)
module.exports = {
- baseUrl: process.env.NODE_ENV === 'production' ? '' : '/dist',
+ baseUrl: process.env.NODE_ENV === 'production' ? '' : '/epmet-oper',
css: {
// 是否使用css分离插件 ExtractTextPlugin
extract: IS_PROD,