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 }}
-
点击前往工单池
+
点击前往工单池