Commit 0ebdbb21 authored by Facius's avatar Facius

feat: 图表接口调试

parent 83a646d3
...@@ -36,4 +36,44 @@ export function exportBill(data) { ...@@ -36,4 +36,44 @@ export function exportBill(data) {
data, data,
noLoading:true noLoading:true
}) })
}
// 周期收支统计
export async function getBookRecordPeriod(data) {
return request({
url: `/rest/bookRecord/period`,
method: 'GET',
data,
noLoading: true
})
}
// 分类统计
export async function getBookRecordClassification(data) {
return request({
url: `/rest/bookRecord/classification`,
method: 'GET',
data,
noLoading: true
})
}
// 每日收支统计
export async function getBookRecordChart(data) {
return request({
url: `/rest/bookRecord/chart`,
method: 'GET',
data,
noLoading: true
})
}
// 分页查询明细
export async function getBookRecordPage(data) {
return request({
url: `/rest/bookRecord/record/page`,
method: 'GET',
data,
noLoading: true
})
} }
\ No newline at end of file
...@@ -13,12 +13,10 @@ ...@@ -13,12 +13,10 @@
<view class="middle-view"> <view class="middle-view">
<view class="top-view"> <view class="top-view">
<view class="top-left-view"> <view class="top-left-view">
<view class="name-view">{{ info.classification.name }} </view> <view class="name-view">{{ info.name }} </view>
<view class="percent-view">{{ info.percent }}%</view> <view class="percent-view">{{ formatCount(info.percent) }}%</view>
</view> </view>
<view class="count-view">{{ <view class="count-view">¥{{formatCount(info.value) }}</view>
typeText[info.type.code] + formatCount(info.amount)
}}</view>
</view> </view>
<view class="bottom-view"> <view class="bottom-view">
<u-line-progress <u-line-progress
...@@ -84,13 +82,7 @@ export default { ...@@ -84,13 +82,7 @@ export default {
}, },
computed: { computed: {
image() { image() {
return billStaticBaseUrl + this.info.classification.bookIcon return billStaticBaseUrl + this.info.icon
},
typeText() {
return {
INCOME: '+¥',
EXPENSE: '-¥',
}
}, },
}, },
......
...@@ -96,7 +96,11 @@ export default { ...@@ -96,7 +96,11 @@ export default {
onShow() { onShow() {
console.log('onShow'); console.log('onShow');
if (!this.firstEnter) { if (!this.firstEnter) {
this.$refs['scroll-box']?.reloadList(); if (this.current == 0) {
this.$refs['scroll-box']?.reloadList();
} else if (this.current == 1) {
this.$refs['chart-view']?.reloadData();
}
// this.getMouthStatistics(); // this.getMouthStatistics();
} }
}, },
...@@ -241,7 +245,7 @@ export default { ...@@ -241,7 +245,7 @@ export default {
} }
} }
.tabs-view { .tabs-view {
margin: 16rpx 0 24rpx 0; margin: 12rpx 0 24rpx 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
......
This diff is collapsed.
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