客户服务
This commit is contained in:
parent
db8186d055
commit
8d20a262eb
@ -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<any[]>([]);
|
||||
const workOrderCount = ref<EchartsUIType>();
|
||||
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 () => {
|
||||
<div>
|
||||
<div>工单总数:</div>
|
||||
<div>{{ board.workOrdersTotal }}</div>
|
||||
<div style="color: #1890FF">点击前往工单池</div>
|
||||
<div style="color: #1890FF" @click="goToProperty()">点击前往工单池</div>
|
||||
</div>
|
||||
<div class="icon-edit"><EditOutlined /></div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user