<!-- * @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: 'youthCrimeBar', components: {SimpleBarChart, SingleLayout, ChartLayout, ColorfulBarChart}, data () { return { options: { id: 'device_count_bar', height: '100%', width: '100%', unit: '件', xAxisData: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], seriesData: [0, 0, 0, 0, 0, 0, 0] } } }, created () { this.getData() }, methods: { getData () { // 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>