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 964844ec
authored
Jun 30, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
ef1379e2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
75 deletions
src/views/salesData/flow.vue
src/views/salesData/trend.vue
src/views/salesData/flow.vue
View file @
964844e
...
@@ -3,11 +3,11 @@
...
@@ -3,11 +3,11 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-06-30 17:
18:27
* @LastEditTime: 2022-06-30 17:
50:45
-->
-->
<
template
>
<
template
>
<div>
<div>
<div
v-
if
=
"hasData"
class=
"flow-box"
>
<div
v-
show
=
"hasData"
class=
"flow-box"
>
<div
class=
"flow-left"
>
<div
class=
"flow-left"
>
<div
class=
"title inline"
style=
"padding-left: 0"
>
客流转化
</div>
<div
class=
"title inline"
style=
"padding-left: 0"
>
客流转化
</div>
<div
class=
"chart-box"
>
<div
class=
"chart-box"
>
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-
else
>
<div
v-
show=
"!hasData"
>
<div
class=
"title"
>
客流转化
</div>
<div
class=
"title"
>
客流转化
</div>
<div
class=
"empty"
>
<div
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
...
@@ -106,24 +106,24 @@ export default {
...
@@ -106,24 +106,24 @@ export default {
getSaletTotal
(
val
)
{
getSaletTotal
(
val
)
{
const
params
=
{
const
params
=
{
req
:
{
req
:
{
corporateGroupName
:
'集团1'
,
queryTime
:
this
.
getCurrentDate
(),
queryTime
:
'2022-06-23'
,
queryType
:
val
.
reportType
queryType
:
val
.
reportType
}
}
}
}
let
api
=
'saleTotal'
var
brandName
=
val
.
brand
?
val
.
brand
.
name
:
''
if
(
val
.
brand
&&
val
.
brand
.
name
)
{
this
.
api
.
sales
[
brandName
?
'storeTotal'
:
'saleTotal'
](
params
).
then
(
res
=>
{
params
.
req
.
brandName
=
'品牌1'
api
=
'storeTotal'
}
this
.
api
.
sales
[
api
](
params
).
then
(
res
=>
{
if
(
res
.
code
===
'0'
)
{
if
(
res
.
code
===
'0'
)
{
if
(
res
.
data
.
dataList
.
length
)
{
res
.
data
.
dataList
[
0
].
num
.
forEach
((
item
,
index
)
=>
{
res
.
data
.
dataList
[
0
].
num
.
forEach
((
item
,
index
)
=>
{
this
.
funnelData
[
index
].
value
=
item
this
.
funnelData
[
index
].
value
=
item
})
})
this
.
hasData
=
res
.
data
.
dataList
[
0
].
num
.
every
(
i
=>
i
!=
0
)
this
.
hasData
=
res
.
data
.
dataList
[
0
].
num
.
every
(
i
=>
i
!=
0
)
if
(
this
.
hasData
)
this
.
draw
()
if
(
this
.
hasData
)
this
.
draw
()
}
else
{
this
.
hasData
=
false
}
}
}
console
.
log
(
this
.
hasData
)
})
})
},
},
draw
()
{
draw
()
{
...
@@ -207,6 +207,7 @@ export default {
...
@@ -207,6 +207,7 @@ export default {
console
.
log
(
res
)
console
.
log
(
res
)
this
.
topList
=
[]
this
.
topList
=
[]
this
.
lastList
=
[]
this
.
lastList
=
[]
if
(
res
.
data
.
dataList
.
length
)
{
let
{
topList
,
lastList
}
=
res
.
data
.
dataList
[
0
]
let
{
topList
,
lastList
}
=
res
.
data
.
dataList
[
0
]
topList
=
topList
?
JSON
.
parse
(
topList
)
:
[]
topList
=
topList
?
JSON
.
parse
(
topList
)
:
[]
lastList
=
lastList
?
JSON
.
parse
(
lastList
)
:
[]
lastList
=
lastList
?
JSON
.
parse
(
lastList
)
:
[]
...
@@ -222,62 +223,8 @@ export default {
...
@@ -222,62 +223,8 @@ export default {
value
:
lastList
[
key
]
value
:
lastList
[
key
]
})
})
}
}
// this.lastList = lastList ? JSON.parse(lastList) : []
}
console
.
log
(
this
.
topList
,
this
.
lastList
)
// this.topList = [
// {
// id: 1,
// name: '林则徐:苟利国家生死以岂因祸福避趋之',
// num: 3323425
// },
// {
// id: 2,
// name: '林则徐',
// num: 9999999
// },
// {
// id: 3,
// name: 'fg',
// num: 33234
// },
// {
// id: 4,
// name: '售后客户价值分析',
// num: 33234
// },
// {
// id: 5,
// name: '林则徐:苟利国家生死以岂因祸福避趋之',
// num: 33234
// }
// ]
// this.lastList = [
// {
// id: 1,
// name: '广汇集团BI数据看板-前端-交互',
// num: 3323425
// },
// {
// id: 2,
// name: '广汇集团BI数据看板-前端-交互广汇集团BI数据看板-前端-交互',
// num: 9999999
// },
// {
// id: 3,
// name: 'fsdfasdg',
// num: 33234
// },
// {
// id: 4,
// name: '广汇集团BI数据看板-前端-交互',
// num: 33234
// },
// {
// id: 5,
// name: '广汇集团BI数据看板-前端-交互',
// num: 33234
// }
// ]
this
.
flowData
=
this
.
topList
this
.
flowData
=
this
.
topList
})
})
},
},
...
...
src/views/salesData/trend.vue
View file @
964844e
...
@@ -3,15 +3,15 @@
...
@@ -3,15 +3,15 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-06-30 17:
04:25
* @LastEditTime: 2022-06-30 17:
50:59
-->
-->
<
template
>
<
template
>
<div>
<div>
<div
class=
"title"
>
转化趋势
{{
hasData
}}
</div>
<div
class=
"title"
>
转化趋势
</div>
<div
v-
if
=
"hasData"
style=
"width: 100%"
>
<div
v-
show
=
"hasData"
style=
"width: 100%"
>
<div
id=
"lineTrend"
:style=
"
{ height: height - 4.1 + 'vh' }">
</div>
<div
id=
"lineTrend"
:style=
"
{ height: height - 4.1 + 'vh' }">
</div>
</div>
</div>
<div
v-
else
class=
"empty"
>
<div
v-
show=
"!hasData"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
</div>
</div>
</div>
...
@@ -44,7 +44,6 @@ export default {
...
@@ -44,7 +44,6 @@ export default {
getChartData
(
val
)
{
getChartData
(
val
)
{
var
params
=
{
var
params
=
{
req
:
{
req
:
{
corporateGroupName
:
'集团1'
,
// queryItem: 'enter',
// queryItem: 'enter',
querystartTime
:
+
val
.
reportType
===
1
?
this
.
getNDate
(
-
30
)
:
this
.
getNMonth
(
-
12
),
querystartTime
:
+
val
.
reportType
===
1
?
this
.
getNDate
(
-
30
)
:
this
.
getNMonth
(
-
12
),
queryendTime
:
+
val
.
reportType
===
1
?
this
.
getNDate
(
-
1
)
:
this
.
getNMonth
(
-
1
),
queryendTime
:
+
val
.
reportType
===
1
?
this
.
getNDate
(
-
1
)
:
this
.
getNMonth
(
-
1
),
...
@@ -53,9 +52,6 @@ export default {
...
@@ -53,9 +52,6 @@ export default {
}
}
var
brandName
=
val
.
brand
?
val
.
brand
.
name
:
''
var
brandName
=
val
.
brand
?
val
.
brand
.
name
:
''
this
.
storeOrBrandTxt
=
brandName
?
'门店'
:
'品牌'
this
.
storeOrBrandTxt
=
brandName
?
'门店'
:
'品牌'
if
(
brandName
)
{
params
.
req
.
brandName
=
brandName
}
const
api
=
brandName
?
'storeTransTrend'
:
'saleTransTrend'
const
api
=
brandName
?
'storeTransTrend'
:
'saleTransTrend'
const
p
=
[]
const
p
=
[]
this
.
list
.
forEach
((
i
,
idx
)
=>
{
this
.
list
.
forEach
((
i
,
idx
)
=>
{
...
...
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