Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsk-data-view-pd
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 e2befc53
authored
Sep 11, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
接口联调
1 parent
c58f87ec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
10 deletions
src/views/internal/components/BarChart.vue
src/views/internal/components/DigitalMarketingLeft.vue
src/views/internal/components/BarChart.vue
View file @
e2befc5
...
@@ -81,7 +81,7 @@ export default {
...
@@ -81,7 +81,7 @@ export default {
},
},
drawBar
(
dataList
)
{
drawBar
(
dataList
)
{
if
(
dataList
&&
dataList
.
length
)
{
if
(
dataList
&&
dataList
.
length
)
{
console
.
log
(
this
.
dataList
)
console
.
log
(
dataList
)
this
.
barOptions
.
xAxis
.
data
=
dataList
.
map
(
item
=>
item
[
this
.
label
])
this
.
barOptions
.
xAxis
.
data
=
dataList
.
map
(
item
=>
item
[
this
.
label
])
this
.
barOptions
.
series
[
0
].
data
=
dataList
.
map
(
item
=>
item
[
this
.
valueName
])
this
.
barOptions
.
series
[
0
].
data
=
dataList
.
map
(
item
=>
item
[
this
.
valueName
])
this
[
this
.
domId
].
setOption
(
this
.
barOptions
)
this
[
this
.
domId
].
setOption
(
this
.
barOptions
)
...
...
src/views/internal/components/DigitalMarketingLeft.vue
View file @
e2befc5
...
@@ -2,19 +2,22 @@
...
@@ -2,19 +2,22 @@
<div
class=
"marketing-left"
>
<div
class=
"marketing-left"
>
<PullDownSelect
ref=
"leftDownSelect"
:selectList=
"selectList"
@
selectVal=
"selectVal"
></PullDownSelect>
<PullDownSelect
ref=
"leftDownSelect"
:selectList=
"selectList"
@
selectVal=
"selectVal"
></PullDownSelect>
<inner-tab
class=
"inner-tab"
v-if=
"tabShow"
:list=
"tabList"
:width=
"6.4"
:itemPadding=
"0.5"
@
changeTab=
"changeTab"
></inner-tab>
<inner-tab
class=
"inner-tab"
v-if=
"tabShow"
:list=
"tabList"
:width=
"6.4"
:itemPadding=
"0.5"
@
changeTab=
"changeTab"
></inner-tab>
<BarChart
ref=
"trendChartRef"
domId=
"trendChart"
:label=
"'statMonth'"
:height=
"'16vh'"
:colorList=
"colorList"
:valueName=
"valueName"
></BarChart>
<BarChart
v-show=
"chartShow"
ref=
"trendChartRef"
domId=
"trendChart"
:label=
"'statMonth'"
:height=
"'16vh'"
:colorList=
"colorList"
:valueName=
"valueName"
></BarChart>
<LineChart
v-show=
"!chartShow"
ref=
"monthIncomeLineChartRef"
domId=
"monthIncomeLineChart"
:height=
"'16vh'"
:valName=
"valName"
></LineChart>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
BarChart
from
'./BarChart.vue'
import
BarChart
from
'./BarChart.vue'
import
LineChart
from
'./LineCharts.vue'
import
PullDownSelect
from
'./PullDownSelect.vue'
import
PullDownSelect
from
'./PullDownSelect.vue'
import
{
digitalMarketingLeftSelectList
}
from
'./constant'
import
{
digitalMarketingLeftSelectList
}
from
'./constant'
export
default
{
export
default
{
name
:
'DigitalMarketingLeft'
,
name
:
'DigitalMarketingLeft'
,
components
:
{
components
:
{
PullDownSelect
,
PullDownSelect
,
BarChart
BarChart
,
LineChart
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -24,7 +27,10 @@ export default {
...
@@ -24,7 +27,10 @@ export default {
valueName
:
'registerNum'
,
valueName
:
'registerNum'
,
tabShow
:
false
,
tabShow
:
false
,
marketingTrendList
:
[],
marketingTrendList
:
[],
marketingCrowdFundingTrendList
:
[]
marketingCrowdFundingTrendList
:
[],
chartShow
:
true
,
valName
:
'orderNum'
,
tabActive
:
0
}
}
},
},
...
@@ -38,17 +44,23 @@ export default {
...
@@ -38,17 +44,23 @@ export default {
this
.
$bus
.
$on
(
'digitalMarketingTabChange'
,
data
=>
{
this
.
$bus
.
$on
(
'digitalMarketingTabChange'
,
data
=>
{
// console.log(data)
// console.log(data)
// this.$refs.leftDownSelect.selectType = ''
this
.
$refs
.
leftDownSelect
.
selectType
=
''
this
.
tabActive
-
data
this
.
tabShow
=
false
this
.
tabShow
=
false
this
.
chartShow
=
true
this
.
selectList
=
digitalMarketingLeftSelectList
[
data
]
this
.
selectList
=
digitalMarketingLeftSelectList
[
data
]
switch
(
data
)
{
switch
(
data
)
{
case
0
:
case
0
:
this
.
valueName
=
'registerNum'
this
.
valueName
=
'registerNum'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
})
break
break
case
1
:
case
1
:
this
.
valueName
=
'activityNum'
this
.
valueName
=
'activityNum'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingCrowdFundingTrendList
)
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingCrowdFundingTrendList
)
})
break
break
}
}
})
})
...
@@ -60,30 +72,61 @@ export default {
...
@@ -60,30 +72,61 @@ export default {
// this.tabShow = false
// this.tabShow = false
switch
(
val
.
val
)
{
switch
(
val
.
val
)
{
case
'registerNum'
:
case
'registerNum'
:
this
.
chartShow
=
true
this
.
valueName
=
'registerNum'
this
.
valueName
=
'registerNum'
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
break
break
case
'activeNum'
:
case
'activeNum'
:
this
.
chartShow
=
true
this
.
valueName
=
'activeNum'
this
.
valueName
=
'activeNum'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
})
break
break
case
'output'
:
case
'output'
:
this
.
valueName
=
'output'
this
.
valName
=
'output'
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingTrendList
)
this
.
chartShow
=
false
// this.tabShow = true
this
.
tabShow
=
true
this
.
$refs
.
monthIncomeLineChartRef
.
drawLine
(
this
.
marketingTrendList
)
break
break
case
'activityNum'
:
case
'activityNum'
:
this
.
chartShow
=
true
this
.
valueName
=
'activityNum'
this
.
valueName
=
'activityNum'
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingCrowdFundingTrendList
)
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingCrowdFundingTrendList
)
break
break
case
'orderNum'
:
case
'orderNum'
:
this
.
valueName
=
'orderNum'
this
.
chartShow
=
true
// this.valueName = 'orderNum'
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingCrowdFundingTrendList
)
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingCrowdFundingTrendList
)
break
break
case
'avgPrice'
:
case
'avgPrice'
:
this
.
chartShow
=
true
this
.
valueName
=
'avgPrice'
this
.
valueName
=
'avgPrice'
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingCrowdFundingTrendList
)
this
.
$refs
.
trendChartRef
.
drawBar
(
this
.
marketingCrowdFundingTrendList
)
this
.
tabShow
=
true
// this.tabShow = true
break
}
},
changeTab
(
val
)
{
console
.
log
(
val
)
switch
(
val
)
{
case
0
:
if
(
this
.
tabActive
===
0
)
{
this
.
valName
=
'orderNum'
console
.
log
(
111
)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
monthIncomeLineChartRef
.
drawLine
(
this
.
marketingTrendList
)
})
}
break
case
1
:
if
(
this
.
tabActive
===
0
)
{
this
.
valName
=
'output'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
monthIncomeLineChartRef
.
drawLine
(
this
.
marketingTrendList
)
})
}
break
break
}
}
},
},
...
...
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