Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
dj-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 91989383
authored
Oct 31, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.0' of
http://192.168.3.233:8090/gh/dj-data-view
into v1.0.0
2 parents
7f8dc469
5d0c5b83
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
95 additions
and
40 deletions
src/components/Legend.vue
src/components/PieChart.vue
src/components/ViewChart.vue
src/components/ViewContentLeft.vue
src/components/ViewTabs.vue
src/mixins/clientMixin.js
src/mixins/userMixin.js
src/views/customer/area.vue
src/views/customer/brand.vue
src/views/customer/store.vue
src/views/saas/business.vue
src/views/saas/category.vue
src/views/saas/overview.vue
src/views/user/age.vue
src/views/user/buyCar.vue
src/views/user/mileage.vue
src/views/user/price.vue
src/components/Legend.vue
View file @
9198938
...
...
@@ -21,7 +21,7 @@ export default {
},
colors
:
{
type
:
Array
,
default
:
()
=>
[
'
#FF6E76'
,
'#7CFFB2'
,
' #FDF006'
,
'#4FA0FF'
,
'#EB6001
'
]
default
:
()
=>
[
'
#FF6E76'
,
'#7CFFB2'
,
' #FDF006'
,
'#4FA0FF'
,
'#EB6001'
,
'#BF98FF'
,
'#BF98FF'
,
'#58D9F9
'
]
}
},
watch
:
{
...
...
src/components/PieChart.vue
View file @
9198938
...
...
@@ -39,7 +39,7 @@ export default {
},
colors
:
{
type
:
Array
,
default
:
()
=>
[
'
#FF6E76'
,
'#7CFFB2'
,
' #FDF006'
,
'#4FA0FF'
,
'#EB6001
'
]
default
:
()
=>
[
'
#FF6E76'
,
'#7CFFB2'
,
' #FDF006'
,
'#4FA0FF'
,
'#EB6001'
,
'#BF98FF'
,
'#BF98FF'
,
'#58D9F9
'
]
},
size
:
{
type
:
String
,
...
...
src/components/ViewChart.vue
View file @
9198938
...
...
@@ -27,8 +27,10 @@ import Age from '../views/user/age.vue'
import
Price
from
'../views/user/price'
import
BuyCar
from
'../views/user/buyCar'
import
Mileage
from
'../views/user/mileage'
import
{
userMixin
}
from
'../mixins/index'
export
default
{
name
:
'ViewChart'
,
mixins
:
[
userMixin
],
components
:
{
Age
,
Price
,
...
...
@@ -40,6 +42,9 @@ export default {
privateList
:
[]
}
},
created
()
{
this
.
getDistribution
()
},
mounted
()
{
this
.
$bus
.
$on
(
'drawPrivateChart'
,
data
=>
{
this
.
privateList
=
data
...
...
src/components/ViewContentLeft.vue
View file @
9198938
...
...
@@ -3,7 +3,7 @@
<div
class=
"top"
>
<view-sub-title
title=
"企业客户总览"
/>
<view-tabs
/>
<view-surface/>
<view-surface
/>
<view-pie-group>
<div
slot=
"1"
><Area
:height=
"defaultHeight"
></Area></div>
<div
slot=
"2"
><Brand
:height=
"defaultHeight"
></Brand></div>
...
...
@@ -23,8 +23,10 @@ import Area from '../views/customer/area'
import
Store
from
'../views/customer/store'
import
Brand
from
'../views/customer/brand'
import
OverSize
from
'../views/saas/overview.vue'
import
{
clientMixin
}
from
'../mixins/index'
export
default
{
name
:
'ViewContentLeft'
,
mixins
:
[
clientMixin
],
components
:
{
Area
,
Store
,
...
...
@@ -36,6 +38,9 @@ export default {
defaultHeight
:
datas
.
DefaultData
.
defaultPieHeight
}
},
created
()
{
this
.
getClientData
()
},
mounted
()
{},
methods
:
{}
}
...
...
src/components/ViewTabs.vue
View file @
9198938
...
...
@@ -40,7 +40,7 @@ export default {
},
methods
:
{
toFixNum
(
val
)
{
return
(
val
*
100
).
toFixed
(
0
)
+
'%'
return
(
val
*
100
).
toFixed
(
1
)
+
'%'
},
getEnterpriseOverview
()
{
this
.
api
.
customer
.
getEnterpriseOverview
().
then
(
res
=>
{
...
...
@@ -55,7 +55,7 @@ export default {
<
style
scoped
lang=
"scss"
>
.tabs
{
margin
:
1.22
vh
0
0.98vh
0
;
margin
:
0.98
vh
0
0.98vh
0
;
padding
:
0
1.67vw
;
height
:
6.95vh
;
width
:
100%
;
...
...
src/mixins/clientMixin.js
View file @
9198938
...
...
@@ -14,17 +14,21 @@ export default {
storeData
:
[]
}
},
created
()
{
this
.
getClientData
()
},
methods
:
{
getClientData
()
{
console
.
log
(
22
)
this
.
api
.
customer
.
getEnterpriseDistribution
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
res
.
data
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
queryitem
==
'区域排名'
)
this
.
areaData
=
item
.
rankDistributions
if
(
item
.
queryitem
==
'品牌分布'
)
this
.
brandData
=
item
.
rankDistributions
if
(
item
.
queryitem
==
'门店类型'
)
this
.
storeData
=
item
.
rankDistributions
this
.
$bus
.
$emit
(
'clientData'
,
{
areaData
:
this
.
areaData
,
brandData
:
this
.
brandData
,
storeData
:
this
.
storeData
})
})
}
})
...
...
src/mixins/userMixin.js
View file @
9198938
...
...
@@ -7,9 +7,7 @@ export default {
mileageData
:
[]
}
},
created
()
{
this
.
getDistribution
()
},
methods
:
{
getDistribution
()
{
this
.
api
.
user
.
getDistribution
().
then
(
res
=>
{
...
...
@@ -19,6 +17,12 @@ export default {
if
(
item
.
queryitem
==
'车价'
)
this
.
priceData
=
item
.
distribution
if
(
item
.
queryitem
==
'购车年限'
)
this
.
buyCarData
=
item
.
distribution
if
(
item
.
queryitem
==
'里程'
)
this
.
mileageData
=
item
.
distribution
this
.
$bus
.
$emit
(
'userData'
,
{
ageData
:
this
.
ageData
,
priceData
:
this
.
priceData
,
buyCarData
:
this
.
buyCarData
,
mileageData
:
this
.
mileageData
})
})
}
})
...
...
src/views/customer/area.vue
View file @
9198938
...
...
@@ -21,17 +21,21 @@
</
template
>
<
script
>
import
{
clientMixin
}
from
'../../mixins/index'
export
default
{
name
:
'Area'
,
mixins
:
[
clientMixin
],
data
()
{
return
{
chart
:
{
id
:
'area'
,
keys
:
[
'name'
,
'num'
]
}
},
areaData
:
[]
}
},
created
()
{
this
.
$bus
.
$on
(
'clientData'
,
data
=>
{
this
.
areaData
=
data
.
areaData
})
}
}
</
script
>
src/views/customer/brand.vue
View file @
9198938
...
...
@@ -6,24 +6,28 @@
<span>
品牌分布
</span>
</div>
<div
class=
"container flex"
>
<pie-chart
:id=
"chart.id"
:list=
"brandData"
:keys=
"chart.keys"
></pie-chart>
<pie-chart
:id=
"chart.id"
:list=
"brandData"
:keys=
"chart.keys"
></pie-chart>
<Legend
:list=
"brandData"
></Legend>
</div>
</div>
</
template
>
<
script
>
import
{
clientMixin
}
from
'../../mixins/index'
export
default
{
name
:
'Brand'
,
mixins
:
[
clientMixin
],
data
()
{
return
{
type
:
'gender'
,
chart
:
{
id
:
'brand'
,
keys
:
[
'name'
,
'num'
]
}
keys
:
[
'name'
,
'num'
]
},
brandData
:
[]
}
},
created
()
{
this
.
$bus
.
$on
(
'clientData'
,
data
=>
{
this
.
brandData
=
data
.
brandData
})
}
}
</
script
>
src/views/customer/store.vue
View file @
9198938
...
...
@@ -12,18 +12,22 @@
</
template
>
<
script
>
import
{
clientMixin
}
from
'../../mixins/index'
export
default
{
name
:
'Store'
,
mixins
:
[
clientMixin
],
data
()
{
return
{
chart
:
{
id
:
'store'
,
keys
:
[
'name'
,
'num'
],
colors
:
[
'#4FA0FF'
,
'#7CFFB2'
,
'#FDF006'
,
'#EB6001'
]
}
},
storeData
:
[]
}
},
created
()
{
this
.
$bus
.
$on
(
'clientData'
,
data
=>
{
this
.
storeData
=
data
.
storeData
})
}
}
</
script
>
src/views/saas/business.vue
View file @
9198938
...
...
@@ -68,9 +68,10 @@ export default {
.business-wrap
{
height
:
13.9vh
;
margin-bottom
:
0.98vh
;
margin-top
:
0.98vh
;
.business-data
{
margin-right
:
4px
;
margin-top
:
2.5
vh
;
//
margin-top
:
0.98
vh
;
width
:
36.11vw
;
height
:
100%
;
}
...
...
src/views/saas/category.vue
View file @
9198938
...
...
@@ -33,6 +33,7 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.category-box
{
overflow
:
hidden
;
height
:
13.9vh
;
background
:
#0b0e31
;
.title
{
...
...
@@ -40,7 +41,7 @@ export default {
}
.category-container
{
height
:
11.34vh
;
margin
:
1.59vh
1.67vw
1.46vh
1.11vw
;
//
margin
:
1.59vh
1.67vw
1.46vh
1.11vw
;
.category-legend{
width
:
4.2vw
;
...
...
src/views/saas/overview.vue
View file @
9198938
...
...
@@ -212,6 +212,9 @@ export default {
font-size
:
12px
;
color
:
#ffffff
;
}
&
:last-child
{
border
:
none
!important
;
}
}
}
.bg-1
{
...
...
@@ -244,6 +247,9 @@ export default {
font-size
:
12px
;
color
:
#ffffff
;
}
&
:last-child
{
border
:
none
!important
;
}
}
}
.bgEstimate-1
{
...
...
src/views/user/age.vue
View file @
9198938
...
...
@@ -9,29 +9,33 @@
<pie-chart
ref=
"pieChart"
:id=
"chart.id"
:size=
"chart.size"
:list=
"ageData"
:keys=
"chart.keys"
:radius=
"chart.radius"
height=
"6.1vh"
@
pieAction=
"pieAction"
></pie-chart>
<div
class=
"legend-item flex"
>
<span
:style=
"
{ background: descColor }">
</span>
{{
selectData
&&
selectData
.
name
}}
{{
selectData
&&
selectData
.
name
}}
</div>
</div>
</div>
</
template
>
<
script
>
import
{
userMixin
}
from
'../../mixins/index'
export
default
{
name
:
'Age'
,
mixins
:
[
userMixin
],
data
()
{
return
{
chart
:
{
id
:
'user-age'
,
keys
:
[
'name'
,
'num'
],
radius
:
[
'56%'
,
'85%'
],
size
:
'8px'
radius
:
[
'56%'
,
'85%'
],
size
:
'8px'
},
selectData
:
''
,
descColor
:
''
descColor
:
''
,
ageData
:
[]
}
},
created
()
{
this
.
$bus
.
$on
(
'userData'
,
data
=>
{
this
.
ageData
=
data
.
ageData
})
},
methods
:
{
pieAction
(
data
)
{
this
.
descColor
=
this
.
$refs
.
pieChart
.
descColor
...
...
src/views/user/buyCar.vue
View file @
9198938
...
...
@@ -16,10 +16,8 @@
</
template
>
<
script
>
import
{
userMixin
}
from
'../../mixins/index'
export
default
{
name
:
'bugCar'
,
mixins
:
[
userMixin
],
data
()
{
return
{
selectData
:
''
,
...
...
@@ -29,9 +27,16 @@ export default {
keys
:
[
'name'
,
'num'
],
radius
:
[
'56%'
,
'85%'
],
size
:
'8px'
}
},
buyCarData
:
[],
}
},
created
()
{
this
.
$bus
.
$on
(
'userData'
,
data
=>
{
this
.
buyCarData
=
data
.
buyCarData
})
},
methods
:
{
pieAction
(
data
)
{
this
.
descColor
=
this
.
$refs
.
pieChart
.
descColor
...
...
src/views/user/mileage.vue
View file @
9198938
...
...
@@ -16,10 +16,8 @@
</
template
>
<
script
>
import
{
userMixin
}
from
'../../mixins/index'
export
default
{
name
:
'Mileage'
,
mixins
:
[
userMixin
],
data
()
{
return
{
selectData
:
''
,
...
...
@@ -28,10 +26,16 @@ export default {
id
:
'mileage'
,
keys
:
[
'name'
,
'num'
],
radius
:
[
'56%'
,
'85%'
],
size
:
'8px'
}
size
:
'8px'
},
mileageData
:
[]
}
},
created
()
{
this
.
$bus
.
$on
(
'userData'
,
data
=>
{
this
.
mileageData
=
data
.
mileageData
})
},
methods
:
{
pieAction
(
data
)
{
this
.
descColor
=
this
.
$refs
.
pieChart
.
descColor
...
...
src/views/user/price.vue
View file @
9198938
...
...
@@ -16,10 +16,8 @@
</
template
>
<
script
>
import
{
userMixin
}
from
'../../mixins/index'
export
default
{
name
:
'Price'
,
mixins
:
[
userMixin
],
data
()
{
return
{
selectData
:
''
,
...
...
@@ -29,9 +27,15 @@ export default {
keys
:
[
'name'
,
'num'
],
radius
:
[
'56%'
,
'85%'
],
size
:
'8px'
}
},
priceData
:
[]
}
},
created
()
{
this
.
$bus
.
$on
(
'userData'
,
data
=>
{
this
.
priceData
=
data
.
priceData
})
},
methods
:
{
pieAction
(
data
)
{
this
.
descColor
=
this
.
$refs
.
pieChart
.
descColor
...
...
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