我的设备加载0.2

This commit is contained in:
WindowBird 2025-08-19 08:58:59 +08:00
parent ba20cd182a
commit dc31b79c58
2 changed files with 30 additions and 4 deletions

View File

@ -49,6 +49,10 @@ export default {
methods: { methods: {
getStatusText(status) { getStatusText(status) {
const statusMap = { const statusMap = {
available: '可租用',
rented: '已出租',
maintenance: '维护中',
scrapped: '报废',
normal: '正常', normal: '正常',
warning: '警告', warning: '警告',
error: '异常', error: '异常',
@ -141,6 +145,26 @@ export default {
font-size: 24rpx; font-size: 24rpx;
color: #40c186; color: #40c186;
&.available {
background-color: #e6f7ff;
color: #1890ff;
}
&.rented {
background-color: #ebfff6;
color: #40c186;
}
&.maintenance {
background-color: #fff7e6;
color: #fa8c16;
}
&.scrapped {
background-color: #fff1f0;
color: #ff4d4f;
}
&.normal { &.normal {
background-color: #ebfff6; background-color: #ebfff6;
} }

View File

@ -146,11 +146,13 @@ export default {
// operationState // operationState
let status = 'normal' let status = 'normal'
if (device.operationState === '1') { if (device.operationState === '1') {
status = 'normal' // status = 'available' //
} else if (device.operationState === '2') { } else if (device.operationState === '2') {
status = 'expired' // status = 'rented' //
} else if (device.operationState === '3') { } else if (device.operationState === '3') {
status = 'maintenance' // status = 'maintenance' //
} else if (device.operationState === '4') {
status = 'scrapped' //
} }
// onlineState线 // onlineState线
@ -180,7 +182,7 @@ export default {
{ {
id: 'default1', id: 'default1',
name: '商用节能灶', name: '商用节能灶',
status: 'normal', status: 'rented',
startTime: '2025-07-25 13:23:59', startTime: '2025-07-25 13:23:59',
endTime: '2026-07-25 13:23:59', endTime: '2026-07-25 13:23:59',
image: commonEnum.TEMP2, image: commonEnum.TEMP2,
@ -189,7 +191,7 @@ export default {
{ {
id: 'default2', id: 'default2',
name: '节能燃烧器', name: '节能燃烧器',
status: 'normal', status: 'rented',
startTime: '2025-07-25 13:23:59', startTime: '2025-07-25 13:23:59',
endTime: '2026-07-25 13:23:59', endTime: '2026-07-25 13:23:59',
image: commonEnum.TEMP3, image: commonEnum.TEMP3,