|
|
|
|
@ -6,15 +6,23 @@
|
|
|
|
|
<span>在册人员:{{ totalPerson }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tabs">
|
|
|
|
|
<div :class="!addCur?'tabcur':''" @click="changeMask(1)">抢险队伍</div>
|
|
|
|
|
<div :class="activeTab === 'teams' ? 'tabcur' : ''" @click="changeMask('teams')">抢险队伍</div>
|
|
|
|
|
|
|
|
|
|
<div :class="addCur?'tabcur':''">
|
|
|
|
|
<div
|
|
|
|
|
v-for="item in chubeileixingList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:class="String(activeTab) === String(item.id) ? 'tabcur' : ''"
|
|
|
|
|
>
|
|
|
|
|
<el-dropdown :show-timeout="100" @command="clickQuyu">
|
|
|
|
|
<span class="el-dropdown-link" @click="changeMask(2)">
|
|
|
|
|
防汛仓库<i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
|
<span class="el-dropdown-link" @click="selectChubeileixingTab(item)">
|
|
|
|
|
{{ item.value }}<i class="el-icon-arrow-down el-icon--right" />
|
|
|
|
|
</span>
|
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
|
<el-dropdown-item v-for="item in areaList" :command="item.id">{{ item.value }}</el-dropdown-item>
|
|
|
|
|
<el-dropdown-item
|
|
|
|
|
v-for="area in areaList"
|
|
|
|
|
:key="area.id"
|
|
|
|
|
:command="{ areaId: area.id, chubeileixingId: item.id }"
|
|
|
|
|
>{{ area.value }}</el-dropdown-item>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</el-dropdown>
|
|
|
|
|
</div>
|
|
|
|
|
@ -94,13 +102,15 @@ export default {
|
|
|
|
|
storages: []
|
|
|
|
|
},
|
|
|
|
|
areaList: [],
|
|
|
|
|
chubeileixingList: [],
|
|
|
|
|
activeTab: 'teams',
|
|
|
|
|
currentChubeileixing: '',
|
|
|
|
|
infoWindow: null,
|
|
|
|
|
openData: [],
|
|
|
|
|
materList: [],
|
|
|
|
|
quyu_id: '',
|
|
|
|
|
loading: true,
|
|
|
|
|
total: 0,
|
|
|
|
|
addCur: false,
|
|
|
|
|
loadingFull: null,
|
|
|
|
|
myicon:require('@/assets/icon1.png'),
|
|
|
|
|
table: [{
|
|
|
|
|
@ -222,10 +232,11 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getArea() {
|
|
|
|
|
getparameteritem('area').then(res => {
|
|
|
|
|
this.areaList = res.detail
|
|
|
|
|
})
|
|
|
|
|
async getArea() {
|
|
|
|
|
const areaRes = await getparameteritem('area')
|
|
|
|
|
this.areaList = areaRes.detail || []
|
|
|
|
|
const chubeiRes = await getparameteritem('ck_chubeileixing')
|
|
|
|
|
this.chubeileixingList = chubeiRes.detail || []
|
|
|
|
|
},
|
|
|
|
|
initHeight() {
|
|
|
|
|
const winHeight = document.body.clientHeight
|
|
|
|
|
@ -257,14 +268,20 @@ export default {
|
|
|
|
|
// this.setMapMarker()
|
|
|
|
|
},
|
|
|
|
|
changeMask(type) {
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
this.addCur = false
|
|
|
|
|
if (type === 'teams') {
|
|
|
|
|
this.activeTab = 'teams'
|
|
|
|
|
this.currentChubeileixing = ''
|
|
|
|
|
this.setMapMarker('teams', this.makerObj.teams)
|
|
|
|
|
} else if (type == 2) {
|
|
|
|
|
this.addCur = true
|
|
|
|
|
this.quyu_id = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectChubeileixingTab(item) {
|
|
|
|
|
this.activeTab = String(item.id)
|
|
|
|
|
this.currentChubeileixing = item.id
|
|
|
|
|
if (this.quyu_id) {
|
|
|
|
|
this.getStorages()
|
|
|
|
|
// this.setMapMarker("storages", this.makerObj.storages)
|
|
|
|
|
} else {
|
|
|
|
|
this.makerObj.storages = []
|
|
|
|
|
this.setMapMarker('storages', [])
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getTeams() {
|
|
|
|
|
@ -296,12 +313,16 @@ export default {
|
|
|
|
|
this.loadingFull.close()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
clickQuyu(e) {
|
|
|
|
|
console.log('e', e)
|
|
|
|
|
this.quyu_id = e
|
|
|
|
|
clickQuyu({ areaId, chubeileixingId }) {
|
|
|
|
|
this.activeTab = String(chubeileixingId)
|
|
|
|
|
this.currentChubeileixing = chubeileixingId
|
|
|
|
|
this.quyu_id = areaId
|
|
|
|
|
this.getStorages()
|
|
|
|
|
},
|
|
|
|
|
async getStorages() {
|
|
|
|
|
if (!this.quyu_id || !this.currentChubeileixing) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.loadingFull = this.$loading({
|
|
|
|
|
lock: true,
|
|
|
|
|
text: '',
|
|
|
|
|
@ -309,30 +330,36 @@ export default {
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
})
|
|
|
|
|
this.makerObj.storages = []
|
|
|
|
|
await index({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 9999,
|
|
|
|
|
table_name: 'materialstorages',
|
|
|
|
|
filter: [{
|
|
|
|
|
key: 'quyu_id',
|
|
|
|
|
op: 'eq',
|
|
|
|
|
value: this.quyu_id
|
|
|
|
|
}]
|
|
|
|
|
}).then(res => {
|
|
|
|
|
const markers = []
|
|
|
|
|
if (res.data.length < 1) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
res.data.map(item => {
|
|
|
|
|
this.makerObj.storages.push({
|
|
|
|
|
type: 'storages',
|
|
|
|
|
name: item.cangkumingcheng,
|
|
|
|
|
...item
|
|
|
|
|
})
|
|
|
|
|
try {
|
|
|
|
|
const res = await index({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 9999,
|
|
|
|
|
table_name: 'materialstorages',
|
|
|
|
|
filter: [{
|
|
|
|
|
key: 'quyu_id',
|
|
|
|
|
op: 'eq',
|
|
|
|
|
value: this.quyu_id
|
|
|
|
|
}, {
|
|
|
|
|
key: 'chubeileixing',
|
|
|
|
|
op: 'eq',
|
|
|
|
|
value: this.currentChubeileixing
|
|
|
|
|
}]
|
|
|
|
|
})
|
|
|
|
|
if (res.data && res.data.length > 0) {
|
|
|
|
|
res.data.forEach(item => {
|
|
|
|
|
this.makerObj.storages.push({
|
|
|
|
|
type: 'storages',
|
|
|
|
|
name: item.cangkumingcheng,
|
|
|
|
|
...item
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.setMapMarker('storages', this.makerObj.storages)
|
|
|
|
|
this.loadingFull.close()
|
|
|
|
|
})
|
|
|
|
|
} finally {
|
|
|
|
|
if (this.loadingFull) {
|
|
|
|
|
this.loadingFull.close()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getMater(id) {
|
|
|
|
|
const res = await index({
|
|
|
|
|
|