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 f4d4a902
authored
Jul 14, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加接口
1 parent
555df628
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
src/views/solarDetail/index.vue
src/views/solarDetail/index.vue
View file @
f4d4a90
...
@@ -69,7 +69,6 @@
...
@@ -69,7 +69,6 @@
<
script
>
<
script
>
import
{
changeMixin
}
from
'@/mixins'
import
{
changeMixin
}
from
'@/mixins'
import
RightViewContent
from
'../home/solar/RightViewContent.vue'
import
RightViewContent
from
'../home/solar/RightViewContent.vue'
import
{
mapActions
}
from
'vuex'
export
default
{
export
default
{
name
:
'SolarDetail'
,
name
:
'SolarDetail'
,
mixins
:
[
changeMixin
],
mixins
:
[
changeMixin
],
...
@@ -182,10 +181,11 @@ export default {
...
@@ -182,10 +181,11 @@ export default {
businessTime
:
''
businessTime
:
''
}
}
},
},
created
()
{},
created
()
{
this
.
initData
()
},
methods
:
{
methods
:
{
...
mapActions
([
'setSolarYear'
]),
async
initData
()
{
async
init
()
{
console
.
log
(
this
.
$route
.
query
,
'999'
)
console
.
log
(
this
.
$route
.
query
,
'999'
)
this
.
businessTime
=
this
.
$store
.
state
.
app
.
solarTime
this
.
businessTime
=
this
.
$store
.
state
.
app
.
solarTime
this
.
businessYear
=
this
.
$store
.
state
.
app
.
solarYear
this
.
businessYear
=
this
.
$store
.
state
.
app
.
solarYear
...
@@ -203,7 +203,8 @@ export default {
...
@@ -203,7 +203,8 @@ export default {
// _merchantList = _data[purchaseType]
// _merchantList = _data[purchaseType]
// })
// })
// }
// }
if
(
!
_merchantList
.
length
)
_merchantList
=
await
this
.
getAllRanking
(
purchaseType
)
// if (!_merchantList.length)
_merchantList
=
await
this
.
getAllRanking
(
purchaseType
)
this
.
merchantList
=
_merchantList
this
.
merchantList
=
_merchantList
console
.
log
(
this
.
merchantList
,
'this.merchantList'
)
console
.
log
(
this
.
merchantList
,
'this.merchantList'
)
this
.
tabObject
=
this
.
$route
.
query
this
.
tabObject
=
this
.
$route
.
query
...
@@ -240,6 +241,7 @@ export default {
...
@@ -240,6 +241,7 @@ export default {
},
},
// 获取每个门店的商城采购额(占比)、自采采购额(占比) 趋势
// 获取每个门店的商城采购额(占比)、自采采购额(占比) 趋势
getMerchantPurchaseTrend
(
year
,
merchantid
)
{
getMerchantPurchaseTrend
(
year
,
merchantid
)
{
this
.
dataList
=
[]
this
.
api
.
solar
.
getMerchantPurchaseTrend
({
year
:
year
,
MerchantId
:
merchantid
}).
then
(
res
=>
{
this
.
api
.
solar
.
getMerchantPurchaseTrend
({
year
:
year
,
MerchantId
:
merchantid
}).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
!
res
.
code
===
'0'
)
{
if
(
!
res
.
code
===
'0'
)
{
...
@@ -258,10 +260,6 @@ export default {
...
@@ -258,10 +260,6 @@ export default {
this
.
$refs
.
purchaseTrend
.
drawBarLine
()
this
.
$refs
.
purchaseTrend
.
drawBarLine
()
})
})
},
},
// 切换年份
yearValue
(
val
)
{
this
.
setSolarYear
(
val
)
},
getAllRanking
(
purchaseType
)
{
getAllRanking
(
purchaseType
)
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
let
_merchantList
let
_merchantList
...
...
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