1.睡眠缺少单位问题
This commit is contained in:
2023-12-29 14:54:46 +08:00
parent ecbd690117
commit f016fdc69f
2 changed files with 24 additions and 11 deletions
@@ -4,18 +4,21 @@
<div style="width: 15%; text-align: center"> <div style="width: 15%; text-align: center">
<div> <div>
<span style="font-size: 25px"> {{ maxInfo }}</span> <span style="font-size: 25px"> {{ maxInfo }}</span>
<span style="color: #aa9db6">分钟</span>
</div> </div>
<div style="color: #aa9db6">最高睡眠时长</div> <div style="color: #aa9db6">最高睡眠时长</div>
</div> </div>
<div style="width: 15%; text-align: center"> <div style="width: 15%; text-align: center">
<div> <div>
<span style="font-size: 25px"> {{ minInfo }}</span> <span style="font-size: 25px"> {{ minInfo }}</span>
<span style="color: #aa9db6">分钟</span>
</div> </div>
<div style="color: #aa9db6">最低睡眠时长</div> <div style="color: #aa9db6">最低睡眠时长</div>
</div> </div>
<div style="width: 15%; text-align: center"> <div style="width: 15%; text-align: center">
<div> <div>
<span style="font-size: 25px">{{ middleInfo }}</span> <span style="font-size: 25px">{{ middleInfo }}</span>
<span style="color: #aa9db6">分钟</span>
</div> </div>
<div style="color: #aa9db6">平均睡眠时长</div> <div style="color: #aa9db6">平均睡眠时长</div>
</div> </div>
@@ -157,14 +160,24 @@
} else { } else {
str = str =
xArr[tar.dataIndex] + xArr[tar.dataIndex] +
'<br/>' + `<div>
'深睡' + <div style="display: flex;justify-content: space-between">
' : ' + <div>
(tar.value ? tar.value : 0) + 深睡:${tar.value ? tar.value : 0}
'<br/>' + </div>
'浅睡' + <div style="padding-left: 5px">
' : ' + 分钟
(tar1.value ? tar1.value : 0); </div>
</div>
<div style="display: flex;justify-content: space-between;">
<div>
浅睡:${tar1.value ? tar1.value : 0}
</div>
<div style="padding-left: 5px;">
分钟
</div>
</div>
</div>`;
} }
return str; return str;
}, },
@@ -110,8 +110,8 @@
let xArr = []; let xArr = [];
let yArr = []; let yArr = [];
maxInfo.value = result.total ? result.total : '/'; maxInfo.value = result.total ? result.total : '/';
middleInfo.value = result.total1 ? result.total1 : '/'; middleInfo.value = result.total2 ? result.total2 : '/';
minInfo.value = result.total2 ? result.total2 : '/'; minInfo.value = result.total1 ? result.total1 : '/';
if (type === '1') return; if (type === '1') return;
result.viewDataList.map((item) => { result.viewDataList.map((item) => {
xArr.push(item.date); xArr.push(item.date);
@@ -205,4 +205,4 @@
initEchart('0'); initEchart('0');
}); });
</script> </script>
<style scoped lang="less"></style> <style scoped lang="less"></style>