diff --git a/src/assets/imgs/dashboard_img.png b/src/assets/imgs/dashboard_img.png new file mode 100644 index 00000000..d1e9fa77 Binary files /dev/null and b/src/assets/imgs/dashboard_img.png differ diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 383bfe5c..244237a8 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -611,6 +611,18 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, + { + path: '/iot/report/dashboardPage/Dashboard1', + component: () => import('@/views/report/dashboardPage/dashboard1/Dashboard8.vue'), + name: 'IotReportDashboard1', + meta: { + title: '智能制造产线任务总览', + hidden: true, + noTagsView: true, + canTo: true + } + }, + { path: '/:pathMatch(.*)*', component: () => import('@/views/Error/404.vue'), diff --git a/src/views/report/dashboardPage/dashboard1/Dashboard8.vue b/src/views/report/dashboardPage/dashboard1/Dashboard8.vue new file mode 100644 index 00000000..cf9af525 --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/Dashboard8.vue @@ -0,0 +1,197 @@ + + + + + diff --git a/src/views/report/dashboardPage/dashboard1/components/DashboardHeader.vue b/src/views/report/dashboardPage/dashboard1/components/DashboardHeader.vue new file mode 100644 index 00000000..ee07885b --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/components/DashboardHeader.vue @@ -0,0 +1,269 @@ + + + + + diff --git a/src/views/report/dashboardPage/dashboard1/components/DeviceOverview.vue b/src/views/report/dashboardPage/dashboard1/components/DeviceOverview.vue new file mode 100644 index 00000000..860ab372 --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/components/DeviceOverview.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/src/views/report/dashboardPage/dashboard1/components/EnergyMonitor.vue b/src/views/report/dashboardPage/dashboard1/components/EnergyMonitor.vue new file mode 100644 index 00000000..cdd6fc7c --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/components/EnergyMonitor.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/src/views/report/dashboardPage/dashboard1/components/EventReminder.vue b/src/views/report/dashboardPage/dashboard1/components/EventReminder.vue new file mode 100644 index 00000000..a8f8c7ad --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/components/EventReminder.vue @@ -0,0 +1,239 @@ + + + + + diff --git a/src/views/report/dashboardPage/dashboard1/components/PaymentMethod.vue b/src/views/report/dashboardPage/dashboard1/components/PaymentMethod.vue new file mode 100644 index 00000000..4e72ab36 --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/components/PaymentMethod.vue @@ -0,0 +1,170 @@ + + + + + diff --git a/src/views/report/dashboardPage/dashboard1/components/ProductionTrend.vue b/src/views/report/dashboardPage/dashboard1/components/ProductionTrend.vue new file mode 100644 index 00000000..144de130 --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/components/ProductionTrend.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/views/report/dashboardPage/dashboard1/components/TaskList.vue b/src/views/report/dashboardPage/dashboard1/components/TaskList.vue new file mode 100644 index 00000000..d8a12131 --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/components/TaskList.vue @@ -0,0 +1,152 @@ + + + + + diff --git a/src/views/report/dashboardPage/dashboard1/utils.ts b/src/views/report/dashboardPage/dashboard1/utils.ts new file mode 100644 index 00000000..fe6c7c70 --- /dev/null +++ b/src/views/report/dashboardPage/dashboard1/utils.ts @@ -0,0 +1,62 @@ +import { onMounted, onUnmounted } from 'vue' +import * as echarts from 'echarts' + +export const colors = { + blue: '#1e90ff', + cyan: '#22d3ee', + green: '#22c55e', + purple: '#8b5cf6', + warn: '#f59e0b', + danger: '#ef4444' +} + +export const style = { + axisLine: { lineStyle: { color: 'rgba(148,163,184,0.45)' } }, + axisLabel: { color: '#a8b7d8', fontSize: 12 }, + splitLine: { lineStyle: { color: 'rgba(30,64,175,0.55)', type: 'dashed' } }, + legendText: { color: '#e5f0ff', fontSize: 12 } +} + +export function animateCount(el: HTMLElement | null, target: number, suffix: string, duration: number) { + if (!el) return + const start = 0 + const t0 = performance.now() + const step = (t: number) => { + const p = Math.min(1, (t - t0) / duration) + const v = start + (target - start) * p + const out = Number.isInteger(target) ? Math.round(v) : Math.round(v * 10) / 10 + el.textContent = suffix ? `${out}${suffix}` : `${out}` + if (p < 1) requestAnimationFrame(step) + } + requestAnimationFrame(step) +} + +export function useChart(domId: string) { + let chart: echarts.ECharts | null = null + + const init = () => { + const el = document.getElementById(domId) + if (!el) return null + chart = echarts.init(el, 'dark', { renderer: 'canvas' }) + return chart + } + + const resize = () => { + chart?.resize() + } + + onMounted(() => { + window.addEventListener('resize', resize) + }) + + onUnmounted(() => { + window.removeEventListener('resize', resize) + chart?.dispose() + }) + + return { + init, + resize, + instance: () => chart + } +}