feat:【antd】【erp 系统】home 界面的代码优化
This commit is contained in:
@@ -5,8 +5,8 @@ import { DocAlert, Page } from '@vben/common-ui';
|
||||
|
||||
import { Col, Row, Spin } from 'ant-design-vue';
|
||||
|
||||
import SummaryCard from './components/SummaryCard.vue';
|
||||
import TimeSummaryChart from './components/TimeSummaryChart.vue';
|
||||
import SummaryCard from './modules/SummaryCard.vue';
|
||||
import TimeSummaryChart from './modules/TimeSummaryChart.vue';
|
||||
|
||||
/** ERP首页 */
|
||||
defineOptions({ name: 'ErpHome' });
|
||||
|
||||
@@ -32,7 +32,6 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
});
|
||||
|
||||
/** 概览数据 */
|
||||
// TODO @nehc:应该是有 8 个小卡片,少了 4 个?
|
||||
const overviewItems = computed<AnalysisOverviewItem[]>(() => [
|
||||
{
|
||||
icon: SvgCardIcon,
|
||||
@@ -123,11 +123,9 @@ watch(
|
||||
if (!val || val.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 更新图表数据
|
||||
const xAxisData = val.map((item) => item.time);
|
||||
const seriesData = val.map((item) => item.price);
|
||||
|
||||
const options = {
|
||||
...lineChartOptions,
|
||||
xAxis: {
|
||||
@@ -141,7 +139,6 @@ watch(
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
renderEcharts(options);
|
||||
},
|
||||
{ immediate: true },
|
||||
@@ -151,14 +148,6 @@ watch(
|
||||
onMounted(() => {
|
||||
initData();
|
||||
});
|
||||
|
||||
/** 暴露数据给父组件使用 */
|
||||
defineExpose({
|
||||
saleSummary,
|
||||
purchaseSummary,
|
||||
saleTimeSummaryList,
|
||||
purchaseTimeSummaryList,
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
Reference in New Issue
Block a user