diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index 20787d54c..f1ab1016d 100644 --- a/apps/web-antd/src/adapter/component/index.ts +++ b/apps/web-antd/src/adapter/component/index.ts @@ -156,7 +156,7 @@ async function initComponentAdapter() { 'select', { component: TreeSelect, - props: { label: 'label', value: 'value', children: 'children' }, + fieldNames: { label: 'label', value: 'value', children: 'children' }, loadingSlot: 'suffixIcon', modelPropName: 'value', optionsPropName: 'treeData', diff --git a/apps/web-ele/src/adapter/component/index.ts b/apps/web-ele/src/adapter/component/index.ts index 03845253a..7a5d9f074 100644 --- a/apps/web-ele/src/adapter/component/index.ts +++ b/apps/web-ele/src/adapter/component/index.ts @@ -212,13 +212,6 @@ async function initComponentAdapter() { 'select', { component: ElCascader, - props: { - props: { - label: 'label', - value: 'value', - children: 'children', - }, - }, }, ), ApiTreeSelect: withDefaultPlaceholder( @@ -229,7 +222,6 @@ async function initComponentAdapter() { 'select', { component: ElTreeSelect, - props: { label: 'label', children: 'children' }, nodeKey: 'value', loadingSlot: 'loading', optionsPropName: 'data', diff --git a/apps/web-ele/src/utils/constants.ts b/apps/web-ele/src/utils/constants.ts index 78da9f947..9b684696b 100644 --- a/apps/web-ele/src/utils/constants.ts +++ b/apps/web-ele/src/utils/constants.ts @@ -201,6 +201,16 @@ export const PayOrderStatusEnum = { }; // ========== MALL - 商品模块 ========== +/** + * 商品 首页 日期类型 + */ +export enum TimeRangeTypeEnum { + DAY30 = 1, + MONTH = 30, + WEEK = 7, + YEAR = 365, +} + /** * 商品 SPU 状态 */ diff --git a/apps/web-ele/src/views/mall/home/components/analysis-chart-card.vue b/apps/web-ele/src/views/mall/home/components/analysis-chart-card.vue new file mode 100644 index 000000000..807b6bad0 --- /dev/null +++ b/apps/web-ele/src/views/mall/home/components/analysis-chart-card.vue @@ -0,0 +1,25 @@ + + + diff --git a/apps/web-ele/src/views/mall/home/components/analysis-overview-icon.vue b/apps/web-ele/src/views/mall/home/components/analysis-overview-icon.vue new file mode 100644 index 000000000..80ebbbd80 --- /dev/null +++ b/apps/web-ele/src/views/mall/home/components/analysis-overview-icon.vue @@ -0,0 +1,100 @@ + + + diff --git a/apps/web-ele/src/views/mall/home/components/analysis-overview.vue b/apps/web-ele/src/views/mall/home/components/analysis-overview.vue new file mode 100644 index 000000000..6e1aa439f --- /dev/null +++ b/apps/web-ele/src/views/mall/home/components/analysis-overview.vue @@ -0,0 +1,174 @@ + + + + diff --git a/apps/web-ele/src/views/mall/home/components/analysis-trade-overview.vue b/apps/web-ele/src/views/mall/home/components/analysis-trade-overview.vue new file mode 100644 index 000000000..b188a9d2c --- /dev/null +++ b/apps/web-ele/src/views/mall/home/components/analysis-trade-overview.vue @@ -0,0 +1,87 @@ + + + diff --git a/apps/web-ele/src/views/mall/home/components/data.ts b/apps/web-ele/src/views/mall/home/components/data.ts new file mode 100644 index 000000000..021a20e5f --- /dev/null +++ b/apps/web-ele/src/views/mall/home/components/data.ts @@ -0,0 +1,39 @@ +export interface WorkbenchQuickDataShowItem { + name: string; + value: number; + prefix: string; + decimals: number; + routerName: string; +} + +export interface AnalysisOverviewItem { + title: string; + totalTitle?: string; + totalValue?: number; + value: number; + prefix?: string; + tooltip?: string; + // 环比增长相关字段 + showGrowthRate?: boolean; // 是否显示环比增长率,默认为false +} + +export interface AnalysisOverviewIconItem { + icon: string; + title: string; + value: number; + prefix?: string; + iconBgColor: string; + iconColor: string; + tooltip?: string; + decimals?: number; + percent?: number; +} + +export interface AnalysisOverviewTradeItem { + title: string; + value: number; + prefix?: string; + decimals?: number; + percent?: number; + tooltip?: string; +} diff --git a/apps/web-ele/src/views/mall/home/components/member-funnel-card.vue b/apps/web-ele/src/views/mall/home/components/member-funnel-card.vue index 47ed3dd01..089e507ad 100644 --- a/apps/web-ele/src/views/mall/home/components/member-funnel-card.vue +++ b/apps/web-ele/src/views/mall/home/components/member-funnel-card.vue @@ -3,13 +3,13 @@ import type { MallMemberStatisticsApi } from '#/api/mall/statistics/member'; import { ref } from 'vue'; -import { AnalysisChartCard } from '@vben/common-ui'; import { calculateRelativeRate, fenToYuan } from '@vben/utils'; import dayjs from 'dayjs'; import * as MemberStatisticsApi from '#/api/mall/statistics/member'; +import AnalysisChartCard from './analysis-chart-card.vue'; import ShortcutDateRangePicker from './shortcut-date-range-picker.vue'; /** 会员概览卡片 */ diff --git a/apps/web-ele/src/views/mall/home/components/trade-trend-card.vue b/apps/web-ele/src/views/mall/home/components/trade-trend-card.vue index 7385292bb..8c2b2b692 100644 --- a/apps/web-ele/src/views/mall/home/components/trade-trend-card.vue +++ b/apps/web-ele/src/views/mall/home/components/trade-trend-card.vue @@ -10,8 +10,7 @@ import { fenToYuan, formatDate } from '@vben/utils'; import dayjs, { Dayjs } from 'dayjs'; import * as TradeStatisticsApi from '#/api/mall/statistics/trade'; - -import { TimeRangeTypeEnum } from '../data'; +import { TimeRangeTypeEnum } from '#/utils/constants'; /** 交易量趋势 */ defineOptions({ name: 'TradeTrendCard' }); diff --git a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-data-show.vue b/apps/web-ele/src/views/mall/home/components/workbench-quick-data-show.vue similarity index 70% rename from packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-data-show.vue rename to apps/web-ele/src/views/mall/home/components/workbench-quick-data-show.vue index 68b03fedc..3d55ccb8b 100644 --- a/packages/effects/common-ui/src/ui/dashboard/workbench/workbench-quick-data-show.vue +++ b/apps/web-ele/src/views/mall/home/components/workbench-quick-data-show.vue @@ -1,12 +1,10 @@ diff --git a/apps/web-ele/src/views/mall/home/data.ts b/apps/web-ele/src/views/mall/home/data.ts deleted file mode 100644 index d88b257f2..000000000 --- a/apps/web-ele/src/views/mall/home/data.ts +++ /dev/null @@ -1,6 +0,0 @@ -export enum TimeRangeTypeEnum { - DAY30 = 1, - MONTH = 30, - WEEK = 7, - YEAR = 365, -} // 日期类型 diff --git a/apps/web-ele/src/views/mall/home/index.vue b/apps/web-ele/src/views/mall/home/index.vue index a8c00711f..3ebbe281a 100644 --- a/apps/web-ele/src/views/mall/home/index.vue +++ b/apps/web-ele/src/views/mall/home/index.vue @@ -1,27 +1,17 @@