Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
ec-report-refactor
Project
Project
Details
Activity
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
lihuizhen
ec-report-refactor
Commits
15b3908a
Commit
15b3908a
authored
Jan 11, 2022
by
Jenny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增文件
parent
f9fa3c41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
HorizontalBar.vue
components/HorizontalBar/HorizontalBar.vue
+20
-0
NormalBar.vue
components/NormalBar/NormalBar.vue
+20
-0
index.vue
pages/index/index.vue
+6
-1
No files found.
components/HorizontalBar/HorizontalBar.vue
0 → 100644
View file @
15b3908a
<
template
>
<view>
横向柱状图
</view>
</
template
>
<
script
>
export
default
{
name
:
"HorizontalBar"
,
data
()
{
return
{
};
}
}
</
script
>
<
style
>
</
style
>
components/NormalBar/NormalBar.vue
0 → 100644
View file @
15b3908a
<
template
>
<view>
柱状图
</view>
</
template
>
<
script
>
export
default
{
name
:
"NormalBar"
,
data
()
{
return
{
};
}
}
</
script
>
<
style
>
</
style
>
pages/index/index.vue
View file @
15b3908a
...
...
@@ -7,7 +7,12 @@
}"
>
<view
v-for=
"element in reportData"
:key=
"item.id"
>
<!-- 普通柱状图 -->
<NormalBar
v-if=
"element.type == 'NormalBar'"
:elementInfo=
"element"
></NormalBar>
<!-- 普通折线图 -->
<NormalLine
v-if=
"element.type == 'NormalLine'"
:elementInfo=
"element"
></NormalLine>
<!-- 横向柱状图 -->
<HorizontalBar
v-if=
"element.type == 'HorizontalBar'"
:elementInfo=
"element"
></HorizontalBar>
</view>
</view>
</
template
>
...
...
@@ -25,7 +30,7 @@
},
methods
:
{
async
getReportList
()
{
let
res
=
await
this
.
$u
.
api
.
getReportList
({
id
:
'61
3ee9e9ce776abde5455495
'
})
let
res
=
await
this
.
$u
.
api
.
getReportList
({
id
:
'61
c424a4c06bff0ce05d9a53
'
})
console
.
log
()
const
{
Status
,
Result
}
=
res
.
data
if
(
Status
===
'true'
)
{
...
...
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