派生自 wuyushui/SewerAndRainNetwork

XingChuan
2021-05-27 05302246665dbb14b26c5d46386bd82d89965396
更换报表数据请求方式
6个文件已添加
5个文件已修改
498 ■■■■■ 已修改文件
public/assets/pollutionSource.json 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/soilGroundwater.json 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/wasteGas.json 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/wasteWater.json 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapApi.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table/components/EnvironmentalRisk.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table/components/PollutionSource.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table/components/SoilGroundwater.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table/components/WasteGas.vue 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table/components/WasteWater.vue 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/table/components/tabHandover.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/pollutionSource.json
New file
@@ -0,0 +1,22 @@
[
  {
    "UserName": "集团公司",
    "ProductionFacilities": 45,
    "GovernanceFacilities": 32
  },
  {
    "UserName": "北京石油",
    "ProductionFacilities": 22,
    "GovernanceFacilities": 14
  },
  {
    "UserName": "天津石化",
    "ProductionFacilities": 3,
    "GovernanceFacilities": 12
  },
  {
    "UserName": "贵州石油",
    "ProductionFacilities": 10,
    "GovernanceFacilities": 6
  }
]
public/assets/soilGroundwater.json
New file
@@ -0,0 +1,53 @@
[
  {
    UserName: '集团名称',
    WasteWaters: '',
    AddOutPut: '',
    MonthOutPut: '',
    NH4NPut: '',
    NH4NMonth: '',
    normal: '',
    overProof: '',
    Abnormal: '',
    StopProduction: '',
    deficiency: ''
  },
  {
    UserName: '天津石化',
    WasteWaters: '116.6',
    AddOutPut: '58.3',
    MonthOutPut: '13.1',
    NH4NPut: '58.3',
    NH4NMonth: '13.1',
    normal: '21',
    overProof: '2',
    Abnormal: '2',
    StopProduction: '2',
    deficiency: '2'
  },
  {
    UserName: 'xxxx炼化3',
    WasteWaters: '116.6',
    MonthOutPut: '13.1',
    NH4NPut: '58.3',
    NH4NMonth: '13.1',
    normal: '21',
    overProof: '2',
    Abnormal: '2',
    StopProduction: '2',
    deficiency: '2'
  },
  {
    UserName: 'xxxx4',
    WasteWaters: '116.6',
    AddOutPut: '58.3',
    MonthOutPut: '13.1',
    NH4NPut: '58.3',
    NH4NMonth: '13.1',
    normal: '21',
    overProof: '2',
    Abnormal: '2',
    StopProduction: '2',
    deficiency: '2'
  }
]
public/assets/wasteGas.json
New file
@@ -0,0 +1,53 @@
[
  {
    "UserName": "集团名称",
    "WasteWaters": "",
    "AddOutPut": "",
    "MonthOutPut": "",
    "NH4NPut": "",
    "NH4NMonth": "",
    "normal": "",
    "overProof": "",
    "Abnormal": "",
    "StopProduction": "",
    "deficiency": ""
  },
  {
    "UserName": "天津石化",
    "WasteWaters": "116.6",
    "AddOutPut": "58.3",
    "MonthOutPut": "13.1",
    "NH4NPut": "58.3",
    "NH4NMonth": "13.1",
    "normal": "21",
    "overProof": "2",
    "Abnormal": "2",
    "StopProduction": "2",
    "deficiency": "2"
  },
  {
    "UserName": "xxxx炼化3",
    "WasteWaters": "116.6",
    "MonthOutPut": "13.1",
    "NH4NPut": "58.3",
    "NH4NMonth": "13.1",
    "normal": "21",
    "overProof": "2",
    "Abnormal": "2",
    "StopProduction": "2",
    "deficiency": "2"
  },
  {
    "UserName": "xxxx4",
    "WasteWaters": "116.6",
    "AddOutPut": "58.3",
    "MonthOutPut": "13.1",
    "NH4NPut": "58.3",
    "NH4NMonth": "13.1",
    "normal": "21",
    "overProof": "2",
    "Abnormal": "2",
    "StopProduction": "2",
    "deficiency": "2"
  }
]
public/assets/wasteWater.json
New file
@@ -0,0 +1,53 @@
[
  {
    "UserName": "集团名称",
    "WasteWaters": "",
    "AddOutPut": "",
    "MonthOutPut": "",
    "NH4NPut": "",
    "NH4NMonth": "",
    "normal": "",
    "overProof": "",
    "Abnormal": "",
    "StopProduction": "",
    "deficiency": ""
  },
  {
    "UserName": "天津石化",
    "WasteWaters": "116.6",
    "AddOutPut": "58.3",
    "MonthOutPut": "13.1",
    "NH4NPut": "58.3",
    "NH4NMonth": "13.1",
    "normal": "21",
    "overProof": "2",
    "Abnormal": "2",
    "StopProduction": "2",
    "deficiency": "2"
  },
  {
    "UserName": "xxxx炼化3",
    "WasteWaters": "116.6",
    "MonthOutPut": "13.1",
    "NH4NPut": "58.3",
    "NH4NMonth": "13.1",
    "normal": "21",
    "overProof": "2",
    "Abnormal": "2",
    "StopProduction": "2",
    "deficiency": "2"
  },
  {
    "UserName": "xxxx4",
    "WasteWaters": "116.6",
    "AddOutPut": "58.3",
    "MonthOutPut": "13.1",
    "NH4NPut": "58.3",
    "NH4NMonth": "13.1",
    "normal": "21",
    "overProof": "2",
    "Abnormal": "2",
    "StopProduction": "2",
    "deficiency": "2"
  }
]
src/api/mapApi.js
@@ -91,5 +91,20 @@
  },
  getRiskEnterprise (data) {
    return axios.get('/assets/riskEnterprise.json', data)
  },
  getPollutionSourceStatistics (data) {
    return axios.get('/assets/pollutionSource.json', data)
  },
  getWasteWaterStatistics (data) {
    return axios.get('/assets/wasteWater.json', data)
  },
  getWasteGasStatistics (data) {
    return axios.get('/assets/wasteGas.json', data)
  },
  getSolidWasteStatistics (data) {
    return axios.get('/assets/wasteGas.json', data)
  },
  getEnvironmentalRiskStatistics (data) {
    return axios.get('/assets/pollutionSource.json', data)
  }
}
src/components/table/components/EnvironmentalRisk.vue
New file
@@ -0,0 +1,43 @@
<template>
  <div class="PollutionSource">
    <el-table class="tableBox" :data="EnvironmentalRisktableDataList" :header-cell-style="tableHeaderColor" :cell-style="rowClass" border>
      <el-table-column width="30px" label="">
        <template>
          <i class="el-icon-caret-right"></i>
          <span style="margin-left: 10px"></span>
        </template>
      </el-table-column>
      <el-table-column label="序号" width="60px" type="index"></el-table-column>
      <el-table-column prop="UserName" label="企业名称"></el-table-column>
      <el-table-column prop="ProductionFacilities" label="一级风险源(个)"></el-table-column>
      <el-table-column prop="GovernanceFacilities" label="二级风险源(个)"></el-table-column>
      <el-table-column prop="GovernanceFacilities" label="三级风险源(个)"></el-table-column>
      <el-table-column prop="GovernanceFacilities" label="应急物资存放点"></el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  name: 'AirQuality',
  data () {
    return {
      tableData: null
    }
  },
  props: ['EnvironmentalRisktableDataList'],
  methods: {
    tableHeaderColor ({ row, column, owIndex, columnIndex }) {
      // return 'background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;font-wight:500;font-size:12px;text-align:center;height:0px'
    },
    // 表头样式设置
    rowClass  () {
      // return 'text-align: center;background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;width:64px'
    }
  }
}
</script>
<style scoped>
</style>
src/components/table/components/PollutionSource.vue
New file
@@ -0,0 +1,41 @@
<template>
    <div class="PollutionSource">
        <el-table class="tableBox" :data="PollutionSourcetableDataList" :header-cell-style="tableHeaderColor" :cell-style="rowClass" border>
            <el-table-column width="30px" label="">
                <template>
                    <i class="el-icon-caret-right"></i>
                    <span style="margin-left: 10px"></span>
                </template>
            </el-table-column>
            <el-table-column label="序号" width="60px" type="index"></el-table-column>
            <el-table-column prop="UserName" label="企业名称"></el-table-column>
            <el-table-column prop="ProductionFacilities" label="生产设施"></el-table-column>
            <el-table-column prop="GovernanceFacilities" label="治理设施"></el-table-column>
        </el-table>
    </div>
