bug fix and performance improvements

This commit is contained in:
2023-07-20 17:26:43 +08:00
parent 3b2fed2967
commit 6cc3e9e348
27 changed files with 757 additions and 422 deletions

View File

@ -0,0 +1,66 @@
<script setup>
import StatisticsPanel from "@/views/components/StatisticsPanel.vue";
import { getBrokerStatistic } from "@/api/admin/agent/home";
import { ref } from "vue";
const statisticsList = ref([
{
label: "企业数量",
value: 0,
unit: "家",
},
{
label: "正在服务需求数",
value: 0,
unit: "个",
},
{
label: "订单总数",
value: 0,
unit: "元",
},
{
// demandCount
label: "需求总数",
value: 0,
unit: "个",
},
]);
const loadStatistics = async () => {
const { data } = await getBrokerStatistic();
statisticsList.value = [
{
label: "企业数量",
value: data?.enterpriseCount ?? 0,
unit: "家",
},
{
label: "正在服务需求数",
value: data?.runDemandCount ?? 0,
unit: "个",
},
{
label: "订单总数",
value: data?.orderTotal ?? 0,
unit: "元",
},
{
// demandCount
label: "需求总数",
value: data?.demandCount ?? 0,
unit: "个",
},
];
};
loadStatistics();
</script>
<template>
<div class="app-container">
<statistics-panel :list="statisticsList" />
</div>
</template>
<style lang="scss" scoped></style>