Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
data-view
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 58016170
authored
Jun 30, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_v1.0.0' of
http://192.168.3.233:8090/gh/data-view
into dev_v1.0.0
2 parents
0ebbcf2a
c9f26e42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
3 deletions
src/components/LineChart.vue
src/views/afterSales/first.vue
src/views/afterSales/sadayasu.vue
src/components/LineChart.vue
View file @
5801617
...
@@ -34,6 +34,27 @@ export default {
...
@@ -34,6 +34,27 @@ export default {
dataList
:
{
dataList
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
},
tooltipFormatterObj
:
{
type
:
Array
,
default
:
()
=>
{
return
[
{
label
:
'数量'
,
attrName
:
'num'
},
{
label
:
'环比'
,
attrName
:
'hrate'
,
addSymbol
:
'%'
},
{
label
:
'同比'
,
attrName
:
'trate'
,
addSymbol
:
'%'
}
]
}
}
}
},
},
...
@@ -66,7 +87,14 @@ export default {
...
@@ -66,7 +87,14 @@ export default {
methods
:
{
methods
:
{
tooltipFormatter
(
obj
)
{
tooltipFormatter
(
obj
)
{
var
currentItem
=
this
.
dataList
[
obj
[
0
].
dataIndex
]
var
currentItem
=
this
.
dataList
[
obj
[
0
].
dataIndex
]
return
`数量:
${
currentItem
.
num
}
<br>环比:
${
currentItem
.
hrate
}
%<br>同比:
${
currentItem
.
trate
}
%`
var
txt
=
''
this
.
tooltipFormatterObj
.
forEach
(
item
=>
{
if
(
txt
)
{
txt
=
txt
+
'<br>'
}
txt
=
txt
+
item
.
label
+
':'
+
currentItem
[
item
.
attrName
]
+
(
item
.
addSymbol
||
''
)
})
return
txt
},
},
autoMove
()
{
autoMove
()
{
...
...
src/views/afterSales/first.vue
View file @
5801617
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"firstChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"firstChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:tooltipFormatterObj=
"tooltipFormatterObj"
></LineChart>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -35,6 +35,23 @@ export default {
...
@@ -35,6 +35,23 @@ export default {
return
{
return
{
isEmpty
:
true
,
isEmpty
:
true
,
storeOrBrandTxt
:
'品牌'
,
storeOrBrandTxt
:
'品牌'
,
tooltipFormatterObj
:
[
{
label
:
'回店率'
,
attrName
:
'num'
,
addSymbol
:
'%'
},
{
label
:
'环比'
,
attrName
:
'hrate'
,
addSymbol
:
'%'
},
{
label
:
'同比'
,
attrName
:
'trate'
,
addSymbol
:
'%'
}
],
dataList
:
[]
dataList
:
[]
}
}
},
},
...
...
src/views/afterSales/sadayasu.vue
View file @
5801617
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
v-if=
"isEmpty"
class=
"empty"
>
<div
v-if=
"isEmpty"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
</div>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"sadayasuChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
></LineChart>
<LineChart
v-else
ref=
"lineChartRef"
domId=
"sadayasuChart"
:dataList
.
sync=
"dataList"
:storeOrBrandTxt=
"storeOrBrandTxt"
:tooltipFormatterObj=
"tooltipFormatterObj"
></LineChart>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -35,6 +35,23 @@ export default {
...
@@ -35,6 +35,23 @@ export default {
return
{
return
{
isEmpty
:
true
,
isEmpty
:
true
,
storeOrBrandTxt
:
'品牌'
,
storeOrBrandTxt
:
'品牌'
,
tooltipFormatterObj
:
[
{
label
:
'回店率'
,
attrName
:
'num'
,
addSymbol
:
'%'
},
{
label
:
'环比'
,
attrName
:
'hrate'
,
addSymbol
:
'%'
},
{
label
:
'同比'
,
attrName
:
'trate'
,
addSymbol
:
'%'
}
],
dataList
:
[]
dataList
:
[]
}
}
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment