diff --git a/public/images/home.png b/public/images/home.png new file mode 100644 index 0000000..84a071c Binary files /dev/null and b/public/images/home.png differ diff --git a/src/api/menu/index.ts b/src/api/menu/index.ts index cdc272f..b3ac6f8 100644 --- a/src/api/menu/index.ts +++ b/src/api/menu/index.ts @@ -8,6 +8,34 @@ class MenuAPI { static getRoutes() { return new Promise((resolve) => { resolve([ + { + path: "/home", + component: "Layout", + redirect: "/home/index2", + name: "/index2", + meta: { + title: "数据总览2", + icon: "homepage", + hidden: false, + roles: ["GUEST", "ADMIN", "ADMIN6"], + alwaysShow: false, + }, + children: [ + { + path: "index2", + component: "dashboard/index2", + name: "dashboardIndex2", + meta: { + title: "模型管理", + icon: "user", + hidden: true, + roles: ["ADMIN", "GUEST"], + keepAlive: true, + alwaysShow: false, + }, + }, + ] + }, { path: "/modelMgr", component: "Layout", diff --git a/src/assets/logojd.png b/src/assets/logojd.png new file mode 100644 index 0000000..016667b Binary files /dev/null and b/src/assets/logojd.png differ diff --git a/src/layout/components/NavBar/components/NavbarRight2.vue b/src/layout/components/NavBar/components/NavbarRight2.vue new file mode 100644 index 0000000..f4b92ef --- /dev/null +++ b/src/layout/components/NavBar/components/NavbarRight2.vue @@ -0,0 +1,112 @@ + + + + + + + 超异构框架统一管理平台 + + + + + + + + + + + + {{ userStore.user.username }} + + + + + 修改密码 + + + 注销登录 + + + + + + + + + + diff --git a/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue b/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue index 8dbc291..229832d 100644 --- a/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue +++ b/src/layout/components/Sidebar/components/SidebarMixTopMenu.vue @@ -51,7 +51,7 @@ const handleMenuSelect = (routePath: string) => { permissionStore.setMixLeftMenus(routePath); // 获取左侧菜单集合,默认跳转到第一个菜单 const mixLeftMenus = permissionStore.mixLeftMenus; - goToFirstMenu(mixLeftMenus); + goToFirstMenu(mixLeftMenus); }; /** diff --git a/src/layout/index.vue b/src/layout/index.vue index e7cf2fe..6742776 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,6 +1,9 @@ - + + + + @@ -14,18 +17,20 @@ + \ No newline at end of file diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 96d0ddc..62976f2 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -117,28 +117,30 @@ import IndexNotice from './components/IndexNotice.vue' import ServiceStatus from './components/ServiceStatus.vue' import DeviceAPI from "@/api/device"; let svTemp=ref(55.5) +let rd=()=>{ return +(""+Math.random()).substring(3,5)}; +let rd2=()=>{ return +(""+Math.random()).substring(3,4)}; let topInfos = reactive([ - { title: '模型总数', count: 158,ucnt:3, clsName: 'c1', icon: "images/nav/nav1.png" }, - { title: '算子总数', count: 158, ucnt:3,clsName: 'c1', icon: "images/nav/nav2.png" }, - { title: '数据集总数', count: 158, ucnt:3,clsName: 'c1', icon: "images/nav/nav3.png" }, - { title: '评估报告总数', count: 158,ucnt:3, clsName: 'c1', icon: "images/nav/nav4.png" }, - { title: '互联总数', count: 158, ucnt:3,clsName: 'c1', icon: "images/nav/nav5.png" }, - { title: '总访问量', count: 158, ucnt:3,clsName: 'c1', icon: "images/nav/nav1.png" }, + { title: '模型总数', count: rd(),ucnt:rd2(), clsName: 'c1', icon: "images/nav/nav1.png" }, + { title: '算子总数', count: rd(), ucnt:rd2(),clsName: 'c1', icon: "images/nav/nav2.png" }, + { title: '数据集总数', count: rd(), ucnt:rd2(),clsName: 'c1', icon: "images/nav/nav3.png" }, + { title: '评估报告总数', count: rd(),ucnt:rd2(), clsName: 'c1', icon: "images/nav/nav4.png" }, + { title: '互联总数', count: rd(), ucnt:rd2(),clsName: 'c1', icon: "images/nav/nav5.png" }, + { title: '总访问量', count: rd(), ucnt:rd2(),clsName: 'c1', icon: "images/nav/nav1.png" }, ]); let devInfos = reactive([ - { id: 1001, name: '设备名称1', netType: 'network001', modelName: '模型名称', state: 'offline', temperature: 25, memory: 85, cpu: 51 }, - { id: 1002, name: '设备名称2', netType: 'network001', modelName: '模型名称', state: 'compile', temperature: 25, memory: 85, cpu: 51 }, - { id: 1003, name: '设备名称3', netType: 'network001', modelName: '模型名称', state: 'free', temperature: 25, memory: 85, cpu: 51 }, - { id: 1004, name: '设备名称4', netType: 'network001', modelName: '模型名称', state: 'inferencing', temperature: 25, memory: 85, cpu: 51 }, - { id: 1005, name: '设备名称5', netType: 'network001', modelName: '模型名称', state: 'noreg', temperature: 25, memory: 85, cpu: 51 }, - { id: 1006, name: '设备名称6', netType: 'network001', modelName: '模型名称', state: 'publish', temperature: 25, memory: 85, cpu: 51 }, - { id: 1007, name: '设备名称1', netType: 'network001', modelName: '模型名称', state: 'training', temperature: 25, memory: 85, cpu: 51 }, - { id: 1008, name: '设备名称2', netType: 'network001', modelName: '模型名称', state: 'updating', temperature: 25, memory: 85, cpu: 51 }, - { id: 1009, name: '设备名称3', netType: 'network001', modelName: '模型名称', state: 'offline', temperature: 25, memory: 85, cpu: 51 }, - { id: 1010, name: '设备名称4', netType: 'network001', modelName: '模型名称', state: 'training', temperature: 25, memory: 85, cpu: 51 }, - { id: 1011, name: '设备名称5', netType: 'network001', modelName: '模型名称', state: 'training', temperature: 25, memory: 85, cpu: 51 }, - { id: 1012, name: '设备名称6', netType: 'network001', modelName: '模型名称', state: 'training', temperature: 25, memory: 85, cpu: 51 }, + { id: 1001, name: '设备名称1', netType: 'network001', modelName: '模型名称', state: 'offline', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1002, name: '设备名称2', netType: 'network001', modelName: '模型名称', state: 'compile', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1003, name: '设备名称3', netType: 'network001', modelName: '模型名称', state: 'free', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1004, name: '设备名称4', netType: 'network001', modelName: '模型名称', state: 'inferencing', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1005, name: '设备名称5', netType: 'network001', modelName: '模型名称', state: 'noreg', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1006, name: '设备名称6', netType: 'network001', modelName: '模型名称', state: 'publish', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1007, name: '设备名称1', netType: 'network001', modelName: '模型名称', state: 'training', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1008, name: '设备名称2', netType: 'network001', modelName: '模型名称', state: 'updating', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1009, name: '设备名称3', netType: 'network001', modelName: '模型名称', state: 'offline', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1010, name: '设备名称4', netType: 'network001', modelName: '模型名称', state: 'training', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1011, name: '设备名称5', netType: 'network001', modelName: '模型名称', state: 'training', temperature:rd() , memory: rd(), cpu:rd() }, + { id: 1012, name: '设备名称6', netType: 'network001', modelName: '模型名称', state: 'training', temperature:rd() , memory: rd(), cpu:rd() }, ]) const winWidth=ref(0) const isSmallScreen=computed(()=>{ @@ -161,7 +163,7 @@ const getState=(e:any)=>{ return "未注册"; } if(e=="publish"){ - return "部署模型和算子中"; + return "部署中"; } if(e=="training"){ return "训练中"; diff --git a/src/views/dashboard/index2.vue b/src/views/dashboard/index2.vue new file mode 100644 index 0000000..d2c47b2 --- /dev/null +++ b/src/views/dashboard/index2.vue @@ -0,0 +1,478 @@ + + + + + + + + + {{ it.title }} + + {{ it.ucnt }} / {{it.count }} + + + + + + + + + + + 设备运行状态 + 更多 + + + + + + + + {{ it.name }} + + + + + + 网络类型:{{ it.netType }} + + + + + + + {{getState(it.state) }} + + + + 温度 + {{ it.temperature }}% + + + + + + + 内存 + {{ it.memory }}% + + + + + + + 效率 + {{ it.cpu }}% + + + + + + + + + + + + + + + + + 超异构任务部署流程 + + + + + + + + + + 通知中心 + + + + + + + + + + + 服务器运行状态 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/home2.vue b/src/views/home2.vue new file mode 100644 index 0000000..3bd2b61 --- /dev/null +++ b/src/views/home2.vue @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file