|
|
|
|
@ -2,8 +2,18 @@
|
|
|
|
|
<div>
|
|
|
|
|
<div class="map" id="map" :style="{'height':mapHeight+'px'}">
|
|
|
|
|
<div class="tabs">
|
|
|
|
|
<div :class="!addCur?'tabcur':''" @click="changeMask(1)">抢险队伍</div>
|
|
|
|
|
<div :class="addCur?'tabcur':''" @click="changeMask(2)">防汛仓库</div>
|
|
|
|
|
<div :class="!addCur?'tabcur':''" @click="changeMask(1)">抢险队伍</div>
|
|
|
|
|
|
|
|
|
|
<div :class="addCur?'tabcur':''">
|
|
|
|
|
<el-dropdown @command="clickQuyu" :show-timeout="100" >
|
|
|
|
|
<span class="el-dropdown-link" @click="changeMask(2)">
|
|
|
|
|
防汛仓库<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
|
</span>
|
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
|
<el-dropdown-item v-for="item in areaList" :command="item.id">{{item.value}}</el-dropdown-item>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</el-dropdown>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div ref='infoWindow' id="infoWindow">
|
|
|
|
|
@ -62,7 +72,10 @@
|
|
|
|
|
import {
|
|
|
|
|
index,
|
|
|
|
|
destroy
|
|
|
|
|
} from "@/api/system/baseForm.js"
|
|
|
|
|
} from "@/api/system/baseForm.js"
|
|
|
|
|
import {
|
|
|
|
|
getparameteritem
|
|
|
|
|
} from "@/api/system/dictionary.js"
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
@ -74,10 +87,12 @@
|
|
|
|
|
makerObj: {
|
|
|
|
|
teams: [],
|
|
|
|
|
storages: []
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
areaList:[],
|
|
|
|
|
infoWindow: null,
|
|
|
|
|
openData: [],
|
|
|
|
|
materList: [],
|
|
|
|
|
materList: [],
|
|
|
|
|
quyu_id:'',
|
|
|
|
|
loading: true,
|
|
|
|
|
total: 0,
|
|
|
|
|
addCur: false,
|
|
|
|
|
@ -205,13 +220,19 @@
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
created() {
|
|
|
|
|
this.getArea()
|
|
|
|
|
this.initHeight()
|
|
|
|
|
this.$nextTick(function() {
|
|
|
|
|
this.mapInit()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
methods: {
|
|
|
|
|
getArea(){
|
|
|
|
|
getparameteritem("area").then(res=>{
|
|
|
|
|
this.areaList = res.detail
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
initHeight() {
|
|
|
|
|
let winHeight = document.body.clientHeight
|
|
|
|
|
this.mapHeight = winHeight - 50 - 20
|
|
|
|
|
@ -239,7 +260,7 @@
|
|
|
|
|
offset: new AMap.Pixel(-10, -10)
|
|
|
|
|
})
|
|
|
|
|
this.getTeams()
|
|
|
|
|
this.getStorages()
|
|
|
|
|
// this.getStorages()
|
|
|
|
|
// this.setMapMarker()
|
|
|
|
|
},
|
|
|
|
|
changeMask(type) {
|
|
|
|
|
@ -247,8 +268,10 @@
|
|
|
|
|
this.addCur = false
|
|
|
|
|
this.setMapMarker("teams", this.makerObj.teams)
|
|
|
|
|
} else if (type == 2) {
|
|
|
|
|
this.addCur = true
|
|
|
|
|
this.setMapMarker("storages", this.makerObj.storages)
|
|
|
|
|
this.addCur = true
|
|
|
|
|
this.quyu_id = ''
|
|
|
|
|
this.getStorages()
|
|
|
|
|
// this.setMapMarker("storages", this.makerObj.storages)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getTeams() {
|
|
|
|
|
@ -268,14 +291,32 @@
|
|
|
|
|
...item
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
this.setMapMarker("teams", this.makerObj.teams)
|
|
|
|
|
this.setMapMarker("teams", this.makerObj.teams)
|
|
|
|
|
this.loadingFull.close();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
clickQuyu(e){
|
|
|
|
|
console.log("e",e)
|
|
|
|
|
this.quyu_id = e
|
|
|
|
|
this.getStorages()
|
|
|
|
|
},
|
|
|
|
|
async getStorages() {
|
|
|
|
|
async getStorages() {
|
|
|
|
|
this.loadingFull = this.$loading({
|
|
|
|
|
lock: true,
|
|
|
|
|
text: '',
|
|
|
|
|
spinner: 'el-icon-loading',
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
});
|
|
|
|
|
this.makerObj.storages = []
|
|
|
|
|
await index({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 9999,
|
|
|
|
|
table_name: 'flood_storages'
|
|
|
|
|
table_name: 'flood_storages',
|
|
|
|
|
filter: [{
|
|
|
|
|
key:'quyu_id',
|
|
|
|
|
op:'eq',
|
|
|
|
|
value:this.quyu_id
|
|
|
|
|
}],
|
|
|
|
|
}).then(res => {
|
|
|
|
|
let markers = []
|
|
|
|
|
if (res.data.length < 1) {
|
|
|
|
|
@ -288,6 +329,7 @@
|
|
|
|
|
...item
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
this.setMapMarker("storages", this.makerObj.storages)
|
|
|
|
|
this.loadingFull.close();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
@ -363,7 +405,7 @@
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.tabs {
|
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 99;
|
|
|
|
|
@ -379,7 +421,11 @@
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-dropdown{
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
.tabs>div:first-child {
|
|
|
|
|
border-radius: 20px 0 0 20px;
|
|
|
|
|
|
|
|
|
|
@ -393,6 +439,10 @@
|
|
|
|
|
.tabs>div.tabcur {
|
|
|
|
|
background: #0077CC;
|
|
|
|
|
color: #fff
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .tabs>div.tabcur .el-dropdown{
|
|
|
|
|
color: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#infoWindow {
|
|
|
|
|
@ -439,7 +489,7 @@
|
|
|
|
|
width: 50%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/deep/ #infoWindow .el-icon-close {
|
|
|
|
|
::v-deep #infoWindow .el-icon-close {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 5px;
|
|
|
|
|
right: 5px;
|
|
|
|
|
|