|
|
|
@ -14,6 +14,8 @@
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import TitleBox from './titleBox.vue' |
|
|
|
|
import { ScreenApi } from '@/api/screen' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const leftWrapperRef = ref() |
|
|
|
|
|
|
|
|
@ -67,7 +69,7 @@ const row1Options = ref({
|
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
type: 'bar', |
|
|
|
|
data: [100, 90, 10, 90, 90, 20, 56, 89], |
|
|
|
|
data: [100, 10], |
|
|
|
|
barWidth: 5, |
|
|
|
|
itemStyle: { |
|
|
|
|
color: { |
|
|
|
@ -311,7 +313,36 @@ const handlerResize = () => {
|
|
|
|
|
unref(row3Chart).resizeHandler() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const queryParams:any = ref(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//左一数据 |
|
|
|
|
const leftFirst = async() => { |
|
|
|
|
const data:any = await ScreenApi.getLeftFirst(queryParams.value); |
|
|
|
|
row1Options.value.xAxis.data = data.map(i=>i.name) |
|
|
|
|
row1Options.value.series[0].data = data.map(i=>i.value) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//左二数据 |
|
|
|
|
const leftSecond = async() => { |
|
|
|
|
const data = await ScreenApi.getLeftSecond(queryParams.value); |
|
|
|
|
row2Options.value.title.text = data.enterpriseCount |
|
|
|
|
row2Options.value.series[0].data = data.enterpriseCountGroup |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//左三数据 |
|
|
|
|
const leftThird = async() => { |
|
|
|
|
const data = await ScreenApi.getLeftThird(queryParams.value); |
|
|
|
|
row3Options.value.yAxis[0].data = data.map(i=>i.name) |
|
|
|
|
row3Options.value.yAxis[1].data = data.map(i=>i.finishCount) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
leftFirst() |
|
|
|
|
leftSecond() |
|
|
|
|
leftThird() |
|
|
|
|
initChart() |
|
|
|
|
observer = new ResizeObserver(handlerResize) |
|
|
|
|
observer.observe(leftWrapperRef.value) |
|
|
|
|