<template>
|
<div>
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane v-for="(item,index) in topicList" :key="index" :label="item.name" :name="item.name"></el-tab-pane>
|
</el-tabs>
|
<div>
|
<component :is="gcComp" :PollutionSourcetableDataList="PollutionSourcetableDataList" v-if="PollutionSourcetableDataList"
|
:WasteWatertableDataList="WasteWatertableDataList"
|
:WasteGastableDataList="WasteGastableDataList"
|
:SolidWastetableDataList="SolidWastetableDataList"
|
:EnvironmentalRisktableDataList="EnvironmentalRisktableDataList"
|
></component>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
|
import WasteWater from '@components/table/components/WasteWater'
|
import SoilGroundwater from '@components/table/components/SoilGroundwater'
|
import WasteGas from '@components/table/components/WasteGas'
|
import SolidWaste from '@components/table/components/WasteSolid'
|
import PollutionSource from '@components/table/components/PollutionSource'
|
import EnvironmentalRisk from '@components/table/components/EnvironmentalRisk'
|
import mapApi from '@/api/mapApi'
|
|
import { TopicList } from '../../../conf/Topic'
|
export default {
|
name: 'tabHandover',
|
components: {
|
WasteWater,
|
// WasteGas,
|
// SoilGroundwater,
|
SolidWaste,
|
PollutionSource,
|
EnvironmentalRisk
|
},
|
data () {
|
return {
|
titleProp: '',
|
activeName: '污染源',
|
topicList: TopicList, // tab项
|
gcComp: PollutionSource, // 默认显示污染源内容
|
PollutionSourcetableDataList: null, // 污染源统计数据
|
WasteWatertableDataList: null, // 废水统计数据
|
WasteGastableDataList: null, // 废气统计数据
|
SolidWastetableDataList: null, // 固废统计数据
|
EnvironmentalRisktableDataList: null // 环境风险源统计数据
|
}
|
},
|
mounted () {
|
this.getStatisticsData(this.activeName)
|
},
|
methods: {
|
refsDatatitle (item) {
|
this.titleProp = item
|
},
|
async getStatisticsData (obj) {
|
switch (obj) {
|
case '污染源':
|
this.PollutionSourcetableDataList = await mapApi.getPollutionSourceStatistics()
|
break
|
case '废水':
|
this.WasteWatertableDataList = await mapApi.getWasteWaterStatistics()
|
break
|
case '废气':
|
this.WasteGastableDataList = await mapApi.getWasteGasStatistics()
|
break
|
case '固废':
|
this.SolidWastetableDataList = await mapApi.getSolidWasteStatistics()
|
break
|
case '环境风险':
|
this.EnvironmentalRisktableDataList = await mapApi.getEnvironmentalRiskStatistics()
|
break
|
}
|
},
|
handleClick (tab, event) {
|
switch (tab.label) {
|
case '污染源':
|
this.gcComp = PollutionSource
|
this.getStatisticsData('污染源')
|
break
|
case '废水':
|
this.gcComp = WasteWater
|
this.getStatisticsData('废水')
|
break
|
case '废气':
|
this.gcComp = WasteGas
|
this.getStatisticsData('废气')
|
break
|
case '固废':
|
this.gcComp = SolidWaste
|
this.getStatisticsData('固废')
|
break
|
case '环境风险':
|
this.gcComp = EnvironmentalRisk
|
this.getStatisticsData('环境风险')
|
break
|
case '土壤及地下水':
|
this.gcComp = SoilGroundwater
|
break
|
case '管线':
|
// this.gcComp = AirQuality
|
break
|
}
|
}
|
}
|
}
|
</script>
|
|
<style scoped>
|
|
</style>
|