Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘文虎
account-book
Commits
0ebdbb21
Commit
0ebdbb21
authored
Aug 15, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 图表接口调试
parent
83a646d3
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
239 additions
and
246 deletions
+239
-246
index.js
api/bill/index.js
+40
-0
index.vue
components/cell-bill-percent/index.vue
+4
-12
bill.vue
pages/index/bill/bill.vue
+6
-2
chart-view.vue
pages/index/bill/components/chart-view.vue
+189
-232
No files found.
api/bill/index.js
View file @
0ebdbb21
...
@@ -37,3 +37,43 @@ export function exportBill(data) {
...
@@ -37,3 +37,43 @@ export function exportBill(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
components/cell-bill-percent/index.vue
View file @
0ebdbb21
...
@@ -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
:
'-¥'
,
}
},
},
},
},
...
...
pages/index/bill/bill.vue
View file @
0ebdbb21
...
@@ -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
)
{
if
(
this
.
current
==
0
)
{
this
.
$refs
[
'scroll-box'
]?.
reloadList
();
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
:
1
6
rpx
0
24rpx
0
;
margin
:
1
2
rpx
0
24rpx
0
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
...
...
pages/index/bill/components/chart-view.vue
View file @
0ebdbb21
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment