feat 首页驾驶舱显示优化

This commit is contained in:
xxm1995
2024-03-26 12:34:00 +08:00
parent 000fed19b4
commit 7ceded01f4
5 changed files with 12 additions and 12 deletions

View File

@@ -1,17 +1,17 @@
<template>
<Card :tab-list="tabListTitle" v-bind="$attrs" :active-tab-key="activeKey" @tab-change="onTabChange">
<p v-if="activeKey === 't1'">
<VisitAnalysis :head="payHead" :data="payAmount" :max="payMax" />
<OrderAmountLine :head="payHead" :data="payAmount" :max="payMax" />
</p>
<p v-if="activeKey === 't2'">
<VisitAnalysis :head="refundHead" :data="refundAmount" :max="refundMax" />
<OrderAmountLine :head="refundHead" :data="refundAmount" :max="refundMax" />
</p>
</Card>
</template>
<script lang="ts" setup>
import { computed, ref } from 'vue'
import { Card } from 'ant-design-vue'
import VisitAnalysis from './VisitAnalysis.vue'
import OrderAmountLine from './OrderAmountLine.vue'
const activeKey = ref('t1')
const tabListTitle = [

View File

@@ -2,7 +2,7 @@
<div ref="chartRef" :style="{ height: '280px', width: '95%' }"></div>
</template>
<script lang="ts" setup>
import { ref, Ref, watch } from 'vue'
import { ref, Ref, watch } from 'vue'
import { useECharts } from '/@/hooks/web/useECharts'
const chartRef = ref<HTMLDivElement | null>(null)

View File

@@ -5,20 +5,20 @@
<!-- 占比图 -->
<div class="md:flex !my-4 enter-y">
<!-- 支付 -->
<VisitSource class="md:w-1/2 !md:my-0 !my-4 w-full" :loading="loading" :data="payOrderChannelCount" />
<PayOrderCount class="md:w-1/2 !md:my-0 !my-4 w-full" :loading="loading" :data="payOrderChannelCount" />
<!-- 退款 -->
<SalesProductPie class="md:w-1/2 !md:mx-4 w-full" :loading="loading" :data="refundOrderChannelCount" />
<RefundOrderCount class="md:w-1/2 !md:mx-4 w-full" :loading="loading" :data="refundOrderChannelCount" />
</div>
<!-- 订单折线图 -->
<SiteAnalysis class="!my-4 enter-y" :loading="loading" :payOrder="payOrderChannelAmount" :refundOrder="refundOrderChannelAmount" />
<OrderAmount class="!my-4 enter-y" :loading="loading" :payOrder="payOrderChannelAmount" :refundOrder="refundOrderChannelAmount" />
</div>
</template>
<script lang="ts" setup>
import { computed, onMounted, ref } from 'vue'
import OrderCount from './components/OrderCount.vue'
import SiteAnalysis from './components/SiteAnalysis.vue'
import VisitSource from './components/VisitSource.vue'
import SalesProductPie from './components/SalesProductPie.vue'
import OrderAmount from './components/OrderAmount.vue'
import PayOrderCount from './components/PayOrderCount.vue'
import RefundOrderCount from './components/RefundOrderCount.vue'
import dayjs from 'dayjs'
import {
CockpitReportQuery,
@@ -117,7 +117,7 @@
return { name: o.channelName, value: o.orderCount }
})
payOrderChannelAmount = data.map((o) => {
return { name: o.channelName, value: o.orderAmount }
return { name: o.channelName, value: o.orderAmount / 100.0 }
})
})
}
@@ -131,7 +131,7 @@
return { name: o.channelName, value: o.orderCount }
})
refundOrderChannelAmount = data.map((o) => {
return { name: o.channelName, value: o.orderAmount }
return { name: o.channelName, value: o.orderAmount / 100.0 }
})
})
}