bugfix and performance improvements

This commit is contained in:
2023-07-27 17:31:39 +08:00
parent 2ba5ff9439
commit 5c50715a33
109 changed files with 1516 additions and 1154 deletions

View File

@ -2,26 +2,31 @@
import StatisticsPanel from "@/views/components/StatisticsPanel.vue";
import { getBrokerStatistic } from "@/api/admin/agent/home";
import { ref } from "vue";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const statisticsList = ref([
{
label: "企业数量",
key: "enterpriseCount",
label: computed(() => t("admin.statistics.enterpriseCount")),
value: 0,
unit: "家",
},
{
label: "正在服务需求数",
key: "runDemandCount",
label: computed(() => t("admin.statistics.serviceDemandCount")),
value: 0,
unit: "个",
},
{
label: "订单总数",
key: "orderTotal",
label: computed(() => t("admin.statistics.orderCount")),
value: 0,
unit: "元",
},
{
// demandCount
label: "需求总数",
key: "demandCount",
label: computed(() => t("admin.statistics.demandCount")),
value: 0,
unit: "个",
},
@ -29,30 +34,9 @@ const statisticsList = ref([
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: "个",
},
];
statisticsList.value.forEach((item) => {
item.value = data[item.key] ?? 0;
});
};
loadStatistics();
</script>