Commit 4dfdbed3 by 胡悦

修复企业客户总览

1 parent edadcad0
......@@ -108,7 +108,14 @@ img {
user-select: none;
box-sizing: border-box;
height: 2.07vh;
margin-top: 4px;
// margin-top: 4px;
.title-bg {
display: inline-block;
height: 1.71vh;
padding-left: 0.83vw;
transform: rotate(-360deg);
background-image: linear-gradient(90deg, #003F57 0%, #111056 54%, #07173500 100%);
}
}
.container {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2023-08-16 16:26:49
* @LastEditors: huyue
* @LastEditTime: 2023-08-16 16:26:54
* @LastEditTime: 2023-08-22 10:54:51
-->
<template>
......
......@@ -3,14 +3,14 @@
* @Author: huyue
* @Date: 2023-08-16 14:34:58
* @LastEditors: huyue
* @LastEditTime: 2023-08-16 14:35:10
* @LastEditTime: 2023-08-22 10:53:20
-->
<template>
<div>
<div class="title title-icon">
<span class="icon"></span>
<span>区域分布</span>
<span class="title-bg">区域分布</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id" :list="areaData" :keys="chart.keys"></pie-chart>
......
......@@ -3,14 +3,14 @@
* @Author: huyue
* @Date: 2023-08-16 14:35:24
* @LastEditors: huyue
* @LastEditTime: 2023-08-16 14:38:45
* @LastEditTime: 2023-08-22 10:56:23
-->
<template>
<div>
<div class="title title-icon">
<span class="icon"></span>
<span>品牌分布</span>
<span class="title-bg">品牌分布</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id" :list="brandData" :keys="chart.keys"></pie-chart>
......
......@@ -26,10 +26,6 @@ export default {
type: String,
default: '品牌'
},
dataList: {
type: Array,
default: () => []
},
// 0-月表;1-日表
queryType: {
type: Number,
......@@ -73,26 +69,40 @@ export default {
timer: null
}
},
watch: {
dataList: {
handler() {
console.log(33333333333);
this.lineOptions = lineAndBarOptions(this.dataList)
this.chartBindEvent()
},
deep: true
}
},
// watch: {
// dataList: {
// handler() {
// console.log(33333333333);
// this.lineOptions = lineAndBarOptions(this.dataList)
// this.chartBindEvent()
// },
// deep: true
// }
// },
mounted() {
console.log(888888);
this.lineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.lineDom)
this.chartBindEvent()
},
methods: {
tooltipFormatter(obj) {
var _currentItem = this.dataList[obj[0].dataIndex]
var _html = ''
var _txt = ''
_txt += `<div style="display:flex;"><div style="color: #c9c9c9">${this.tooltipFormatterObj.label}:</div><div style="color: #fff;">${utils.numAddSymbol(_currentItem[this.tooltipFormatterObj.attrName])}${this.tooltipFormatterObj.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
},
chartBindEvent() {
// window.addEventListener('resize', () => {
// this[this.domId].resize()
// })
// resize
window.addEventListener('resize', () => {
this[this.domId].resize()
})
},
drawLine(dataList) {
this.lineOptions = lineAndBarOptions(dataList)
this[this.domId].setOption(this.lineOptions)
}
}
......
......@@ -234,6 +234,9 @@ export default {
border-bottom: 1px solid #0a2d26;
height: 4.88vh;
}
.clew-num {
color: #FF0000;
}
}
.bg-2 {
background: #280935;
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-08-16 14:35:35
* @LastEditors: huyue
* @LastEditTime: 2023-08-22 10:56:30
-->
<template>
<div>
<div class="title title-icon">
<span class="icon"></span>
<span>门店类型</span>
<span class="title-bg">门店类型</span>
</div>
<div class="container flex">
<pie-chart :id="chart.id" :list="storeData" :keys="chart.keys"></pie-chart>
......
<!--
* @Description:
* @Author: huyue
* @Date: 2023-08-16 14:46:00
* @LastEditors: huyue
* @LastEditTime: 2023-08-22 10:49:36
-->
<template>
<div class="pie-group">
<template v-for="(i, index) in items">
......@@ -29,6 +36,8 @@ export default {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0 8px;
margin: 0 0.83vw;
width: calc(100% - 1.66vw);
.box {
height:13.05vh;
}
......
......@@ -2,17 +2,17 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26
* @LastEditors: huyue
* @LastEditTime: 2023-08-16 17:36:08
* @LastEditTime: 2023-08-22 10:17:28
* @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 domId="surfaceChart" boxHeight="21.46vh" :dataList="dataList"></LineBar>
<LineBar ref="lineBarCharts" domId="surfaceChart" boxHeight="21.46vh" :dataList="dataList"></LineBar>
</div>
</template>
<script type="text/ecmascript-6">
import LineBar from './LineChart.vue'
import LineBar from './LineBar.vue'
export default {
name: 'ViewSurface',
components: {
......@@ -30,8 +30,9 @@ export default {
getEnterpriseOverviewTrend() {
this.api.operational.getEnterpriseOverviewTrend().then(res => {
if (res.code == 0) {
console.log(res, '000000000');
this.dataList = res.data.dataList
console.log(res, '000000000')
// this.dataList = res.data.dataList
this.$refs.lineBarCharts.drawLine(res.data.dataList)
}
})
}
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:46:24
* @LastEditors: huyue
* @LastEditTime: 2023-08-16 15:51:58
* @LastEditTime: 2023-08-22 11:21:12
* @FilePath: \dj-data-view\src\components\barOptions.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -300,22 +300,24 @@ function lineAndBarOptions(list) {
var options = {
tooltip: {
trigger: 'axis',
axisPointer: {
lineStyle: {
type: 'solid'
}
},
padding: 5,
borderWidth: 1,
backgroundColor: 'rgba(35, 45, 152, 1)',
borderRadius: 4,
textStyle: {
color: 'rgba(255,255,255,1)',
fontSize: 10
},
formatter: function (item) {
borderWidth: 0,
padding: 0,
// axisPointer: {
// lineStyle: {
// type: 'solid'
// }
// },
// padding: 5,
// borderWidth: 1,
// backgroundColor: 'rgba(35, 45, 152, 1)',
// borderRadius: 4,
// textStyle: {
// color: 'rgba(255,255,255,1)',
// fontSize: 10
// },
formatter: function(item) {
const items = list[item[0].dataIndex]
return `当月总门店数:${item[0].value}<br>当月新增:${item[1].value}<br>上月总门店数:${items.yesterdaytotalNum}<br>上月月新增:${items.yesterdayincreNum}`
return `<div style="backdrop-filter: blur(4px);background-color: #051526;border: 2px solid;border-image: linear-gradient(90deg, #074989, #30DCFF, #074989) 1;padding: 10px;"><div style="display:flex;"><div style="color: #fff">当月总门店数:${item[0].value}<br>当月新增:${item[1].value}<br>上月总门店数:${items.yesterdaytotalNum}<br>上月月新增:${items.yesterdayincreNum}</div></div>`
}
},
xAxis: [
......@@ -355,8 +357,7 @@ function lineAndBarOptions(list) {
}
},
axisLabel: {
color: '#FFD241',
fontSize: '0.8em'
color: '#FFF'
},
splitNumber: 4
},
......@@ -370,8 +371,7 @@ function lineAndBarOptions(list) {
}
},
axisLabel: {
color: '#769EFF',
fontSize: '0.8em'
color: '#FFF'
},
splitNumber: 4
}
......@@ -387,26 +387,6 @@ function lineAndBarOptions(list) {
// 平滑曲线
smooth: true,
showSymbol: false,
// 折线背景色
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(254, 84, 0, 0.3)'
},
{
offset: 1,
color: 'rgba(254, 84, 0, 0.01)'
}
]
}
},
data: totalNum
},
{
......@@ -418,7 +398,32 @@ function lineAndBarOptions(list) {
},
yAxisIndex: 1,
barWidth: '30%',
data: increNum
data: increNum,
itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) {
const colorList = [
['#2AD191', '#00A89E', '#061422'],
['#22D8FF', '#223FA9', '#061422']
]
var colorItem = []
colorItem = params.dataIndex % 2 === 0 ? colorList[0] : colorList[1]
return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: colorItem[0]
}, // 柱图渐变色
{
offset: 0.5, // 指100%处的颜色
color: colorItem[1]
},
{
offset: 1, // 指100%处的颜色
color: colorItem[2]
}]
)
}
}
}
]
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!