42 lines
652 B
Vue
42 lines
652 B
Vue
<template>
|
|
<div>
|
|
<Chart :cdata="cdata" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Chart from './chart.vue'
|
|
export default {
|
|
props: {
|
|
ifHelpPoorList: {
|
|
type: Array,
|
|
default: () => ([])
|
|
}
|
|
},
|
|
created () {
|
|
this.cdata.seriesData = this.ifHelpPoorList.map(item => {
|
|
// 将id转换为字符串
|
|
return { ...item, id: item.id.toString() }
|
|
})
|
|
},
|
|
data () {
|
|
return {
|
|
cdata: {
|
|
xData: this.ifHelpPoorList.map(item => item.name),
|
|
seriesData: []
|
|
}
|
|
}
|
|
},
|
|
components: {
|
|
Chart
|
|
},
|
|
mounted () {
|
|
},
|
|
methods: {
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
</style>
|