Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.4 #2

Merged
merged 21 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat 首页驾驶舱显示优化
  • Loading branch information
xxm1995 committed Mar 26, 2024
commit 7ceded01f48f1cf80c4c58dc126059236d1de64e
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions src/views/dashboard/analysis/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 }
})
})
}
Expand All @@ -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 }
})
})
}
Expand Down