From 8d20a262ebcc3b8c8ca8234f71c9e6616b69d561 Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Wed, 23 Jul 2025 16:29:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerService/centerConsole/index.vue | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/web-antd/src/views/property/customerService/centerConsole/index.vue b/apps/web-antd/src/views/property/customerService/centerConsole/index.vue index 147acde9..2be3601d 100644 --- a/apps/web-antd/src/views/property/customerService/centerConsole/index.vue +++ b/apps/web-antd/src/views/property/customerService/centerConsole/index.vue @@ -3,7 +3,9 @@ import { EditOutlined } from '@ant-design/icons-vue'; import {EchartsUI, type EchartsUIType, useEcharts} from "@vben/plugins/echarts"; import {onMounted, ref} from "vue"; import {countsList} from '#/api/property/customerService/centerConsole' +import { useRouter } from 'vue-router' +const router = useRouter() const board = ref ({}) const getBoard = async () => { board.value = await countsList(); @@ -15,19 +17,21 @@ const seriesData = ref([]); const workOrderCount = ref(); const { renderEcharts: renderWorkOrderCount } = useEcharts(workOrderCount); async function fetchWorkOrderCount() { - xAxisData.value = board.value.recentWeekWorkOrders - const result = xAxisData.value.map(item => { + xAxisData.value = board.value.recentWeekWorkOrders.map(item => { const [year, month, day] = item.date.split('-'); const monthDay = `${month}-${day}`; return `${monthDay}${item.dayOfWeek}`; }); - console.log(result) + seriesData.value = board.value.recentWeekWorkOrders.map(item => { + return `${item.count}`; + }); + console.log(xAxisData.value,seriesData.value) renderWorkOrderCount({ tooltip: { trigger: 'axis' }, xAxis: { type: 'category', boundaryGap: false, - data: ['06-17周二', '06-17周二', '06-17周二', '06-17周二', '06-17周二', '06-17周二', '06-17周二'] + data: xAxisData.value }, yAxis: { type: 'value', @@ -35,7 +39,7 @@ async function fetchWorkOrderCount() { }, series: [ { - data: [6, 2, 0, 1, 0, 0, 1], + data: seriesData.value, type: 'line', areaStyle: {}, smooth: true, @@ -153,6 +157,10 @@ async function fetchOrderTyper() { }) } +const goToProperty = () => { + router.push('/property') +} + onMounted(async () => { await getBoard() await fetchWorkOrderCount() @@ -172,7 +180,7 @@ onMounted(async () => {
工单总数:
{{ board.workOrdersTotal }}
-
点击前往工单池
+
点击前往工单池