Newer
Older
CloudBrainNew / src / views / cityManage / components / mobileManage / components / staffBar.vue
<!--
 * @Description: 青少年犯罪趋势
 * @Author: 王晓颖
 * @Date: 2020-12-03 09:56:31
 -->
<template>
  <single-layout  title="各区域人员数量">
    <div style="width: 100%;height:100%;">
      <simple-bar-chart
        :id="options.id"
        :unit="options.unit"
        :height="options.height"
        :xAxisData="options.xAxisData"
        :seriesData="options.seriesData"
      />
    </div>
  </single-layout>
</template>

<script>
import ColorfulBarChart from '@/components/barChart/colorfulBarChart'
import ChartLayout from '@/components/layout/chartLayout'
import {fetchPipeCount} from '@/api/cityManage'
import SingleLayout from '@/components/layout/singleLayout'
import SimpleBarChart from "../../../../../components/barChart/simpleBarChart";
export default {
  name: 'staffBar',
  components: {SimpleBarChart, SingleLayout, ChartLayout, ColorfulBarChart},
  data () {
    return {
      options: {
        id: 'staff_bar',
        height: '100%',
        width: '100%',
        unit: '件',
        xAxisData: ['潭东镇', '潭口镇', '高校园区'],
        seriesData: [0, 0, 0]
      }
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getData () {
const mockData = this.$globalJsons.globalCity
      this.options.seriesData = mockData.urbanManagement.staffBar
      // fetchPipeCount().then(response => {
      //   if (response.code === 200) {
      //     const data = response.data
      //     this.options.xAxisData = data.map(item => { return item.name })
      //     this.options.seriesData = data.map(item => { return item.value })
      //   }
      // })
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>