Commit fc5a2df7 authored by Facius's avatar Facius

fix: bug修复

parent 9ca9a097
Pipeline #3249 canceled with stages
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<swiper <swiper
class="swiper" class="swiper"
:indicator-dots="true" :indicator-dots="true"
indicator-color="rgba(252, 184, 42, 0.45)" indicator-color="rgba(2, 160, 116, 0.45)"
indicator-active-color="#FCB82A" indicator-active-color="rgba(2, 160, 116, 1)"
style="height: 420rpx" style="height: 420rpx"
> >
<swiper-item> <swiper-item>
......
...@@ -439,22 +439,18 @@ export default { ...@@ -439,22 +439,18 @@ export default {
}, },
reloadData() { reloadData() {
this.getBookRecordPeriod() this.getBookRecordPeriod()
this.getBookRecordChart()
if (this.infoIndex != 2) {
this.getBookRecordClassification()
this.getBookRecordPage()
}
}, },
handleClickInfo(index) { handleClickInfo(index) {
this.infoIndex = index this.infoIndex = index
this.otherRequest()
},
otherRequest() {
this.getBookRecordChart() this.getBookRecordChart()
if (this.infoIndex != 2) {
if (index != 2) {
this.getBookRecordPage() this.getBookRecordPage()
this.getBookRecordClassification() this.getBookRecordClassification()
} }
}, },
// 收支 // 收支
getBookRecordPeriod() { getBookRecordPeriod() {
this.loading = true this.loading = true
...@@ -492,6 +488,7 @@ export default { ...@@ -492,6 +488,7 @@ export default {
} }
}) })
this.loading = false this.loading = false
this.otherRequest()
}) })
.catch((err) => { .catch((err) => {
this.loading = false this.loading = false
...@@ -549,17 +546,14 @@ export default { ...@@ -549,17 +546,14 @@ export default {
return Number(item2.amount) - Number(item1.amount) return Number(item2.amount) - Number(item1.amount)
}) })
var list = [] var list = []
var all = Number(this.info[this.currentSetting.key])
for (var item of sortData) { for (var item of sortData) {
list.push({ list.push({
name: item.name, name: item.name,
value: Number(item.amount || 0), value: Number(item.amount || 0),
id: item.id, id: item.id,
icon: item.icon, icon: item.icon,
percent: ( percent: all && item.amount ? (Number(item.amount || 0) / all * 100).toFixed(2) : 0,
(Number(item.amount || 0) /
Number(this.info[this.currentSetting.key])) *
100
).toFixed(2),
}) })
} }
} }
......
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