update code

main
haha 2024-06-24 22:33:55 +08:00
parent 5b51fde173
commit 01b6ef0491
11 changed files with 53 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -65,7 +65,7 @@ watch(route, () => {
}
}
.el-header{
background-color: #fff;
background-color: #EEF7FE;
}
.center-container{
padding-top:12px;

View File

@ -7,7 +7,9 @@
<img :src="it.icon" class="top-icon" />
<div class="top-row">
<div class="div-title">{{ it.title }}</div>
<div class="div-num">{{ it.count }}</div>
<div class="div-num">
<span style="color:dodgerblue;">{{ it.ucnt }} </span>/ <span style="font-size:14px;">{{it.count }}</span>
</div>
</div>
</el-card>
</el-col>
@ -37,9 +39,9 @@
</div>
<div class="dev-row3">
<div class="device-state">
<i class="dev-state" :class="it.state == 0 ? 'dev-s' : it.state == 1 ? 'dev-w' : 'dev-e'"></i>
<div class="state-text" :class="'state' + it.state">{{ it.state == 0 ? "正常" : (it.state == 1 ? "预警" : "异常") }}</div>
<div style="color:#999;font-size:12px;">设备运行状态</div>
<img style="position: relative;top: -10px;left:-10px;" :src="'images/state/'+it.state+'.png'"/>
<div style="font-size:20px;color:#888;position: relative;top: -10px;padding-right:10px;text-align: center;" >{{getState(it.state) }}</div>
</div>
<div class="dev-chart">
<div class="chart-item-title">
@ -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;

View File

@ -40,7 +40,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
"@": pathSrc,
},
},
base: "/ai/",
base: "./",
css: {
// CSS 预处理器
preprocessorOptions: {