Commit f2cc8309 authored by “yiyousong”'s avatar “yiyousong”

perf: 优化首页图表日期显示

parent c721d4b1
......@@ -194,9 +194,11 @@ export default {
this.totalDataset.source = thirtyStatList
.map((item) => {
return {
name: this.$moment(
`${item.year}-${item.month}-${item.day}`
).format("YYYY-MM-DD"),
name: `${item.year}-${String(item.month).padStart(
2,
"0"
)}-${String(item.day).padStart(2, "0")}`,
value: item.count,
};
})
......@@ -204,9 +206,10 @@ export default {
this.phDataset.source = thirtyPhStatList
.map((item) => {
return {
name: this.$moment(
`${item.year}-${item.month}-${item.day}`
).format("YYYY-MM-DD"),
name: `${item.year}-${String(item.month).padStart(
2,
"0"
)}-${String(item.day).padStart(2, "0")}`,
value: item.phCount,
};
})
......@@ -214,9 +217,10 @@ export default {
this.pjDataset.source = thirtyPjStatList
.map((item) => {
return {
name: this.$moment(
`${item.year}-${item.month}-${item.day}`
).format("YYYY-MM-DD"),
name: `${item.year}-${String(item.month).padStart(
2,
"0"
)}-${String(item.day).padStart(2, "0")}`,
value: item.pjCount,
};
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment