Commit 7775d926 by xuyl
2 parents b80e7362 14b0c506
...@@ -26,7 +26,22 @@ img { ...@@ -26,7 +26,22 @@ img {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.flex-around {
display: flex;
align-items: center;
justify-content: space-around;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-column {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.text-hide { .text-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
...@@ -91,7 +106,7 @@ img { ...@@ -91,7 +106,7 @@ img {
user-select: none; user-select: none;
box-sizing: border-box; box-sizing: border-box;
height: 2.07vh; height: 2.07vh;
margin-top:4px; margin-top: 4px;
} }
.title-icon { .title-icon {
...@@ -108,7 +123,7 @@ img { ...@@ -108,7 +123,7 @@ img {
} }
.container { .container {
height:8.54vh; height: 8.54vh;
margin: 8px 6px 8px 8px; margin: 8px 6px 8px 8px;
} }
...@@ -124,3 +139,8 @@ img { ...@@ -124,3 +139,8 @@ img {
height: 9.5vh; height: 9.5vh;
} }
} }
.text-linear {
background: linear-gradient(top, #b4bdff, #7e8eff);
color: transparent;
-webkit-background-clip: text;
}
<template> <template>
<div class="line-box"> <div class="line-box">
<div :id="domId" class="line-chart"></div> <div :id="domId" class="line-chart"></div>
<div class="rank-box">
<div class="rank-title-block">
<p :class="['rank-title', rankFlag == 'top' ? 'rank-title-active' : '']" @click="handleRankChange('top')">前5{{ storeOrBrandTxt }}</p>
<p :class="['rank-title', rankFlag == 'last' ? 'rank-title-active' : '']" @click="handleRankChange('last')">后5{{ storeOrBrandTxt }}</p>
</div>
<div class="rank-block">
<div class="rank-line" v-for="(item, index) in rankList" :key="index">
<div class="line-item">
<marquee :direction="directionTimer" :delay="delayTimer" :text="item.label"></marquee>
</div>
<div class="line-item">
<marquee class="txt-orange" :direction="directionTimer" :delay="delayTimer" :text="item.value"></marquee>
</div>
</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -167,7 +150,7 @@ export default { ...@@ -167,7 +150,7 @@ export default {
this.lineOptions.yAxis.scale = true this.lineOptions.yAxis.scale = true
} else { } else {
this.lineOptions.yAxis.max = Math.ceil(Math.max(...seriesDate) / 10) * 10 this.lineOptions.yAxis.max = Math.ceil(Math.max(...seriesDate) / 10) * 10
this.lineOptions.yAxis.min = Math.floor(Math.min(...seriesDate) * 0.9 / 10) * 10 this.lineOptions.yAxis.min = Math.floor((Math.min(...seriesDate) * 0.9) / 10) * 10
} }
this[this.domId].setOption(this.lineOptions) this[this.domId].setOption(this.lineOptions)
// 默认展示tooltip // 默认展示tooltip
......
...@@ -23,7 +23,6 @@ import Area from '../views/customer/area' ...@@ -23,7 +23,6 @@ import Area from '../views/customer/area'
import Store from '../views/customer/store' import Store from '../views/customer/store'
import Brand from '../views/customer/brand' import Brand from '../views/customer/brand'
import OverSize from '../views/saas/overview.vue' import OverSize from '../views/saas/overview.vue'
export default { export default {
name: 'ViewContentLeft', name: 'ViewContentLeft',
components: { components: {
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 11:17:49
* @FilePath: \dj-data-view\src\components\ViewSurface.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="surface box"> <div class="surface box"></div>
</div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
...@@ -20,7 +26,7 @@ export default { ...@@ -20,7 +26,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.surface { .surface {
height:21.46vh; height: 21.46vh;
margin-bottom:0.98vh; margin-bottom: 0.98vh;
} }
</style> </style>
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="tabs flex box"> <div class="tabs flex box">
<div class="tab" v-for="item in tabs" :key="item.key"> <div class="tab" v-for="item in tabs" :key="item.key">
<div class="tab-title">{{ item.title }}</div> <div class="tab-title">{{ item.title }}</div>
<div class="tab-text">2,174443</div> <div class="tab-text text-linear">2,1744</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -40,8 +40,11 @@ export default { ...@@ -40,8 +40,11 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.tabs { .tabs {
margin: 1.22vh 2.78vw 0.98vh 2.78vw; margin: 1.22vh 0 0.98vh 0;
padding:0 1.67vw;
height: 6.95vh; height: 6.95vh;
width:100%;
box-sizing: border-box;
justify-content: space-between; justify-content: space-between;
.tab { .tab {
margin:0.61vh 0; margin:0.61vh 0;
...@@ -53,7 +56,6 @@ export default { ...@@ -53,7 +56,6 @@ export default {
.tab-text { .tab-text {
font-weight: 700; font-weight: 700;
font-size: 24px; font-size: 24px;
color: #6578ff;
line-height: 30px; line-height: 30px;
} }
} }
......
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:43:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 15:05:23
* @FilePath: \dj-data-view\src\components\barChart.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="line-box">
<div :id="domId" class="line-chart" :style="{ height: boxHeight }"></div>
</div>
</template>
<script>
import datas from '@/utils/data'
import * as echarts from 'echarts'
import { getBarOptions, getBarReverseOptions } from './barOptions'
export default {
name: 'barChart',
props: {
domId: {
type: String,
default: 'line-chart'
},
revese: {
type: Boolean,
default: false
},
boxHeight: {
type: String,
default: '12.83vh'
},
storeOrBrandTxt: {
type: String,
default: '品牌'
},
dataList: {
type: Array,
default: () => []
},
// 0-月表;1-日表
queryType: {
type: Number,
default: 0
},
tooltipFormatterObj: {
type: Array,
default: () => {
return [
{
label: '数量',
attrName: 'num'
},
{
label: '环比',
attrName: 'hrate',
addSymbol: '%'
},
{
label: '同比',
attrName: 'trate',
addSymbol: '%'
}
]
}
}
},
data() {
return {
directionTimer: datas.DefaultData.directionTimer,
delayTimer: datas.DefaultData.delayTimer,
rankFlag: 'top',
lineOptions: [],
rankList: [],
echartsLine: '',
moveAttr: {
// speed: 900,
seriesIndex: 0,
dataIndex: 0
},
timer: null
}
},
created() {
this.lineOptions = this.revese ? getBarReverseOptions() : getBarOptions()
},
mounted() {
this.lineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.lineDom)
this.chartBindEvent()
},
methods: {
chartBindEvent() {
this[this.domId].setOption(this.lineOptions)
}
}
}
</script>
<style lang="scss" scoped>
.line-box {
height: 100%;
color: #ffffff;
.txt-orange {
color: #eb6001;
}
.line-chart {
width: 100%;
}
}
</style>
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:46:24
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 15:14:13
* @FilePath: \dj-data-view\src\components\barOptions.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
function getBarOptions(obj) {
var options = {
xAxis: {
type: 'category',
axisLabel: {
color: '#606266',
fontSize: '0.8em',
rotate: 30
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
grid: {
left: '3%',
right: '6%',
top: '6%',
bottom: '0%',
containLabel: true
},
yAxis: {
nameGap: 30,
type: 'value',
splitLine: {
show: false
},
axisLabel: {
show: false
},
splitLine: {
lineStyle: {
color: '#2F314F'
}
},
splitNumber: 4
},
series: [
{
type: 'bar',
symbol: 'circle',
backgroundStyle: {
color: '#6578FF'
},
barWidth: '30%',
data: [120, 200, 150, 80, 70, 110, 130]
}
]
}
return options
}
function getBarReverseOptions(obj) {
var options = {
tooltip: {
trigger: 'axis',
showContent: false,
axisPointer: {
type: 'shadow',
shadowStyle: {
color: 'rgba(210, 210, 210, 0.2)'
}
},
borderWidth: 0,
backgroundColor: 'rgba(68,68,68,0.80)',
confine: true,
textStyle: {
color: '#ffffff',
fontSize: 8
}
},
yAxis: {
type: 'category',
axisLabel: {
color: '#ccc',
fontSize: '0.8em'
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
data: ['一般发展', '一般价值', '一般挽留', '重要挽留', '重要价值', '重要发展', '重要保持', '一般保持']
},
grid: {
left: '15%',
right: '0%',
top: '0%',
bottom: '0%',
containLabel: true
},
xAxis: {
nameGap: 30,
type: 'value',
splitLine: {
show: false
},
axisLabel: {
show: false
},
splitNumber: 4
},
series: [
{
type: 'bar',
symbol: 'circle',
backgroundStyle: {
color: '#6578FF'
},
data: [30, 120, 200, 150, 80, 70, 110, 130]
}
]
}
return options
}
export { getBarReverseOptions, getBarOptions }
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: 公共数据 * @Description: 公共数据
* @Author: huyue * @Author: huyue
* @Date: 2022-06-23 17:38:33 * @Date: 2022-06-23 17:38:33
* @LastEditors: huyue * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-06-29 19:47:34 * @LastEditTime: 2022-10-25 10:38:15
*/ */
const DefaultData = { const DefaultData = {
defaultLineHeight: '17.32', defaultLineHeight: '17.32',
......
<template> <template>
<div class="overview flex"> <div class="overview flex">
<div class="overview-store"> <div class="store mgr4">
<div class="headline flex-around">
<div :style="{ width: item.width ? item.width : 'auto' }" v-for="(item, index) in titleList" :key="index">{{ item.text }}</div>
</div>
<div class="content">
<div :class="['content-item', 'flex', info.pd ? info.pd : '']" v-for="(info, index) in infoList" :key="index">
<div class="content-title">{{ info.title }}</div>
<template v-for="(data, ids) in info.dataList">
<div :class="['content-number', 'num-' + ids]" :key="ids">1,287</div>
</template>
</div>
</div>
</div>
<div class="clew mgr4">
<div class="headline text-center">产生线索/核销数</div>
<div class="clew-content">
<div :class="['clew-content-item', 'bg-' + clewInx]" v-for="(clew, clewInx) in clewList" :key="clewInx">
<template v-for="(clewData, clewIds) in clew">
<div class="clew-line-text flex-between" :key="clewIds">
<div>{{ clewData.title }}</div>
<div class="clew-num">1,542,081</div>
</div>
</template>
</div>
</div>
</div>
<div class="estimate">
<div class="headline text-center">预估价值/挽回损失</div>
<div class="estimate-content">
<div :class="['estimate-content-item', 'bgEstimate-' + estimateInx]" v-for="(estimate, estimateInx) in estimateList" :key="estimateInx">
<template v-for="(estimateData, estimateIds) in estimate">
<div :class="['estimate-line-text', estimateInx == 2 ? 'flex-column retrieve' : 'text-center']" :key="estimateIds">
<div v-if="estimateInx == 2">挽回损失</div>
<div class="estimate-num">1,542,081</div>
</div>
</template>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -11,7 +47,43 @@ import datas from '../../utils/data' ...@@ -11,7 +47,43 @@ import datas from '../../utils/data'
export default { export default {
name: 'oversize', name: 'oversize',
data() { data() {
return {} return {
titleList: [{ text: '订阅门店' }, { text: '线索订阅门店数(累计)', width: '3.82vw' }, { text: '线索订阅门店数(当年新增)', width: '4.68vw' }, { text: '活跃使用门店' }, { text: '留存率' }],
infoList: [
{
title: '智慧门店线索订阅',
pd: 'pd26',
width: '2.78vw',
dataList: [obj => obj.totalnum, obj => obj.increnum, obj => obj.activenum, obj => obj.retention]
},
{
title: '门店会员的权益',
width: '2.78vw',
dataList: [obj => obj.totalnum, obj => obj.increnum, obj => obj.activenum, obj => obj.retention]
},
{
title: '智慧车管线索订阅',
width: '2.78vw',
dataList: [obj => obj.totalnum, obj => obj.increnum, obj => obj.activenum, obj => obj.retention]
}
],
clewList: [
[
{ title: '到店线索', value: obj => obj.arrival },
{ title: '送修线索', value: obj => obj.repair },
{ title: '续保线索', value: obj => obj.insurance }
],
[
{ title: '自店权益', value: obj => obj.ownshopequity },
{ title: '数字权益', value: obj => obj.digitalequity }
],
[
{ title: '高危点', value: obj => obj.highcriticalpoint },
{ title: '高危报警', value: obj => obj.highriskalarm }
]
],
estimateList: [[obj => obj.totalnum, obj => obj.increnum, obj => obj.activenum], [obj => obj.totalnum], [obj => obj.totalnum]]
}
}, },
mounted() {}, mounted() {},
methods: {} methods: {}
...@@ -20,10 +92,142 @@ export default { ...@@ -20,10 +92,142 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.overview { .overview {
margin: 10px 16px 16px 16px; margin: 10px 0 16px 0;
&-store { .store {
width: 23.89vw; width: 23.89vw;
height:30.73vh; height: 30.73vh;
}
.clew {
width: 9.58vw;
height: 30.73vh;
}
.estimate {
width: 7.64vw;
height: 30.73vh;
}
.headline {
height: 6.1vh;
opacity: 0.6;
background: #161c5f;
font-weight: 600;
font-size: 10px;
color: #fff;
}
.content {
width: 100%;
&-item {
padding: 1.59vh 0.49vw 1.59vh 0.69vw;
height: 6.83vh;
background: #0b0e31;
margin-bottom: 0.49vh;
justify-content: space-around;
box-sizing: border-box;
}
&-title {
width: 2.78vw;
font-weight: 400;
font-size: 10px;
color: #fff;
// white-space: pre-wrap;
}
&-number {
font-weight: 700;
font-size: 12px;
color: #ffffff;
text-align: center;
}
.num-0 {
width: 3.82vw;
}
.num-1 {
width: 4.68vw;
}
.num-2 {
width: 4.68vw;
}
.num-3 {
width: 2.29vw;
}
.pd26 {
height: 9.999vh;
padding: 3.17vh 0.49vw 3.17vh 0.69vw;
}
}
.mgr4 {
margin-right: 0.28vw;
}
.clew-content {
width: 100%;
&-item {
margin-bottom: 0.49vh;
background: #091b39;
.clew-line-text {
padding: 0.85vh 0.56vw 0.73vh 0.56vw;
font-weight: 400;
font-size: 10px;
color: #fff;
border-bottom: 1px solid #0e2949;
box-sizing: border-box;
height: 3.333vh;
.clew-num {
font-weight: 700;
font-size: 12px;
color: #ffffff;
}
}
}
.bg-1 {
background: #061e19;
.clew-line-text {
border-bottom: 1px solid #0a2d26;
height: 3.415vh;
}
}
.bg-2 {
background: #280935;
.clew-line-text {
border-bottom: 1px solid #390b4b;
height: 3.415vh;
}
}
}
.estimate-content {
width: 100%;
&-item {
margin-bottom: 0.49vh;
background: #0b0e31;
.estimate-line-text {
font-weight: 400;
border-bottom: 1px solid #171f60;
box-sizing: border-box;
height: 3.333vh;
.estimate-num {
font-weight: 700;
font-size: 12px;
color: #ffffff;
}
}
}
.bgEstimate-1 {
.estimate-line-text {
height: 6.83vh;
border: none;
}
}
.bgEstimate-2 {
.estimate-line-text {
height: 6.83vh;
border: none;
}
}
.retrieve {
font-size: 10px;
color: #ff3540;
.estimate-num{
color: #ff3540 !important;
margin-top:0.37vh;
}
}
} }
} }
</style> </style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 15:16:19
* @FilePath: \dj-data-view\src\views\user\analyse.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="analyse"> <div class="analyse">
<div class="title title-icon"> <div class="title title-icon">
<span class="icon"></span> <span class="icon"></span>
<span>门店类型</span> <div class="title-h3">客户价值分析</div>
</div> </div>
<div class="container"> <div class="container">
<bar-chart domId="analyseChart" :revese="true" boxHeight="14.54vh"></bar-chart>
</div> </div>
</div> </div>
</template> </template>
...@@ -15,14 +22,26 @@ ...@@ -15,14 +22,26 @@
export default { export default {
name: 'Analyse', name: 'Analyse',
data() { data() {
return { return {}
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.analyse{ .analyse {
width:18.06vw; width: 18.06vw;
.container {
margin-top: -1vh;
}
.icon {
display: inline-block;
transform: rotate(90deg);
}
.title {
display: block;
}
.title-h3 {
width: 10px;
margin: 10px 4px;
}
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 13:49:20
* @FilePath: \dj-data-view\src\views\user\area.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="area"> <div class="area">
<div class="title title-icon"> <div class="title title-icon">
...@@ -6,23 +13,22 @@ ...@@ -6,23 +13,22 @@
<span>区域分布</span> <span>区域分布</span>
</div> </div>
<div class="container"> <div class="container">
<bar-chart domId="areaChart"></bar-chart>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import '../../components'
export default { export default {
name: 'Area', name: 'Area',
data() { data() {
return { return {}
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.analyse{ .area {
width:15.42vw; width: 15.42vw;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-10-25 13:43:57
* @FilePath: \dj-data-view\src\views\user\brand.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template> <template>
<div class="brand"> <div class="brand">
<div class="title title-icon"> <div class="title title-icon">
...@@ -6,22 +13,21 @@ ...@@ -6,22 +13,21 @@
<span>品牌分布</span> <span>品牌分布</span>
</div> </div>
<div class="container"> <div class="container">
<bar-chart domId="brandChart"></bar-chart>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import '../../components'
export default { export default {
name: 'Brand', name: 'Brand',
data() { data() {
return { return {}
}
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.brand{ .brand {
width:15.42vw; width: 15.42vw;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
<template> <template>
<div class="user-tab"> <div class="user-tab flex">
<template v-for="(tab, index) in userData">
<div class="tab-item" :key="index">
<div class="tab-title">{{ tab.text }}</div>
<div class="tab-count text-linear">15,351,2</div>
<div class="tab-increase flex-between">
<div class="increase-text">当年新增</div>
<div class="increase-count">7,329,2</div>
</div>
</div>
</template>
</div> </div>
</template> </template>
...@@ -10,14 +19,76 @@ export default { ...@@ -10,14 +19,76 @@ export default {
name: 'UserTab', name: 'UserTab',
data() { data() {
return { return {
userData: [
{
text: '用户数',
value: obj => obj.increnum,
increase: obj => obj.increnum
},
{
text: '企微客户数',
value: obj => obj.totalwechatnum,
increase: obj => obj.increwechatnum
},
{
text: '企微群数',
value: obj => obj.totalwechatgroupnum,
increase: obj => obj.increwechatgroupnum
},
{
text: '小程序',
value: obj => obj.totalappletnum,
increase: obj => obj.increappletnum
},
{
text: '个微客户数',
value: obj => obj.totalsinglewechantnum,
increase: obj => obj.incresinglewechantnum
}
]
} }
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.user-tab{ .user-tab {
height:29.51vh; height: 9.02vh;
margin:1.46vh 0 0.98vh 0; margin: 1.46vh 0 0.98vh 0;
.tab-item {
width: 9.65vw;
height: 9.02vh;
background: #0b0e31;
margin-right: 0.28vw;
padding: 0.28vh 0;
box-sizing: border-box;
.tab-title {
font-weight: 400;
font-size: 12px;
color: #e8e8e8;
margin: 0 0.69vw;
height: 2.07vh;
}
.tab-count {
font-weight: 700;
font-size: 22px;
margin: 0 0.69vw;
height: 3.8vh;
line-height: 3.8vh;
}
.tab-increase {
height: 2.44vh;
border-top: 1px solid #171f60;
padding: 0 0.69vw;
}
.increase-text {
font-size: 9px;
color: #dddddd;
}
.increase-count {
font-weight: 700;
font-size: 12px;
color: #ffffff;
}
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!