Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
44881299
Commit
44881299
authored
Sep 28, 2021
by
Zhang Xiaojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
40e6fcb8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
31 deletions
+49
-31
index.vue
src/views/Root/Home/index.vue
+45
-27
publish.vue
src/views/Root/Product/Loan/publish.vue
+4
-4
No files found.
src/views/Root/Home/index.vue
View file @
44881299
<
template
>
<div
class=
"
overflow-x-auto
"
>
<div
class=
"
overflow-x-auto 2xl:overflow-x-hidden
"
>
<p
class=
"text-2xl font-bold mb-5"
>
实时数据
</p>
<a-row
type=
"flex"
justify=
"center"
align=
"middle"
:gutter=
"[50, 100]"
>
<a-col>
...
...
@@ -31,7 +31,7 @@
<div
id=
"barchart"
ref=
"barchart"
style=
"width:
12
00px"
style=
"width:
11
00px"
class=
"h-96 mx-auto text-center"
></div>
</div>
...
...
@@ -59,31 +59,46 @@ export default Vue.extend({
data
()
{
return
{
option
:
{
tooltip
:
{
trigger
:
"axis"
,
axisPointer
:
{
type
:
"cross"
},
},
color
:
"#3E4FAF"
,
xAxis
:
{
name
:
"日期"
,
type
:
"category"
,
// mock
data
:
[]
as
Array
<
any
>
data
:
[]
as
Array
<
any
>
,
axisTick
:
{
alignWithLabel
:
true
,
},
// data: [] as Array
<
number
>
,
},
yAxis
:
{
type
:
"value"
,
name
:
"用户数量"
,
axisLabel
:
{
formatter
:
"{value} 人"
,
},
},
grid
:[
grid
:
[
{
left
:
2
0
,
top
:
3
0
,
right
:
0
,
left
:
6
0
,
top
:
5
0
,
right
:
4
0
,
bottom
:
70
,
}
}
,
],
series
:
[
{
// data: [] as Array
<
number
>
,
// mock
data
:
[
820
,
932
,
901
,
934
,
1290
,
1330
,
1320
,
934
,
1290
,
1330
,
1320
,
820
,
932
,
901
,
934
,
1290
,
1330
,
1320
,
934
,
1290
,
1330
,
1320
],
data
:
[
820
,
932
,
901
,
934
,
1290
,
1330
,
1320
,
934
,
1290
,
1330
,
1320
,
820
,
932
,
901
,
934
,
1290
,
1330
,
1320
,
934
,
1290
,
1330
,
1320
,
],
type
:
"line"
,
areaStyle
:
{
color
:
"#F5F5FB"
},
areaStyle
:
{
color
:
"#F5F5FB"
},
smooth
:
true
,
showBackground
:
false
,
},
...
...
@@ -91,9 +106,9 @@ export default Vue.extend({
},
timeRange
:
10
,
myChart
:
undefined
as
undefined
|
echarts
.
ECharts
,
chartType
:
eBarChart
.
not_login_dau
,
chartType
:
eBarChart
.
not_login_dau
,
eBarChart
,
type
:
''
,
type
:
""
,
login_dau
:
0
,
total_dau
:
0
,
total_register_user
:
0
,
...
...
@@ -104,8 +119,8 @@ export default Vue.extend({
document
.
getElementById
(
"barchart"
)
as
HTMLCanvasElement
);
this
.
initEchart
(
this
.
timeRange
);
this
.
queryRealtime
()
this
.
queryChart
()
this
.
queryRealtime
()
;
this
.
queryChart
()
;
},
methods
:
{
handleChangeTimeRange
(
e
:
any
)
{
...
...
@@ -113,11 +128,14 @@ export default Vue.extend({
this
.
initEchart
(
this
.
timeRange
);
},
handleChangeSource
(
e
:
any
)
{
let
type
=
e
.
target
!
.
value
let
type
=
e
.
target
!
.
value
;
console
.
log
(
type
);
this
.
chartType
=
type
===
eBarChart
.
login_dau
?
eBarChart
.
login_dau
:
eBarChart
.
not_login_dau
this
.
queryChart
()
this
.
chartType
=
type
===
eBarChart
.
login_dau
?
eBarChart
.
login_dau
:
eBarChart
.
not_login_dau
;
this
.
queryChart
();
},
initEchart
(
period
:
number
)
{
// mock
...
...
@@ -126,7 +144,7 @@ export default Vue.extend({
)
as
Array
<
String
>
;
//
(
this
.
myChart
as
echarts
.
ECharts
).
setOption
(
this
.
option
);
this
.
queryChart
()
this
.
queryChart
()
;
},
async
queryRealtime
()
{
const
ret
=
await
DashboardService
.
getInstance
().
queryRealTime
();
...
...
@@ -137,21 +155,21 @@ export default Vue.extend({
}
},
async
queryChart
()
{
console
.
log
(
this
.
timeRange
,
this
.
chartType
);
console
.
log
(
this
.
timeRange
,
this
.
chartType
);
const
ret
=
await
DashboardService
.
getInstance
().
queryChart
(
{
days
:
this
.
timeRange
,
name
:
this
.
chartType
}
);
const
ret
=
await
DashboardService
.
getInstance
().
queryChart
({
days
:
this
.
timeRange
,
name
:
this
.
chartType
,
});
if
(
ret
.
code
===
200
)
{
console
.
log
(
ret
);
ret
.
data
.
map
((
data
)
=>
{
this
.
option
.
series
[
0
].
data
=
[];
this
.
option
.
xAxis
.
data
=
[];
ret
.
data
.
map
((
data
)
=>
{
// 真实数据
// this.option.series[0].data.push(data.value)
// this.option.xAxis.data.push(data.time)
})
})
;
}
},
},
...
...
src/views/Root/Product/Loan/publish.vue
View file @
44881299
...
...
@@ -267,8 +267,8 @@ export default Vue.extend({
product_name
:
this
.
form
.
name
,
products
:
this
.
form
.
introduction
,
loan_type
:
this
.
form
.
type
,
rate_lower
:
this
.
form
.
interstMin
,
rate_upper
:
this
.
form
.
interstMax
,
rate_lower
:
+
this
.
form
.
interstMin
,
rate_upper
:
+
this
.
form
.
interstMax
,
submit_cond
:
this
.
form
.
submissionCon
,
min_amount
:
this
.
form
.
limitMin
,
min_date
:
this
.
form
.
startTime
,
...
...
@@ -298,8 +298,8 @@ export default Vue.extend({
loan_type
:
this
.
form
.
type
as
eProductType
,
product_name
:
this
.
form
.
name
,
products
:
this
.
form
.
introduction
,
rate_lower
:
this
.
form
.
interstMin
,
rate_upper
:
this
.
form
.
interstMax
,
rate_lower
:
+
this
.
form
.
interstMin
,
rate_upper
:
+
this
.
form
.
interstMax
,
submit_cond
:
this
.
form
.
submissionCon
,
})
.
then
((
ret
)
=>
{
...
...
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