diff --git a/.gitignore b/.gitignore index 1c45866..f863201 100644 --- a/.gitignore +++ b/.gitignore @@ -186,17 +186,63 @@ web/apps/web-ele/src/components/form-design/ web/apps/web-ele/src/components/zq-editor/ web/apps/web-ele/src/components/whiteboard/ web/apps/web-ele/src/views/online-dev/ +!web/apps/web-ele/src/views/online-dev/ +web/apps/web-ele/src/views/online-dev/* +!web/apps/web-ele/src/views/online-dev/page-render/ +!web/apps/web-ele/src/views/online-dev/page-render/** web/apps/web-ele/src/views/dashboard/ web/apps/web-ele/src/views/demos/ web/apps/web-ele/src/views/zq-smart-table/ web/apps/web-ele/src/api/online-dev/ +!web/apps/web-ele/src/api/online-dev/ +web/apps/web-ele/src/api/online-dev/* +!web/apps/web-ele/src/api/online-dev/page-manager.ts web/apps/web-ele/src/components/dashboard-design/ +!web/apps/web-ele/src/components/dashboard-design/ +web/apps/web-ele/src/components/dashboard-design/* +!web/apps/web-ele/src/components/dashboard-design/DashboardRenderer.vue +!web/apps/web-ele/src/components/dashboard-design/index.ts +!web/apps/web-ele/src/components/dashboard-design/runtime.ts +!web/apps/web-ele/src/components/dashboard-design/types.ts +!web/apps/web-ele/src/components/dashboard-design/components/ +web/apps/web-ele/src/components/dashboard-design/components/* +!web/apps/web-ele/src/components/dashboard-design/components/WidgetRenderer.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/ +web/apps/web-ele/src/components/dashboard-design/components/widgets/* +!web/apps/web-ele/src/components/dashboard-design/components/widgets/AnnouncementList.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/ApprovalCenter.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/CalendarWidget.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/ClockWidget.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/CountdownWidget.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/DataTable.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterDate.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterDateRange.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterInput.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterSelect.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/IframeWidget.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/ImageCarousel.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/ImageWidget.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/MyApps.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/NoticeList.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/ProgressCard.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/QuickLinks.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/RankingList.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/ServerMonitor.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/StatCard.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/TodoList.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/VideoPlayer.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/WeatherWidget.vue +!web/apps/web-ele/src/components/dashboard-design/components/widgets/WelcomeCard.vue +!web/apps/web-ele/src/components/dashboard-design/utils/ +web/apps/web-ele/src/components/dashboard-design/utils/* +!web/apps/web-ele/src/components/dashboard-design/utils/dataFetcher.ts web/apps/web-ele/src/components/document-designer/ web/apps/web-ele/src/components/workflow/designer/ web/packages/effects/common-ui/src/ui/dashboard/ web/docs/src/public/guide/ web/packages/zq-univer/ web/apps/web-ele/src/locales/langs/*/dashboard-design.json* +!web/apps/web-ele/src/locales/langs/*/dashboard-design.json web/apps/web-ele/src/locales/langs/*/form-design.json web/apps/web-ele/src/locales/langs/*/screen-design.json web/apps/web-ele/src/router/routes/modules/form-layout.ts @@ -207,6 +253,24 @@ backend-fastapi/online_dev/ !backend-fastapi/online_dev/ backend-fastapi/online_dev/* !backend-fastapi/online_dev/__init__.py +!backend-fastapi/online_dev/router.py +!backend-fastapi/online_dev/page_manager/ +!backend-fastapi/online_dev/page_manager/** +backend-fastapi/online_dev/page_manager/* +!backend-fastapi/online_dev/page_manager/__init__.py +!backend-fastapi/online_dev/page_manager/api.py +!backend-fastapi/online_dev/page_manager/model.py +!backend-fastapi/online_dev/page_manager/service.py +!backend-fastapi/online_dev/form_manager/ +!backend-fastapi/online_dev/form_manager/** +backend-fastapi/online_dev/form_manager/* +!backend-fastapi/online_dev/form_manager/__init__.py +!backend-fastapi/online_dev/form_manager/model.py +!backend-fastapi/online_dev/form_manager/service.py +!backend-fastapi/online_dev/ +backend-fastapi/online_dev/* +!backend-fastapi/online_dev/__init__.py +!backend-fastapi/online_dev/router.py !backend-fastapi/online_dev/form_manager/ !backend-fastapi/online_dev/form_manager/** !backend-fastapi/online_dev/form_data_manager/ diff --git a/backend-fastapi/online_dev/router.py b/backend-fastapi/online_dev/router.py new file mode 100644 index 0000000..2581e27 --- /dev/null +++ b/backend-fastapi/online_dev/router.py @@ -0,0 +1,6 @@ +from fastapi import APIRouter + +from online_dev.page_manager.api import router as page_manager_router + +router = APIRouter() +router.include_router(page_manager_router) diff --git a/web/apps/web-ele/package.json b/web/apps/web-ele/package.json index b70adab..0cc431e 100644 --- a/web/apps/web-ele/package.json +++ b/web/apps/web-ele/package.json @@ -59,6 +59,7 @@ "cron-parser": "^4.9.0", "dayjs": "catalog:", "element-plus": "catalog:", + "grid-layout-plus": "1.1.1", "pinia": "catalog:", "vue": "catalog:", "vue-router": "catalog:", diff --git a/web/apps/web-ele/src/api/online-dev/page-manager.ts b/web/apps/web-ele/src/api/online-dev/page-manager.ts new file mode 100644 index 0000000..eb581c0 --- /dev/null +++ b/web/apps/web-ele/src/api/online-dev/page-manager.ts @@ -0,0 +1,20 @@ +import { requestClient } from '#/api/request'; + +export interface PageMeta { + id: string; + application_id?: string; + name: string; + code: string; + category: string; + description: string; + status: string; + version: number; + page_config: Record; + sort: number; + sys_create_datetime: string; + sys_update_datetime: string; +} + +export async function getPageByCodeApi(code: string) { + return requestClient.get(`/api/online_dev/page/code/${code}`); +} diff --git a/web/apps/web-ele/src/components/dashboard-design/DashboardRenderer.vue b/web/apps/web-ele/src/components/dashboard-design/DashboardRenderer.vue new file mode 100644 index 0000000..5546dc5 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/DashboardRenderer.vue @@ -0,0 +1,135 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/WidgetRenderer.vue b/web/apps/web-ele/src/components/dashboard-design/components/WidgetRenderer.vue new file mode 100644 index 0000000..2bdc3bb --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/WidgetRenderer.vue @@ -0,0 +1,357 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/AnnouncementList.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/AnnouncementList.vue new file mode 100644 index 0000000..ce131ad --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/AnnouncementList.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/ApprovalCenter.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ApprovalCenter.vue new file mode 100644 index 0000000..65c5c48 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ApprovalCenter.vue @@ -0,0 +1,118 @@ + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/CalendarWidget.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/CalendarWidget.vue new file mode 100644 index 0000000..6568876 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/CalendarWidget.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/ClockWidget.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ClockWidget.vue new file mode 100644 index 0000000..e08e428 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ClockWidget.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/CountdownWidget.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/CountdownWidget.vue new file mode 100644 index 0000000..e6fb606 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/CountdownWidget.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/DataTable.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/DataTable.vue new file mode 100644 index 0000000..78c755e --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/DataTable.vue @@ -0,0 +1,285 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterDate.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterDate.vue new file mode 100644 index 0000000..d54a381 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterDate.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterDateRange.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterDateRange.vue new file mode 100644 index 0000000..4a755f7 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterDateRange.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterInput.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterInput.vue new file mode 100644 index 0000000..88cd1a6 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterInput.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterSelect.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterSelect.vue new file mode 100644 index 0000000..6cf69f4 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/FilterSelect.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/IframeWidget.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/IframeWidget.vue new file mode 100644 index 0000000..95ed3f1 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/IframeWidget.vue @@ -0,0 +1,202 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/ImageCarousel.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ImageCarousel.vue new file mode 100644 index 0000000..5e19293 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ImageCarousel.vue @@ -0,0 +1,252 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/ImageWidget.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ImageWidget.vue new file mode 100644 index 0000000..f83caee --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ImageWidget.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/MyApps.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/MyApps.vue new file mode 100644 index 0000000..65a8780 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/MyApps.vue @@ -0,0 +1,109 @@ + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/NoticeList.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/NoticeList.vue new file mode 100644 index 0000000..76deccd --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/NoticeList.vue @@ -0,0 +1,269 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/ProgressCard.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ProgressCard.vue new file mode 100644 index 0000000..d546246 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ProgressCard.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/QuickLinks.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/QuickLinks.vue new file mode 100644 index 0000000..ec167b4 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/QuickLinks.vue @@ -0,0 +1,120 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/RankingList.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/RankingList.vue new file mode 100644 index 0000000..afb3cbb --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/RankingList.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/ServerMonitor.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ServerMonitor.vue new file mode 100644 index 0000000..cdcaaa6 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/ServerMonitor.vue @@ -0,0 +1,294 @@ + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/StatCard.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/StatCard.vue new file mode 100644 index 0000000..74c60cd --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/StatCard.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/TodoList.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/TodoList.vue new file mode 100644 index 0000000..5ed1800 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/TodoList.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/VideoPlayer.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/VideoPlayer.vue new file mode 100644 index 0000000..1fc6df6 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/VideoPlayer.vue @@ -0,0 +1,277 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/WeatherWidget.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/WeatherWidget.vue new file mode 100644 index 0000000..a53a3c8 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/WeatherWidget.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/components/widgets/WelcomeCard.vue b/web/apps/web-ele/src/components/dashboard-design/components/widgets/WelcomeCard.vue new file mode 100644 index 0000000..229ef9a --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/components/widgets/WelcomeCard.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/web/apps/web-ele/src/components/dashboard-design/index.ts b/web/apps/web-ele/src/components/dashboard-design/index.ts new file mode 100644 index 0000000..9fde736 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/index.ts @@ -0,0 +1,10 @@ +export { default as DashboardRenderer } from './DashboardRenderer.vue'; +export type { + DashboardConfig, + DashboardWidget, + DataSourceConfig, + DataSourceType, + WidgetStyle, + WidgetType, +} from './types'; +export { createRefreshTimer, fetchWidgetData } from './utils/dataFetcher'; diff --git a/web/apps/web-ele/src/components/dashboard-design/runtime.ts b/web/apps/web-ele/src/components/dashboard-design/runtime.ts new file mode 100644 index 0000000..a8278da --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/runtime.ts @@ -0,0 +1,23 @@ +import { ref } from 'vue'; + +const globalParams = ref>({}); +const globalParamsVersion = ref(0); + +function updateGlobalParam(key: string, value: any) { + globalParams.value = { ...globalParams.value, [key]: value }; + globalParamsVersion.value++; +} + +function clearGlobalParams() { + globalParams.value = {}; + globalParamsVersion.value++; +} + +export function useDashboardRuntime() { + return { + clearGlobalParams, + globalParams, + globalParamsVersion, + updateGlobalParam, + }; +} diff --git a/web/apps/web-ele/src/components/dashboard-design/types.ts b/web/apps/web-ele/src/components/dashboard-design/types.ts new file mode 100644 index 0000000..c7314fe --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/types.ts @@ -0,0 +1,115 @@ +export type DataSourceType = 'api' | 'dataSource' | 'static' | 'upload'; + +export interface FieldMapping { + source: string; + target: string; +} + +export interface ParamBinding { + paramName: string; + globalKey: string; +} + +export interface DataSourceConfig { + type: DataSourceType; + dataSourceCode?: string; + apiUrl?: string; + apiMethod?: 'GET' | 'POST'; + apiHeaders?: Record; + apiParams?: Record; + apiBody?: Record; + dataPath?: string; + fieldMappings?: FieldMapping[]; + paramBindings?: ParamBinding[]; + refreshInterval?: number; + refreshEnabled?: boolean; +} + +export type WidgetType = + | 'announcement-list' + | 'approval-center' + | 'calendar' + | 'chart-area' + | 'chart-bar' + | 'chart-funnel' + | 'chart-gauge' + | 'chart-heatmap' + | 'chart-kline' + | 'chart-line' + | 'chart-pie' + | 'chart-radar' + | 'chart-ring' + | 'chart-sankey' + | 'chart-scatter' + | 'clock' + | 'countdown' + | 'data-table' + | 'filter-date' + | 'filter-date-range' + | 'filter-input' + | 'filter-select' + | 'form-render' + | 'iframe' + | 'image' + | 'image-carousel' + | 'my-apps' + | 'notice-list' + | 'progress-card' + | 'quick-links' + | 'ranking-list' + | 'server-monitor' + | 'stat-card' + | 'todo-list' + | 'video-player' + | 'weather' + | 'welcome-card'; + +export interface WidgetStyle { + backgroundColor?: string; + backgroundImage?: string; + backgroundSize?: 'auto' | 'contain' | 'cover'; + borderWidth?: number; + borderColor?: string; + borderStyle?: 'dashed' | 'dotted' | 'none' | 'solid'; + borderRadius?: number; + shadowEnabled?: boolean; + shadowColor?: string; + shadowBlur?: number; + shadowOffsetX?: number; + shadowOffsetY?: number; + padding?: number; + titleShow?: boolean; + titleFontSize?: number; + titleColor?: string; + titleAlign?: 'center' | 'left' | 'right'; + titleFontWeight?: 'bold' | 'normal'; +} + +export interface DashboardWidget { + id: string; + type: WidgetType; + i: string; + x: number; + y: number; + w: number; + h: number; + minW?: number; + minH?: number; + maxW?: number; + maxH?: number; + title?: string; + props: Record; + style?: WidgetStyle; + dataSource?: DataSourceConfig; +} + +export interface DashboardConfig { + id: string; + name: string; + columns: number; + rowHeight: number; + margin: [number, number]; + backgroundColor?: string; + showOuterMargin?: boolean; + widgets: DashboardWidget[]; +} diff --git a/web/apps/web-ele/src/components/dashboard-design/utils/dataFetcher.ts b/web/apps/web-ele/src/components/dashboard-design/utils/dataFetcher.ts new file mode 100644 index 0000000..6b479f2 --- /dev/null +++ b/web/apps/web-ele/src/components/dashboard-design/utils/dataFetcher.ts @@ -0,0 +1,314 @@ +import type { + DataSourceConfig, + FieldMapping, +} from '../types'; + +import { $t } from '@vben/locales'; + +import { requestClient } from '#/api/request'; + +/** + * 根据路径获取对象中的值 + * @param obj 对象 + * @param path 路径,如 'data.list' 或 'data.items[0].name' + */ +export function getValueByPath(obj: any, path: string): any { + if (!obj || !path) return obj; + + const keys = path.replaceAll(/\[(\d+)\]/g, '.$1').split('.'); + let result = obj; + + for (const key of keys) { + if (result === null || result === undefined) return undefined; + result = result[key]; + } + + return result; +} + +/** + * 根据路径设置对象中的值 + */ +export function setValueByPath(obj: any, path: string, value: any): void { + if (!obj || !path) return; + + const keys = path.split('.'); + let current = obj; + + for (let i = 0; i < keys.length - 1; i++) { + const key = keys[i]!; + if (current[key] === undefined) { + current[key] = {}; + } + current = current[key]; + } + + current[keys[keys.length - 1]!] = value; +} + +/** + * 应用字段映射 + */ +export function applyFieldMappings( + data: any, + mappings: FieldMapping[] | undefined, + targetProps: Record, +): Record { + if (!mappings || mappings.length === 0) { + return { ...targetProps, ...data }; + } + + const result = { ...targetProps }; + + for (const mapping of mappings) { + const value = getValueByPath(data, mapping.source); + if (value !== undefined) { + setValueByPath(result, mapping.target, value); + } + } + + return result; +} + +/** + * 数据获取工具 + */ +export async function fetchWidgetData( + dataSource: DataSourceConfig | undefined, + defaultProps: Record, + params?: Record, +): Promise<{ data: any; props: Record }> { + if (!dataSource || dataSource.type === 'static') { + return { data: null, props: defaultProps }; + } + + // 通用数据源类型 + if (dataSource.type === 'dataSource' && dataSource.dataSourceCode) { + try { + const response = await requestClient.get( + `/api/core/data-source/execute/${dataSource.dataSourceCode}`, + { params: params && Object.keys(params).length > 0 ? params : undefined }, + ); + + // 后端返回格式是 {data: ...},需要提取 data 字段 + const rawData = response?.data ?? response; + + // 数据源返回的数据可能是数组或对象(图表数据源返回 {xAxisData, seriesData} 格式) + const extractedData = dataSource.dataPath + ? getValueByPath(rawData, dataSource.dataPath) + : rawData; + + // 检查是否是图表数据格式(包含 xAxisData 或 seriesData 或 indicator 或 value) + if ( + extractedData && + typeof extractedData === 'object' && + !Array.isArray(extractedData) && + ('xAxisData' in extractedData || + 'seriesData' in extractedData || + 'indicator' in extractedData || + 'yAxisData' in extractedData || + ('value' in extractedData && 'max' in extractedData)) + ) { + // 图表数据格式,直接合并到 props + const mappedProps = { ...defaultProps, ...extractedData }; + // 如果有额外的字段映射,也应用 + if (dataSource.fieldMappings && dataSource.fieldMappings.length > 0) { + return { + data: extractedData, + props: applyFieldMappings( + extractedData, + dataSource.fieldMappings, + mappedProps, + ), + }; + } + return { data: extractedData, props: mappedProps }; + } + + // 普通数据,应用字段映射 + const mappedProps = applyFieldMappings( + extractedData, + dataSource.fieldMappings, + defaultProps, + ); + + return { data: extractedData, props: mappedProps }; + } catch (error) { + console.error('Failed to fetch data source:', error); + return { data: null, props: defaultProps }; + } + } + + // API 类型 + if (dataSource.type === 'api' && dataSource.apiUrl) { + try { + const method = dataSource.apiMethod || 'GET'; + const params = dataSource.apiParams || {}; + const body = dataSource.apiBody || {}; + const headers = dataSource.apiHeaders || {}; + + let response: any; + + response = await (method === 'GET' + ? requestClient.get(dataSource.apiUrl, { + params, + headers, + }) + : requestClient.post(dataSource.apiUrl, body, { + params, + headers, + })); + + // 根据 dataPath 提取数据 + const extractedData = dataSource.dataPath + ? getValueByPath(response, dataSource.dataPath) + : response; + + // 应用字段映射 + const mappedProps = applyFieldMappings( + extractedData, + dataSource.fieldMappings, + defaultProps, + ); + + return { data: extractedData, props: mappedProps }; + } catch (error) { + console.error('Failed to fetch widget data:', error); + return { data: null, props: defaultProps }; + } + } + + return { data: null, props: defaultProps }; +} + +/** + * 创建自动刷新定时器 + */ +export function createRefreshTimer( + dataSource: DataSourceConfig | undefined, + callback: () => void, +): (() => void) | null { + if ( + !dataSource?.refreshEnabled || + !dataSource.refreshInterval || + dataSource.refreshInterval <= 0 + ) { + return null; + } + + const timer = setInterval(callback, dataSource.refreshInterval * 1000); + + return () => clearInterval(timer); +} + +/** + * 获取组件支持的字段映射目标 + */ +export function getWidgetFieldTargets( + widgetType: string, +): { key: string; label: string }[] { + const commonFields = [ + { key: 'title', label: $t('dashboard-design.attribute.fieldLabels.title') }, + ]; + + const fieldMap: Record = { + 'stat-card': [ + ...commonFields, + { + key: 'value', + label: $t('dashboard-design.attribute.fieldLabels.value'), + }, + { + key: 'trend', + label: $t('dashboard-design.attribute.fieldLabels.trend'), + }, + { + key: 'trendLabel', + label: $t('dashboard-design.attribute.fieldLabels.trendLabel'), + }, + { + key: 'prefix', + label: $t('dashboard-design.attribute.fieldLabels.prefix'), + }, + { + key: 'suffix', + label: $t('dashboard-design.attribute.fieldLabels.suffix'), + }, + ], + 'progress-card': [ + ...commonFields, + { + key: 'percentage', + label: $t('dashboard-design.attribute.fieldLabels.percentage'), + }, + ], + 'chart-line': [ + ...commonFields, + { + key: 'xAxisData', + label: $t('dashboard-design.attribute.fieldLabels.xAxisData'), + }, + { + key: 'seriesData', + label: $t('dashboard-design.attribute.fieldLabels.seriesData'), + }, + ], + 'chart-bar': [ + ...commonFields, + { + key: 'xAxisData', + label: $t('dashboard-design.attribute.fieldLabels.xAxisData'), + }, + { + key: 'seriesData', + label: $t('dashboard-design.attribute.fieldLabels.seriesData'), + }, + ], + 'chart-pie': [ + ...commonFields, + { + key: 'seriesData', + label: $t('dashboard-design.attribute.fieldLabels.seriesData'), + }, + ], + 'chart-gauge': [ + ...commonFields, + { + key: 'value', + label: $t('dashboard-design.attribute.fieldLabels.currentValue'), + }, + { key: 'min', label: $t('dashboard-design.attribute.fieldLabels.min') }, + { key: 'max', label: $t('dashboard-design.attribute.fieldLabels.max') }, + ], + 'todo-list': [ + ...commonFields, + { + key: 'items', + label: $t('dashboard-design.attribute.fieldLabels.listData'), + }, + ], + 'notice-list': [ + ...commonFields, + { + key: 'items', + label: $t('dashboard-design.attribute.fieldLabels.listData'), + }, + ], + 'ranking-list': [ + ...commonFields, + { + key: 'items', + label: $t('dashboard-design.attribute.fieldLabels.listData'), + }, + ], + 'quick-links': [ + ...commonFields, + { + key: 'links', + label: $t('dashboard-design.attribute.fieldLabels.linkData'), + }, + ], + }; + + return fieldMap[widgetType] || commonFields; +} diff --git a/web/apps/web-ele/src/locales/langs/en-US/dashboard-design.json b/web/apps/web-ele/src/locales/langs/en-US/dashboard-design.json new file mode 100644 index 0000000..6197b63 --- /dev/null +++ b/web/apps/web-ele/src/locales/langs/en-US/dashboard-design.json @@ -0,0 +1,894 @@ +{ + "title": "Dashboard Design", + "preview": "Preview", + "save": "Save", + "saveSuccess": "Save successful", + "clear": "Clear", + "clearConfirm": "Are you sure you want to clear the canvas? This action cannot be undone.", + "clearSuccess": "Cleared", + "export": "Export", + "exportSuccess": "Export successful", + "import": "Import", + "importTitle": "Import Configuration", + "importPlaceholder": "Please paste JSON configuration content...", + "importSuccess": "Import successful", + "importError": "Invalid configuration format", + "importEmpty": "Please enter configuration content", + "viewCode": "View Code", + "jsonPreview": "JSON Preview", + "copyCode": "Copy Code", + "copySuccess": "Copied to clipboard", + "copyError": "Copy failed", + "undoSuccess": "Undone", + "redoSuccess": "Redone", + "copyWidgetSuccess": "Copied", + "pasteWidgetSuccess": "Pasted", + "deleteWidgetSuccess": "Deleted", + "noWidgetsTip": "Please add widgets first", + "noConfigTip": "No dashboard configuration", + "loadingData": "Loading data...", + "loadDataError": "Failed to load data", + "unknownWidget": "Unknown widget type", + "widgetCount": "{count} widgets", + "dragTip": "Drag widgets from the left to here", + "add": "Add", + "copy": "Copy", + "delete": "Delete", + "reset": "Reset", + "clean": "Clear", + "canvas": { + "title": "Design Canvas", + "adaptive": "Adaptive", + "actualSize": "Actual Size", + "settings": "Canvas Settings", + "undo": "Undo", + "redo": "Redo" + }, + "months": { + "jan": "Jan", + "feb": "Feb", + "mar": "Mar", + "apr": "Apr", + "may": "May", + "jun": "Jun", + "jul": "Jul", + "aug": "Aug", + "sep": "Sep", + "oct": "Oct", + "nov": "Nov", + "dec": "Dec" + }, + "weekdaysShort": { + "mon": "Mon", + "tue": "Tue", + "wed": "Wed", + "thu": "Thu", + "fri": "Fri", + "sat": "Sat", + "sun": "Sun" + }, + "material": { + "title": "Material Library", + "search": "Search widgets...", + "category": { + "common": "Common", + "chart": "Chart", + "filter": "Filter", + "map": "Map", + "media": "Media", + "other": "Other" + }, + "widgets": { + "statCard": "Stat Card", + "progressCard": "Progress Card", + "chartLine": "Line Chart", + "chartBar": "Bar Chart", + "chartPie": "Pie Chart", + "chartGauge": "Gauge Chart", + "chartArea": "Area Chart", + "chartRadar": "Radar Chart", + "chartFunnel": "Funnel Chart", + "chartScatter": "Scatter Chart", + "chartRing": "Ring Progress", + "chartHeatmap": "Heatmap", + "chartKline": "K-line Chart", + "chartSankey": "Sankey Chart", + "todoList": "Todo List", + "noticeList": "Message Notification", + "announcementList": "Announcement List", + "rankingList": "Ranking List", + "quickLinks": "Quick Links", + "welcomeCard": "Welcome Card", + "calendar": "Calendar", + "countdown": "Countdown", + "clock": "Clock", + "weather": "Weather", + "imageCarousel": "Image Carousel", + "dataTable": "Data Table", + "iframe": "iframe Embed", + "videoPlayer": "Video Player", + "image": "Image", + "formRender": "Form Render", + "approvalCenter": "Approval Center", + "myApps": "My Apps", + "serverMonitor": "Server Monitor", + "filterInput": "Input Filter", + "filterSelect": "Select Filter", + "filterDate": "Date Filter", + "filterDateRange": "Date Range" + }, + "defaultProps": { + "statTitle": "Statistic Data", + "trendLabel": "vs Yesterday", + "progressTitle": "Completion Progress", + "visitTrend": "Visit Trend", + "visits": "Visits", + "downloads": "Downloads", + "salesStat": "Sales Statistics", + "trafficSource": "Traffic Source", + "searchEngine": "Search Engine", + "directAccess": "Direct Access", + "emailMarketing": "Email Marketing", + "unionAds": "Union Ads", + "videoAds": "Video Ads", + "sysLoad": "System Load", + "abilityEval": "Ability Evaluation", + "sales": "Sales", + "mgmt": "Mgmt", + "tech": "Tech", + "cs": "CS", + "rd": "R&D", + "mkt": "Mkt", + "budget": "Budget", + "actual": "Actual", + "convFunnel": "Conversion Funnel", + "visit": "Visit", + "consult": "Consult", + "intent": "Intent", + "order": "Order", + "deal": "Deal", + "dataDist": "Data Distribution", + "height": "Height (cm)", + "weight": "Weight (kg)", + "male": "Male", + "female": "Female", + "kpiDone": "KPI Completion", + "salesVolume": "Sales Volume", + "orderVolume": "Order Volume", + "customerCount": "Customer Count", + "weekVisitHeat": "Weekly Visit Heat", + "stockTrend": "Stock Trend", + "todoTitle": "To-do Items", + "todoItem1": "Complete project report", + "todoItem2": "Team weekly meeting", + "todoItem3": "Code review", + "latestNotice": "Message Notification", + "latestAnnouncement": "Latest Announcements", + "salesRanking": "Sales Ranking", + "welcomeTitle": "Welcome back", + "welcomeSubtitle": "Today is a good day", + "countdownTitle": "Event Countdown", + "todayWeather": "Today's Weather", + "dataList": "Data List", + "externalPage": "External Page", + "itemName": "Item", + "imageTitle": "Image", + "myDashboard": "My Dashboard", + "formRender": "Form Data", + "approvalCenter": "Approval Center", + "myApps": "My Apps", + "serverMonitor": "Server Monitor", + "filterInput": "Keyword", + "filterInputPlaceholder": "Enter keyword to filter...", + "filterSelect": "Select Filter", + "filterSelectPlaceholder": "Please select...", + "filterDate": "Date", + "filterDatePlaceholder": "Select date", + "filterDateRange": "Date Range", + "filterStartDate": "Start Date", + "filterEndDate": "End Date" + } + }, + "attribute": { + "title": "Attribute Panel", + "canvasConfig": "Canvas Config", + "widgetConfig": "Widget Config", + "styleConfig": "Style Config", + "dataConfig": "Data Config", + "globalSettings": "Global Settings", + "dashboardName": "Dashboard Name", + "gridLayout": "Grid Layout", + "columns": "Columns", + "rowHeight": "Row Height (px)", + "widgetMargin": "Widget Margin (px)", + "horizontal": "Horizontal", + "vertical": "Vertical", + "background": "Background", + "backgroundColor": "Background Color", + "reset": "Reset", + "display": "Display", + "outerMargin": "Outer Margin", + "outerMarginTip": "Show outer margin during rendering", + "widgetTitle": "Title", + "layout": "Layout", + "widthGrid": "Width (Grid)", + "heightGrid": "Height (Grid)", + "layoutTip": "Tip: Resize widgets directly on the canvas", + "iconConfig": "Icon Config", + "icon": "Icon", + "iconColor": "Icon Color", + "status": "Status", + "strokeWidth": "Stroke Width", + "showText": "Show Text", + "border": "Border", + "borderWidth": "Border Width", + "borderColor": "Border Color", + "borderStyleLabel": "Border Style", + "borderRadius": "Corner Radius", + "shadow": "Shadow", + "enableShadow": "Enable Shadow", + "shadowColor": "Shadow Color", + "shadowBlur": "Blur Radius", + "chartLayout": "Chart Layout", + "margin": { + "left": "Left Margin (%)", + "right": "Right Margin (%)", + "top": "Top Margin (%)", + "bottom": "Bottom Margin (%)" + }, + "tabs": { + "basic": "Basic", + "data": "Data", + "style": "Style" + }, + "placeholder": { + "name": "Please enter name", + "title": "Please enter title", + "remark": "Please enter description" + }, + "iconOptions": { + "trending": "Trending", + "creditCard": "Credit Card", + "users": "Users", + "activity": "Activity", + "bell": "Bell", + "award": "Award" + }, + "progressStatus": { + "default": "Default", + "success": "Success", + "warning": "Warning", + "exception": "Exception" + }, + "colorTheme": { + "label": "Color Theme", + "default": "Default", + "fresh": "Fresh", + "business": "Business", + "tech": "Tech", + "warm": "Warm" + }, + "chart": { + "smooth": "Smooth Curve", + "showArea": "Show Area", + "showSymbol": "Show Symbol", + "symbolSize": "Symbol Size", + "lineWidth": "Line Width", + "axis": "Axis", + "xAxisName": "X-Axis Name", + "yAxisName": "Y-Axis Name", + "nameLocation": "Name Location", + "legend": "Legend", + "showLegend": "Show Legend", + "legendPosition": "Legend Position", + "barWidth": "Bar Width", + "barRadius": "Bar Radius", + "horizontal": "Horizontal", + "stack": "Stack", + "showBackground": "Show Background", + "pieType": "Pie Type", + "showLabel": "Show Label", + "labelPosition": "Label Position", + "minValue": "Min Value", + "maxValue": "Max Value", + "splitNumber": "Split Number", + "showProgress": "Show Progress", + "showMA5": "Show MA5", + "showMA10": "Show MA10", + "shape": "Shape", + "sort": "Sort", + "orient": "Orient", + "pointSize": "Point Size", + "numerical": "Numerical Config", + "currentValue": "Current Value", + "min": "Min", + "max": "Max", + "unit": "Unit", + "maConfig": "MA Config", + "prefix": "Prefix", + "suffix": "Suffix", + "trendConfig": "Trend Config", + "trendValue": "Trend Value (%)", + "trendTip": "Positive for increase, negative for decrease", + "trendLabel": "Trend Description", + "seriesNamePrefix": "Series", + "itemNamePrefix": "Item", + "placeholder": { + "xAxis": "e.g. Month", + "yAxis": "e.g. Sales", + "unit": "e.g. %", + "title": "Please enter title", + "xAxis2": "Separated by commas, e.g. Jan, Feb, Mar", + "seriesData": "Separated by commas, e.g. 100, 200, 300", + "seriesName": "Series Name", + "prefix": "e.g. $", + "suffix": "e.g. items, %", + "trendLabel": "e.g. vs Yesterday", + "subtitle": "Please enter subtitle" + }, + "location": { + "start": "Start", + "middle": "Middle", + "end": "End", + "top": "Top", + "bottom": "Bottom", + "left": "Left", + "right": "Right" + }, + "pieTypes": { + "pie": "Pie", + "ring": "Ring", + "rose": "Rose" + }, + "labelPositions": { + "outside": "Outside", + "inside": "Inside" + }, + "barWidthOptions": { + "auto": "Auto", + "thin": "Thin (30%)", + "medium": "Medium (50%)", + "thick": "Thick (70%)" + }, + "shapes": { + "polygon": "Polygon", + "circle": "Circle" + }, + "sortOptions": { + "descending": "Descending", + "ascending": "Ascending", + "none": "None" + }, + "orientOptions": { + "vertical": "Vertical", + "horizontal": "Horizontal" + }, + "dataEditMode": "Edit Mode", + "dataEditForm": "Form", + "dataEditJson": "JSON", + "jsonPlaceholder": "JSON format data", + "jsonTip": "Edit JSON directly, automatically applied on blur", + "xAxisData": "X-Axis Data", + "seriesDataLabel": "Series Data", + "addSeries": "Add Series", + "dataItem": "Data Item", + "addItem": "Add Data Item", + "radarTip": "Radar chart data is complex, JSON mode is recommended", + "scatterTip": "Scatter chart data is coordinate points, JSON mode is recommended", + "ringTip": "Ring progress data JSON mode is recommended", + "heatmapTip": "Heatmap data JSON mode is recommended", + "klineTip": "K-line data JSON mode is recommended", + "sankeyTip": "Sankey data JSON mode is recommended", + "gaugeTip": "Gauge data set 'Current Value' in Basic Config" + }, + "dataSource": { + "dataType": "Data Type", + "static": "Static Data", + "uploadImage": "Image Upload", + "uploadVideo": "Video Upload", + "dataSource": "Data Source", + "api": "API Interface", + "config": "Data Source Config", + "select": "Select Data Source", + "selectPlaceholder": "Please select data source", + "mapping": "Field Mapping", + "sourceField": "Source Field", + "targetField": "Target", + "addMapping": "Add Mapping", + "mappingTip": "Tip: Data source mapping is configured in 'Data Source Management', additional mappings here override default.", + "refresh": "Refresh Config", + "autoRefresh": "Auto Refresh", + "interval": "Refresh Interval", + "intervalUnit": "Unit: seconds, min 5 seconds", + "apiConfig": "API Config", + "apiUrl": "Request URL", + "apiUrlPlaceholder": "e.g. /api/dashboard/stats", + "apiMethod": "Request Method", + "dataPath": "Data Path", + "dataPathPlaceholder": "e.g. data.list", + "dataPathTip": "Path to extract data from response", + "enableRefresh": "Enable Refresh", + "intervalSeconds": "Refresh Interval (s)", + "paramBinding": "Param Binding", + "paramName": "Data Source Param", + "globalParam": "Filter Param", + "addBinding": "Add Binding", + "paramBindingTip": "Bind filter component parameters to data source parameters for interactive filtering. Select data source parameter on the left, select or enter filter parameter key on the right.", + "required": "Required" + }, + "widget": { + "todo": { + "items": "Todo Items", + "add": "Add Todo", + "done": "Done", + "newItem": "New Todo", + "priority": { + "high": "High", + "medium": "Medium", + "low": "Low" + } + }, + "notice": { + "tip": "Notice list automatically fetched from system messages, no manual configuration needed", + "limit": "Display Count" + }, + "announcement": { + "tip": "Announcement list automatically fetched from system announcements, no manual configuration needed", + "limit": "Display Count" + }, + "ranking": { + "items": "Ranking Items", + "add": "Add Ranking", + "newItem": "New Member" + }, + "quickLinks": { + "title": "Quick Links", + "tip": "Click grid to select menu, icon automatically uses menu config", + "iconColorDefault": "Default Theme Color", + "selectMenu": "Select Menu" + }, + "welcome": { + "subtitle": "Subtitle", + "subtitlePlaceholder": "Please enter subtitle", + "showTime": "Show Time" + }, + "countdown": { + "config": "Countdown Settings", + "targetTime": "Target Time", + "targetTimePlaceholder": "Select target time", + "showDays": "Show Days", + "showHours": "Show Hours", + "showMinutes": "Show Minutes", + "showSeconds": "Show Seconds", + "finishedText": "Finished Text", + "finishedTextPlaceholder": "e.g. Finished" + }, + "clock": { + "config": "Clock Settings", + "showDate": "Show Date", + "showSeconds": "Show Seconds", + "format24": "24H Format", + "timezone": "Timezone", + "timezoneOptions": { + "local": "Local Time", + "utc": "UTC", + "beijing": "Beijing Time", + "tokyo": "Tokyo Time", + "newyork": "New York Time", + "london": "London Time" + } + }, + "weather": { + "config": "Weather Config", + "cityName": "City Name", + "cityNamePlaceholder": "e.g. Beijing", + "presetCity": "Preset City", + "presetCityPlaceholder": "Quick select city", + "latitude": "Latitude", + "longitude": "Longitude", + "autoLocate": "Auto Locate", + "refreshInterval": "Refresh Interval (min)", + "refreshIntervalTip": "Unit: minutes, minimum 5 minutes" + }, + "carousel": { + "config": "Carousel Settings", + "autoplay": "Autoplay", + "interval": "Interval", + "intervalUnit": "ms", + "showIndicator": "Show Indicator", + "showArrow": "Show Arrow", + "imageList": "Image List", + "addImage": "Add Image", + "selectFromGallery": "From Gallery", + "selectedImages": "Selected Images", + "selectTip": "Please select images from gallery", + "newItem": "New Image" + }, + "table": { + "config": "Table Settings", + "stripe": "Stripe", + "border": "Border", + "showIndex": "Show Index", + "showHeader": "Show Header", + "highlightCurrentRow": "Highlight Current Row", + "alignment": "Alignment", + "headerAlign": "Header Align", + "cellAlign": "Cell Align", + "heightConfig": "Height Config", + "height": "Fixed Height", + "heightPlaceholder": "e.g. 300px or 100%", + "heightTip": "Supports pixels or percentage", + "maxHeight": "Max Height", + "maxHeightPlaceholder": "e.g. 500", + "maxHeightTip": "Shows scrollbar when exceeded", + "customization": "Customization", + "emptyText": "Empty Text", + "emptyTextPlaceholder": "No data", + "headerBgColor": "Header Background", + "summaryConfig": "Summary Config", + "showSummary": "Show Footer Summary", + "summaryType": "Summary Type", + "summaryTypes": { + "sum": "Sum", + "avg": "Average", + "count": "Count", + "max": "Maximum", + "min": "Minimum" + }, + "summaryPrecision": "Decimal Places", + "summaryColumns": "Summary Columns", + "noColumnsConfigured": "Please configure table columns first", + "mergeConfig": "Merge Config", + "enableMerge": "Enable Merge", + "mergeRules": "Merge Rules", + "mergeTypes": { + "row": "Row Merge", + "column": "Column Merge" + }, + "selectMergeField": "Select merge field", + "rowIndex": "Row Index", + "startCol": "Start Column", + "colspan": "Column Span", + "addMergeRule": "Add Merge Rule", + "size": "Size", + "sizeOptions": { + "default": "Default", + "large": "Large", + "small": "Small" + }, + "columnConfig": "Column Config", + "columnConfigJson": "Column Config JSON", + "tableData": "Table Data", + "tableDataJson": "Table Data JSON", + "complexDataTip": "Table data structure is complex, JSON mode is recommended" + }, + "iframe": { + "config": "Display Settings", + "showBorder": "Show Border", + "allowFullscreen": "Allow Fullscreen", + "pageAddress": "Page Address" + }, + "video": { + "config": "Playback Settings", + "autoplay": "Autoplay", + "loop": "Loop", + "muted": "Muted", + "controls": "Native Controls", + "videoAddress": "Video Address", + "poster": "Poster", + "posterPlaceholder": "Poster Image URL (Optional)", + "selectFromFileLib": "From File Library" + }, + "image": { + "title": "Image", + "config": "Image Settings", + "alt": "Alt Text", + "altPlaceholder": "Alt text when image cannot be displayed", + "fit": "Fit Mode", + "fitOptions": { + "cover": "Cover", + "contain": "Contain", + "fill": "Fill", + "none": "None", + "scaleDown": "Scale Down" + }, + "lazy": "Lazy Load", + "previewConfig": "Preview Settings", + "zIndex": "Z-Index", + "closeOnClickModal": "Close on Click Modal", + "url": "Image URL", + "urlPlaceholder": "Please enter image URL", + "link": "Link URL", + "previewList": "Preview List", + "previewListTip": "List of images to preview when clicked, current image if empty", + "addImage": "Add Image", + "mainImage": "Main Image" + }, + "common": { + "staticDataTip": "Current component uses static data, can be modified in Basic Config" + }, + "formRender": { + "formConfig": "Form Config", + "formCode": "Select Form", + "formCodePlaceholder": "Please select a form", + "containerType": "Container Type", + "drawer": "Drawer", + "dialog": "Dialog", + "displayConfig": "Display Config", + "showToolbar": "Show Toolbar", + "showPagination": "Show Pagination", + "pageSize": "Page Size", + "buttonConfig": "Button Config", + "showAdd": "Add Button", + "showView": "View Button", + "showEdit": "Edit Button", + "showDelete": "Delete Button" + } + }, + "fieldLabels": { + "title": "Title", + "value": "Value", + "time": "Time", + "trend": "Trend %", + "trendLabel": "Trend Desc", + "prefix": "Prefix", + "suffix": "Suffix", + "percentage": "Percentage", + "xAxisData": "X-Axis Data", + "seriesData": "Series Data", + "currentValue": "Current Value", + "min": "Min", + "max": "Max", + "listData": "List Data", + "linkData": "Link Data" + }, + "resultType": { + "list": "List", + "tree": "Tree", + "object": "Object", + "value": "Value", + "chartAxis": "Axis Chart", + "chartPie": "Pie Chart", + "chartGauge": "Gauge Chart", + "chartRadar": "Radar Chart", + "chartScatter": "Scatter Chart", + "chartHeatmap": "Heatmap" + }, + "borderStyle": { + "solid": "Solid", + "dashed": "Dashed", + "dotted": "Dotted", + "none": "None" + } + }, + "widgets": { + "announcement": { + "markAllRead": "Mark All as Read", + "top": "Top", + "noData": "No Announcements", + "loading": "Loading...", + "noContent": "No detailed content", + "publisher": "Publisher: ", + "priority": { + "normal": "Normal", + "important": "Important", + "urgent": "Urgent" + }, + "time": { + "justNow": "Just now", + "minutesAgo": " minutes ago", + "hoursAgo": " hours ago", + "daysAgo": " days ago" + } + }, + "weather": { + "city": "City", + "humidity": "Humidity", + "wind": "Wind", + "loading": "Loading weather data...", + "error": "Failed to fetch weather data", + "codes": { + "clear": "Clear", + "mainlyClear": "Mainly Clear", + "partlyCloudy": "Partly Cloudy", + "overcast": "Overcast", + "fog": "Fog", + "drizzle": "Drizzle", + "rain": "Rain", + "snow": "Snow", + "showers": "Showers", + "snowShowers": "Snow Showers", + "thunderstorm": "Thunderstorm" + }, + "windDir": { + "n": "N", + "ne": "NE", + "e": "E", + "se": "SE", + "s": "S", + "sw": "SW", + "w": "W", + "nw": "NW" + } + }, + "chart": { + "visits": "Visits" + }, + "iframe": { + "refresh": "Refresh", + "openNew": "Open in New Tab", + "placeholder": "iframe Embedding", + "noUrl": "URL not set", + "loading": "Loading...", + "loadFailed": "Load failed", + "retry": "Click to retry" + }, + "todo": { + "title": "To-do List", + "noData": "No to-dos", + "priority": { + "high": "High", + "medium": "Medium", + "low": "Low" + } + }, + "dataTable": { + "status": { + "normal": "Normal", + "warning": "Warning", + "error": "Error", + "success": "Success", + "failed": "Failed", + "processing": "Processing" + }, + "summary": { + "sum": "Sum", + "avg": "Avg", + "count": "Count", + "max": "Max", + "min": "Min" + } + }, + "formRender": { + "placeholder": "Form Render Widget", + "noFormCode": "Please configure form code", + "deleteConfirm": "Are you sure to delete this data?", + "batchDeleteConfirm": "Are you sure to delete the selected {count} records?", + "importResult": "Successfully imported {success}, failed {failed}", + "view": "View" + }, + "welcome": { + "greeting": { + "night": "Good late night", + "morning": "Good morning", + "morning2": "Good morning", + "noon": "Good noon", + "afternoon": "Good afternoon", + "evening": "Good evening" + } + }, + "countdown": { + "day": "d", + "hour": "h", + "minute": "m", + "second": "s", + "finished": "Finished" + }, + "video": { + "placeholder": "Video Player" + }, + "ranking": { + "tenThousand": "W" + }, + "clock": { + "weekdays": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + "year": "-", + "month": "-", + "day": "" + }, + "image": { + "title": "Image", + "noData": "No images" + }, + "approvalCenter": { + "initiated": "My Initiated", + "pending": "My Pending", + "handling": "My Handling", + "signing": "My Signing", + "handled": "My Handled", + "copy": "CC to Me", + "start": "Start Process", + "more": "More", + "config": "Approval Center Config", + "routePrefix": "Route Prefix" + }, + "myApps": { + "more": "More", + "noData": "No apps" + }, + "serverMonitor": { + "config": "Server Monitor Config", + "cpuBgColor": "CPU Background", + "memoryBgColor": "Memory Background", + "diskBgColor": "Disk Background", + "networkBgColor": "Network Background", + "core": " Cores", + "thread": " Threads", + "memory": "Memory", + "disk": "Disk", + "network": "Network", + "read": "Read", + "write": "Write", + "upload": "Upload", + "download": "Download", + "totalRW": "Total R/W", + "uptime": "Uptime", + "days": "d ", + "hours": "h ", + "minutes": "m" + } + }, + "filter": { + "config": "Filter Config", + "paramKey": "Param Key", + "paramKeyPlaceholder": "e.g. status", + "startParamKey": "Start Date Param", + "startParamKeyPlaceholder": "e.g. start_date", + "endParamKey": "End Date Param", + "endParamKeyPlaceholder": "e.g. end_date", + "label": "Label", + "labelPlaceholder": "Enter label", + "defaultValue": "Default Value", + "noParamKey": "Param key not configured", + "optionConfig": "Option Config", + "optionSource": "Option Source", + "staticOptions": "Static Options", + "optionLabel": "Label", + "optionValue": "Value", + "addOption": "Add Option", + "optionDataSource": "Option Data Source", + "labelField": "Label Field", + "valueField": "Value Field", + "multiple": "Multiple", + "dateFormat": "Date Format", + "styleConfig": "Style Config", + "labelPosition": "Label Position", + "labelPositionLeft": "Left", + "labelPositionTop": "Top", + "labelPositionHidden": "Hidden", + "labelWidth": "Label Width", + "labelAlign": "Label Align", + "alignLeft": "Left", + "alignCenter": "Center", + "alignRight": "Right", + "componentSize": "Size", + "sizeLarge": "Large", + "sizeDefault": "Default", + "sizeSmall": "Small", + "showBorder": "Show Border", + "borderRadius": "Border Radius" + }, + "gradient": { + "solid": "Solid", + "gradient": "Gradient", + "startColor": "Start", + "endColor": "End", + "direction": "Direction", + "noColor": "Not set", + "presetTitle": "Preset Gradients", + "presets": { + "warmSunrise": "Warm Sunrise", + "oceanBreeze": "Ocean Breeze", + "freshMint": "Fresh Mint", + "peachGlow": "Peach Glow", + "lavenderDream": "Lavender Dream", + "skyBlue": "Sky Blue", + "roseWater": "Rose Water", + "softGrass": "Soft Grass", + "winterNymph": "Winter Nymph", + "cottonCandy": "Cotton Candy", + "sunnyMorning": "Sunny Morning", + "crystalClear": "Crystal Clear" + } + } +} diff --git a/web/apps/web-ele/src/locales/langs/zh-CN/dashboard-design.json b/web/apps/web-ele/src/locales/langs/zh-CN/dashboard-design.json new file mode 100644 index 0000000..cf8ad49 --- /dev/null +++ b/web/apps/web-ele/src/locales/langs/zh-CN/dashboard-design.json @@ -0,0 +1,873 @@ +{ + "title": "仪表盘设计", + "preview": "预览", + "save": "保存", + "saveSuccess": "保存成功", + "clear": "清空", + "clearConfirm": "确定要清空画布吗?此操作不可撤销。", + "clearSuccess": "已清空", + "export": "导出", + "exportSuccess": "导出成功", + "import": "导入", + "importTitle": "导入配置", + "importPlaceholder": "请粘贴 JSON 配置内容...", + "importSuccess": "导入成功", + "importError": "配置格式错误", + "importEmpty": "请输入配置内容", + "viewCode": "查看代码", + "jsonPreview": "JSON 预览", + "copyCode": "复制代码", + "copySuccess": "已复制到剪贴板", + "copyError": "复制失败", + "undoSuccess": "已撤销", + "redoSuccess": "已重做", + "copyWidgetSuccess": "已复制", + "pasteWidgetSuccess": "已粘贴", + "deleteWidgetSuccess": "已删除", + "noWidgetsTip": "请先添加组件", + "noConfigTip": "暂无仪表盘配置", + "loadingData": "数据加载中...", + "loadDataError": "数据加载失败", + "unknownWidget": "未知组件类型", + "widgetCount": "{count} 个组件", + "dragTip": "从左侧拖拽组件到此处", + "add": "添加", + "copy": "复制", + "delete": "删除", + "reset": "重置", + "clean": "清除", + "canvas": { + "title": "设计画布", + "adaptive": "自适应", + "actualSize": "实际尺寸", + "settings": "画布设置", + "undo": "撤销", + "redo": "重做" + }, + "months": { + "jan": "1月", + "feb": "2月", + "mar": "3月", + "apr": "4月", + "may": "5月", + "jun": "6月", + "jul": "7月", + "aug": "8月", + "sep": "9月", + "oct": "10月", + "nov": "11月", + "dec": "12月" + }, + "weekdaysShort": { + "mon": "周一", + "tue": "周二", + "wed": "周三", + "thu": "周四", + "fri": "周五", + "sat": "周六", + "sun": "周日" + }, + "location": { + "east": "华东", + "south": "华南", + "north": "华北", + "central": "华中", + "southwest": "西南", + "northwest": "西北", + "northeast": "东北" + }, + "material": { + "title": "组件库", + "search": "搜索组件...", + "category": { + "common": "通用", + "chart": "图表", + "filter": "筛选器", + "map": "地图", + "media": "多媒体", + "other": "其他" + }, + "widgets": { + "statCard": "统计卡片", + "progressCard": "进度卡片", + "chartLine": "折线图", + "chartBar": "柱状图", + "chartPie": "饼图", + "chartGauge": "仪表盘", + "chartArea": "面积图", + "chartRadar": "雷达图", + "chartFunnel": "漏斗图", + "chartScatter": "散点图", + "chartRing": "环形进度", + "chartHeatmap": "热力图", + "chartKline": "K线图", + "chartSankey": "桑基图", + "todoList": "待办列表", + "noticeList": "消息通知", + "announcementList": "公告列表", + "rankingList": "排行榜", + "quickLinks": "快捷入口", + "welcomeCard": "欢迎卡片", + "calendar": "日历", + "countdown": "倒计时", + "clock": "时钟", + "weather": "天气", + "imageCarousel": "图片轮播", + "dataTable": "数据表格", + "iframe": "iframe 嵌入", + "videoPlayer": "视频播放器", + "image": "图片", + "formRender": "表单渲染", + "approvalCenter": "审批中心", + "myApps": "我的应用", + "serverMonitor": "服务器信息", + "filterInput": "输入筛选", + "filterSelect": "下拉筛选", + "filterDate": "日期筛选", + "filterDateRange": "日期范围" + }, + "defaultProps": { + "statTitle": "统计数据", + "trendLabel": "较昨日", + "progressTitle": "完成进度", + "visitTrend": "访问趋势", + "visits": "访问量", + "downloads": "下载量", + "salesStat": "销售统计", + "trafficSource": "流量来源", + "searchEngine": "搜索引擎", + "directAccess": "直接访问", + "emailMarketing": "邮件营销", + "unionAds": "联盟广告", + "videoAds": "视频广告", + "sysLoad": "系统负载", + "abilityEval": "能力评估", + "sales": "销售", + "mgmt": "管理", + "tech": "技术", + "cs": "客服", + "rd": "研发", + "mkt": "市场", + "budget": "预算", + "actual": "实际", + "convFunnel": "转化漏斗", + "visit": "访问", + "consult": "咨询", + "intent": "意向", + "order": "下单", + "deal": "成交", + "dataDist": "数据分布", + "height": "身高 (cm)", + "weight": "体重 (kg)", + "male": "男性", + "female": "女性", + "kpiDone": "KPI完成度", + "salesVolume": "销售额", + "orderVolume": "订单量", + "customerCount": "客户数", + "weekVisitHeat": "周访问热力", + "stockTrend": "股价走势", + "todoTitle": "待办事项", + "todoItem1": "完成项目报告", + "todoItem2": "团队周会", + "todoItem3": "代码审查", + "latestNotice": "消息通知", + "latestAnnouncement": "最新公告", + "salesRanking": "销售排行", + "welcomeTitle": "欢迎回来", + "welcomeSubtitle": "今天是个好日子", + "countdownTitle": "活动倒计时", + "todayWeather": "今日天气", + "dataList": "数据列表", + "externalPage": "外部页面", + "itemName": "项目", + "imageTitle": "图片", + "myDashboard": "我的仪表盘", + "formRender": "表单数据", + "approvalCenter": "审批中心", + "myApps": "我的应用", + "serverMonitor": "服务器信息", + "filterInput": "关键词", + "filterInputPlaceholder": "请输入关键词筛选...", + "filterSelect": "选择筛选", + "filterSelectPlaceholder": "请选择...", + "filterDate": "日期", + "filterDatePlaceholder": "请选择日期", + "filterDateRange": "日期范围", + "filterStartDate": "开始日期", + "filterEndDate": "结束日期" + } + }, + "attribute": { + "title": "属性面板", + "canvasConfig": "画布配置", + "widgetConfig": "组件配置", + "styleConfig": "样式配置", + "dataConfig": "数据配置", + "globalSettings": "仪表盘全局设置", + "dashboardName": "仪表盘名称", + "gridLayout": "网格布局", + "columns": "列数", + "rowHeight": "行高 (px)", + "widgetMargin": "组件间距 (px)", + "horizontal": "水平", + "vertical": "垂直", + "background": "背景", + "backgroundColor": "背景颜色", + "reset": "重置", + "display": "显示", + "outerMargin": "四周边距", + "outerMarginTip": "渲染时显示四周边距", + "widgetTitle": "标题", + "layout": "布局", + "widthGrid": "宽度 (格)", + "heightGrid": "高度 (格)", + "layoutTip": "提示:直接在画布上拖拽调整组件大小", + "iconConfig": "图标配置", + "icon": "图标", + "iconColor": "图标颜色", + "status": "状态", + "strokeWidth": "线条宽度", + "showText": "显示文字", + "border": "边框", + "borderWidth": "边框宽度", + "borderColor": "边框颜色", + "borderStyleLabel": "边框样式", + "borderRadius": "圆角", + "shadow": "阴影", + "enableShadow": "启用阴影", + "shadowColor": "阴影颜色", + "shadowBlur": "模糊半径", + "chartLayout": "图表布局", + "margin": { + "left": "左边距 (%)", + "right": "右边距 (%)", + "top": "上边距 (%)", + "bottom": "下边距 (%)" + }, + "tabs": { + "basic": "基础", + "data": "数据", + "style": "样式" + }, + "placeholder": { + "name": "请输入名称", + "title": "请输入标题", + "remark": "请输入描述" + }, + "iconOptions": { + "trending": "趋势", + "creditCard": "信用卡", + "users": "用户", + "activity": "活动", + "bell": "铃铛", + "award": "奖杯" + }, + "progressStatus": { + "default": "默认", + "success": "成功", + "warning": "警告", + "exception": "异常" + }, + "colorTheme": { + "label": "颜色主题", + "default": "默认", + "fresh": "清新", + "business": "商务", + "tech": "科技", + "warm": "暖色" + }, + "chart": { + "smooth": "平滑曲线", + "showArea": "显示面积", + "showSymbol": "显示数据点", + "symbolSize": "数据点大小", + "lineWidth": "线条宽度", + "axis": "坐标轴", + "xAxisName": "X轴名称", + "yAxisName": "Y轴名称", + "nameLocation": "名称位置", + "legend": "图例", + "showLegend": "显示图例", + "legendPosition": "图例位置", + "barWidth": "柱子宽度", + "barRadius": "圆角大小", + "horizontal": "水平方向", + "stack": "堆叠显示", + "showBackground": "显示背景", + "pieType": "图表类型", + "showLabel": "显示标签", + "labelPosition": "标签位置", + "minValue": "最小值", + "maxValue": "最大值", + "splitNumber": "刻度数量", + "showProgress": "显示进度", + "showMA5": "显示MA5", + "showMA10": "显示MA10", + "shape": "形状", + "sort": "排序方式", + "orient": "方向", + "pointSize": "点大小", + "numerical": "数值配置", + "currentValue": "当前值", + "min": "最小值", + "max": "最大值", + "unit": "单位", + "maConfig": "均线配置", + "prefix": "前缀", + "suffix": "后缀", + "trendConfig": "趋势配置", + "trendValue": "趋势值 (%)", + "trendTip": "正数为上升,负数为下降", + "trendLabel": "趋势说明", + "seriesNamePrefix": "系列", + "itemNamePrefix": "项目", + "placeholder": { + "xAxis": "如:月份", + "yAxis": "如:销量", + "unit": "如:%", + "title": "请输入标题", + "xAxis2": "用逗号分隔,如:1月, 2月, 3月", + "seriesData": "用逗号分隔,如:100, 200, 300", + "seriesName": "系列名称", + "prefix": "如:¥", + "suffix": "如:元、%", + "trendLabel": "如:较昨日", + "subtitle": "请输入副标题" + }, + "location": { + "start": "起点", + "middle": "中间", + "end": "末端", + "top": "顶部", + "bottom": "底部", + "left": "左侧", + "right": "右侧" + }, + "pieTypes": { + "pie": "饼图", + "ring": "环形图", + "rose": "玫瑰图" + }, + "labelPositions": { + "outside": "外部", + "inside": "内部" + }, + "barWidthOptions": { + "auto": "自动", + "thin": "细 (30%)", + "medium": "中 (50%)", + "thick": "粗 (70%)" + }, + "shapes": { + "polygon": "多边形", + "circle": "圆形" + }, + "sortOptions": { + "descending": "降序", + "ascending": "升序", + "none": "不排序" + }, + "orientOptions": { + "vertical": "垂直", + "horizontal": "水平" + }, + "dataEditMode": "编辑模式", + "dataEditForm": "表单", + "dataEditJson": "JSON", + "jsonPlaceholder": "JSON 格式数据", + "jsonTip": "直接编辑 JSON 数据,失去焦点后自动应用", + "xAxisData": "X轴数据", + "seriesDataLabel": "系列数据", + "addSeries": "添加系列", + "dataItem": "数据项", + "addItem": "添加数据项", + "radarTip": "雷达图数据结构较复杂,建议使用 JSON 模式编辑", + "scatterTip": "散点图数据为坐标点数组,建议使用 JSON 模式编辑", + "ringTip": "环形进度数据建议使用 JSON 模式编辑", + "heatmapTip": "热力图数据建议使用 JSON 模式编辑", + "klineTip": "K线图数据建议使用 JSON 模式编辑", + "sankeyTip": "桑基图数据建议使用 JSON 模式编辑", + "gaugeTip": "仪表盘数据在基础配置中设置\"当前值\"" + }, + "dataSource": { + "dataType": "数据类型", + "static": "静态数据", + "uploadImage": "图片上传", + "uploadVideo": "视频上传", + "dataSource": "数据源", + "api": "API接口", + "config": "数据源配置", + "select": "选择数据源", + "selectPlaceholder": "请选择数据源", + "mapping": "字段映射", + "sourceField": "源字段", + "targetField": "目标", + "addMapping": "添加映射", + "mappingTip": "提示:数据源已在「数据源管理」中配置好字段映射,此处可添加额外的字段映射覆盖默认配置。", + "refresh": "刷新配置", + "autoRefresh": "自动刷新", + "interval": "刷新间隔", + "intervalUnit": "单位:秒,最小 5 秒", + "apiConfig": "接口配置", + "apiUrl": "请求地址", + "apiUrlPlaceholder": "如:/api/dashboard/stats", + "apiMethod": "请求方式", + "dataPath": "数据路径", + "dataPathPlaceholder": "如:data.list", + "dataPathTip": "从响应中提取数据的路径", + "enableRefresh": "启用刷新", + "intervalSeconds": "刷新间隔 (秒)", + "paramBinding": "参数绑定", + "paramName": "数据源参数", + "globalParam": "筛选器参数", + "addBinding": "添加绑定", + "paramBindingTip": "将筛选器组件的参数绑定到数据源参数,实现筛选联动。左侧选择数据源中定义的参数,右侧选择或输入筛选器的参数键名。", + "required": "必填" + }, + "widget": { + "todo": { + "items": "待办项", + "add": "添加待办", + "done": "完成", + "newItem": "新待办", + "priority": { + "high": "高", + "medium": "中", + "low": "低" + } + }, + "notice": { + "tip": "通知列表自动从系统消息中获取数据,无需手动配置", + "limit": "显示数量" + }, + "announcement": { + "tip": "公告列表自动从系统公告中获取数据,无需手动配置", + "limit": "显示数量" + }, + "ranking": { + "items": "排行项", + "add": "添加排行", + "newItem": "新成员" + }, + "quickLinks": { + "title": "快捷入口", + "tip": "点击格子选择菜单,图标自动使用菜单配置", + "iconColorDefault": "默认主题色", + "selectMenu": "选择菜单" + }, + "welcome": { + "subtitle": "副标题", + "subtitlePlaceholder": "请输入副标题", + "showTime": "显示时间" + }, + "countdown": { + "config": "倒计时设置", + "targetTime": "目标时间", + "targetTimePlaceholder": "选择目标时间", + "showDays": "显示天数", + "showHours": "显示小时", + "finishedTextPlaceholder": "已结束" + }, + "clock": { + "timezone": "时区" + }, + "weather": { + "config": "天气配置", + "cityName": "城市名称", + "cityNamePlaceholder": "如:北京", + "presetCity": "预设城市", + "presetCityPlaceholder": "快速选择城市", + "latitude": "纬度", + "longitude": "经度", + "autoLocate": "自动定位", + "refreshInterval": "刷新间隔(分钟)", + "refreshIntervalTip": "单位:分钟,最小 5 分钟" + }, + "iframe": { + "config": "显示设置", + "showBorder": "显示边框", + "allowFullscreen": "允许全屏", + "pageAddress": "页面地址" + }, + "video": { + "config": "播放设置", + "autoplay": "自动播放", + "loop": "循环播放", + "muted": "静音", + "controls": "原生控制栏", + "videoAddress": "视频地址", + "poster": "封面图", + "posterPlaceholder": "封面图片 URL(可选)", + "selectFromFileLib": "从文件库选择" + }, + "image": { + "title": "图片", + "config": "图片设置", + "alt": "替代文本", + "altPlaceholder": "图片无法显示时的替代文本", + "fit": "填充方式", + "fitOptions": { + "cover": "覆盖 (cover)", + "contain": "包含 (contain)", + "fill": "填充 (fill)", + "none": "无 (none)", + "scaleDown": "缩小 (scale-down)" + }, + "lazy": "懒加载", + "previewConfig": "预览设置", + "zIndex": "预览层级", + "closeOnClickModal": "点击遮罩关闭", + "url": "图片 URL", + "urlPlaceholder": "请输入图片URL", + "link": "跳转链接(可选)", + "previewList": "预览图片列表", + "previewListTip": "点击图片时可预览的图片列表,为空时预览当前图片", + "addImage": "添加图片", + "mainImage": "主图" + }, + "common": { + "staticDataTip": "当前组件使用静态数据,可在基础配置中修改" + }, + "formRender": { + "formConfig": "表单配置", + "formCode": "选择表单", + "formCodePlaceholder": "请选择表单", + "containerType": "容器类型", + "drawer": "抽屉", + "dialog": "弹窗", + "displayConfig": "显示配置", + "showToolbar": "显示工具栏", + "showPagination": "显示分页", + "pageSize": "每页条数", + "buttonConfig": "按钮配置", + "showAdd": "新增按钮", + "showView": "查看按钮", + "showEdit": "编辑按钮", + "showDelete": "删除按钮" + }, + "table": { + "config": "表格配置", + "stripe": "斑马纹", + "border": "边框", + "showIndex": "显示序号", + "showHeader": "显示表头", + "highlightCurrentRow": "高亮当前行", + "alignment": "对齐方式", + "headerAlign": "表头对齐", + "cellAlign": "单元格对齐", + "heightConfig": "高度配置", + "height": "固定高度", + "heightPlaceholder": "如:300px 或 100%", + "heightTip": "支持像素值或百分比", + "maxHeight": "最大高度", + "maxHeightPlaceholder": "如:500", + "maxHeightTip": "超出后显示滚动条", + "customization": "自定义", + "emptyText": "空数据提示", + "emptyTextPlaceholder": "暂无数据", + "headerBgColor": "表头背景色", + "summaryConfig": "统计配置", + "showSummary": "显示表尾统计", + "summaryType": "统计类型", + "summaryTypes": { + "sum": "合计", + "avg": "平均值", + "count": "计数", + "max": "最大值", + "min": "最小值" + }, + "summaryPrecision": "小数位数", + "summaryColumns": "统计列", + "noColumnsConfigured": "请先配置表格列", + "mergeConfig": "合并配置", + "enableMerge": "启用合并", + "mergeRules": "合并规则", + "mergeTypes": { + "row": "行合并", + "column": "列合并" + }, + "selectMergeField": "选择合并字段", + "rowIndex": "行号", + "startCol": "起始列", + "colspan": "合并列数", + "addMergeRule": "添加合并规则", + "columnConfig": "列配置", + "columnConfigJson": "JSON 格式列配置", + "tableData": "表格数据", + "tableDataJson": "JSON 格式表格数据", + "complexDataTip": "表格数据结构较复杂,建议使用 JSON 模式编辑", + "sizeOptions": { + "default": "默认", + "large": "大", + "small": "小" + } + } + }, + "fieldLabels": { + "title": "标题", + "value": "数值", + "time": "时间", + "trend": "趋势百分比", + "trendLabel": "趋势说明", + "prefix": "前缀", + "suffix": "后缀", + "percentage": "百分比", + "xAxisData": "X轴数据", + "seriesData": "系列数据", + "currentValue": "当前值", + "min": "最小值", + "max": "最大值", + "listData": "列表数据", + "linkData": "链接数据" + }, + "resultType": { + "list": "列表", + "tree": "树形", + "object": "对象", + "value": "单值", + "chartAxis": "轴向图表", + "chartPie": "饼图", + "chartGauge": "仪表盘", + "chartRadar": "雷达图", + "chartScatter": "散点图", + "chartHeatmap": "热力图" + }, + "borderStyle": { + "solid": "实线", + "dashed": "虚线", + "dotted": "点线", + "none": "无" + } + }, + "widgets": { + "announcement": { + "markAllRead": "全部已读", + "top": "置顶", + "noData": "暂无公告", + "loading": "加载中...", + "noContent": "暂无详细内容", + "publisher": "发布者:", + "priority": { + "normal": "普通", + "important": "重要", + "urgent": "紧急" + }, + "time": { + "justNow": "刚刚", + "minutesAgo": "分钟前", + "hoursAgo": "小时前", + "daysAgo": "天前" + } + }, + "weather": { + "city": "城市", + "humidity": "湿度", + "wind": "风力", + "loading": "加载天气数据中...", + "error": "获取天气数据失败", + "codes": { + "clear": "晴", + "mainlyClear": "晴间多云", + "partlyCloudy": "多云", + "overcast": "阴", + "fog": "雾", + "drizzle": "毛毛雨", + "rain": "雨", + "snow": "雪", + "showers": "阵雨", + "snowShowers": "阵雪", + "thunderstorm": "雷暴" + }, + "windDir": { + "n": "北风", + "ne": "东北风", + "e": "东风", + "se": "东南风", + "s": "南风", + "sw": "西南风", + "w": "西风", + "nw": "西北风" + } + }, + "chart": { + "visits": "访问量" + }, + "iframe": { + "refresh": "刷新", + "openNew": "新窗口打开", + "placeholder": "iframe 嵌入", + "noUrl": "未设置 URL", + "loading": "加载中...", + "loadFailed": "加载失败", + "retry": "点击重试" + }, + "todo": { + "title": "待办事项", + "noData": "暂无待办", + "priority": { + "high": "高", + "medium": "中", + "low": "低" + } + }, + "dataTable": { + "status": { + "normal": "正常", + "warning": "警告", + "error": "异常", + "success": "成功", + "failed": "失败", + "processing": "进行中" + }, + "summary": { + "sum": "合计", + "avg": "平均", + "count": "计数", + "max": "最大", + "min": "最小" + } + }, + "formRender": { + "placeholder": "表单渲染组件", + "noFormCode": "请配置表单编码", + "deleteConfirm": "确定要删除这条数据吗?", + "batchDeleteConfirm": "确定要删除选中的 {count} 条数据吗?", + "importResult": "成功导入 {success} 条,失败 {failed} 条", + "view": "查看" + }, + "welcome": { + "greeting": { + "night": "夜深了", + "morning": "早上好", + "morning2": "上午好", + "noon": "中午好", + "afternoon": "下午好", + "evening": "晚上好" + } + }, + "countdown": { + "day": "天", + "hour": "时", + "minute": "分", + "second": "秒", + "finished": "已结束" + }, + "video": { + "placeholder": "视频播放器" + }, + "ranking": { + "tenThousand": "万" + }, + "clock": { + "weekdays": ["周日", "周一", "周二", "周三", "周四", "周五", "周六"], + "year": "年", + "month": "月", + "day": "日" + }, + "image": { + "title": "图片", + "noData": "暂无图片" + }, + "approvalCenter": { + "initiated": "我发起的", + "pending": "我的待办", + "handling": "我的在办", + "signing": "我的待签", + "handled": "我的已办", + "copy": "抄送我的", + "start": "发起流程", + "more": "更多", + "config": "审批中心配置", + "routePrefix": "路由前缀" + }, + "myApps": { + "more": "更多", + "noData": "暂无应用" + }, + "serverMonitor": { + "config": "服务器信息配置", + "cpuBgColor": "CPU背景色", + "memoryBgColor": "内存背景色", + "diskBgColor": "磁盘背景色", + "networkBgColor": "网络背景色", + "core": "核", + "thread": "线程", + "memory": "内存", + "disk": "磁盘", + "network": "网络", + "read": "读取", + "write": "写入", + "upload": "上传", + "download": "下载", + "totalRW": "累计读/写", + "uptime": "运行时间", + "days": "天", + "hours": "小时", + "minutes": "分钟" + } + }, + "filter": { + "config": "筛选器配置", + "paramKey": "参数键名", + "paramKeyPlaceholder": "如:status", + "startParamKey": "开始日期参数", + "startParamKeyPlaceholder": "如:start_date", + "endParamKey": "结束日期参数", + "endParamKeyPlaceholder": "如:end_date", + "label": "标签", + "labelPlaceholder": "请输入标签", + "defaultValue": "默认值", + "noParamKey": "未配置参数键名", + "optionConfig": "选项配置", + "optionSource": "选项来源", + "staticOptions": "静态选项", + "optionLabel": "标签", + "optionValue": "值", + "addOption": "添加选项", + "optionDataSource": "选项数据源", + "labelField": "标签字段", + "valueField": "值字段", + "multiple": "多选", + "dateFormat": "日期格式", + "styleConfig": "样式配置", + "labelPosition": "标签位置", + "labelPositionLeft": "左侧", + "labelPositionTop": "上方", + "labelPositionHidden": "隐藏", + "labelWidth": "标签宽度", + "labelAlign": "标签对齐", + "alignLeft": "左对齐", + "alignCenter": "居中", + "alignRight": "右对齐", + "componentSize": "组件尺寸", + "sizeLarge": "大", + "sizeDefault": "中", + "sizeSmall": "小", + "showBorder": "显示边框", + "borderRadius": "圆角" + }, + "gradient": { + "solid": "纯色", + "gradient": "渐变", + "startColor": "起始色", + "endColor": "结束色", + "direction": "方向", + "noColor": "未设置", + "presetTitle": "预设渐变", + "presets": { + "warmSunrise": "暖阳晨曦", + "oceanBreeze": "海洋微风", + "freshMint": "清新薄荷", + "peachGlow": "蜜桃光晕", + "lavenderDream": "薰衣草梦", + "skyBlue": "天空蔚蓝", + "roseWater": "玫瑰花水", + "softGrass": "柔和青草", + "winterNymph": "冬日仙子", + "cottonCandy": "棉花糖", + "sunnyMorning": "阳光早晨", + "crystalClear": "水晶透明" + } + } +} diff --git a/web/apps/web-ele/src/locales/langs/zh-TW/dashboard-design.json b/web/apps/web-ele/src/locales/langs/zh-TW/dashboard-design.json new file mode 100644 index 0000000..d89f1c5 --- /dev/null +++ b/web/apps/web-ele/src/locales/langs/zh-TW/dashboard-design.json @@ -0,0 +1,894 @@ +{ + "title": "儀表板設計", + "preview": "預覽", + "save": "保存", + "saveSuccess": "保存成功", + "clear": "清空", + "clearConfirm": "確定要清空畫布嗎?此操作不可撤銷。", + "clearSuccess": "已清空", + "export": "導出", + "exportSuccess": "導出成功", + "import": "導入", + "importTitle": "導入配置", + "importPlaceholder": "請粘貼 JSON 配置內容...", + "importSuccess": "導入成功", + "importError": "配置格式錯誤", + "importEmpty": "請輸入配置內容", + "viewCode": "查看代碼", + "jsonPreview": "JSON 預覽", + "copyCode": "複製代碼", + "copySuccess": "已複製到剪貼板", + "copyError": "複製失敗", + "undoSuccess": "已撤銷", + "redoSuccess": "已重做", + "copyWidgetSuccess": "已複製", + "pasteWidgetSuccess": "已粘貼", + "deleteWidgetSuccess": "已刪除", + "noWidgetsTip": "請先添加組件", + "noConfigTip": "暫無儀表板配置", + "loadingData": "數據加載中...", + "loadDataError": "數據加載失敗", + "unknownWidget": "未知組件類型", + "widgetCount": "{count} 個組件", + "dragTip": "從左側拖拽組件到此處", + "add": "添加", + "copy": "複製", + "delete": "刪除", + "reset": "重置", + "clean": "清除", + "canvas": { + "title": "設計畫布", + "adaptive": "自適應", + "actualSize": "實際尺寸", + "settings": "畫布設置", + "undo": "撤銷", + "redo": "重做" + }, + "months": { + "jan": "1月", + "feb": "2月", + "mar": "3月", + "apr": "4月", + "may": "5月", + "jun": "6月", + "jul": "7月", + "aug": "8月", + "sep": "9月", + "oct": "10月", + "nov": "11月", + "dec": "12月" + }, + "weekdaysShort": { + "mon": "週一", + "tue": "週二", + "wed": "週三", + "thu": "週四", + "fri": "週五", + "sat": "週六", + "sun": "週日" + }, + "material": { + "title": "組件庫", + "search": "搜索組件...", + "category": { + "common": "通用", + "chart": "圖表", + "filter": "篩選器", + "map": "地圖", + "media": "多媒體", + "other": "其他" + }, + "widgets": { + "statCard": "統計卡片", + "progressCard": "進度卡片", + "chartLine": "折線圖", + "chartBar": "柱狀圖", + "chartPie": "餅圖", + "chartGauge": "儀表板", + "chartArea": "面積圖", + "chartRadar": "雷達圖", + "chartFunnel": "漏斗圖", + "chartScatter": "散點圖", + "chartRing": "環形進度", + "chartHeatmap": "熱力圖", + "chartKline": "K線圖", + "chartSankey": "桑基圖", + "todoList": "待辦列表", + "noticeList": "消息通知", + "announcementList": "公告列表", + "rankingList": "排行榜", + "quickLinks": "快捷入口", + "welcomeCard": "歡迎卡片", + "calendar": "日曆", + "countdown": "倒計時", + "clock": "時鐘", + "weather": "天氣", + "imageCarousel": "圖片輪播", + "dataTable": "數據表格", + "iframe": "iframe 嵌入", + "videoPlayer": "視頻播放器", + "image": "圖片", + "formRender": "表單渲染", + "approvalCenter": "審批中心", + "myApps": "我的應用", + "serverMonitor": "服務器信息", + "filterInput": "輸入篩選", + "filterSelect": "下拉篩選", + "filterDate": "日期篩選", + "filterDateRange": "日期範圍" + }, + "defaultProps": { + "statTitle": "統計數據", + "trendLabel": "較昨日", + "progressTitle": "完成進度", + "visitTrend": "訪問趨勢", + "visits": "訪問量", + "downloads": "下載量", + "salesStat": "銷售統計", + "trafficSource": "流量來源", + "searchEngine": "搜索引擎", + "directAccess": "直接訪問", + "emailMarketing": "郵件營銷", + "unionAds": "聯盟廣告", + "videoAds": "視頻廣告", + "sysLoad": "系統負載", + "abilityEval": "能力評估", + "sales": "銷售", + "mgmt": "管理", + "tech": "技術", + "cs": "客服", + "rd": "研發", + "mkt": "市場", + "budget": "預算", + "actual": "實際", + "convFunnel": "轉化漏斗", + "visit": "訪問", + "consult": "諮詢", + "intent": "意向", + "order": "下單", + "deal": "成交", + "dataDist": "數據分佈", + "height": "身高 (cm)", + "weight": "體重 (kg)", + "male": "男性", + "female": "女性", + "kpiDone": "KPI完成度", + "salesVolume": "銷售額", + "orderVolume": "訂單量", + "customerCount": "客戶數", + "weekVisitHeat": "周訪問熱力", + "stockTrend": "股價走勢", + "todoTitle": "待辦事項", + "todoItem1": "完成項目報告", + "todoItem2": "團隊週會", + "todoItem3": "代碼審查", + "latestNotice": "消息通知", + "latestAnnouncement": "最新公告", + "salesRanking": "銷售排行", + "welcomeTitle": "歡迎回來", + "welcomeSubtitle": "今天個好日子", + "countdownTitle": "活動倒計時", + "todayWeather": "今日天氣", + "dataList": "數據列表", + "externalPage": "外部頁面", + "itemName": "項目", + "imageTitle": "圖片", + "myDashboard": "我的儀表盤", + "formRender": "表單數據", + "approvalCenter": "審批中心", + "myApps": "我的應用", + "serverMonitor": "服務器信息", + "filterInput": "關鍵詞", + "filterInputPlaceholder": "請輸入關鍵詞篩選...", + "filterSelect": "選擇篩選", + "filterSelectPlaceholder": "請選擇...", + "filterDate": "日期", + "filterDatePlaceholder": "請選擇日期", + "filterDateRange": "日期範圍", + "filterStartDate": "開始日期", + "filterEndDate": "結束日期" + } + }, + "attribute": { + "title": "屬性面板", + "canvasConfig": "畫布配置", + "widgetConfig": "組件配置", + "styleConfig": "樣式配置", + "dataConfig": "數據配置", + "globalSettings": "儀表板全局設置", + "dashboardName": "儀表板名稱", + "gridLayout": "網格佈局", + "columns": "列數", + "rowHeight": "行高 (px)", + "widgetMargin": "組件間距 (px)", + "horizontal": "水平", + "vertical": "垂直", + "background": "背景", + "backgroundColor": "背景顏色", + "reset": "重置", + "display": "顯示", + "outerMargin": "四週邊距", + "outerMarginTip": "渲染時顯示四週邊距", + "widgetTitle": "標題", + "layout": "佈局", + "widthGrid": "寬度 (格)", + "heightGrid": "高度 (格)", + "layoutTip": "提示:直接在畫布上拖拽調整組件大小", + "iconConfig": "圖標配置", + "icon": "圖標", + "iconColor": "圖標顏色", + "status": "狀態", + "strokeWidth": "線條寬度", + "showText": "顯示文字", + "border": "邊框", + "borderWidth": "邊框寬度", + "borderColor": "邊框顏色", + "borderStyleLabel": "邊框樣式", + "borderRadius": "圓角", + "shadow": "陰影", + "enableShadow": "啟用陰影", + "shadowColor": "陰影顏色", + "shadowBlur": "模糊半徑", + "chartLayout": "圖表佈局", + "margin": { + "left": "左邊距 (%)", + "right": "右邊距 (%)", + "top": "上邊距 (%)", + "bottom": "下邊距 (%)" + }, + "tabs": { + "basic": "基礎", + "data": "數據", + "style": "樣式" + }, + "placeholder": { + "name": "請輸入名稱", + "title": "請輸入標題", + "remark": "請輸入描述" + }, + "iconOptions": { + "trending": "趨勢", + "creditCard": "信用卡", + "users": "用戶", + "activity": "活動", + "bell": "鈴鐺", + "award": "獎杯" + }, + "progressStatus": { + "default": "默認", + "success": "成功", + "warning": "警告", + "exception": "異常" + }, + "colorTheme": { + "label": "顏色主題", + "default": "默認", + "fresh": "清新", + "business": "商務", + "tech": "科技", + "warm": "暖色" + }, + "chart": { + "smooth": "平滑曲線", + "showArea": "顯示面積", + "showSymbol": "顯示數據點", + "symbolSize": "數據點大小", + "lineWidth": "線條寬度", + "axis": "座標軸", + "xAxisName": "X軸名稱", + "yAxisName": "Y軸名稱", + "nameLocation": "名稱位置", + "legend": "圖例", + "showLegend": "顯示圖例", + "legendPosition": "圖例位置", + "barWidth": "柱子寬度", + "barRadius": "圓角大小", + "horizontal": "水平方向", + "stack": "堆疊顯示", + "showBackground": "顯示背景", + "pieType": "圖表類型", + "showLabel": "顯示標籤", + "labelPosition": "標籤位置", + "minValue": "最小值", + "maxValue": "最大值", + "splitNumber": "刻度數量", + "showProgress": "顯示進度", + "showMA5": "顯示MA5", + "showMA10": "顯示MA10", + "shape": "形狀", + "sort": "排序方式", + "orient": "方向", + "pointSize": "點大小", + "numerical": "數值配置", + "currentValue": "當前值", + "min": "最小值", + "max": "最大值", + "unit": "單位", + "maConfig": "均線配置", + "prefix": "前綴", + "suffix": "後綴", + "trendConfig": "趨勢配置", + "trendValue": "趨勢值 (%)", + "trendTip": "正數為上升,負數為下降", + "trendLabel": "趨勢說明", + "seriesNamePrefix": "系列", + "itemNamePrefix": "項目", + "placeholder": { + "xAxis": "如:月份", + "yAxis": "如:銷量", + "unit": "如:%", + "title": "請輸入標題", + "xAxis2": "用逗號分隔,如:1月, 2月, 3月", + "seriesData": "用逗號分隔,如:100, 200, 300", + "seriesName": "系列名稱", + "prefix": "如:¥", + "suffix": "如:元、%", + "trendLabel": "如:較昨日", + "subtitle": "請輸入副標題" + }, + "location": { + "start": "起點", + "middle": "中間", + "end": "末端", + "top": "頂部", + "bottom": "底部", + "left": "左側", + "right": "右側" + }, + "pieTypes": { + "pie": "餅圖", + "ring": "環形圖", + "rose": "玫瑰圖" + }, + "labelPositions": { + "outside": "外部", + "inside": "內部" + }, + "barWidthOptions": { + "auto": "自動", + "thin": "細 (30%)", + "medium": "中 (50%)", + "thick": "粗 (70%)" + }, + "shapes": { + "polygon": "多邊形", + "circle": "圓形" + }, + "sortOptions": { + "descending": "降序", + "ascending": "升序", + "none": "不排序" + }, + "orientOptions": { + "vertical": "垂直", + "horizontal": "水平" + }, + "dataEditMode": "編輯模式", + "dataEditForm": "表單", + "dataEditJson": "JSON", + "jsonPlaceholder": "JSON 格式數據", + "jsonTip": "直接編輯 JSON 數據,失去焦點後自動應用", + "xAxisData": "X軸數據", + "seriesDataLabel": "系列數據", + "addSeries": "添加系列", + "dataItem": "數據項", + "addItem": "添加數據項", + "radarTip": "雷達圖數據結構較複雜,建議使用 JSON 模式編輯", + "scatterTip": "散點圖數據為座標點數組,建議使用 JSON 模式編輯", + "ringTip": "環形進度數據建議使用 JSON 模式編輯", + "heatmapTip": "熱力圖數據建議使用 JSON 模式編輯", + "klineTip": "K線圖數據建議使用 JSON 模式編輯", + "sankeyTip": "桑基圖數據建議使用 JSON 模式編輯", + "gaugeTip": "儀表盤數據在基礎配置中設置\"當前值\"" + }, + "dataSource": { + "dataType": "數據類型", + "static": "靜態數據", + "uploadImage": "圖片上傳", + "uploadVideo": "視頻上傳", + "dataSource": "數據源", + "api": "API接口", + "config": "數據源配置", + "select": "選擇數據源", + "selectPlaceholder": "請選擇數據源", + "mapping": "字段映射", + "sourceField": "源字段", + "targetField": "目標", + "addMapping": "添加映射", + "mappingTip": "提示:數據源已在「數據源管理」中配置好字段映射,此處可添加額外的字段映射覆蓋默認配置。", + "refresh": "刷新配置", + "autoRefresh": "自動刷新", + "interval": "刷新間隔", + "intervalUnit": "單位:秒,最小 5 秒", + "apiConfig": "接口配置", + "apiUrl": "請求地址", + "apiUrlPlaceholder": "如:/api/dashboard/stats", + "apiMethod": "請求方式", + "dataPath": "數據路徑", + "dataPathPlaceholder": "如:data.list", + "dataPathTip": "從響應中提取數據的路徑", + "enableRefresh": "啟用刷新", + "intervalSeconds": "刷新間隔 (秒)", + "paramBinding": "參數綁定", + "paramName": "數據源參數", + "globalParam": "篩選器參數", + "addBinding": "添加綁定", + "paramBindingTip": "將篩選器組件的參數綁定到數據源參數,實現篩選聯動。左側選擇數據源中定義的參數,右側選擇或輸入篩選器的參數鍵名。", + "required": "必填" + }, + "widget": { + "todo": { + "items": "待辦項", + "add": "添加待辦", + "done": "完成", + "newItem": "新待辦", + "priority": { + "high": "高", + "medium": "中", + "low": "低" + } + }, + "notice": { + "tip": "通知列表自動從系統消息中獲取數據,無需手動配置", + "limit": "顯示數量" + }, + "announcement": { + "tip": "公告列表自動從系統公告中獲取數據,無需手動配置", + "limit": "顯示數量" + }, + "ranking": { + "items": "排行項", + "add": "添加排行", + "newItem": "新成員" + }, + "quickLinks": { + "title": "快捷入口", + "tip": "點擊格子選擇菜單,圖標自動使用菜單配置", + "iconColorDefault": "默認主題色", + "selectMenu": "選擇菜單" + }, + "welcome": { + "subtitle": "副標題", + "subtitlePlaceholder": "請輸入副標題", + "showTime": "顯示時間" + }, + "countdown": { + "config": "倒計時設置", + "targetTime": "目標時間", + "targetTimePlaceholder": "選擇目標時間", + "showDays": "顯示天數", + "showHours": "顯示小時", + "showMinutes": "顯示分鐘", + "showSeconds": "顯示秒數", + "finishedText": "結束文字", + "finishedTextPlaceholder": "如:已結束" + }, + "clock": { + "config": "時鐘設置", + "showDate": "顯示日期", + "showSeconds": "顯示秒數", + "format24": "24小時制", + "timezone": "時區", + "timezoneOptions": { + "local": "本地時間", + "utc": "UTC", + "beijing": "北京時間", + "tokyo": "東京時間", + "newyork": "紐約時間", + "london": "倫敦時間" + } + }, + "weather": { + "config": "天氣配置", + "cityName": "城市名稱", + "cityNamePlaceholder": "如:北京", + "presetCity": "預設城市", + "presetCityPlaceholder": "快速選擇城市", + "latitude": "緯度", + "longitude": "經度", + "autoLocate": "自動定位", + "refreshInterval": "刷新間隔(分鐘)", + "refreshIntervalTip": "單位:分鐘,最小 5 分鐘" + }, + "carousel": { + "config": "輪播設置", + "autoplay": "自動播放", + "interval": "切換間隔", + "intervalUnit": "毫秒", + "showIndicator": "顯示指示器", + "showArrow": "顯示箭頭", + "imageList": "圖片列表", + "addImage": "添加圖片", + "selectFromGallery": "從圖庫選擇", + "selectedImages": "已選圖片", + "selectTip": "請從圖庫選擇圖片", + "newItem": "新圖片" + }, + "table": { + "config": "表格設置", + "stripe": "斑馬紋", + "border": "邊框", + "showIndex": "顯示序號", + "showHeader": "顯示表頭", + "highlightCurrentRow": "高亮當前行", + "alignment": "對齊方式", + "headerAlign": "表頭對齊", + "cellAlign": "單元格對齊", + "heightConfig": "高度配置", + "height": "固定高度", + "heightPlaceholder": "如:300px 或 100%", + "heightTip": "支持像素值或百分比", + "maxHeight": "最大高度", + "maxHeightPlaceholder": "如:500", + "maxHeightTip": "超出後顯示滾動條", + "customization": "自定義", + "emptyText": "空數據提示", + "emptyTextPlaceholder": "暫無數據", + "headerBgColor": "表頭背景色", + "summaryConfig": "統計配置", + "showSummary": "顯示表尾統計", + "summaryType": "統計類型", + "summaryTypes": { + "sum": "合計", + "avg": "平均值", + "count": "計數", + "max": "最大值", + "min": "最小值" + }, + "summaryPrecision": "小數位數", + "summaryColumns": "統計列", + "noColumnsConfigured": "請先配置表格列", + "mergeConfig": "合併配置", + "enableMerge": "啟用合併", + "mergeRules": "合併規則", + "mergeTypes": { + "row": "行合併", + "column": "列合併" + }, + "selectMergeField": "選擇合併字段", + "rowIndex": "行號", + "startCol": "起始列", + "colspan": "合併列數", + "addMergeRule": "添加合併規則", + "size": "尺寸", + "sizeOptions": { + "default": "默認", + "large": "大", + "small": "小" + }, + "columnConfig": "列配置", + "columnConfigJson": "列配置 JSON", + "tableData": "表格數據", + "tableDataJson": "表格數據 JSON", + "complexDataTip": "表格數據結構較複雜,建議使用 JSON 模式編輯" + }, + "iframe": { + "config": "顯示設置", + "showBorder": "顯示邊框", + "allowFullscreen": "允許全屏", + "pageAddress": "頁面地址" + }, + "video": { + "config": "播放設置", + "autoplay": "自動播放", + "loop": "循環播放", + "muted": "靜音", + "controls": "原生控制欄", + "videoAddress": "視頻地址", + "poster": "封面圖", + "posterPlaceholder": "封面圖片 URL(選填)", + "selectFromFileLib": "從文件庫選擇" + }, + "image": { + "title": "圖片", + "config": "圖片設置", + "alt": "替代文本", + "altPlaceholder": "圖片無法顯示時的替代文本", + "fit": "填充方式", + "fitOptions": { + "cover": "覆蓋 (cover)", + "contain": "包含 (contain)", + "fill": "填充 (fill)", + "none": "無 (none)", + "scaleDown": "縮小 (scale-down)" + }, + "lazy": "懶加載", + "previewConfig": "預覽設置", + "zIndex": "預覽層級", + "closeOnClickModal": "點擊遮罩關閉", + "url": "圖片 URL", + "urlPlaceholder": "請輸入圖片URL", + "link": "跳轉鏈接(選填)", + "previewList": "預覽圖片列表", + "previewListTip": "點擊圖片時可預覽的圖片列表,為空時預覽當前圖片", + "addImage": "添加圖片", + "mainImage": "主圖" + }, + "common": { + "staticDataTip": "當前組件使用靜態數據,可在基礎配置中修改" + }, + "formRender": { + "formConfig": "表單配置", + "formCode": "選擇表單", + "formCodePlaceholder": "請選擇表單", + "containerType": "容器類型", + "drawer": "抽屜", + "dialog": "彈窗", + "displayConfig": "顯示配置", + "showToolbar": "顯示工具欄", + "showPagination": "顯示分頁", + "pageSize": "每頁條數", + "buttonConfig": "按鈕配置", + "showAdd": "新增按鈕", + "showView": "查看按鈕", + "showEdit": "編輯按鈕", + "showDelete": "刪除按鈕" + } + }, + "fieldLabels": { + "title": "標題", + "value": "數值", + "time": "時間", + "trend": "趨勢百分比", + "trendLabel": "趨勢說明", + "prefix": "前綴", + "suffix": "後綴", + "percentage": "百分比", + "xAxisData": "X軸數據", + "seriesData": "系列數據", + "currentValue": "當前值", + "min": "最小值", + "max": "最大值", + "listData": "列表數據", + "linkData": "鏈接數據" + }, + "resultType": { + "list": "列表", + "tree": "樹形", + "object": "對象", + "value": "單值", + "chartAxis": "軸向圖表", + "chartPie": "餅圖", + "chartGauge": "儀表盤", + "chartRadar": "雷達圖", + "chartScatter": "散點圖", + "chartHeatmap": "熱力圖" + }, + "borderStyle": { + "solid": "實線", + "dashed": "虛線", + "dotted": "點線", + "none": "無" + } + }, + "widgets": { + "announcement": { + "markAllRead": "全部已讀", + "top": "置頂", + "noData": "暫無公告", + "loading": "加載中...", + "noContent": "暫無詳細內容", + "publisher": "發佈者:", + "priority": { + "normal": "普通", + "important": "重要", + "urgent": "緊急" + }, + "time": { + "justNow": "剛剛", + "minutesAgo": "分鐘前", + "hoursAgo": "小時前", + "daysAgo": "天前" + } + }, + "weather": { + "city": "城市", + "humidity": "濕度", + "wind": "風力", + "loading": "載入天氣資料中...", + "error": "取得天氣資料失敗", + "codes": { + "clear": "晴", + "mainlyClear": "晴間多雲", + "partlyCloudy": "多雲", + "overcast": "陰", + "fog": "霧", + "drizzle": "毛毛雨", + "rain": "雨", + "snow": "雪", + "showers": "陣雨", + "snowShowers": "陣雪", + "thunderstorm": "雷暴" + }, + "windDir": { + "n": "北風", + "ne": "東北風", + "e": "東風", + "se": "東南風", + "s": "南風", + "sw": "西南風", + "w": "西風", + "nw": "西北風" + } + }, + "chart": { + "visits": "訪問量" + }, + "iframe": { + "refresh": "刷新", + "openNew": "新窗口打開", + "placeholder": "iframe 嵌入", + "noUrl": "未設置 URL", + "loading": "加載中...", + "loadFailed": "加載失敗", + "retry": "點擊重試" + }, + "todo": { + "title": "待辦事項", + "noData": "暫無待辦", + "priority": { + "high": "高", + "medium": "中", + "low": "低" + } + }, + "dataTable": { + "status": { + "normal": "正常", + "warning": "警告", + "error": "異常", + "success": "成功", + "failed": "失敗", + "processing": "進行中" + }, + "summary": { + "sum": "合計", + "avg": "平均", + "count": "計數", + "max": "最大", + "min": "最小" + } + }, + "formRender": { + "placeholder": "表單渲染組件", + "noFormCode": "請配置表單編碼", + "deleteConfirm": "確定要刪除這條數據嗎?", + "batchDeleteConfirm": "確定要刪除選中的 {count} 條數據嗎?", + "importResult": "成功導入 {success} 條,失敗 {failed} 條", + "view": "查看" + }, + "welcome": { + "greeting": { + "night": "夜深了", + "morning": "早上好", + "morning2": "上午好", + "noon": "中午好", + "afternoon": "下午好", + "evening": "晚上好" + } + }, + "countdown": { + "day": "天", + "hour": "時", + "minute": "分", + "second": "秒", + "finished": "已結束" + }, + "video": { + "placeholder": "視頻播放器" + }, + "ranking": { + "tenThousand": "萬" + }, + "clock": { + "weekdays": ["週日", "週一", "週二", "週三", "週四", "週五", "週六"], + "year": "年", + "month": "月", + "day": "日" + }, + "image": { + "title": "圖片", + "noData": "暫無圖片" + }, + "approvalCenter": { + "initiated": "我發起的", + "pending": "我的待辦", + "handling": "我的在辦", + "signing": "我的待簽", + "handled": "我的已辦", + "copy": "抄送我的", + "start": "發起流程", + "more": "更多", + "config": "審批中心配置", + "routePrefix": "路由前綴" + }, + "myApps": { + "more": "更多", + "noData": "暫無應用" + }, + "serverMonitor": { + "config": "服務器信息配置", + "cpuBgColor": "CPU背景色", + "memoryBgColor": "記憶體背景色", + "diskBgColor": "磁碟背景色", + "networkBgColor": "網絡背景色", + "core": "核", + "thread": "線程", + "memory": "記憶體", + "disk": "磁碟", + "network": "網絡", + "read": "讀取", + "write": "寫入", + "upload": "上傳", + "download": "下載", + "totalRW": "累計讀/寫", + "uptime": "運行時間", + "days": "天", + "hours": "小時", + "minutes": "分鐘" + } + }, + "filter": { + "config": "篩選器配置", + "paramKey": "參數鍵名", + "paramKeyPlaceholder": "如:status", + "startParamKey": "開始日期參數", + "startParamKeyPlaceholder": "如:start_date", + "endParamKey": "結束日期參數", + "endParamKeyPlaceholder": "如:end_date", + "label": "標籤", + "labelPlaceholder": "請輸入標籤", + "defaultValue": "默認值", + "noParamKey": "未配置參數鍵名", + "optionConfig": "選項配置", + "optionSource": "選項來源", + "staticOptions": "靜態選項", + "optionLabel": "標籤", + "optionValue": "值", + "addOption": "添加選項", + "optionDataSource": "選項數據源", + "labelField": "標籤字段", + "valueField": "值字段", + "multiple": "多選", + "dateFormat": "日期格式", + "styleConfig": "樣式配置", + "labelPosition": "標籤位置", + "labelPositionLeft": "左側", + "labelPositionTop": "上方", + "labelPositionHidden": "隱藏", + "labelWidth": "標籤寬度", + "labelAlign": "標籤對齊", + "alignLeft": "左對齊", + "alignCenter": "居中", + "alignRight": "右對齊", + "componentSize": "組件尺寸", + "sizeLarge": "大", + "sizeDefault": "中", + "sizeSmall": "小", + "showBorder": "顯示邊框", + "borderRadius": "圓角" + }, + "gradient": { + "solid": "純色", + "gradient": "漸變", + "startColor": "起始色", + "endColor": "結束色", + "direction": "方向", + "noColor": "未設置", + "presetTitle": "預設漸變", + "presets": { + "warmSunrise": "暖陽晨曦", + "oceanBreeze": "海洋微風", + "freshMint": "清新薄荷", + "peachGlow": "蜜桃光暈", + "lavenderDream": "薰衣草夢", + "skyBlue": "天空蔚藍", + "roseWater": "玫瑰花水", + "softGrass": "柔和青草", + "winterNymph": "冬日仙子", + "cottonCandy": "棉花糖", + "sunnyMorning": "陽光早晨", + "crystalClear": "水晶透明" + } + } +} diff --git a/web/apps/web-ele/src/views/online-dev/page-render/index.vue b/web/apps/web-ele/src/views/online-dev/page-render/index.vue new file mode 100644 index 0000000..6420d28 --- /dev/null +++ b/web/apps/web-ele/src/views/online-dev/page-render/index.vue @@ -0,0 +1,85 @@ + + + diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 8d33439..2c4a3c7 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -743,6 +743,9 @@ importers: element-plus: specifier: 'catalog:' version: 2.11.9(vue@3.5.25(typescript@5.9.3)) + grid-layout-plus: + specifier: 1.1.1 + version: 1.1.1(vue@3.5.25(typescript@5.9.3)) pinia: specifier: ^3.0.3 version: 3.0.4(typescript@5.9.3)(vue@3.5.25(typescript@5.9.3)) @@ -3558,6 +3561,9 @@ packages: '@types/node': optional: true + '@interactjs/types@1.10.27': + resolution: {integrity: sha512-BUdv0cvs4H5ODuwft2Xp4eL8Vmi3LcihK42z0Ft/FbVJZoRioBsxH+LlsBdK4tAie7PqlKGy+1oyOncu1nQ6eA==} + '@internationalized/date@3.10.0': resolution: {integrity: sha512-oxDR/NTEJ1k+UFVQElaNIk65E/Z83HK1z1WI3lQyhTtnNg4R5oVXaPzK3jcpKG8UHKDVuDQHzn+wsxSz8RP3aw==} @@ -3663,6 +3669,9 @@ packages: '@jspm/import-map@1.2.2': resolution: {integrity: sha512-QrM7+lkgVE8t9NZSm9fDSzheguEOVCOxueKxSwgoOt7yUWesWKDFmmL9bQFURl4IqMcpPz7VV2Tvw9s9emaJzQ==} + '@juggle/resize-observer@3.4.0': + resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} + '@keyv/bigmap@1.3.0': resolution: {integrity: sha512-KT01GjzV6AQD5+IYrcpoYLkCu1Jod3nau1Z7EsEuViO3TZGRacSbO9MfHmbJ1WaOXFtWLxPVj169cn2WNKPkIg==} engines: {node: '>= 18'} @@ -4623,6 +4632,14 @@ packages: engines: {node: '>=18'} hasBin: true + '@vexip-ui/hooks@2.9.4': + resolution: {integrity: sha512-dGUiBAeHIsnSVigGSPHcuHBVqrSGW8LV+zGohvOpBfXs8Ynn5ZcSmybIWJ3G826NsicPu9rqwcJG8uvSgG4k4Q==} + peerDependencies: + vue: ^3.5.17 + + '@vexip-ui/utils@2.16.4': + resolution: {integrity: sha512-KX+Q4EsuwDp6ZlRJ7OAkiYxu52D5CVM8zpqQz/FXYV+JUtzl9T3dvxgtA8gQ0wm5Sh/xT6jp8Wo4X7tLAzRh/A==} + '@vite-pwa/vitepress@1.1.0': resolution: {integrity: sha512-enif5C2JmepS69Ak7PSr6K3Eimsg7VyryZo1Z6NiIPNDnjXFlOqxwBYaq8R/d0M7akArJsjos7KmQnEfNFf5nA==} peerDependencies: @@ -6941,6 +6958,11 @@ packages: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} engines: {node: '>=6.0'} + grid-layout-plus@1.1.1: + resolution: {integrity: sha512-7CWehJubrVC8Ps5QFUlnDsp0kiREvKfi3Pdjp21EyY8BNzSusqI3Utcxvu1Y9UUKe3YExvbhJzIxHK6rorbRaQ==} + peerDependencies: + vue: ^3.5.17 + gzip-size@7.0.0: resolution: {integrity: sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -7123,6 +7145,9 @@ packages: resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + interactjs@1.10.27: + resolution: {integrity: sha512-y/8RcCftGAF24gSp76X2JS3XpHiUvDQyhF8i7ujemBz77hwiHDuJzftHx7thY8cxGogwGiPJ+o97kWB6eAXnsA==} + internal-slot@1.1.0: resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} @@ -13016,6 +13041,8 @@ snapshots: optionalDependencies: '@types/node': 22.19.1 + '@interactjs/types@1.10.27': {} + '@internationalized/date@3.10.0': dependencies: '@swc/helpers': 0.5.17 @@ -13150,6 +13177,8 @@ snapshots: '@jspm/import-map@1.2.2': {} + '@juggle/resize-observer@3.4.0': {} + '@keyv/bigmap@1.3.0(keyv@5.5.4)': dependencies: hashery: 1.3.0 @@ -14157,6 +14186,15 @@ snapshots: - rollup - supports-color + '@vexip-ui/hooks@2.9.4(vue@3.5.25(typescript@5.9.3))': + dependencies: + '@floating-ui/dom': 1.7.6 + '@juggle/resize-observer': 3.4.0 + '@vexip-ui/utils': 2.16.4 + vue: 3.5.25(typescript@5.9.3) + + '@vexip-ui/utils@2.16.4': {} + '@vite-pwa/vitepress@1.1.0(vite-plugin-pwa@1.2.0(vite@5.4.21(@types/node@24.10.1)(less@4.4.2)(sass@1.94.2)(terser@5.44.1))(workbox-build@7.4.0)(workbox-window@7.4.0))': dependencies: vite-plugin-pwa: 1.2.0(vite@5.4.21(@types/node@24.10.1)(less@4.4.2)(sass@1.94.2)(terser@5.44.1))(workbox-build@7.4.0)(workbox-window@7.4.0) @@ -16847,6 +16885,13 @@ snapshots: section-matter: 1.0.0 strip-bom-string: 1.0.0 + grid-layout-plus@1.1.1(vue@3.5.25(typescript@5.9.3)): + dependencies: + '@vexip-ui/hooks': 2.9.4(vue@3.5.25(typescript@5.9.3)) + '@vexip-ui/utils': 2.16.4 + interactjs: 1.10.27 + vue: 3.5.25(typescript@5.9.3) + gzip-size@7.0.0: dependencies: duplexer: 0.1.2 @@ -17040,6 +17085,10 @@ snapshots: ini@4.1.1: {} + interactjs@1.10.27: + dependencies: + '@interactjs/types': 1.10.27 + internal-slot@1.1.0: dependencies: es-errors: 1.3.0