|
@ -140,30 +140,31 @@ |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
if (res.msg === 'success') { |
|
|
if (res.msg === 'success') { |
|
|
logList.value = res.data; |
|
|
logList.value = res.data; |
|
|
infoObject.value = { ...logList.value[0] }; |
|
|
if (logList.value.length > 0) { |
|
|
infoObject.value.state = infoObject.value.state.value; |
|
|
infoObject.value = { ...logList.value[0] }; |
|
|
let colorMap = { |
|
|
infoObject.value.state = infoObject.value.state.value; |
|
|
1: 'rgba(255, 188, 70, 1)', |
|
|
let colorMap = { |
|
|
2: 'rgba(67, 136, 251, 1)', |
|
|
1: 'rgba(255, 188, 70, 1)', |
|
|
3: 'rgba(41, 196, 154, 1)', |
|
|
2: 'rgba(67, 136, 251, 1)', |
|
|
4: 'rgba(243, 97, 99, 1)', |
|
|
3: 'rgba(41, 196, 154, 1)', |
|
|
5: 'rgba(141, 150, 163, 1)', |
|
|
4: 'rgba(243, 97, 99, 1)', |
|
|
}; |
|
|
5: 'rgba(141, 150, 163, 1)', |
|
|
let bgColorMap = { |
|
|
}; |
|
|
1: 'rgba(255, 188, 70, 0.1)', |
|
|
let bgColorMap = { |
|
|
2: 'rgba(67, 136, 251, 0.1)', |
|
|
1: 'rgba(255, 188, 70, 0.1)', |
|
|
3: 'rgba(41, 196, 154, 0.1)', |
|
|
2: 'rgba(67, 136, 251, 0.1)', |
|
|
4: 'rgba(243, 97, 99, 0.1)', |
|
|
3: 'rgba(41, 196, 154, 0.1)', |
|
|
5: 'rgba(141, 150, 163, 0.1)', |
|
|
4: 'rgba(243, 97, 99, 0.1)', |
|
|
}; |
|
|
5: 'rgba(141, 150, 163, 0.1)', |
|
|
logList.value.forEach((item) => { |
|
|
}; |
|
|
item.stateName = item.state.label; |
|
|
logList.value.forEach((item) => { |
|
|
item.color = colorMap[item.state.value]; |
|
|
item.stateName = item.state.label; |
|
|
item.bgColor = bgColorMap[item.state.value]; |
|
|
item.color = colorMap[item.state.value]; |
|
|
item.src = 'state-' + item.state.value; |
|
|
item.bgColor = bgColorMap[item.state.value]; |
|
|
}); |
|
|
item.src = 'state-' + item.state.value; |
|
|
console.log(logList.value); |
|
|
}); |
|
|
config.value.dataSource = logList.value; |
|
|
config.value.dataSource = logList.value; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}; |
|
|
}; |
|
|