</template>
<script>
export default {
  name: 'AirQuality',
  data () {
    return {
      tableData: null
    }
  },
  props: ['PollutionSourcetableDataList'],
  methods: {
    tableHeaderColor ({ row, column, owIndex, columnIndex }) {
      // return 'background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;font-wight:500;font-size:12px;text-align:center;height:0px'
    },
    // 表头样式设置
    rowClass  () {
      // return 'text-align: center;background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;width:64px'
    }
  }
}
</script>
<style scoped>
</style>
src/components/table/components/SoilGroundwater.vue
@@ -1,6 +1,6 @@
<template>
    <div class="waste-water">
        <el-table class="tableBox" :data="tableData" style="width: 100%" @cell-click="handle">
        <el-table class="tableBox" :data="SolidWastetableDataList" style="width: 100%" @cell-click="handle">
            <el-table-column width="30px" label="">
                <template slot-scope="{row,$index}">
                    <el-popover placement="bottom" trigger="click" :disabled="!isShowIcon" popper-class="popovers">
@@ -96,55 +96,6 @@
    return {
      isActive: '',
      isShowIcon: false,
      tableData: [{
        UserName: '集团名称',
        WasteWaters: '',
        AddOutPut: '',
        MonthOutPut: '',
        NH4NPut: '',
        NH4NMonth: '',
        normal: '',
        overProof: '',
        Abnormal: '',
        StopProduction: '',
        deficiency: ''
      }, {
        UserName: '天津石化',
        WasteWaters: '116.6',
        AddOutPut: '58.3',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }, {
        UserName: 'xxxx炼化3',
        WasteWaters: '116.6',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }, {
        UserName: 'xxxx4',
        WasteWaters: '116.6',
        AddOutPut: '58.3',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }],
      tableHeader1: [
        { name: '企业名称', width: '140', propS: 'value1' },
        { name: '地块名称', width: '140', propS: 'value2' },
@@ -165,6 +116,7 @@
      ]
    }
  },
  props: ['SolidWastetableDataList'],
  methods: {
    tableHeaderColor ({ row, column, owIndex, columnIndex }) {
      //  return 'background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;font-wight:500;font-size:12px;text-align:center;height:0px'
src/components/table/components/WasteGas.vue
@@ -1,6 +1,6 @@
<template>
    <div class="Waste-water">
        <el-table class="tableBox" :data="tableData" :header-cell-style="tableHeaderColor" :cell-style="rowClass" @cell-click="handle">
        <el-table class="tableBox" :data="WasteGastableDataList" :header-cell-style="tableHeaderColor" :cell-style="rowClass" @cell-click="handle">
            <el-table-column width="30px" label="">
              <template slot-scope="{row,$index}">
                <!--                   <i class="el-icon-caret-right" v-if="$index ===1"></i>-->
@@ -74,55 +74,6 @@
    return {
      isActive: '',
      isShowIcon: false,
      tableData: [{
        UserName: '集团名称',
        WasteWaters: '',
        AddOutPut: '',
        MonthOutPut: '',
        NH4NPut: '',
        NH4NMonth: '',
        normal: '',
        overProof: '',
        Abnormal: '',
        StopProduction: '',
        deficiency: ''
      }, {
        UserName: '天津石化',
        WasteWaters: '116.6',
        AddOutPut: '58.3',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }, {
        UserName: 'xxxx炼化3',
        WasteWaters: '116.6',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }, {
        UserName: 'xxxx4',
        WasteWaters: '116.6',
        AddOutPut: '58.3',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }],
      tableHeader1: [
        { name: '排放点', width: '140', propS: 'value1' },
        { name: '单位部门', width: '80', propS: 'value2' },
@@ -137,6 +88,7 @@
      ]
    }
  },
  props: ['WasteGastableDataList'],
  methods: {
    tableHeaderColor ({ columnIndex }) {
      //   return 'background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;font-wight:500;font-size:12px;text-align:center;height:0px'
src/components/table/components/WasteWater.vue
@@ -1,6 +1,6 @@
<template>
   <div class="waste-water">
           <el-table class="tableBox" :data="tableData" style="width: 100%" @cell-click="handle">
           <el-table class="tableBox" :data="WasteWatertableDataList" style="width: 100%" @cell-click="handle">
               <el-table-column width="30px" label="">
                 <template slot-scope="{row,$index}">
<!--                   <i class="el-icon-caret-right" v-if="$index ===1"></i>-->
@@ -80,58 +80,10 @@
  data () {
    return {
      isActive: '',
      isShowIcon: false,
      tableData: [{
        UserName: '集团名称',
        WasteWaters: '',
        AddOutPut: '',
        MonthOutPut: '',
        NH4NPut: '',
        NH4NMonth: '',
        normal: '',
        overProof: '',
        Abnormal: '',
        StopProduction: '',
        deficiency: ''
      }, {
        UserName: '天津石化',
        WasteWaters: '116.6',
        AddOutPut: '58.3',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }, {
        UserName: 'xxxx炼化3',
        WasteWaters: '116.6',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }, {
        UserName: 'xxxx4',
        WasteWaters: '116.6',
        AddOutPut: '58.3',
        MonthOutPut: '13.1',
        NH4NPut: '58.3',
        NH4NMonth: '13.1',
        normal: '21',
        overProof: '2',
        Abnormal: '2',
        StopProduction: '2',
        deficiency: '2'
      }]
      isShowIcon: false
    }
  },
  props: ['WasteWatertableDataList'],
  methods: {
    tableHeaderColor ({ row, column, owIndex, columnIndex }) {
    //  return 'background-color: rgba(26, 73, 81, 0.901960784313726);color:#fff;font-wight:500;font-size:12px;text-align:center;height:0px'
src/components/table/components/tabHandover.vue
@@ -4,7 +4,12 @@
      <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"></component>
      <component :is="gcComp" :PollutionSourcetableDataList="PollutionSourcetableDataList" v-if="PollutionSourcetableDataList"
                              :WasteWatertableDataList="WasteWatertableDataList"
                              :WasteGastableDataList="WasteGastableDataList"
                              :SolidWastetableDataList="SolidWastetableDataList"
                              :EnvironmentalRisktableDataList="EnvironmentalRisktableDataList"
      ></component>
    </div>
  </div>
</template>
@@ -15,10 +20,11 @@
import SoilGroundwater from '@components/table/components/SoilGroundwater'
import WasteGas from '@components/table/components/WasteGas'
import SolidWaste from '@components/table/components/WasteSolid'
import AirQuality from '@components/table/components/AirQuality'
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: {
@@ -26,43 +32,75 @@
    // WasteGas,
    // SoilGroundwater,
    SolidWaste,
    AirQuality
    PollutionSource,
    EnvironmentalRisk
  },
  data () {
    return {
      titleProp: '',
      activeName: 'gcComp',
      topicList: TopicList,
      gcComp: AirQuality
      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) {
      console.log(tab.label)
      switch (tab.label) {
        case '污染源':
          this.gcComp = AirQuality
          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 = AirQuality
          this.gcComp = EnvironmentalRisk
          this.getStatisticsData('环境风险')
          break
        case '土壤及地下水':
          this.gcComp = SoilGroundwater
          break
        case '管线':
          this.gcComp = AirQuality
          // this.gcComp = AirQuality
          break
      }
    }