Newer
Older
CloudBrainNew / src / views / cityConstruction / components / construction / components / peopleDetail.vue
StephanieGitHub on 4 Feb 2021 2 KB first commit
<!--
 * @Description:各工程施工人员在岗人员统计
 * @Author: 王晓颖
 * @Date: 2020-12-10 14:43:19
 -->
<template>
  <div style="width: 100%;height:100%;padding:0.1rem;">
    <scroll-board :config="boardConfig"/>
  </div>
</template>

<script>
import SimplePieChart from '@/components/pieChart/simplePieChart'
import Corner1 from '@/components/corner/Corner1'
import ChartLayout from '@/components/layout/chartLayout'
// import {fetchOccupationByPark} from '@/api/cityManage'
import ScrollBoard from '@/components/board/ScrollBoard'
export default {
  name: 'PeopleDetail',
  components: {ScrollBoard, ChartLayout, Corner1, SimplePieChart},
  data () {
    return {
      boardConfig: {
        header: ['', '施工人员总数', '在岗人数', '缺勤人数'],
        rowNum: 4,
        hoverColor: true,
        headerBGC: 'rgba(46,145,244,0.4)',
        oddRowBGC: 'transparent',
        evenRowBGC: '#030737',
        headerColor: '#00F0FF',
        rowColor: '#FFFFFF',
        headerFontSize: '0.072rem', // 表头字体大小
        rowFontSize: '0.07rem', // 行字体大小
        columnWidth: [160],
        data: [
          ['狮形岭路', '132', '123', '9'],
          ['滨江公园', '132', '123', '9'],
          ['蓉江三路', '132', '123', '9'],
          ['江西应用技术职业学院学生宿舍', '132', '123', '9'],
          ['赣南卫生健康职业学院学生宿舍', '132', '123', '9'],
          ['富力现代城B02', '132', '123', '9'],
          ['富力现代城B06', '--', '--', '--'],
          ['坪路小学及幼儿园', '--', '--', '--'],
          ['滨江公园', '--', '--', '--'],
          ['大桥河公园', '--', '--', '--'],
          ['蓉江花园城市棚户区', '--', '--', '--']
        ]
      }
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getData () {
      // fetchOccupationByPark().then(response => {
      //   if (response.code === 200) {
      //     const data = response.data
      //     const list = data.map(item => {
      //       const radio = Math.round(item.already / item.total * 100)
      //       return [item.name, item.total, item.already, radio + '%']
      //     })
      //     this.boardConfig.data = list
      //     const boardConfig = this.boardConfig
      //     // this.$set(this, 'boardConfig', boardConfig)
      //     this.boardConfig = Object.assign({}, boardConfig)
      //   }
      // })
    }
  }
}
</script>

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

</style>