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 866f93bf
authored
Jul 14, 2023
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.0' of
http://192.168.3.233:8090/h5/glsk-data-view-pd
into v1.0.0
2 parents
92df765e
83b31f78
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
35 deletions
src/utils/data.js
src/views/home/solar/MerchantTrends.vue
src/views/home/solar/PurchaseTrends.vue
src/views/solarDetail/index.vue
src/utils/data.js
View file @
866f93b
/*
* @Description: 基础数据
* @Author: huyue
* @Date: 2023-07-04 11:46:53
* @LastEditors: huyue
* @LastEditTime: 2023-07-14 14:39:49
*/
const
DefaultData
=
{
const
DefaultData
=
{
yearList
:
[
'2023'
,
'2022'
,
'2021'
,
'2020'
],
yearList
:
[
'2023'
,
'2022'
],
businessList
:
[
businessList
:
[
{
{
label
:
'业务数据 | 1.0太阳膜采购'
,
label
:
'业务数据 | 1.0太阳膜采购'
,
...
...
src/views/home/solar/MerchantTrends.vue
View file @
866f93b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-07-06 16:19:15
* @Date: 2023-07-06 16:19:15
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-07-14 1
0:29:38
* @LastEditTime: 2023-07-14 1
4:28:17
-->
-->
<
template
>
<
template
>
<div
class=
"merchant-box"
>
<div
class=
"merchant-box"
>
...
@@ -45,22 +45,9 @@ export default {
...
@@ -45,22 +45,9 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
getTrendData
()
this
.
getTrendData
()
// const p = new Promise((resolve) => {
// for (let i = 0; i < 12; i++) {
// this.dataList.push({
// month: i + 1 + '月',
// data1: +(Math.random() * 20).toFixed(2),
// data2: +(Math.random() * 40).toFixed(2)
// })
// }
// console.log(this.dataList)
// resolve()
// })
// p.then(() => {
// this.$refs.merchantTrendsRef.drawBar()
// })
},
},
async
getTrendData
()
{
async
getTrendData
()
{
this
.
dataList
=
[]
const
_data
=
await
this
.
api
.
solar
.
getAllOpenBuyTrend
({
year
:
this
.
$store
.
state
.
app
.
solarYear
})
const
_data
=
await
this
.
api
.
solar
.
getAllOpenBuyTrend
({
year
:
this
.
$store
.
state
.
app
.
solarYear
})
const
_dataList
=
_data
.
data
.
dataList
const
_dataList
=
_data
.
data
.
dataList
_dataList
.
forEach
(
item
=>
{
_dataList
.
forEach
(
item
=>
{
...
...
src/views/home/solar/PurchaseTrends.vue
View file @
866f93b
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @Author: huyue
* @Author: huyue
* @Date: 2023-07-06 16:19:15
* @Date: 2023-07-06 16:19:15
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2023-07-14 1
0:29:34
* @LastEditTime: 2023-07-14 1
4:27:08
-->
-->
<
template
>
<
template
>
<div
class=
"purchase-box"
>
<div
class=
"purchase-box"
>
...
@@ -57,22 +57,9 @@ export default {
...
@@ -57,22 +57,9 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
getDataList
()
this
.
getDataList
()
// const p = new Promise((resolve) => {
// for (let i = 0; i < 12; i++) {
// this.dataList.push({
// month: i + 1 + '月',
// data1: +(Math.random() * 2000).toFixed(2),
// data2: +(Math.random() * 5000).toFixed(2),
// data3: +(Math.random() * 50).toFixed(2)
// })
// }
// resolve()
// })
// p.then(() => {
// this.$refs.purchaseRef.drawBarLine()
// })
},
},
async
getDataList
()
{
async
getDataList
()
{
this
.
dataList
=
[]
const
_data
=
await
this
.
api
.
solar
.
getAllPurchaseTrend
({
year
:
this
.
$store
.
state
.
app
.
solarYear
})
const
_data
=
await
this
.
api
.
solar
.
getAllPurchaseTrend
({
year
:
this
.
$store
.
state
.
app
.
solarYear
})
const
_dataList
=
_data
.
data
.
dataList
const
_dataList
=
_data
.
data
.
dataList
_dataList
.
forEach
(
item
=>
{
_dataList
.
forEach
(
item
=>
{
...
...
src/views/solarDetail/index.vue
View file @
866f93b
...
@@ -83,21 +83,30 @@ export default {
...
@@ -83,21 +83,30 @@ export default {
solarDetailList
:
[
solarDetailList
:
[
{
{
name
:
'总采购额'
,
name
:
'总采购额'
,
valueName
:
'amounttotal'
,
value
:
'2,280,708'
,
value
:
'2,280,708'
,
bottomLabel
:
'本月采购额'
,
bottomLabel
:
'本月采购额'
,
bottomValue
:
'2,280,708'
bottemName
:
'amounttotalThismonth'
,
bottomValue
:
'2,280,708'
,
bottomType
:
'money'
},
},
{
{
name
:
'商城采购额'
,
name
:
'商城采购额'
,
valueName
:
'amountshop'
,
value
:
'2,280,708'
,
value
:
'2,280,708'
,
bottomLabel
:
'本月采购额'
,
bottomLabel
:
'本月采购额'
,
bottomValue
:
'2,280,708'
bottemName
:
'amountshopThismonth'
,
bottomValue
:
'2,280,708'
,
bottomType
:
'money'
},
},
{
{
name
:
'自采采购额'
,
name
:
'自采采购额'
,
valueName
:
'amountself'
,
value
:
'2,280,708'
,
value
:
'2,280,708'
,
bottomLabel
:
'本月采购额'
,
bottomLabel
:
'本月采购额'
,
bottomValue
:
'2,280,708'
bottemName
:
'amountselfThismonth'
,
bottomValue
:
'2,280,708'
,
bottomType
:
'money'
}
}
],
],
// 商城采购饼图结构
// 商城采购饼图结构
...
@@ -188,6 +197,11 @@ export default {
...
@@ -188,6 +197,11 @@ export default {
this
.
openMessage
(
'获取门店商品采购占比失败'
)
this
.
openMessage
(
'获取门店商品采购占比失败'
)
return
return
}
}
const
_dataList
=
res
.
data
.
dataList
[
0
]
this
.
solarDetailList
.
forEach
(
item
=>
{
item
.
value
=
_dataList
[
item
.
valueName
]
item
.
bottomValue
=
_dataList
[
item
.
bottemName
]
})
})
})
},
},
// 获取每个门店的商城采购额(占比)、自采采购额(占比) 趋势
// 获取每个门店的商城采购额(占比)、自采采购额(占比) 趋势
...
@@ -207,7 +221,6 @@ export default {
...
@@ -207,7 +221,6 @@ export default {
data3
:
item
.
shopratio
data3
:
item
.
shopratio
})
})
})
})
console
.
log
(
this
.
dataList
)
this
.
$refs
.
purchaseTrend
.
drawBarLine
()
this
.
$refs
.
purchaseTrend
.
drawBarLine
()
})
})
},
},
...
...
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