mirror of
https://gitee.com/dromara/go-view.git
synced 2025-10-13 22:12:11 +08:00
feat: 设备运行状态调整顺序
This commit is contained in:
parent
a79116d63d
commit
0f06f45d3a
@ -8,9 +8,21 @@ export const option = {}
|
|||||||
export const customData = {
|
export const customData = {
|
||||||
title: '设备运行状态',
|
title: '设备运行状态',
|
||||||
config: JSON.stringify([
|
config: JSON.stringify([
|
||||||
{"id":84,"label":"动力设备","code":"DL","remark":" 高压柜、低压柜、UPS、蓄电池等关于电的动力设备","icon":" ","father_id":0,"complete_id":"84","complete_name":"动力设备","sort":0,"is_leaf_node":false,"father_type":null,"need_data_num":0},
|
{
|
||||||
{"id":87,"label":"环境设备","code":"HJ","remark":"温湿度、空调、漏水、气体等监测或影响环境因素的设备 ","icon":" ","father_id":0,"complete_id":"87","complete_name":"环境设备","sort":0,"is_leaf_node":false,"father_type":null,"need_data_num":0},
|
"code": "DLSB"
|
||||||
{"id":90,"label":"安防设备","code":"AF","remark":" 视频、门禁、红外、消防及其他安防类设备","icon":" ","father_id":0,"complete_id":"90","complete_name":"安防设备","sort":0,"is_leaf_node":false,"father_type":null,"need_data_num":0}
|
},
|
||||||
|
{
|
||||||
|
"code": "ZNSB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "HJSB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "AFSB"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "QTSB"
|
||||||
|
}
|
||||||
]),
|
]),
|
||||||
showInterval: true,
|
showInterval: true,
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,15 @@ const getData = async() => {
|
|||||||
systemDatas.value = systemDatas.value.filter((e: any) => {
|
systemDatas.value = systemDatas.value.filter((e: any) => {
|
||||||
return config.find((v: any) => v.code === e.device_code)
|
return config.find((v: any) => v.code === e.device_code)
|
||||||
})
|
})
|
||||||
|
let map:any = {}
|
||||||
|
config.forEach((item: any, i: number) => {
|
||||||
|
map[item.code] = i
|
||||||
|
})
|
||||||
|
systemDatas.value.sort((a: any, b: any) => {
|
||||||
|
let ai = map[a.device_code]
|
||||||
|
let bi = map[b.device_code]
|
||||||
|
return ai - bi
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const params = {
|
const params = {
|
||||||
levels: [1, 2, 3],
|
levels: [1, 2, 3],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user