diff --git a/public/images/state/compile.png b/public/images/state/compile.png new file mode 100644 index 0000000..10aa2b0 Binary files /dev/null and b/public/images/state/compile.png differ diff --git a/public/images/state/free.png b/public/images/state/free.png new file mode 100644 index 0000000..e55df3f Binary files /dev/null and b/public/images/state/free.png differ diff --git a/public/images/state/inferencing.png b/public/images/state/inferencing.png new file mode 100644 index 0000000..0c0e6f6 Binary files /dev/null and b/public/images/state/inferencing.png differ diff --git a/public/images/state/noreg.png b/public/images/state/noreg.png new file mode 100644 index 0000000..0309eb9 Binary files /dev/null and b/public/images/state/noreg.png differ diff --git a/public/images/state/offline.png b/public/images/state/offline.png new file mode 100644 index 0000000..9988281 Binary files /dev/null and b/public/images/state/offline.png differ diff --git a/public/images/state/publish.png b/public/images/state/publish.png new file mode 100644 index 0000000..7ffe3ee Binary files /dev/null and b/public/images/state/publish.png differ diff --git a/public/images/state/training.png b/public/images/state/training.png new file mode 100644 index 0000000..d065b2d Binary files /dev/null and b/public/images/state/training.png differ diff --git a/public/images/state/updating.png b/public/images/state/updating.png new file mode 100644 index 0000000..e5dcdc0 Binary files /dev/null and b/public/images/state/updating.png differ diff --git a/src/layout/index.vue b/src/layout/index.vue index 667e789..e7cf2fe 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -65,7 +65,7 @@ watch(route, () => { } } .el-header{ - background-color: #fff; + background-color: #EEF7FE; } .center-container{ padding-top:12px; diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 3b24736..96d0ddc 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -7,7 +7,9 @@
{{ it.title }}
-
{{ it.count }}
+
+ {{ it.ucnt }} / {{it.count }} +
@@ -37,9 +39,9 @@
- -
{{ it.state == 0 ? "正常" : (it.state == 1 ? "预警" : "异常") }}
-
设备运行状态
+ + +
{{getState(it.state) }}
@@ -116,32 +118,57 @@ import ServiceStatus from './components/ServiceStatus.vue' import DeviceAPI from "@/api/device"; let svTemp=ref(55.5) let topInfos = reactive([ - { title: '模型总数', count: 158, clsName: 'c1', icon: "images/nav/nav1.png" }, - { title: '算子总数', count: 158, clsName: 'c1', icon: "images/nav/nav2.png" }, - { title: '数据集总数', count: 158, clsName: 'c1', icon: "images/nav/nav3.png" }, - { title: '评估报告总数', count: 158, clsName: 'c1', icon: "images/nav/nav4.png" }, - { title: '互联总数', count: 158, clsName: 'c1', icon: "images/nav/nav5.png" }, - { title: '总访问量', count: 158, clsName: 'c1', icon: "images/nav/nav1.png" }, + { 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" }, ]); let devInfos = reactive([ - { id: 1001, name: '设备名称1', netType: 'network001', modelName: '模型名称', state: 0, temperature: 25, memory: 85, cpu: 51 }, - { id: 1002, name: '设备名称2', netType: 'network001', modelName: '模型名称', state: 1, temperature: 25, memory: 85, cpu: 51 }, - { id: 1003, name: '设备名称3', netType: 'network001', modelName: '模型名称', state: 2, temperature: 25, memory: 85, cpu: 51 }, - { id: 1004, name: '设备名称4', netType: 'network001', modelName: '模型名称', state: 0, temperature: 25, memory: 85, cpu: 51 }, - { id: 1005, name: '设备名称5', netType: 'network001', modelName: '模型名称', state: 1, temperature: 25, memory: 85, cpu: 51 }, - { id: 1006, name: '设备名称6', netType: 'network001', modelName: '模型名称', state: 2, temperature: 25, memory: 85, cpu: 51 }, - { id: 1007, name: '设备名称1', netType: 'network001', modelName: '模型名称', state: 0, temperature: 25, memory: 85, cpu: 51 }, - { id: 1008, name: '设备名称2', netType: 'network001', modelName: '模型名称', state: 1, temperature: 25, memory: 85, cpu: 51 }, - { id: 1009, name: '设备名称3', netType: 'network001', modelName: '模型名称', state: 2, temperature: 25, memory: 85, cpu: 51 }, - { id: 1010, name: '设备名称4', netType: 'network001', modelName: '模型名称', state: 0, temperature: 25, memory: 85, cpu: 51 }, - { id: 1011, name: '设备名称5', netType: 'network001', modelName: '模型名称', state: 1, temperature: 25, memory: 85, cpu: 51 }, - { id: 1012, name: '设备名称6', netType: 'network001', modelName: '模型名称', state: 2, temperature: 25, memory: 85, cpu: 51 }, + { 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 }, ]) const winWidth=ref(0) const isSmallScreen=computed(()=>{ return winWidth.value<1440; }); +const getState=(e:any)=>{ + if(e=="offline"){ + return "离线"; + } + if(e=="compile"){ + return "编译中"; + } + if(e=="free"){ + return "空闲"; + } + if(e=="inferencing"){ + return "推理中"; + } + if(e=="noreg"){ + return "未注册"; + } + if(e=="publish"){ + return "部署模型和算子中"; + } + if(e=="training"){ + return "训练中"; + } + + return "升级中"; +} onMounted(()=>{ winWidth.value=window.outerWidth; window.onresize=()=>{ @@ -391,6 +418,8 @@ onMounted(()=>{ .dev-chart{ flex-grow: 1; + position: relative; + top: -10px; .chart-item-title{ margin: 12px 0px 0px; font-size:12px; diff --git a/vite.config.ts b/vite.config.ts index 1d66d28..74e637f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -40,7 +40,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { "@": pathSrc, }, }, - base: "/ai/", + base: "./", css: { // CSS 预处理器 preprocessorOptions: {