From 576360ee949895016dac76cda579f27fbe98cd69 Mon Sep 17 00:00:00 2001 From: dx <1242347652@qq.com> Date: Mon, 24 Feb 2025 16:20:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/screen/index.ts | 52 +++++++++++--------- src/views/screen/compenonts/rightwrapper.vue | 25 +++++++--- 2 files changed, 45 insertions(+), 32 deletions(-) diff --git a/src/api/screen/index.ts b/src/api/screen/index.ts index 47d8d45..52ef914 100644 --- a/src/api/screen/index.ts +++ b/src/api/screen/index.ts @@ -4,28 +4,32 @@ import request from '@/config/axios' // 数据大屏 API export const ScreenApi = { // 查询大屏左侧第一个接口 - getLeftFirst: async (params: any) => { - return await request.get({ url: `/system/big-view-data/getLeftFirst`, params }) - }, - - getLeftSecond: async (params: any) => { - return await request.get({ url: `/system/big-view-data/getLeftSecond`, params }) - }, - - getLeftThird: async (params: any) => { - return await request.get({ url: `/system/big-view-data/getLeftThird`, params }) - }, - - getRightFirst: async (params: any) => { - return await request.get({ url: `/system/big-view-data/getRightFirst`, params }) - }, - - - getRightSecond: async (params: any) => { - return await request.get({ url: `/system/big-view-data/getRightSecond`, params }) - }, - - getRightThird: async (params: any) => { - return await request.get({ url: `/system/big-view-data/getRightThird`, params }) - }, + getLeftFirst: async (params: any) => { + return await request.get({ url: `/system/big-view-data/getLeftFirst`, params }) + }, + + getLeftSecond: async (params: any) => { + return await request.get({ url: `/system/big-view-data/getLeftSecond`, params }) + }, + + getLeftThird: async (params: any) => { + return await request.get({ url: `/system/big-view-data/getLeftThird`, params }) + }, + + getRightFirst: async (params: any) => { + return await request.get({ url: `/system/big-view-data/getRightFirst`, params }) + }, + + + getRightSecond: async (params: any) => { + return await request.get({ url: `/system/big-view-data/getRightSecond`, params }) + }, + + getRightThird: async (params: any) => { + return await request.get({ url: `/system/big-view-data/getRightThird`, params }) + }, + + getRightFourth: async (params: any) => { + return await request.get({ url: `/system/big-view-data/getRightFourth`, params }) + }, } \ No newline at end of file diff --git a/src/views/screen/compenonts/rightwrapper.vue b/src/views/screen/compenonts/rightwrapper.vue index 4a54c4d..7a26ad3 100644 --- a/src/views/screen/compenonts/rightwrapper.vue +++ b/src/views/screen/compenonts/rightwrapper.vue @@ -385,25 +385,33 @@ const initChart = () => {} const queryParams:any = ref() -//左一数据 -// const rightFirst = async() => { -// const data:any = await ScreenApi.getRightFirst(queryParams.value); -// row1Options.value.xAxis.data = data.map(i=>i.name) -// row1Options.value.series[0].data = data.map(i=>i.value) -// } +//右一数据 +const rightFirst = async() => { + const data:any = await ScreenApi.getRightFirst(queryParams.value); + row1Options.value.xAxis.data = data.map(i=>i.name) + row1Options.value.series[0].data = data.map(i=>i.value) + row1Options.value.series[1].data = data.map(i=>i.taskValue) +} -//左二数据 +//右二数据 const rightSecond = async() => { const data = await ScreenApi.getRightSecond(queryParams.value); row2Options.value.series[0].data = data } -//左三数据 +//右三数据 // const rightThird = async() => { // const data = await ScreenApi.getRightThird(queryParams.value); // row3Options.value.yAxis[0].data = data.map(i=>i.name) // row3Options.value.yAxis[1].data = data.map(i=>i.finishCount) // } +//右四数据 +// const rightFourth = async() => { +// const data = await ScreenApi.getRightFourth(queryParams.value); +// row3Options.value.xAxis[0].data = data.map(i=>i.name) +// row3Options.value.yAxis[1].data = data.map(i=>i.finishCount) +// } + const handlerResize = () => { unref(row1Chart).resizeHandler() @@ -413,6 +421,7 @@ const handlerResize = () => { onMounted(() => { initChart() + rightFirst() rightSecond() observer = new ResizeObserver(handlerResize) observer.observe(rightWrapperRef.value)