diff --git a/package.json b/package.json index f7e2e4b..741b7ac 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "format": "prettier --write src/" }, "dependencies": { - "@vueuse/core": "^13.2.0" + "@vueuse/core": "^13.2.0", + "echarts": "^5.6.0" }, "devDependencies": { "@ease-forge/runtime": "^1.0.15", diff --git a/src/router/index.ts b/src/router/index.ts index 4df6d66..3315653 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,59 +1,189 @@ import { createRouter, createWebHashHistory } from 'vue-router' const router = createRouter({ - history: createWebHashHistory(import.meta.env.BASE_URL), - routes: [ + history: createWebHashHistory(import.meta.env.BASE_URL), + routes: [ + { + path: '/', + name: 'home', + // 自动引导到 /editor + component: () => import('@/views/HomeView.vue'), + children: [ { - path: '/', - name: 'home', - // 自动引导到 /editor - redirect: '/editor' + path: '/dashboard', + name: 'dashboard', + meta: { + title: '仪表盘' + }, + component: () => import('@/views/dashboard/index.vue') }, { - path: '/login', - name: 'login', - component: () => import('@/views/Login.vue') + path: '/modelingSimulation', + name: 'modelingSimulation', + meta: { + title: '建模仿真控制平台' + }, + component: () => import('@/views/modelingSimulation/index.vue') }, { - path: '/tp', - name: 'tp', - component: () => import('@/components/ThreePerfView.vue') + path: '/taskManagement', + name: 'taskManagement', + children:[ + { + path: '/taskQuery', + name: 'taskQuery', + meta: { + title: '任务查询' + }, + component: () => import('@/views/taskManagement/taskQuery.vue') + }, + { + path: '/automatedPresentation', + name: 'automatedPresentation', + meta: { + title: '自动演示管理' + }, + component: () => import('@/views/taskManagement/automatedPresentation.vue') + } + ] }, { - path: '/editor', - name: 'editor', - // component: HomeView, - component: () => import('../editor/ModelMain.vue') + path: '/log', + name: 'log', + children:[ + { + path: '/upstream', + name: 'upstream', + meta: { + title: '上游接口日志' + }, + component: () => import('@/views/log/upstream.vue') + }, + { + path: '/device', + name: 'device', + meta: { + title: '设备报文日志' + }, + component: () => import('@/views/log/device.vue') + } + ] }, { - path: '/about', - name: 'about', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/AboutView.vue') + path: '/device', + name: 'device', + children:[ + { + path: '/points', + name: 'points', + meta: { + title: '点位管理' + }, + component: () => import('@/views/device/points.vue') + }, + { + path: '/locations', + name: 'locations', + meta: { + title: '货位管理' + }, + component: () => import('@/views/device/locations.vue') + }, + { + path: '/vehicles', + name: 'vehicles', + meta: { + title: '车辆管理' + }, + component: () => import('@/views/device/vehicles.vue') + }, + { + path: '/chargers', + name: 'chargers', + meta: { + title: '充电位管理' + }, + component: () => import('@/views/device/chargers.vue') + } + ] }, - { - path: '/DataForm01', - name: 'DataForm01', - component: () => import('@/pages/DataForm01.vue') + path: '/inventory', + name: 'inventory', + children:[ + { + path: '/query', + name: 'query', + meta: { + title: '库存查询' + }, + component: () => import('@/views/inventory/query.vue') + }, + { + path: '/account', + name: 'account', + meta: { + title: '帐页查询' + }, + component: () => import('@/views/inventory/account.vue') + } + ] }, { - path: '/JsDemo', - name: 'JsDemo', - component: () => import('@/pages/JsDemo.vue') - }, - ] -}) + path: '/user', + name: 'user', + children:[ + { + path: '/users', + name: 'users', + meta: { + title: '用户管理' + }, + component: () => import('@/views/user/users.vue') + }, + { + path: '/roles', + name: 'roles', + meta: { + title: '角色管理' + }, + component: () => import('@/views/user/roles.vue') + } + ] + } + ] + }, + { + path: '/tp', + name: 'tp', + component: () => import('@/components/ThreePerfView.vue') + }, + { + path: '/editor', + name: 'editor', + // component: HomeView, + component: () => import('../editor/ModelMain.vue') + }, + { + path: '/about', + name: 'about', + // route level code-splitting + // this generates a separate chunk (About.[hash].js) for this route + // which is lazy-loaded when the route is visited. + component: () => import('../views/AboutView.vue') + }, -router.beforeEach((to, from) => { - if (to.name !== "login" && !window.globalConfig.user) { - return { name: "login" }; - } - // if (to.name === "login" && window.globalConfig.user) { - // return { name: "home" }; - // } + { + path: '/DataForm01', + name: 'DataForm01', + component: () => import('@/pages/DataForm01.vue') + }, + { + path: '/JsDemo', + name: 'JsDemo', + component: () => import('@/pages/JsDemo.vue') + }, + ] }) export default router diff --git a/src/views/Header.vue b/src/views/Header.vue new file mode 100644 index 0000000..bb3226a --- /dev/null +++ b/src/views/Header.vue @@ -0,0 +1,74 @@ + + + + diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 3ed23fc..df7da33 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,50 +1,126 @@ - - function animate() { - requestAnimationFrame(animate) - cube.rotation.x += 0.01 - cube.rotation.y += 0.01 - renderer.render(scene, camera) + diff --git a/src/views/Sidebar.vue b/src/views/Sidebar.vue new file mode 100644 index 0000000..0e64ca7 --- /dev/null +++ b/src/views/Sidebar.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/src/views/dashboard/EChartWrapper.vue b/src/views/dashboard/EChartWrapper.vue new file mode 100644 index 0000000..2e6aaad --- /dev/null +++ b/src/views/dashboard/EChartWrapper.vue @@ -0,0 +1,58 @@ + + + \ No newline at end of file diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue new file mode 100644 index 0000000..b53de95 --- /dev/null +++ b/src/views/dashboard/index.vue @@ -0,0 +1,281 @@ + + + diff --git a/src/views/device/chargers.vue b/src/views/device/chargers.vue new file mode 100644 index 0000000..188d6a7 --- /dev/null +++ b/src/views/device/chargers.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/device/locations.vue b/src/views/device/locations.vue new file mode 100644 index 0000000..cca4dcf --- /dev/null +++ b/src/views/device/locations.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/device/points.vue b/src/views/device/points.vue new file mode 100644 index 0000000..89a0c01 --- /dev/null +++ b/src/views/device/points.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/device/vehicles.vue b/src/views/device/vehicles.vue new file mode 100644 index 0000000..1970a3b --- /dev/null +++ b/src/views/device/vehicles.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/inventory/account.vue b/src/views/inventory/account.vue new file mode 100644 index 0000000..c991376 --- /dev/null +++ b/src/views/inventory/account.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/inventory/query.vue b/src/views/inventory/query.vue new file mode 100644 index 0000000..e0a617a --- /dev/null +++ b/src/views/inventory/query.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/log/device.vue b/src/views/log/device.vue new file mode 100644 index 0000000..e0941c8 --- /dev/null +++ b/src/views/log/device.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/log/upstream.vue b/src/views/log/upstream.vue new file mode 100644 index 0000000..419ef11 --- /dev/null +++ b/src/views/log/upstream.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/modelingSimulation/index.vue b/src/views/modelingSimulation/index.vue new file mode 100644 index 0000000..f4cc1b5 --- /dev/null +++ b/src/views/modelingSimulation/index.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/taskManagement/automatedPresentation.vue b/src/views/taskManagement/automatedPresentation.vue new file mode 100644 index 0000000..b7da511 --- /dev/null +++ b/src/views/taskManagement/automatedPresentation.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/taskManagement/taskQuery.vue b/src/views/taskManagement/taskQuery.vue new file mode 100644 index 0000000..28b5590 --- /dev/null +++ b/src/views/taskManagement/taskQuery.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/user/roles.vue b/src/views/user/roles.vue new file mode 100644 index 0000000..ce510db --- /dev/null +++ b/src/views/user/roles.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/views/user/users.vue b/src/views/user/users.vue new file mode 100644 index 0000000..cea3ce3 --- /dev/null +++ b/src/views/user/users.vue @@ -0,0 +1,12 @@ + + +