Commit 634158a8 by 胡悦

提交新运营看板数据

1 parent 652dc58c
Showing 45 changed files with 3714 additions and 18 deletions
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"dev": "npm run serve" "dev": "npm run serve"
}, },
"dependencies": { "dependencies": {
"@jiaminghi/data-view": "^2.10.0",
"TagCloud": "^2.4.0", "TagCloud": "^2.4.0",
"autoprefixer": "^8.0.0", "autoprefixer": "^8.0.0",
"core-js": "^3.6.4", "core-js": "^3.6.4",
......
// 运营版接口 // 运营版接口
// 企业客户总览接口---获取企业客户总览数据-区域(省份前5)/品牌(品牌前5)/门店类型分布(门店类型:豪华、合资、新能源、自主品牌) // 企业客户总览接口---获取企业客户总览数据-区域(省份前5)/品牌(品牌前5)/门店类型分布(门店类型:豪华、合资、新能源、自主品牌)
const getEnterpriseDistribution = params => { const getEnterpriseDistribution = params => {
return window.$HTTP.get('dj/overview/getEnterpriseDistribution', params) return window.$HTTP.get('enterpriseCustomer/getEnterpriseDistribution', params)
} }
// 企业客户总览接口---获取企业客户总览数据(包括:总客户数、新增客户数、留存率、单店产值) // 品牌分布/区域分布
const getNewValueDistribution = params => {
return window.$HTTP.get('privateDomainUserPool/getValueDistribution', params)
}
// // 企业客户总览接口---获取企业客户总览数据(包括:总客户数、新增客户数、留存率、单店产值)
// const getEnterpriseOverview = params => {
// return window.$HTTP.get('dj/overview/getEnterpriseOverview', params)
// }
// 0926版本--获取企业客户总览数据
const getEnterpriseOverview = params => { const getEnterpriseOverview = params => {
return window.$HTTP.get('dj/overview/getEnterpriseOverview', params) return window.$HTTP.get('enterpriseCustomer/getEnterpriseOverview', params)
} }
// 企业客户总览接口---获取企业客户数据近12个月趋势图(包括:总客户数、新增客户数) // 企业客户总览接口---获取企业客户数据近12个月趋势图(包括:总客户数、新增客户数)
const getEnterpriseOverviewTrend = params => { const getEnterpriseOverviewTrend = params => {
return window.$HTTP.get('dj/overview/getEnterpriseOverviewTrend', params) return window.$HTTP.get('enterpriseCustomer/getEnterpriseOverviewTrend', params)
} }
// 企业客户总览接口---获取路演版本三项新的指标 // 企业客户总览接口---获取路演版本三项新的指标
...@@ -36,7 +46,7 @@ const getSmartMerchantClueSubscription = params => { ...@@ -36,7 +46,7 @@ const getSmartMerchantClueSubscription = params => {
// 私域用户池总览接口---客户价值分析 // 私域用户池总览接口---客户价值分析
const getCustomerValueAnalysis = params => { const getCustomerValueAnalysis = params => {
return window.$HTTP.get('dj/private/getCustomerValueAnalysis', params) return window.$HTTP.get('privateDomainUserPool/getCustomerValueAnalysis', params)
} }
// 私域用户池总览接口---客户年龄分布/车价占比/购车年限分布/里程分布 // 私域用户池总览接口---客户年龄分布/车价占比/购车年限分布/里程分布
...@@ -61,7 +71,7 @@ const getoverview = params => { ...@@ -61,7 +71,7 @@ const getoverview = params => {
// 营销增值服务业务接口---1.0新车权益销售、1.1新车精品升级、1.2新车线上转化、1.3存量用户众筹(累计展业门店数、当年新增、转化率、客单价、产值) // 营销增值服务业务接口---1.0新车权益销售、1.1新车精品升级、1.2新车线上转化、1.3存量用户众筹(累计展业门店数、当年新增、转化率、客单价、产值)
const getBusinessType = params => { const getBusinessType = params => {
return window.$HTTP.get('dj/saasAdded/getBusinessType', params) return window.$HTTP.get('saasValueaddedTransformation/getBusinessType', params)
} }
// 营销增值服务业务接口---累计展业门店数、当年新增门店数、产值_当月、产值_当年、客单价、业务品类_权益类、业务品类_膜类、业务品类_电子类 // 营销增值服务业务接口---累计展业门店数、当年新增门店数、产值_当月、产值_当年、客单价、业务品类_权益类、业务品类_膜类、业务品类_电子类
...@@ -69,6 +79,36 @@ const getSaasValueaddedTransformationOverview = params => { ...@@ -69,6 +79,36 @@ const getSaasValueaddedTransformationOverview = params => {
return window.$HTTP.get('dj/saasAdded/getSaasValueaddedTransformationOverview', params) return window.$HTTP.get('dj/saasAdded/getSaasValueaddedTransformationOverview', params)
} }
// 0926版本--品类价值分析
const getProductCategoryAnalysis = params => {
return window.$HTTP.get('privateDomainUserPool/getProductCategoryAnalysis', params)
}
// 近12个月成交转化分析
const getNear12trend = params => {
return window.$HTTP.get('privateDomainUserPool/getNear12trend', params)
}
// 私域用户池 --- 话术质检
export const getSpeechQualityInspection = () => {
return window.$HTTP.get('privateDomainUserPool/getSpeechQualityInspection')
}
// 私域用户池 --- 上月门店GMV排名
export const getLastmonthmerchantranking = () => {
return window.$HTTP.get('privateDomainUserPool/getLastmonthmerchantranking')
}
// 私域用户池 --- 上月员工GMV排名
export const getLastmonthstaffranking = () => {
return window.$HTTP.get('privateDomainUserPool/getLastmonthstaffranking')
}
// 私域用户池 --- AI趣练
export const getAiPractice = () => {
return window.$HTTP.get('privateDomainUserPool/getAiPractice')
}
export default { export default {
getEnterpriseDistribution, getEnterpriseDistribution,
getEnterpriseOverview, getEnterpriseOverview,
...@@ -83,5 +123,12 @@ export default { ...@@ -83,5 +123,12 @@ export default {
getValueDistribution, getValueDistribution,
getoverview, getoverview,
getBusinessType, getBusinessType,
getSaasValueaddedTransformationOverview getSaasValueaddedTransformationOverview,
getNewValueDistribution,
getProductCategoryAnalysis,
getNear12trend,
getSpeechQualityInspection,
getLastmonthmerchantranking,
getLastmonthstaffranking,
getAiPractice
} }
...@@ -107,13 +107,17 @@ img { ...@@ -107,13 +107,17 @@ img {
background-size: 100%; background-size: 100%;
} }
.title { .title {
padding-top: 0.77vh;
font-size: 0.75vw; font-size: 0.75vw;
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
user-select: none; user-select: none;
box-sizing: border-box; box-sizing: border-box;
height: 2.07vh; height: 2.5vh;
background: linear-gradient(to right, #00C8FF, #006FFF); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
// margin-top: 4px; // margin-top: 4px;
.title-bg { .title-bg {
display: inline-block; display: inline-block;
...@@ -124,7 +128,7 @@ img { ...@@ -124,7 +128,7 @@ img {
} }
} }
.operational-box { .operational-box {
background-color: rgba(11, 44, 142, 0.28); background-color: rgba(11, 63, 142, 0.2);
} }
.container { .container {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-08-15 17:15:24 * @LastEditTime: 2024-09-09 10:51:43
*/ */
// 兼容 IE // 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill // https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
...@@ -23,8 +23,11 @@ import '@/assets/css/index.scss' ...@@ -23,8 +23,11 @@ import '@/assets/css/index.scss'
import './utils/util' import './utils/util'
import 'components' import 'components'
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { flylineChartEnhanced, scrollBoard } from '@jiaminghi/data-view'
// import dialog from './plugins/dialog' // import dialog from './plugins/dialog'
import Bus from '../src/bus' // 这是我的路径,正确引用你们的路径 import Bus from '../src/bus' // 这是我的路径,正确引用你们的路径
Vue.use(flylineChartEnhanced)
Vue.use(scrollBoard)
Vue.prototype.$bus = Bus Vue.prototype.$bus = Bus
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2023-07-04 13:55:35 * @Date: 2023-07-04 13:55:35
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-07-13 14:22:10 * @LastEditTime: 2024-09-10 13:48:47
--> -->
<template> <template>
<div class="page_layout"> <div class="page_layout">
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
data() { data() {
return { return {
activeName: '', activeName: '',
current: 0, current: 4,
titleList: { titleList: {
0: '让你的用车生活更美好', 0: '让你的用车生活更美好',
1: '广联企业全景介绍', 1: '广联企业全景介绍',
......
...@@ -3,21 +3,26 @@ ...@@ -3,21 +3,26 @@
* @Author: huyue * @Author: huyue
* @Date: 2023-07-04 13:55:35 * @Date: 2023-07-04 13:55:35
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-01-26 22:21:24 * @LastEditTime: 2024-09-09 14:26:41
--> -->
<template> <template>
<div class="content"> <div class="content">
<OperationalLeft></OperationalLeft> <OperationalLeft></OperationalLeft>
<OperationalCenter></OperationalCenter>
<OperationalRight></OperationalRight> <OperationalRight></OperationalRight>
</div> </div>
</template> </template>
<script> <script>
import OperationalLeft from '../../operational/OperationalLeft.vue' import OperationalCenter from '../../newOperational/center.vue'
import OperationalRight from '../../operational/OperationalRight.vue' import OperationalLeft from '../../newOperational/left.vue'
import OperationalRight from '../../newOperational/right.vue'
// import OperationalLeft from '../../operational/OperationalLeft.vue'
// import OperationalRight from '../../operational/OperationalRight.vue'
export default { export default {
name: 'ViewOperational', name: 'ViewOperational',
components: { components: {
OperationalCenter,
OperationalLeft, OperationalLeft,
OperationalRight OperationalRight
}, },
...@@ -36,7 +41,7 @@ export default { ...@@ -36,7 +41,7 @@ export default {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
padding: 0.95vh 1.67vw; padding: 0.95vh 1.6vw;
gap: 0 16px; gap: 0 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
} }
}, },
beforeDestroy() { beforeDestroy() {
document.getElementById('aivideos').muted = true if (document.getElementById('aivideos')) document.getElementById('aivideos').muted = true
} }
} }
</script> </script>
......
<!--
* @Description: 中间地图模块
* @Author: huyue
* @Date: 2024-09-04 16:16:02
* @LastEditors: huyue
* @LastEditTime: 2024-09-09 14:36:32
-->
<template>
<div class="center-box">
<div class="top">
<dv-flyline-chart-enhanced :config="config" :dev="true" style="width:100%;height:100%;" />
</div>
<div class="bottom">
<StoreGmv></StoreGmv>
<EmployeeGmv></EmployeeGmv>
</div>
</div>
</template>
<script>
import config from './constant/index'
import StoreGmv from './components/StoreGmv'
import EmployeeGmv from './components/EmployeeGmv'
export default {
components: { StoreGmv, EmployeeGmv },
data() {
return {
config
}
},
mounted() {
console.log(this.config)
}
}
</script>
<style lang="scss" scoped>
.center-box {
width: 28.04vw;
box-sizing: border-box;
background: url(../../assets/images/operation/center-bg.png) no-repeat;
background-size: 100% 47.69vh;
background-position-y: 3.846vw;
.top {
width: 100%;
height: 47.69vh;
}
.bottom {
// display: grid;
// grid-template-columns: repeat(2, 1fr);
// gap: 0 0.96vw;
}
}
</style>
<template>
<div class="aicheck">
<div class="title title-icon">
<span class="icon"></span>
<div class="title-h3">AI趣练分析</div>
</div>
<div class="container">
<div class="chart">
<AngleBorder>
<div class="chart-title" slot="content">对练结果</div>
</AngleBorder>
<div class="category-container flex">
<pie-chart ref="pieChartAicheck" :id="chart.id" :list="categoryData" :formatter="chart.formatter" :colors="chart.colors"></pie-chart>
<OperationaLegend class="category-legend" :list="categoryData" :width="'4.17vw'" :height="'2.44vh'" :colors="chart.colors"></OperationaLegend>
</div>
</div>
<div class="radar">
<AngleBorder>
<div class="radar-title" slot="content">能力体系分析</div>
</AngleBorder>
<Radar :listData="listData"></Radar>
</div>
</div>
</div>
</template>
<script>
import AngleBorder from './AngleBorder'
import OperationaLegend from './OperationaLegend'
import Radar from './Radar'
export default {
name: 'AiCheck',
components: { AngleBorder, OperationaLegend, Radar },
data() {
return {
chart: {
id: 'aicheck',
colors: ['#6578FF', '#34AFFF', '#EB6001', '#16E193', '#BF98FF'],
formatter: 'rate'
},
categoryData: [
{
name: '优秀',
key: 'excellent',
value: 0
},
{
name: '合格',
key: 'qualified',
value: 0
},
{
name: '一般',
key: 'common',
value: 0
}],
listData: {}
}
},
created() {
this.getAiPractice()
},
methods: {
async getAiPractice() {
const res = await this.api.operational.getAiPractice()
this.listData = res.data.dataList[0]
const _dataList = res.data.dataList[0]
this.categoryData = this.categoryData.map(item => {
item.value = _dataList[item.key]
return item
})
console.log(this.categoryData, '-===')
}
}
}
</script>
<style lang="scss" scoped>
.aicheck {
width: 22.2vw;
height: 20vh;
background: #05204780;
box-shadow: inset 0 0 20px 0 #3d8bff40;
margin-left: 0.64vw;
.container {
display: flex;
margin-top: -1vh;
margin-left: 1.08vw;
}
.icon {
display: inline-block;
width: 0.94vw;
height: 0.93vh;
transform: rotate(90deg);
background: url(../../../assets/images/operation/icon-title.png) no-repeat;
background-size: 100%;
margin-top: 7px;
margin-left: 14px;
}
.title {
display: block;
}
.title-h3 {
width: 10px;
font-weight: 500;
font-size: 12px;
margin-left: 20px;
margin-top: 5px;
background: linear-gradient(to bottom, #00c8ff, #006fff); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
}
.chart {
margin-left: 1.6vw;
.chart-title {
width: 8.33vw;
height: 2.31vh;
line-height: 2.31vh;
font-size: 11px;
color: #e8e8e8;
background: repeating-linear-gradient(45deg, #0d2043 5%, #061939 10%);
padding-left: 0.32vw;
}
}
.radar {
margin-left: 1.6vw;
.radar-title {
width: 8.33vw;
height: 2.31vh;
line-height: 2.31vh;
font-size: 11px;
color: #e8e8e8;
background: repeating-linear-gradient(45deg, #0d2043 5%, #061939 10%);
padding-left: 0.32vw;
}
}
}
.category-container {
height: 12.34vh;
.category-legend {
width: 3.2vw;
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 16:45:37
* @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>
<div class="analyse">
<div class="title title-icon">
<span class="icon"></span>
<div class="title-h3">客户价值分析</div>
<!-- <div class="go" @click="goAnalyse">
<img src="@/assets/images/go.png" />
</div> -->
</div>
<div class="container">
<BarChart domId="analyseChart" :revese="true" boxHeight="16.85vh" :analysisList="analysisList" :colorList="colorList"></BarChart>
</div>
<MyDialog :isShow="dialogShow" @closeDialog="closeDialog"></MyDialog>
</div>
</template>
<script>
import BarChart from './BarChart.vue'
import MyDialog from './Dialog.vue'
export default {
name: 'Analyse',
components: {
BarChart,
MyDialog
},
data() {
return {
analysisList: {},
isShow: true,
colorList: ['#00C8FF', '#0069F2'],
dialogShow: false
}
},
mounted() {
this.getCustomerValueAnalysis()
},
methods: {
getCustomerValueAnalysis() {
this.api.operational.getCustomerValueAnalysis().then(res => {
if (res.code === '0') {
this.analysisList = res.data.dataList[0]
}
})
},
goAnalyse() {
this.dialogShow = true
},
closeDialog() {
this.dialogShow = false
}
}
}
</script>
<style scoped lang="scss">
.analyse {
width: 14.66vw;
height: 20vh;
background: #05204780;
box-shadow: inset 0 0 20px 0 #3d8bff40;
.container {
margin-top: -1vh;
margin-left: 2vw;
}
.icon {
display: inline-block;
width: 0.94vw;
height: 0.93vh;
transform: rotate(90deg);
background: url(../../../assets/images/operation/icon-title.png) no-repeat;
background-size: 100%;
margin-top: 7px;
margin-left: 14px;
}
.title {
display: block;
}
.title-h3 {
width: 10px;
// margin: 4px 4px;
// height:10.98vh;
font-size: 12px;
margin-left: 20px;
margin-top: 5px;
background: linear-gradient(to bottom, #00C8FF, #006FFF); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
}
.go {
width: 0.65vw;
height: 0.65vw;
margin: 3px 17px;
cursor: pointer;
}
}
</style>
<template>
<div class="border-box">
<div class="angle"></div>
<slot name="content"></slot>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
.border-box {
// width: 100%;
// height: 2.31vh;
position: relative;
margin-bottom: 0.77vh;
display: inline-flex;
align-items: center;
}
.border-box:after,
.border-box:before,
.angle:after,
.angle:before {
content: '';
display: block;
position: absolute;
width: 4px;
height: 3px;
border: 1.2px solid transparent;
}
.border-box:after,
.border-box:before {
top: 0;
border-top-color: #3D7FFF
}
.angle:after,
.angle:before {
bottom: 0;
border-bottom-color: #3D7FFF
}
.border-box:before,
.angle:before {
left: 0;
border-left-color: #3D7FFF
}
.border-box:after,
.angle:after {
right: 0;
border-right-color: #3D7FFF
}
</style>
<!--
* @Description: 区域分布
* @Author: huyue
* @Date: 2023-08-16 14:34:58
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 14:42:00
-->
<template>
<div class="operational-box">
<div class="title title-icon">
<span class="icon-title"></span>
<span class="title-bg">区域分布</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id" :list="areaData" :formatter="chart.formatter" :keys="chart.keys" :colors="chart.colors"></pie-chart>
<OperationaLegend :list="areaData" :width="'3.68vw'" :colors="chart.colors"></OperationaLegend>
</div>
</div>
</template>
<script>
import OperationaLegend from './OperationaLegend.vue'
export default {
name: 'Area',
components: {
OperationaLegend
},
data() {
return {
chart: {
id: 'area',
keys: ['name', 'num'],
colors: ['#16E193', '#EB6001', '#FFE73C', '#56FEFE', '#E588FF', '#747DFF'],
formatter: 'rate'
},
areaData: []
}
},
created() {
this.$bus.$on('clientData', data => {
this.areaData = data.areaData
})
}
}
</script>
<style lang="scss" scoped>
.container {
height: 11vh;
padding: 1.31vh 0;
box-sizing: border-box;
margin: 0;
}
</style>
<template>
<div class="line-box">
<div :id="domId" class="line-chart" :style="{ height: boxHeight }"></div>
</div>
</template>
<script>
const ValueAnalysis = [
{ name: 'gendev', label: '一般发展', order: 6 },
{ name: 'genrecall', label: '一般召回', order: 7 },
{ name: 'gensave', label: '一般挽留', order: 8 },
{ name: 'genval', label: '一般价值', order: 5 },
{ name: 'majordev', label: '重要发展', order: 2 },
{ name: 'majorrecall', label: '重要召回', order: 3 },
{ name: 'majorsave', label: '重要挽留', order: 4 },
{ name: 'majorval', label: '重要价值', order: 1 }
]
import datas from '@/utils/data'
import * as echarts from 'echarts'
import utils from '../../../utils/util'
import { getBarOptions, getBarReverseOptions } from './options'
export default {
name: 'BarChart',
props: {
domId: {
type: String,
default: 'line-chart'
},
rotate: {
type: Number,
default: 0
},
revese: {
type: Boolean,
default: false
},
boxHeight: {
type: String,
default: '12.43vh'
},
storeOrBrandTxt: {
type: String,
default: '品牌'
},
analysisList: {
type: [Array, Object],
default: () => []
},
// 0-月表;1-日表
queryType: {
type: Number,
default: 0
},
colorList: {
type: Array
},
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: [],
areaList2: this.areaList,
echartsLine: '',
moveAttr: {
// speed: 900,
seriesIndex: 0,
dataIndex: 0
},
timer: null,
currentData: {
dataIndex: 0
}
}
},
// created() {
// const { rotate, analysisList } = this
// const obj = {
// rotate,
// analysisList
// }
// this.lineOptions = this.revese ? getBarReverseOptions(obj) : getBarOptions(obj)
// },
watch: {
analysisList: {
handler() {
const _this = this
const { rotate, analysisList, colorList } = this
const obj = {
rotate,
analysisList,
ValueAnalysis
}
_this.$nextTick(function () {
_this.lineOptions = _this.revese ? getBarReverseOptions(obj, colorList) : getBarOptions(obj, colorList)
_this.chartBindEvent()
})
},
deep: true
},
boxHeight() {
this[this.domId].resize()
}
},
mounted() {
this.lineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.lineDom)
// this.chartBindEvent()
window.addEventListener('resize', () => {
this[this.domId].resize()
})
// const _this = this
// _this.$nextTick(function () {
// _this.lineDom = document.getElementById(_this.domId)
// _this[_this.domId] = echarts.init(_this.lineDom)
// _this.chartReaize()
// _this.chartBindEvent()
// })
},
methods: {
chartReaize() {
window.addEventListener('resize', () => {
this[this.domId] && this[this.domId].resize()
})
},
chartBindEvent() {
if (!this[this.domId]) {
return false
}
if (this[this.domId]) {
// 防止报错
if (this.lineOptions && this.lineOptions.series) {
this[this.domId].setOption(this.lineOptions)
}
}
if (this.revese === false) return
this.chartAction()
this[this.domId].getZr().on(
'mousemove',
utils.debounce(params => {
clearInterval(this.timer)
this.timer = null
const pointInPixel = [params.offsetX, params.offsetY]
const pointInGrid = this[this.domId].convertFromPixel({ seriesIndex: 0 }, pointInPixel)
const yIndex = pointInGrid[1]
this.currentData = {
dataIndex: yIndex
}
this.chartAction(yIndex)
}, 500)
)
// window.addEventListener('resize', () => {
// console.log(444);
// this[this.domId].resize()
// })
this[this.domId].getZr().on(
'mouseout',
utils.debounce(() => {
if (!this.timer) {
this.timer = setInterval(this.setInter, 5000)
}
}, 500)
)
this.timer = setInterval(this.setInter, 5000)
},
setInter() {
if (this.currentData.dataIndex == 0) {
this.currentData.dataIndex = 7
} else {
this.currentData.dataIndex--
}
this.chartAction(this.currentData.dataIndex)
},
chartAction(index = 7) {
if (!this[this.domId]) {
return false
}
this[this.domId].dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: index
})
this.$bus.$emit('drawChart', index)
}
},
destroyed() {
clearInterval(this.timer)
}
}
</script>
<style lang="scss" scoped>
.line-box {
// height: 100%;
// color: #ffffff;
.txt-orange {
color: #eb6001;
}
.line-chart {
width: 100%;
}
}
</style>
/*
* @Description:
* @Author: huyue
* @Date: 2023-07-07 14:04:52
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 17:07:07
*/
import * as echarts from 'echarts'
function getBarLineOptions(obj) {
const { tooltipFormatter } = obj
var barLineOption = {
tooltip: {
trigger: 'axis',
borderWidth: 0,
padding: 0,
formatter: tooltipFormatter || '',
confine: true
},
xAxis: {
data: []
},
yAxis: {
name: '',
type: 'value',
// min: 0,
// max: 100,
splitLine: {
lineStyle: {
color: '#1d2a38'
}
}
},
grid: {
left: '3%',
right: '4%',
top: '20%',
bottom: '6%',
containLabel: true
},
series: [
{
name: 'bar',
type: 'bar',
data: [],
label: {
show: true,
position: 'top',
color: '#fff'
},
itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) {
return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: '#22D8FF'
}, // 柱图渐变色
{
offset: 0.5, // 指100%处的颜色
color: '#223FA9'
},
{
offset: 1, // 指100%处的颜色
color: '#061422'
}]
)
}
}
},
{
name: 'bar2',
type: 'bar',
label: {
show: true,
position: 'top',
color: '#fff'
},
data: [],
itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) {
return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: '#CC875A'
}, // 柱图渐变色
{
offset: 0.5, // 指100%处的颜色
color: '#F2C101'
},
{
offset: 1, // 指100%处的颜色
color: '#FFE73C'
}]
)
}
}
},
{
name: 'bar3',
type: 'bar',
label: {
show: true,
position: 'top',
color: '#fff'
},
data: [],
show: false,
itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) {
return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: '#2AD191'
}, // 柱图渐变色
{
offset: 0.5, // 指100%处的颜色
color: '#0E958D'
},
{
offset: 1, // 指100%处的颜色
color: '#061422'
}]
)
}
}
}
// {
// name: 'bar4',
// type: 'bar',
// label: {
// show: true,
// position: 'top',
// color: '#fff'
// },
// data: [],
// itemStyle: {
// barBorderRadius: [2, 2, 0, 0], // 柱体圆角
// color: function(params) {
// return new echarts.graphic.LinearGradient(
// 0, 0, 0, 1, [{ // 代表渐变色从正上方开始
// offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
// color: '#E65C01'
// }, // 柱图渐变色
// {
// offset: 0.5, // 指100%处的颜色
// color: '#E65C17'
// },
// {
// offset: 1, // 指100%处的颜色
// color: '#061422'
// }]
// )
// }
// }
// }
]
}
return barLineOption
}
export default getBarLineOptions
<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 utils from '../../../utils/util'
import { getBarOptions, getBarReverseOptions1 } from './options'
export default {
name: 'BarValue',
props: {
domId: {
type: String,
default: 'line-chart'
},
rotate: {
type: Number,
default: 0
},
revese: {
type: Boolean,
default: false
},
boxHeight: {
type: String,
default: '12.43vh'
},
storeOrBrandTxt: {
type: String,
default: '品牌'
},
analysisList: {
type: [Array, Object],
default: () => []
},
// 0-月表;1-日表
queryType: {
type: Number,
default: 0
},
colorList: {
type: Array
},
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: [],
areaList2: this.areaList,
echartsLine: '',
moveAttr: {
// speed: 900,
seriesIndex: 0,
dataIndex: 0
},
timer: null,
currentData: {
dataIndex: 0
}
}
},
// created() {
// const { rotate, analysisList } = this
// const obj = {
// rotate,
// analysisList
// }
// this.lineOptions = this.revese ? getBarReverseOptions1(obj) : getBarOptions(obj)
// },
watch: {
analysisList: {
handler() {
const _this = this
const { rotate, analysisList, colorList } = this
analysisList.forEach(element => {
element.label = element.productname
element.value = element.output
})
const obj = {
rotate,
analysisList
// ValueAnalysis
}
_this.$nextTick(function() {
_this.lineOptions = _this.revese ? getBarReverseOptions1(obj, colorList) : getBarOptions(obj, colorList)
_this.chartBindEvent()
})
},
deep: true
},
boxHeight() {
this[this.domId].resize()
}
},
mounted() {
this.lineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.lineDom)
// this.chartBindEvent()
window.addEventListener('resize', () => {
this[this.domId].resize()
})
// const _this = this
// _this.$nextTick(function () {
// _this.lineDom = document.getElementById(_this.domId)
// _this[_this.domId] = echarts.init(_this.lineDom)
// _this.chartReaize()
// _this.chartBindEvent()
// })
},
methods: {
chartReaize() {
window.addEventListener('resize', () => {
this[this.domId] && this[this.domId].resize()
})
},
chartBindEvent() {
if (!this[this.domId]) {
return false
}
if (this[this.domId]) {
// 防止报错
if (this.lineOptions && this.lineOptions.series) {
this[this.domId].setOption(this.lineOptions)
}
}
if (this.revese === false) return
this.chartAction()
this[this.domId].getZr().on(
'mousemove',
utils.debounce(params => {
clearInterval(this.timer)
this.timer = null
const pointInPixel = [params.offsetX, params.offsetY]
const pointInGrid = this[this.domId].convertFromPixel({ seriesIndex: 0 }, pointInPixel)
const yIndex = pointInGrid[1]
this.currentData = {
dataIndex: yIndex
}
this.chartAction(yIndex)
}, 500)
)
// window.addEventListener('resize', () => {
// console.log(444);
// this[this.domId].resize()
// })
this[this.domId].getZr().on(
'mouseout',
utils.debounce(() => {
if (!this.timer) {
this.timer = setInterval(this.setInter, 5000)
}
}, 500)
)
this.timer = setInterval(this.setInter, 5000)
},
setInter() {
if (this.currentData.dataIndex == 0) {
this.currentData.dataIndex = 7
} else {
this.currentData.dataIndex--
}
this.chartAction(this.currentData.dataIndex)
},
chartAction(index = 7) {
if (!this[this.domId]) {
return false
}
this[this.domId].dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: index
})
this.$bus.$emit('drawChart', index)
}
},
destroyed() {
clearInterval(this.timer)
}
}
</script>
<style lang="scss" scoped>
.line-box {
// height: 100%;
// color: #ffffff;
.txt-orange {
color: #eb6001;
}
.line-chart {
width: 100%;
}
}
</style>
<!--
* @Description: 品牌分布
* @Author: huyue
* @Date: 2023-08-16 14:35:24
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 14:43:36
-->
<template>
<div class="operational-box">
<div class="title title-icon">
<span class="icon-title"></span>
<span class="title-bg">品牌分布</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id" :list="brandData" :keys="chart.keys" :formatter="chart.formatter" :colors="chart.colors"></pie-chart>
<OperationaLegend :list="brandData" :colors="chart.colors"></OperationaLegend>
</div>
</div>
</template>
<script>
import OperationaLegend from './OperationaLegend.vue'
export default {
name: 'Brand',
components: {
OperationaLegend
},
data() {
return {
type: 'gender',
chart: {
id: 'brand',
keys: ['name', 'num'],
colors: ['#16E193', '#EB6001', '#FFE73C', '#56FEFE', '#E588FF', '#747DFF'],
formatter: 'rate'
},
brandData: []
}
},
created() {
this.$bus.$on('clientData', data => {
this.brandData = data.brandData
})
}
}
</script>
<style lang="scss" scoped>
.operational-box {
.container {
height: 11vh;
padding: 1.31vh 0;
box-sizing: border-box;
margin: 0;
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 16:45:20
* @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>
<div class="analyse">
<div class="title title-icon">
<span class="icon"></span>
<div class="title-h3">品类产值分析</div>
</div>
<div class="container">
<BarValue domId="categoryChart" :revese="true" boxHeight="12.42vh" :analysisList="analysisList" :colorList="colorList"></BarValue>
</div>
</div>
</template>
<script>
import BarValue from './BarValue.vue'
export default {
name: 'Category',
components: {
BarValue
},
data() {
return {
analysisList: {},
isShow: true,
colorList: ['#00C8FF', '#0069F2']
}
},
mounted() {
this.getProductCategoryAnalysis()
},
methods: {
getProductCategoryAnalysis() {
this.api.operational.getProductCategoryAnalysis().then(res => {
if (res.code === '0') {
this.analysisList = res.data.dataList
}
})
}
}
}
</script>
<style scoped lang="scss">
.analyse {
width: 14.66vw;
background: #05204780;
box-shadow: inset 0 0 20px 0 #3d8bff40;
height: 15.77vh;
.container {
margin-top: -1vh;
margin-left: 2vw;
}
.icon {
display: inline-block;
width: 0.94vw;
height: 0.93vh;
transform: rotate(90deg);
background: url(../../../assets/images/operation/icon-title.png) no-repeat;
background-size: 100%;
margin-top: 7px;
margin-left: 14px;
}
.title {
display: block;
}
.title-h3 {
width: 10px;
// margin: 4px 4px;
// height:10.98vh;
font-size: 12px;
margin-left: 20px;
margin-top: 5px;
background: linear-gradient(to bottom, #00C8FF, #006FFF); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
}
.go {
width: 0.65vw;
height: 0.65vw;
margin: 3px 17px;
cursor: pointer;
}
}
</style>
<template>
<div class="mask" v-if="isShow">
<div class="dialog-wrap">
<div class="dialog">
<div class="dialog-title">
客户价值分析
<div class="close" @click="closeHandle">
<img src="@/assets/images/icon-close.png" />
</div>
</div>
<!-- <div class="dialog-content flex">
<div class="content-top axis">
<img src="@/assets/images/axis.png" />
</div>
<div class="content-top bg">
<div class="content-top-title">
<div class="title">客户价值</div>
</div>
<div class="content-info">
重要价值:R高、F高、M高
<br />
重要发展:R高、F低、M高
<br />
重要召回:R低、F高、M高
<br />
重要挽留:R低、F低、M高
<br />
一般价值:R高、F高、M低
<br />
一般发展:R高、F低、M低
<br />
一般召回:R低、F高、M低
<br />
一般挽留:R低、F低、M低
</div>
</div>
<div class="content-bottom bg">
<div class="title">售后客户价值模型</div>
<div class="info">
R=最近一次和上一次到店间隔时间
<br />
F=一年内到店频次
<br />
M=一年内售后工单金额
</div>
</div>
<div class="content-bottom bg">
<div class="title">当前逻辑</div>
<div class="info">
6个月内(高)< R ≤ 超6个月(低)
<br />
2次以内(低)≤ F <超2次(高)
<br />
3000元 (低)≤ M <超 3000元(高)
</div>
</div>
</div> -->
</div>
</div>
</div>
</template>
<script>
export default {
name: 'MyDialog',
props: {
isShow: Boolean
},
data() {
return {
msg: ''
}
},
methods: {
closeHandle() {
this.$emit('closeDialog')
}
}
}
</script>
<style lang="scss" scoped>
.mask {
width: 100%;
height: 100%;
position: fixed;
z-index: 99;
left: 0px;
top: 0px;
background: rgba(0, 0, 0, 0.8);
}
.dialog-wrap {
width: 67.31vw;
height: 90.38vh;
position: absolute;
z-index: 1;
left: 50%;
top: 50%;
background-image: url('../../../assets/images/operation-bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
transform: translate(-50%, -50%);
border-radius: 5px;
padding: 0 3.67vw 3.9vh;
box-sizing: border-box;
.close {
width: 60px;
height: 60px;
position: absolute;
right: -31vw;
top: 0;
cursor: pointer;
}
.dialog-title {
width: 13.19vw;
height: 4.39vh;
font-weight: 900;
font-size: 30px;
color: #19ecff;
// background-image: url('../../../assets/images/title-dialog.png');
// background-repeat: no-repeat;
// background-size: 100% 100%;
text-align: center;
margin: 0 auto;
position: relative;
line-height: 8.39vh;
}
.dialog-content {
flex-wrap: wrap;
justify-content: space-between;
margin-top: 3.5vh;
.axis {
width: 26.88vw;
height: 34.97vh;
margin-right: 1.25vw;
img {
height: 100%;
}
}
.content-top-title {
width: 10vw;
margin: 7px auto;
display: flex;
align-items: center;
height: 2.68vh;
.title-icon {
width: 21px;
height: 7px;
font-size: 14px;
}
.title {
font-weight: 500;
font-size: 16px;
color: #ffffff;
margin: 0 auto;
height: 2.68vh;
line-height: 2.68vh;
}
}
.content-info {
font-weight: 400;
font-size: 14px;
color: #c0c8d4;
margin: 0 auto;
text-align: center;
}
}
.content-top {
width: 25.14vw;
height: 27.93vh;
margin-bottom: 4.45vh;
}
.content-bottom {
width: 25.14vw;
height: 14.88vh;
font-weight: 400;
font-size: 14px;
color: #ffffff;
padding: 1.2vh 1.39vw;
box-sizing: border-box;
.title {
font-weight: 500;
font-size: 16px;
margin-bottom: 8px;
height: 2.68vh;
}
.info {
font-weight: 400;
font-size: 14px;
color: #c0c8d4;
}
}
.bg {
background: #001d43;
box-shadow: inset 0 0 20px 0 #003587;
border-radius: 4px;
}
}
</style>
<!--
* @Description: 表格
* @Author: huyue
* @Date: 2024-09-09 10:12:50
* @LastEditors: huyue
* @LastEditTime: 2024-09-11 10:10:11
-->
<template>
<div class="table-box">
<div class="table-title">
<span class="icon-title"></span>
<span class="title-text">上月员工GMV排名</span>
</div>
<div class="table-th">
<div class="angle"></div>
<div style="width: 4.4vw;padding-left: 2.4vw;">员工姓名</div>
<div style="width: 2.7vw;">GMV</div>
<div style="width: 1.6vw;">渗透率</div>
</div>
<dv-scroll-board ref="employeeTable" :config="tableConfig" :waitTime="5000" style="width: 100%;height:28.08vh" />
</div>
</template>
<script>
import utils from '../../../utils/util.js'
export default {
data() {
return {
tableConfig: {
data: [
// ['<span class="table-index yellow"><span class="schedule" style="width: calc(11.54vw * 0.82)"></span>1</span>', '深圳广联嘀加汽车销售服务有限公司', '687,465', '82%'],
// ['<span class="table-index yellow">2</span>', '深圳广联嘀加汽车销售服务有限公司', '行2列2', '行2列3'],
// ['<span class="table-index yellow">3</span>', '深圳广联嘀加汽车销售服务有限公司', '<span style="color:#9fe6b8;">行4列2</span>', '行4列3'],
// ['<span class="table-index blue"><span class="schedule" style="width: calc(11.54vw * 0.65)"></span>4</span>', '深圳广联嘀加汽车销售服务有限公司', '行5列2', '行5列3'],
// ['<span class="table-index blue">5</span>', '深圳广联嘀加汽车销售服务有限公司', '<span style="color:#ff9f7f;">行6列2</span>', '行6列3'],
// ['<span class="table-index blue">6</span>', '深圳广联嘀加汽车销售服务有限公司', '行7列2', '<span style="color:#fb7293;">行7列3</span>'],
// ['<span class="table-index blue">7</span>', '深圳广联嘀加汽车销售服务有限公司', '<span style="color:#e062ae;">行8列2</span>', '行8列3'],
// ['<span class="table-index blue">8</span>', '深圳广联嘀加汽车销售服务有限公司', '行9列2', '行9列3'],
// ['<span class="table-index blue">9</span>', '深圳广联嘀加汽车销售服务有限公司', '<span style="color:#e7bcf3;">行10列2</span>', '行10列3']
],
rowNum: 7,
evenRowBGC: 'transparent',
oddRowBGC: 'transparent',
columnWidth: [50, 80, 60, 50],
align: ['left']
}
}
},
created() {
this.getLastmonthstaffranking()
},
methods: {
async getLastmonthstaffranking() {
const res = await this.api.operational.getLastmonthstaffranking()
console.log(res)
const _dataList = res.data.dataList.map((item, index) => {
return [
`<span class="table-index ${index < 3 ? 'yellow' : 'blue'}"><span class="schedule" style="width: calc(11.54vw * ${item.shentoulv / 100})"></span>${index + 1}</span>`,
item.staffname,
utils.numAddSymbol(item.gmv),
`${item.shentoulv}%`
]
})
this.$refs.employeeTable.updateRows(_dataList, 0)
}
}
}
</script>
<style lang="scss" scoped>
.table-box {
background: url(../../../assets/images/operation/center-bg-2.png) no-repeat;
background-size: 100% 37.31vh;
padding: 1.35vh 0.64vw 0;
box-sizing: border-box;
width: 12.82vw;
display: inline-block;
margin-left: 0.96vw;
.table-title {
position: relative;
display: flex;
align-items: center;
.icon-title {
display: inline-block;
width: 20px;
height: 20px;
background: url(../../../assets/images/operation/icon-subtitle.png) no-repeat;
background-size: 100%;
}
.title-text {
background: linear-gradient(to right, #01A4F9, #6DF5F9); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
}
&:after {
content: '';
display: block;
position: absolute;
width: 100%;
height: 0.3vh;
background: url(../../../assets/images/operation/line.png) no-repeat;
background-size: 100%;
bottom: -0.24vw;
}
}
.table-th {
width: 100%;
height: 2.31vh;
position: relative;
margin-top: 1.91vh;
font-size: 11px;
color: #E8E8E8;
line-height: 2.31vh;
margin-bottom: 0.77vh;
display: flex;
align-items: center;
}
.table-th:after,
.table-th:before,
.angle:after,
.angle:before {
content: '';
display: block;
position: absolute;
width: 4px;
height: 3px;
border: 1.2px solid transparent;
}
.table-th:after,
.table-th:before {
top: 0;
border-top-color: #3D7FFF
}
.angle:after,
.angle:before {
bottom: 0;
border-bottom-color: #3D7FFF
}
.table-th:before,
.angle:before {
left: 0;
border-left-color: #3D7FFF
}
.table-th:after,
.angle:after {
right: 0;
border-right-color: #3D7FFF
}
}
</style>
<style lang="scss">
.row-item {
height: 3.85vh !important;
line-height: 3.85vh !important;
margin-bottom: 0.28vh;
.ceil {
font-size: 12px;
&:first-child {
overflow: visible;
}
}
}
.table-index {
width: 24px;
height: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
&:before {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
left: -0.401vw;
top: -0.481vw;
border: 3px solid transparent;
border-left-color: #3D7FFF;
border-top-color: #3D7FFF;
}
}
.yellow {
color: #FFD03B;
background: rgba(255, 208, 59, 0.2);
.schedule {
background-image: linear-gradient(90deg, #ff6a3a59 0%, #FFD03B 95%);
}
}
.blue {
background: rgba(19, 129, 242, 0.3);
color: #3BE7FF;
.schedule {
background-image: linear-gradient(90deg, #d9e7ff33 0%, #AADAFA 94%);
}
}
.table-index,.yellow:before {
border-left-color: #FFD03B;
border-top-color: #FFD03B;
}
.schedule {
position: absolute;
bottom: -0.24vw;
left: 0;
display: inline-block;
height: 2px;
}
</style>
<template>
<div class="inspection">
<div class="title title-icon">
<span class="icon"></span>
<div class="title-h3">大模型质检</div>
</div>
<div class="container">
<div class="statistics">
<template v-for="item in list">
<AngleBorder :key="item.id">
<div class="statistics-item" slot="content">
<div class="label">{{item.label}}</div>
<div class="value">{{numAddSymbol(listData[item.key])}}
<div class="unit">
{{item.unit}}
</div>
</div>
</div>
</AngleBorder>
</template>
</div>
<div class="chart">
<AngleBorder>
<div class="chart-title" slot="content">
战败原因
</div>
</AngleBorder>
<div class="category-container flex">
<pie-chart ref="pieChartInspection" :id="chart.id" :list="categoryData" :formatter="chart.formatter" :colors="chart.colors"></pie-chart>
<OperationaLegend class="category-legend" :list="categoryData" :width="'4.17vw'" :height="'1.44vh'" :colors="chart.colors"></OperationaLegend>
</div>
</div>
</div>
</div>
</template>
<script>
import AngleBorder from './AngleBorder'
import OperationaLegend from './OperationaLegend'
export default {
name: 'Inspection',
components: { AngleBorder, OperationaLegend },
// props: {
// categoryData: {
// type: Array,
// default: () => []
// }
// },
data() {
return {
listData: {},
list: [
{
id: 1,
label: '累计批次',
key: 'totalbatch',
num: '153',
unit: '批'
},
{
id: 2,
label: '累计时长',
key: 'totaltime',
num: '153',
unit: '小时'
},
{
id: 3,
label: '平均得分',
key: 'avgscore',
num: '153',
unit: '分'
},
{
id: 4,
label: '平均接待时长',
key: 'avgtime',
num: '153',
unit: '分钟'
}
],
chart: {
id: 'inspection',
colors: ['#6578FF', '#34AFFF', '#EB6001', '#16E193', '#BF98FF'],
formatter: 'rate'
},
categoryData: [
{
name: '价格异议',
key: 'pricereasons',
value: 0
},
{
name: '决策异议',
key: 'decisionreasons',
value: 0
},
{
name: '产品异议',
key: 'productreasons',
value: 0
},
{
name: '服务异议',
key: 'servicereasons',
value: 0
}
]
}
},
created() {
this.getSpeechQualityInspection()
},
methods: {
async getSpeechQualityInspection() {
const res = await this.api.operational.getSpeechQualityInspection()
this.listData = res.data.dataList[0]
const _dataList = res.data.dataList[0]
this.categoryData = this.categoryData.map(item => {
item.value = _dataList[item.key]
return item
})
console.log(this.categoryData, '-===')
}
}
}
</script>
<style lang="scss" scoped>
.inspection {
width: 22.2vw;
height: 15.77vh;
background: #05204780;
box-shadow: inset 0 0 20px 0 #3d8bff40;
margin-left: 0.64vw;
.container {
display: flex;
margin-top: -1vh;
margin-left: 1.5vw;
.statistics {
width: 8.66vw;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.575vh 0.24vw;
margin-left: 0.76vw;
&-item {
width: 4.09vw;
height: 5.77vh;
padding: 8px;
box-sizing: border-box;
.label {
font-size: 11px;
color: #E8E8E8;
}
.value {
display: flex;
align-items: baseline;
font-weight: 700;
font-size: 20px;
background: linear-gradient(to right, #00C8FF, #006FFF); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
margin-top: 2px;
.unit {
font-weight: 400;
font-size: 10px;
color: #77E9FF;
background: linear-gradient(to right, #00C8FF, #006FFF); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
margin-left: 1px;
}
}
}
}
}
.icon {
display: inline-block;
width: 0.94vw;
height: 0.93vh;
transform: rotate(90deg);
background: url(../../../assets/images/operation/icon-title.png) no-repeat;
background-size: 100%;
margin-top: 7px;
margin-left: 14px;
}
.title {
display: block;
}
.title-h3 {
width: 10px;
font-weight: 500;
font-size: 12px;
margin-left: 20px;
margin-top: 5px;
background: linear-gradient(to bottom, #00C8FF, #006FFF); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
}
.chart {
margin-left: 1.6vw;
.chart-title {
width: 8.33vw;
height: 2.31vh;
line-height: 2.31vh;
font-size: 11px;
color: #E8E8E8;
background: repeating-linear-gradient(45deg, #0d2043 5%, #061939 10%);
padding-left: 0.32vw;
}
}
}
.category-container {
height: 9.34vh;
.category-legend {
width: 4.2vw;
margin-top: -9px;
}
}
</style>
<template>
<div class="line-box">
<div class="title title-icon">
<span class="icon-title"></span>
<span class="title-bg">门店及服务门店增长趋势</span>
</div>
<div :id="domId" class="line-chart" :style="{ height: boxHeight }"></div>
</div>
</template>
<script>
import datas from '@/utils/data'
import utils from '../../../utils/util.js'
import * as echarts from 'echarts'
import { lineAndBarOptions } from './options'
export default {
name: 'LineBar',
props: {
domId: {
type: String,
default: 'line-chart'
},
revese: {
type: Boolean,
default: false
},
boxHeight: {
type: String,
default: '12.43vh'
},
storeOrBrandTxt: {
type: String,
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
}
},
// watch: {
// dataList: {
// handler() {
// console.log(33333333333);
// this.lineOptions = lineAndBarOptions(this.dataList)
// this.chartBindEvent()
// },
// deep: true
// }
// },
mounted() {
this.lineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.lineDom)
this.chartBindEvent()
},
methods: {
chartBindEvent() {
// resize
window.addEventListener('resize', () => {
this[this.domId].resize()
})
},
drawLine(dataList) {
this.lineOptions = lineAndBarOptions(dataList)
this[this.domId].setOption(this.lineOptions)
// this.moveAttr.dataIndex = dataList.length - 1
// this.chartAction()
},
chartAction(type) {
this[this.domId].dispatchAction({
type: type || 'showTip',
seriesIndex: +this.moveAttr.seriesIndex,
dataIndex: +this.moveAttr.dataIndex
})
}
}
}
</script>
<style lang="scss" scoped>
.line-box {
height: 100%;
color: #ffffff;
.txt-orange {
color: #eb6001;
}
.line-chart {
width: 100%;
}
}
</style>
<!--
* @Description:
* @Author: huyue
* @Date: 2024-01-25 16:52:03
* @LastEditors: huyue
* @LastEditTime: 2024-09-09 17:14:52
-->
<template>
<div class="legend">
<div class="legend-item flex" :style="{width: width,height: height}" v-for="(item, index) in dataList" :key="index">
<div class="icon" :style="{ background: colors[index] }"></div>
<div class="item-content">{{ item.name }}</div>
</div>
</div>
</template>
<script>
export default {
name: 'OperationaLegend',
data() {
return {
dataList: this.list
}
},
props: {
list: {
type: Array,
default: () => []
},
colors: {
type: Array,
default: () => ['#FF6E76', '#7CFFB2', ' #FDF006', '#4FA0FF', '#EB6001', '#BF98FF', '#BF98FF', '#58D9F9']
},
width: {
type: String,
default: '3.68vw'
},
height: {
type: String,
default: '2.44vh'
}
},
watch: {
list(val) {
this.dataList = val
}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.legend {
display: flex;
align-items: center;
flex-wrap: wrap;
width: 7.7vw;
height: 10.54vh;
margin-left: 0.42vw;
.legend-item {
// background: #0A214D;
align-items: center;
font-size: 12px;
color: #FFFFFF;
box-sizing: border-box;
margin: 2px 2px 2px 0;
white-space: nowrap;
.item-content {
width: 2.8vw;
overflow: hidden;
}
.icon {
width: 5px;
height: 5px;
background: #bf98ff;
border-radius: 50%;
margin: 4px;
}
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2024-09-11 14:23:03
* @FilePath: \dj-data-view\src\views\saas\project.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="project-wrap flex">
<div class="project-item" v-for="(item, index) in projectList" :key="index">
<div class="project-title">{{ item.bigName }}</div>
<div class="project-subtitle">
<img class="img-icon" src="@/assets/images/operation/left-icon.png" />
<span>{{ item.name }}</span>
<img class="img-icon" src="@/assets/images/operation/right-icon.png" />
</div>
<div class="project-right">
<div class="project-content-item flex">
<div class="project-content-desc">转化率</div>
<div class="project-content-num">{{ toFixRatio(item.conversionrate) }}</div>
</div>
<div class="project-content-item flex">
<div class="project-content-desc">客单价</div>
<div class="project-content-num">{{ toFixNum(item.atv) }}</div>
</div>
<div class="project-content-item flex">
<div class="project-content-desc">GMV</div>
<div class="project-content-num">{{ numAddSymbol(item.outputValue) }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Project',
data() {
return {
projectList: [
{
bigName: '数字化轻改',
name: '1.1新车轻改升级',
conversionrate: '53',
atv: '1,300',
outputValue: '25,509,838'
},
{
bigName: '数字化轻改',
name: '1.2次新车增购',
conversionrate: '10',
atv: '2,100',
outputValue: '20,013,764'
},
{
bigName: '数字化保险',
name: '2.1新车权益升级',
conversionrate: '50',
atv: '1,650',
outputValue: '1,893,844'
},
{
bigName: '数字化保险',
name: '2.2售后续保',
conversionrate: '37',
atv: '2,590',
outputValue: '8,531,460'
},
{
bigName: '数字化保险',
name: '2.3新车延保',
conversionrate: '45',
atv: '8,800',
outputValue: '6,127,763'
}
]
}
},
mounted() {
this.getBusinessType()
},
methods: {
toFixRatio(val) {
if (!val) {
return '0.00%'
}
return (val * 100).toFixed(2) + '%'
},
toFixNum(val) {
return this.numAddSymbol(Math.round(val))
},
getBusinessType() {
this.api.operational.getBusinessType().then(res => {
console.log(res)
if (res.code == 0) {
// this.projectList = res.data.dataList
const _dataList = res.data.dataList
this.projectList.map((item, index) => {
return Object.assign(item, _dataList[index])
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.project-wrap {
margin: 2.31vh 0;
height: 13.08vh;
flex-wrap: wrap;
justify-content: space-between;
.project-item {
width: 6.97vw;
height: 100%;
background-image: url(../../../assets/images/operation/right-bg-1.png);
background-size: 100% 100%;
&:nth-child(3),
&:nth-child(4),
&:nth-child(5) {
.project-title {
color: #60F0F0;
}
}
.project-title {
margin-top: 1.73vh;
font-weight: 600;
font-size: 14px;
color: #51B4FE;
text-align: center;
}
.project-subtitle {
font-weight: 400;
font-size: 12px;
background: linear-gradient(to right, #01a4f9, #6df5f9); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
text-align: center;
margin-top: 2px;
position: relative;
.img-icon {
width: 0.52vw;
height: 0.19vh;
vertical-align: middle;
}
span {
margin: 0 0.34vw;
}
}
.project-right {
flex: 1;
padding: 0 0.52vw;
margin-top: 0.58vh;
.project-content-item {
justify-content: space-between;
margin-bottom: 0.58vh;
.project-content-desc {
font-size: 12px;
color: #E8E8E8;
}
.project-content-num {
font-weight: 700;
font-size: 13px;
color: #FFFFFF;
text-align: right;
}
}
}
.left-icon,
.right-icon {
display: inline-block;
width: 0.8vw;
height: 2px;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.left-icon {
background-image: linear-gradient(90deg, #6DF5F9 1%, #01A4F9 100%);
}
}
}
</style>
<!--
* @Description: 雷达图
* @Author: huyue
* @Date: 2024-09-09 16:50:10
* @LastEditors: huyue
* @LastEditTime: 2024-09-11 14:13:37
-->
<template>
<div class="radar-chart" id="radar-chart"></div>
</template>
<script>
import * as echarts from 'echarts'
import chartOption from './radarOption'
export default {
props: {
listData: {
type: Object,
default: () => {}
}
},
watch: {
listData(val) {
console.log(val, '======1234567')
const _value = this.chartData.map(item => {
item.star = val[item.key]
return item
})
this.drawRadarChart(_value)
}
},
data() {
return {
// radarChart: null,
chartData: [
{
name: '销售技巧',
key: 'salesskills',
star: 0
},
{
name: '流利度',
key: 'fluency',
star: 0
},
{
name: '语音表达',
key: 'languageexpression',
star: 0
},
{
name: '熟练度',
key: 'proficiencylevel',
star: 0
},
{
name: '服务态度',
key: 'serviceattitude',
star: 0
}
]
}
},
mounted() {
this.initChart()
},
methods: {
initChart(res) {
this.$nextTick(() => {
// 初始化雷达图
this.radarChart = echarts.init(document.getElementById('radar-chart'))
window.addEventListener('resize', () => this.resize())
})
},
resize() {
this.radarChart.resize()
},
drawRadarChart(res) {
const [radarData, radarValue] = [[], []]
res?.forEach(item => {
radarData.push({
name: item.name,
max: 5,
score: item.star
})
radarValue.push(item.star)
})
console.log(radarData, '5551111111')
chartOption.radarChartOption.radar.indicator = radarData
// 有4个项目时 旋转45度
if (radarData?.length == 4) chartOption.radarChartOption.radar.startAngle = 45
else chartOption.radarChartOption.radar.startAngle = 90
// 有五个项目时 缩小图表
if (radarData?.length == 5) {
chartOption.radarChartOption.radar.radius = '65%'
chartOption.radarChartOption.radar.center = ['50%', '58%']
} else if (radarData?.length == 3) {
chartOption.radarChartOption.radar.radius = '95%'
chartOption.radarChartOption.radar.center = ['50%', '65%']
} else {
chartOption.radarChartOption.radar.radius = '100%'
chartOption.radarChartOption.radar.center = ['50%', '50%']
}
chartOption.radarChartOption.series[0].data[0].value = radarValue
this.radarChart.setOption(chartOption.radarChartOption)
this.radarChart.on('finished', () => {
// 防止初次渲染导致五角星部分未加载出来
this.resize()
})
}
}
}
</script>
<style lang="scss" scoped>
.radar-chart {
height: 14vh;
}
</style>
<!--
* @Description: 表格
* @Author: huyue
* @Date: 2024-09-09 10:12:50
* @LastEditors: huyue
* @LastEditTime: 2024-09-11 10:09:53
-->
<template>
<div class="table-box">
<div class="table-title">
<span class="icon-title"></span>
<span class="title-text">上月门店GMV排名</span>
</div>
<div class="table-th">
<div class="angle"></div>
<div style="width: 5.5vw;padding-left: 2.4vw;">门店名称</div>
<div style="width: 2.8vw;">GMV</div>
<div style="width: 1.6vw;">渗透率</div>
</div>
<dv-scroll-board ref="storeTable" :config="tableConfig" :waitTime="5000" style="width: 100%;height:28.08vh" />
</div>
</template>
<script>
import utils from '../../../utils/util.js'
export default {
data() {
return {
tableConfig: {
data: [
// ['<span class="table-index yellow">1</span>', '深圳广联嘀加汽车销售服务有限公司', '687,465', '82%'],
// ['<span class="table-index yellow">2</span>', '深圳广联嘀加汽车销售服务有限公司', '行2列2', '行2列3'],
// ['<span class="table-index yellow">3</span>', '深圳广联嘀加汽车销售服务有限公司', '<span style="color:#9fe6b8;">行4列2</span>', '行4列3'],
// ['<span class="table-index blue">4</span>', '深圳广联嘀加汽车销售服务有限公司', '行5列2', '行5列3'],
// ['<span class="table-index blue">5</span>', '深圳广联嘀加汽车销售服务有限公司', '<span style="color:#ff9f7f;">行6列2</span>', '行6列3'],
// ['<span class="table-index blue">6</span>', '深圳广联嘀加汽车销售服务有限公司', '行7列2', '<span style="color:#fb7293;">行7列3</span>'],
// ['<span class="table-index blue">7</span>', '深圳广联嘀加汽车销售服务有限公司', '<span style="color:#e062ae;">行8列2</span>', '行8列3'],
// ['<span class="table-index blue">8</span>', '深圳广联嘀加汽车销售服务有限公司', '行9列2', '行9列3'],
// ['<span class="table-index blue">9</span>', '深圳广联嘀加汽车销售服务有限公司', '<span style="color:#e7bcf3;">行10列2</span>', '行10列3']
],
rowNum: 7,
// index: true,
evenRowBGC: 'transparent',
oddRowBGC: 'transparent',
columnWidth: [50, 100, 60, 50],
align: ['left']
}
}
},
created() {
this.getLastmonthmerchantranking()
},
methods: {
async getLastmonthmerchantranking() {
const res = await this.api.operational.getLastmonthmerchantranking()
console.log(res)
const _dataList = res.data.dataList.map((item, index) => {
return [
`<span class="table-index ${index < 3 ? 'yellow' : 'blue'}">${index + 1}</span>`,
item.merchantname,
utils.numAddSymbol(item.gmv),
`${item.shentoulv}%`
]
})
this.$refs.storeTable.updateRows(_dataList, 0)
}
}
}
</script>
<style lang="scss" scoped>
.table-box {
background: url(../../../assets/images/operation/center-bg-2.png) no-repeat;
background-size: 100% 37.31vh;
padding: 1.35vh 0.64vw 0;
box-sizing: border-box;
width: 14.26vw;
display: inline-block;
.table-title {
position: relative;
display: flex;
align-items: center;
.icon-title {
display: inline-block;
width: 20px;
height: 20px;
background: url(../../../assets/images/operation/icon-subtitle.png) no-repeat;
background-size: 100%;
}
.title-text {
background: linear-gradient(to right, #01A4F9, #6DF5F9); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
}
&:after {
content: '';
display: block;
position: absolute;
width: 100%;
height: 0.3vh;
background: url(../../../assets/images/operation/line.png) no-repeat;
background-size: 100%;
bottom: -0.24vw;
}
}
.table-th {
width: 100%;
height: 2.31vh;
position: relative;
margin-top: 1.91vh;
font-size: 11px;
color: #E8E8E8;
line-height: 2.31vh;
margin-bottom: 0.77vh;
display: flex;
align-items: center;
}
.table-th:after,
.table-th:before,
.angle:after,
.angle:before {
content: '';
display: block;
position: absolute;
width: 4px;
height: 3px;
border: 1.2px solid transparent;
}
.table-th:after,
.table-th:before {
top: 0;
border-top-color: #3D7FFF
}
.angle:after,
.angle:before {
bottom: 0;
border-bottom-color: #3D7FFF
}
.table-th:before,
.angle:before {
left: 0;
border-left-color: #3D7FFF
}
.table-th:after,
.angle:after {
right: 0;
border-right-color: #3D7FFF
}
}
.row-item {
// background-color: transparent !important;
height: 3.85vh !important;
line-height: 3.85vh !important;
margin-bottom: 0.28vh;
.ceil {
font-size: 12px;
}
}
.table-index {
width: 24px;
height: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
&:before {
content: '';
display: block;
width: 0;
height: 0;
position: absolute;
left: -0.401vw;
top: -0.481vw;
border: 3px solid transparent;
border-left-color: #3D7FFF;
border-top-color: #3D7FFF;
}
}
.yellow {
color: #FFD03B;
background: rgba(255, 208, 59, 0.2);
}
.blue {
background: rgba(19, 129, 242, 0.3);
color: #3BE7FF;
}
.table-index,.yellow:before {
border-left-color: #FFD03B;
border-top-color: #FFD03B;
}
</style>
<!--
* @Description: 柱状图
* @Author: huyue
* @Date: 2023-07-07 14:01:42
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 17:05:47
-->
<template>
<div>
<div class="title title-icon">
<span class="icon-title"></span>
<span class="title-bg">近12个月成交转化分析</span>
</div>
<div :id="domId" style="width: 37.5vw" :style="{ height }"></div>
</div>
</template>
<script type="text/ecmascript-6">
import * as echarts from 'echarts'
import BarOptions from './BarOptions'
import utils from '../../../utils/util.js'
export default {
name: 'BarChart',
props: {
height: {
type: String
},
domId: {
type: String,
default: 'bar-line'
},
dataList: {
type: Array,
default: () => []
},
tooltipFormatterObj: {
type: Array,
default: () => {
return [
{
label: '数量',
attrName: 'num'
},
{
label: '环比',
attrName: 'hrate',
addSymbol: '%'
},
{
label: '同比',
attrName: 'trate',
addSymbol: '%'
}
]
}
}
},
data() {
return {
barLineOptions: [],
moveAttr: {
// speed: 900,
seriesIndex: 0,
dataIndex: 0
},
timer: null
}
},
created() {
this.barLineOptions = BarOptions({ tooltipFormatter: this.tooltipFormatter })
},
mounted() {
this.barLineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.barLineDom)
this.chartBindEvent()
},
methods: {
tooltipFormatter(obj) {
var _currentItem = this.dataList[obj[0].dataIndex]
var _html = ''
var _txt = ''
this.tooltipFormatterObj.forEach(item => {
_txt += `<div style="display:flex;"><div style="color: #c9c9c9">${item.label}:</div><div style="color: #fff;">${utils.numAddSymbol(_currentItem[item.attrName])}${item.addSymbol || ''}</div></div>`
})
_html += `<div style="backdrop-filter: blur(4px);background-color: #051526;border: 2px solid;border-image: linear-gradient(90deg, #074989, #30DCFF, #074989) 1;padding: 10px;">
${_txt}
</div>`
return _html
},
drawBar() {
console.log(this.dataList, '11111111111')
this.barLineOptions.xAxis.data = this.dataList.map(item => item.month)
this.barLineOptions.series[0].data = this.dataList.map(item => item.data1)
this.barLineOptions.series[1].data = this.dataList.map(item => item.data2)
this.barLineOptions.series[2].data = this.dataList.map(item => item.data3)
this[this.domId].setOption(this.barLineOptions)
},
chartBindEvent() {
// resize
window.addEventListener('resize', () => {
this[this.domId].resize()
})
}
}
}
</script>
<style scoped lang="scss">
</style>
<!--
* @Description:
* @Author: huyue
* @Date: 2023-08-16 14:46:00
* @LastEditors: huyue
* @LastEditTime: 2024-09-09 17:12:45
-->
<template>
<div class="pie-group">
<template v-for="(i, index) in items">
<div :key="index">
<slot :name="i"></slot>
</div>
</template>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'ViewPieGroup',
props: {},
data() {
return {
items: [1, 2]
}
},
mounted() {
},
methods: {
}
}
</script>
<style scoped lang="scss">
.pie-group {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0 0.64vw;
// margin: 0 0.83vw;
width: 100%;
height:13.85vh;
.box {
}
}
</style>
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 14:50:53
* @FilePath: \dj-data-view\src\components\ViewSurface.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="surface">
<LineBar ref="lineBarCharts" domId="surfaceChart" boxHeight="32.78vh" :dataList="dataList"></LineBar>
</div>
</template>
<script type="text/ecmascript-6">
import LineBar from './LineBar.vue'
export default {
name: 'ViewSurface',
components: {
LineBar
},
data() {
return {
dataList: []
}
},
mounted() {
this.getEnterpriseOverviewTrend()
},
methods: {
getEnterpriseOverviewTrend() {
this.api.operational.getEnterpriseOverviewTrend().then(res => {
if (res.code == 0) {
// this.dataList = res.data.dataList
this.$refs.lineBarCharts.drawLine(res.data.dataList)
}
})
}
}
}
</script>
<style scoped lang="scss">
.surface {
height: 37.31vh;
background-color: rgba(11, 63, 142, 0.2);
margin-top: 3.08vh;
}
</style>
<!--
* @Description: jj
* @Author: huyue
* @Date: 2023-08-16 14:44:03
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 14:05:40
-->
<template>
<div class="tabs-box">
<div class="tabs flex">
<div
class="tab"
:style="{ width: `calc((100% - ${(tabs.length - 1) * 0.64}vw) / ${tabs.length})` }"
v-for="item in tabs"
:key="item.key">
<div v-if="item.key != 'retention'" class="tab-text">{{ numAddSymbol(dataList[item.key]) }}</div>
<div v-else class="tab-text">{{ toFixNum(dataList[item.key]) }}</div>
<div class="tab-title">{{ item.title }}</div>
</div>
</div>
<div class="tabs flex">
<div
class="tab"
:style="{ width: `calc((100% - ${(tabs1.length - 1) * 0.64}vw) / ${tabs1.length})` }"
v-for="item in tabs1"
:key="item.key">
<div v-if="item.key != 'avgshentoulv'" class="tab-text">{{ numAddSymbol(dataList[item.key]) }}</div>
<div v-else class="tab-text">{{ toFixNum(dataList[item.key]) }}</div>
<div class="tab-title">{{ item.title }}</div>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'ViewTabs',
data() {
return {
dataList: {},
tabs: [
{
title: '交付门店',
key: 'totalNum'
},
{
title: '当年新增',
key: 'incrNum'
},
{
title: '当年GMV',
key: 'thisyeargmv'
}
],
tabs1: [
{
title: '店均客单价',
key: 'avgatv'
},
{
title: '店均渗透率',
key: 'avgshentoulv'
},
{
title: '店均GMV',
key: 'avggmv'
}
]
}
},
created() {
this.getEnterpriseOverview()
},
methods: {
toFixNum(val) {
if (!val) {
return '0.0%'
}
return (Number(val) * 100).toFixed(1) + '%'
},
getEnterpriseOverview() {
this.api.operational.getEnterpriseOverview().then(res => {
if (res.code === '0') {
this.dataList = res.data.dataList[0]
}
})
}
}
}
</script>
<style scoped lang="scss">
.tabs-box {
margin-top: 3vh;
}
.tabs {
padding: 3.22vh 0.83vw 0;
padding: 20px 0;
height: 9.23vh;
width: 100%;
box-sizing: border-box;
margin-bottom: 2.31vh;
.tab {
box-sizing: border-box;
padding: 1.98vh 0.56vw 0;
height: 100%;
width: 7.85vw;
height: 9.24vh;
margin-right: 0.64vw;
background: url(../../../assets/images/operation/left-1-bg.png) no-repeat;
background-size: 100%;
text-align: center;
&:last-child {
margin-right: 0;
}
.tab-title {
font-weight: 400;
font-size: 12px;
color: #e8e8e8;
margin-top: 0.56vh;
}
.tab-text {
font-weight: 700;
font-size: 24px;
line-height: 30px;
background: linear-gradient(to right, #01A4F9, #6DF5F9); /* 从左到右渐变 */
-webkit-background-clip: text; /* Safari/Chrome支持该属性 */
color: transparent; /* 将文本颜色设置为透明 */
}
}
}
</style>
// 雷达图
const radarChartOption = {
tooltip: {},
radar: {
// 初始指示器
indicator: [],
name: {
rich: {
star: {
fontSize: 10,
backgroundColor: {
image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/star-1.png'
}
},
halfStar: {
fontSize: 10,
backgroundColor: {
image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/pc-star-2.png'
}
},
emptyStar: {
fontSize: 10,
backgroundColor: {
image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/pc-star-0.png'
}
},
name: {
color: '#fff',
fontSize: 10,
align: 'center'
}
},
formatter: function(v, indicator) {
const createStarRating = (rating) => {
const fullStars = Math.floor(rating)
const halfStar = (rating) % 1 === 0.5
const emptyStars = 5 - fullStars - (halfStar ? 1 : 0)
let stars = ''
for (let i = 0; i < fullStars; i++) {
stars += '{star|}'
}
if (halfStar) {
stars += '{halfStar|}'
}
for (let i = 0; i < emptyStars; i++) {
stars += '{emptyStar|}'
}
return stars
}
return `{name|${v}}\n${createStarRating(indicator.score)}`
},
width: 85,
height: 30
},
nameGap: 0,
shape: 'polygon',
axisLine: {
show: false
},
splitLine: {
lineStyle: {
color: '#283852'
}
},
splitArea: {
areaStyle: {
color: ['transparent', 'transparent', 'transparent', 'transparent', 'transparent']
}
},
startAngle: 90
},
series: [{
type: 'radar',
silent: false,
// 数据
data: [
{
value: [50, 60, 70, 20, 60],
name: '雷达图',
symbol: 'none',
lineStyle: {
color: '#04bef6',
width: 1
},
areaStyle: {
color: '#095abe',
opacity: 0.5
},
blur: {
lineStyle: {
color: '#3F64B0',
width: 1
}
}
}
]
}],
tooltip: {
show: false
}
}
export default {
radarChartOption: radarChartOption
}
export default {
points: [
{
name: '深圳',
coordinate: [0.66, 0.87],
icon: {
src: 'https://img02.glsx.com.cn/weapp/resource/data-view/scene/centerPoint.png',
width: 36,
height: 36,
halo: {
show: true
}
}
},
{
name: '福建',
coordinate: [0.72, 0.79],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '海南',
coordinate: [0.59, 0.95],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '广西',
coordinate: [0.57, 0.83],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '云南',
coordinate: [0.45, 0.82],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '浙江',
coordinate: [0.76, 0.70],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '江西',
coordinate: [0.69, 0.75],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '湖南',
coordinate: [0.63, 0.73],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '贵州',
coordinate: [0.54, 0.77],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '上海',
coordinate: [0.78, 0.67],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '江苏',
coordinate: [0.75, 0.63],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '安徽',
coordinate: [0.71, 0.65],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '湖北',
coordinate: [0.64, 0.67],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '重庆',
coordinate: [0.56, 0.70],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '四川',
coordinate: [0.49, 0.67],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '山东',
coordinate: [0.72, 0.53],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '河南',
coordinate: [0.65, 0.59],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '陕西',
coordinate: [0.57, 0.58],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '西藏',
coordinate: [0.32, 0.69],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '河北',
coordinate: [0.67, 0.49],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '北京',
coordinate: [0.70, 0.43],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '天津',
coordinate: [0.71, 0.45],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '辽宁',
coordinate: [0.80, 0.40],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '吉林',
coordinate: [0.85, 0.33],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '黑龙江',
coordinate: [0.87, 0.22],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '山西',
coordinate: [0.63, 0.51],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '宁夏',
coordinate: [0.53, 0.51],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '甘肃',
coordinate: [0.38, 0.43],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '青海',
coordinate: [0.35, 0.55],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '新疆',
coordinate: [0.22, 0.38],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [10, 20]
}
},
{
name: '内蒙古',
coordinate: [0.73, 0.32],
halo: {
show: true,
color: '#37a2da',
radius: 30
},
line: {
duration: [0, 20]
}
}
],
lines: [
{
source: '深圳',
target: '福建'
},
{
source: '深圳',
target: '海南'
},
{
source: '深圳',
target: '广西'
},
{
source: '深圳',
target: '云南'
},
{
source: '深圳',
target: '浙江'
},
{
source: '深圳',
target: '江西'
},
{
source: '深圳',
target: '湖南'
},
{
source: '深圳',
target: '贵州'
},
{
source: '深圳',
target: '上海'
},
{
source: '深圳',
target: '江苏'
},
{
source: '深圳',
target: '安徽'
},
{
source: '深圳',
target: '湖北'
},
{
source: '深圳',
target: '重庆'
},
{
source: '深圳',
target: '四川'
},
{
source: '深圳',
target: '山东'
},
{
source: '深圳',
target: '河南'
},
{
source: '深圳',
target: '陕西'
},
{
source: '深圳',
target: '西藏'
},
{
source: '深圳',
target: '河北'
},
{
source: '深圳',
target: '北京'
},
{
source: '深圳',
target: '天津'
},
{
source: '深圳',
target: '辽宁'
},
{
source: '深圳',
target: '吉林'
},
{
source: '深圳',
target: '黑龙江'
},
{
source: '深圳',
target: '山西'
},
{
source: '深圳',
target: '宁夏'
},
{
source: '深圳',
target: '甘肃'
},
{
source: '深圳',
target: '青海'
},
{
source: '深圳',
target: '新疆'
},
{
source: '深圳',
target: '内蒙古'
}
],
icon: {
show: true,
src: 'https://img02.glsx.com.cn/weapp/resource/data-view/scene/point.png'
},
k: 0.5,
bgImgSrc: 'https://img02.glsx.com.cn/weapp/resource/data-view/scene/map.png'
}
<!--
* @Description: 运营看板左侧
* @Author: huyue
* @Date: 2024-09-04 16:16:02
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 14:23:11
-->
<template>
<div class="left-box">
<box-title title="企业客户总览" :textAlign="'center'"></box-title>
<view-tabs />
<view-pie-group>
<div slot="1"><Area :height="defaultHeight"></Area></div>
<div slot="2"><Brand :height="defaultHeight"></Brand></div>
</view-pie-group>
<view-surface />
</div>
</template>
<script>
import datas from '../../utils/data'
import ViewTabs from './components/ViewTab'
import Area from './components/Area.vue'
import Brand from './components/Brand.vue'
import ViewPieGroup from './components/ViewPieGroup.vue'
import ViewSurface from './components/ViewSurface.vue'
import { clientMixin } from '../../mixins/index'
export default {
components: { ViewTabs, Area, Brand, ViewPieGroup, ViewSurface },
mixins: [clientMixin],
data() {
return {
defaultHeight: datas.DefaultData.defaultPieHeight
}
},
created() {
this.getClientData()
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
.left-box {
width: 26.76vw;
box-sizing: border-box;
background: url(../../assets/images/operation/left-bg.png) no-repeat;
background-size: 100% 86.54vh;
padding: 0 0.96vw;
}
</style>
<!--
* @Description: 运营看板左侧
* @Author: huyue
* @Date: 2024-09-04 16:16:02
* @LastEditors: huyue
* @LastEditTime: 2024-09-10 17:16:19
-->
<template>
<div class="right-box">
<box-title title="业绩总览" :textAlign="'center'"></box-title>
<Project></Project>
<div class="second-box">
<Category></Category>
<Inspection></Inspection>
</div>
<div class="second-box">
<Analyse></Analyse>
<AiCheck></AiCheck>
</div>
<div class="last-box">
<div class="legend">
<div class="legend-item">
<span class="first"></span>
交车数
</div>
<div class="legend-item">
<span class="second"></span>
接待数
</div>
<div class="legend-item">
<span class="third"></span>
成交数
</div>
</div>
<Transformation ref="transformationTrendsRef" height="17.69vh" domId="transformationTrends" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></Transformation>
</div>
</div>
</template>
<script>
import Category from './components/Category.vue'
import Project from './components/Project.vue'
import Analyse from './components/Analyse'
import Inspection from './components/Inspection.vue'
import AiCheck from './components/AiCheck'
import Transformation from './components/Transformation.vue'
export default {
components: { Project, Category, Analyse, Inspection, AiCheck, Transformation },
data() {
return {
dataList: [],
tooltipFormatterObj: [
{
label: '交车数',
attrName: 'data1'
},
{
label: '接待数',
attrName: 'data2'
},
{
label: '成交数',
attrName: 'data3'
}
]
}
},
create() {
},
mounted() {
this.getNear12trend()
},
methods: {
async getNear12trend() {
this.dataList = []
const _data = await this.api.operational.getNear12trend()
const _dataList = _data.data.dataList
if (!_dataList.length) {
this.isEmpty = true
return
}
_dataList.forEach(item => {
this.dataList.push({
month: item.statdate,
data1: item.jiaocheshu,
data2: item.jiedaishu,
data3: item.chengjiaoshu
})
})
this.$refs.transformationTrendsRef.drawBar()
}
}
}
</script>
<style lang="scss" scoped>
.right-box {
width: 39.42vw;
box-sizing: border-box;
background: url(../../assets/images/operation/right-bg.png) no-repeat;
background-size: 100% 86.54vh;
padding: 0 1vw;
}
.second-box {
display: flex;
margin-bottom: 1.54vh;
}
.second-box {
display: flex;
margin-bottom: 2.31vh;
}
.last-box {
position: relative;
width: 37.5vw;
height: 23.46vh;
background: #05204780;
box-shadow: inset 0 0 20px 0 #3d8bff40;
}
.legend {
font-size: 14px;
position: absolute;
display: flex;
align-items: center;
// top: 3.97vh;
top: 8px;
right: -3.845vw;
// left: 50%;
transform: translateX(-50%);
&-item {
display: flex;
align-items: center;
color: #fff;
margin-right: 1.67vw;
&:last-child {
margin-right: 0;
}
.first,
.second,
.third {
width: 5px;
height: 5px;
border-radius: 50%;
margin-right: 0.28vw;
}
.first {
background-image: linear-gradient(179deg, #00C8FF 0%, #0069F2 100%);
}
.second {
background-image: linear-gradient(179deg, #FFE73C 0%, #CC875A 100%);
}
.third {
background-image: linear-gradient(179deg, #56FEFE 0%, #3BB888 100%);
}
}
}
</style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-06-23 10:52:23 * @Date: 2022-06-23 10:52:23
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-01-26 22:26:25 * @LastEditTime: 2024-09-09 10:10:47
--> -->
<template> <template>
<div class="right"> <div class="right">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!