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 1255d06d
authored
Jul 06, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复BUG
1 parent
a18f6225
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
12 deletions
src/components/LineChart.vue
src/components/ViewTabs.vue
src/components/LineChart.vue
View file @
1255d06
...
...
@@ -226,4 +226,18 @@ p {
}
}
}
::v-deep
.line-chart
{
width
:
100%
;
height
:
100%
;
div
{
&:nth-child(1)
{
width
:
100%
!important
;
height
:
100%
!important
;
canvas
{
width
:
100%
!important
;
height
:
100%
!important
;
}
}
}
}
</
style
>
src/components/ViewTabs.vue
View file @
1255d06
...
...
@@ -168,7 +168,6 @@ export default {
if
(
params
.
brand
)
this
.
isGroup
=
false
this
.
req
=
req
this
.
isEmpty
=
true
// this.flag = false
this
.
getOverallbase
(
'total'
)
this
.
getOverallbase
(
'wechat'
)
this
.
getOverallbase
(
'wechatGroup'
)
...
...
@@ -189,6 +188,13 @@ export default {
}
this
.
tabHead
=
this
.
isGroup
?
[
'前5品牌'
,
'后5品牌'
]
:
[
'前5门店'
,
'后5门店'
]
this
.
api
.
overview
[
this
.
isGroup
?
'getBrandOverallbase'
:
'getMerchantOverallbase'
](
params
).
then
(({
code
,
data
})
=>
{
this
.
pageData
[
queryItem
]
=
{
top
:
[],
last
:
[],
incrNum
:
0
,
returnNum
:
0
,
totalNum
:
0
}
if
(
code
==
0
)
{
let
[
dataList
]
=
data
.
dataList
if
(
dataList
)
{
...
...
@@ -211,21 +217,18 @@ export default {
this
.
pageData
[
queryItem
]
=
dataList
}
}).
catch
(()
=>
{
this
.
pageData
[
queryItem
]
=
{
top
:
[],
last
:
[],
incrNum
:
0
,
returnNum
:
0
,
totalNum
:
0
}
})
},
ObjectToArray
(
obj
)
{
let
arr
=
[]
if
(
obj
&&
obj
!=
'null'
)
JSON
.
parse
(
obj
).
map
(
e
=>
{
Object
.
keys
(
e
).
map
(
name
=>
arr
.
push
({
name
,
num
:
e
[
name
]
}))
})
if
(
obj
&&
obj
!==
'null'
)
{
obj
=
obj
.
replace
(
'null'
,
'"未知"'
)
let
item
=
JSON
.
parse
(
obj
)
if
(
Array
.
isArray
(
item
))
item
.
map
(
e
=>
{
Object
.
keys
(
e
).
map
(
name
=>
arr
.
push
({
name
,
num
:
e
[
name
]
}))
})
else
Object
.
keys
(
item
).
map
(
name
=>
arr
.
push
({
name
,
num
:
item
[
name
]
}))
}
return
arr
},
getOveralltrend
(
queryItem
)
{
...
...
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