Commit 11af1fa7 by 胡悦

提交运营看板修改

1 parent eb505ce5
...@@ -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-09-14 15:09:24 * @LastEditTime: 2024-09-24 10:16:56
--> -->
<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: 4, current: 0,
titleList: { titleList: {
0: '让你的用车生活更美好', 0: '让你的用车生活更美好',
1: '广联企业全景介绍', 1: '广联企业全景介绍',
......
...@@ -34,7 +34,7 @@ export default { ...@@ -34,7 +34,7 @@ export default {
return { return {
chart: { chart: {
id: 'aicheck', id: 'aicheck',
colors: ['#6578FF', '#34AFFF', '#EB6001', '#16E193', '#BF98FF'], colors: ['#56FEFE', '#FFE73C', '#747DFF'],
formatter: 'rate' formatter: 'rate'
}, },
categoryData: [ categoryData: [
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2023-07-07 14:04:52 * @Date: 2023-07-07 14:04:52
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-09-10 17:07:07 * @LastEditTime: 2024-09-23 11:08:08
*/ */
import * as echarts from 'echarts' import * as echarts from 'echarts'
function getBarLineOptions(obj) { function getBarLineOptions(obj) {
...@@ -13,8 +13,15 @@ function getBarLineOptions(obj) { ...@@ -13,8 +13,15 @@ function getBarLineOptions(obj) {
trigger: 'axis', trigger: 'axis',
borderWidth: 0, borderWidth: 0,
padding: 0, padding: 0,
backgroundColor: 'transparent',
formatter: tooltipFormatter || '', formatter: tooltipFormatter || '',
confine: true // confine: true
axisPointer: {
type: 'shadow',
shadowStyle: {
color: 'rgba(36, 74, 243, 0.4)'
}
}
}, },
xAxis: { xAxis: {
data: [] data: []
...@@ -31,37 +38,34 @@ function getBarLineOptions(obj) { ...@@ -31,37 +38,34 @@ function getBarLineOptions(obj) {
} }
}, },
grid: { grid: {
left: '3%', left: '10%',
right: '4%', right: '4%',
top: '20%', top: '20%',
bottom: '6%', bottom: '6%',
containLabel: true containLabel: true
// tooltip: {}
}, },
series: [ series: [
{ {
name: 'bar', name: 'bar',
type: 'bar', type: 'bar',
barWidth: '15%',
data: [], data: [],
label: {
show: true,
position: 'top',
color: '#fff'
},
itemStyle: { itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 // barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) { color: function(params) {
return new echarts.graphic.LinearGradient( return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始 0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色 offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: '#22D8FF' color: '#00C8FF'
}, // 柱图渐变色 }, // 柱图渐变色
{ {
offset: 0.5, // 指100%处的颜色 offset: 0.5, // 指100%处的颜色
color: '#223FA9' color: '#0098F8'
}, },
{ {
offset: 1, // 指100%处的颜色 offset: 1, // 指100%处的颜色
color: '#061422' color: '#0069F2'
}] }]
) )
} }
...@@ -70,14 +74,10 @@ function getBarLineOptions(obj) { ...@@ -70,14 +74,10 @@ function getBarLineOptions(obj) {
{ {
name: 'bar2', name: 'bar2',
type: 'bar', type: 'bar',
label: { barWidth: '15%',
show: true,
position: 'top',
color: '#fff'
},
data: [], data: [],
itemStyle: { itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 // barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) { color: function(params) {
return new echarts.graphic.LinearGradient( return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始 0, 0, 0, 1, [{ // 代表渐变色从正上方开始
...@@ -86,7 +86,7 @@ function getBarLineOptions(obj) { ...@@ -86,7 +86,7 @@ function getBarLineOptions(obj) {
}, // 柱图渐变色 }, // 柱图渐变色
{ {
offset: 0.5, // 指100%处的颜色 offset: 0.5, // 指100%处的颜色
color: '#F2C101' color: '#E5B74B'
}, },
{ {
offset: 1, // 指100%处的颜色 offset: 1, // 指100%处的颜色
...@@ -99,28 +99,24 @@ function getBarLineOptions(obj) { ...@@ -99,28 +99,24 @@ function getBarLineOptions(obj) {
{ {
name: 'bar3', name: 'bar3',
type: 'bar', type: 'bar',
label: { barWidth: '15%',
show: true,
position: 'top',
color: '#fff'
},
data: [], data: [],
show: false, show: false,
itemStyle: { itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 // barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) { color: function(params) {
return new echarts.graphic.LinearGradient( return new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{ // 代表渐变色从正上方开始 0, 0, 0, 1, [{ // 代表渐变色从正上方开始
offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色 offset: 0, // offset范围是0~1,用于表示位置,0是指0%处的颜色
color: '#2AD191' color: '#56FEFE'
}, // 柱图渐变色 }, // 柱图渐变色#56FEFE
{ {
offset: 0.5, // 指100%处的颜色 offset: 0.5, // 指100%处的颜色
color: '#0E958D' color: '#48D9C0'
}, },
{ {
offset: 1, // 指100%处的颜色 offset: 1, // 指100%处的颜色
color: '#061422' color: '#3BB888'
}] }]
) )
} }
......
...@@ -99,8 +99,8 @@ export default { ...@@ -99,8 +99,8 @@ export default {
const _this = this const _this = this
const { rotate, analysisList, colorList } = this const { rotate, analysisList, colorList } = this
analysisList.forEach(element => { analysisList.forEach(element => {
element.label = element.productname element.label = element.name
element.value = element.output element.value = element.outputValue
}) })
const obj = { const obj = {
rotate, rotate,
......
...@@ -25,6 +25,17 @@ export default { ...@@ -25,6 +25,17 @@ export default {
components: { components: {
BarValue BarValue
}, },
props: {
dataList: {
type: Array,
default: () => []
}
},
watch: {
dataList() {
this.analysisList = this.dataList
}
},
data() { data() {
return { return {
analysisList: {}, analysisList: {},
...@@ -33,7 +44,7 @@ export default { ...@@ -33,7 +44,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.getProductCategoryAnalysis() // this.getProductCategoryAnalysis()
}, },
methods: { methods: {
getProductCategoryAnalysis() { getProductCategoryAnalysis() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-09-09 10:12:50 * @Date: 2024-09-09 10:12:50
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-09-14 16:30:09 * @LastEditTime: 2024-09-23 11:02:14
--> -->
<template> <template>
<div class="table-box"> <div class="table-box">
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
</div> </div>
<div class="table-th"> <div class="table-th">
<div class="angle"></div> <div class="angle"></div>
<div style="width: 4.3vw;padding-left: 2.4vw;">员工姓名</div> <div style="width: 4.3vw;padding-left: 2.3vw;">员工姓名</div>
<div style="width: 2.6vw;">GMV</div> <div style="width: 2.6vw;">GMV</div>
<div style="width: 1.6vw;">渗透率</div> <div style="width: 1.6vw;">渗透率</div>
</div> </div>
<dv-scroll-board ref="employeeTable" :config="tableConfig" :waitTime="5000" style="width: 100%;height:28.08vh" /> <dv-scroll-board ref="employeeTable" :config="tableConfig" style="width: 100%;height:28.08vh" />
</div> </div>
</template> </template>
<script> <script>
...@@ -41,7 +41,9 @@ export default { ...@@ -41,7 +41,9 @@ export default {
evenRowBGC: 'transparent', evenRowBGC: 'transparent',
oddRowBGC: 'transparent', oddRowBGC: 'transparent',
columnWidth: [50, 120, 70, 70], columnWidth: [50, 120, 70, 70],
align: ['left'] align: ['left'],
carousel: 'page',
waitTime: 5000
} }
} }
}, },
......
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
], ],
chart: { chart: {
id: 'inspection', id: 'inspection',
colors: ['#6578FF', '#34AFFF', '#EB6001', '#16E193', '#BF98FF'], colors: ['#FFE73C', '#56FEFE', '#EB6001', '#747DFF'],
formatter: 'rate' formatter: 'rate'
}, },
categoryData: [ categoryData: [
...@@ -146,6 +146,7 @@ export default { ...@@ -146,6 +146,7 @@ export default {
height: 5.77vh; height: 5.77vh;
padding: 8px; padding: 8px;
box-sizing: border-box; box-sizing: border-box;
background-color: rgba(47, 85, 143, .3);
.label { .label {
font-size: 11px; font-size: 11px;
color: #E8E8E8; color: #E8E8E8;
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
</div> </div>
</template> </template>
<script> <script>
let timer = null
let currentIndex = -1
import datas from '@/utils/data' import datas from '@/utils/data'
import utils from '../../../utils/util.js' import utils from '../../../utils/util.js'
import * as echarts from 'echarts' import * as echarts from 'echarts'
...@@ -71,7 +73,8 @@ export default { ...@@ -71,7 +73,8 @@ export default {
seriesIndex: 0, seriesIndex: 0,
dataIndex: 0 dataIndex: 0
}, },
timer: null timer: null,
length: 0
} }
}, },
// watch: { // watch: {
...@@ -88,6 +91,7 @@ export default { ...@@ -88,6 +91,7 @@ export default {
this.lineDom = document.getElementById(this.domId) this.lineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.lineDom) this[this.domId] = echarts.init(this.lineDom)
this.chartBindEvent() this.chartBindEvent()
this.startToolTipLoop(this[this.domId])
}, },
methods: { methods: {
chartBindEvent() { chartBindEvent() {
...@@ -95,19 +99,46 @@ export default { ...@@ -95,19 +99,46 @@ export default {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this[this.domId].resize() this[this.domId].resize()
}) })
this[this.domId].on('mouseover', data => {
this.closeSwitchTooltip()
})
this[this.domId].on('mousedown', data => {
this.startToolTipLoop(this[this.domId])
})
}, },
drawLine(dataList) { drawLine(dataList) {
this.lineOptions = lineAndBarOptions(dataList) this.lineOptions = lineAndBarOptions(dataList)
this[this.domId].setOption(this.lineOptions) this[this.domId].setOption(this.lineOptions)
// this.moveAttr.dataIndex = dataList.length - 1 this.length = this.dataList.length
// this.chartAction()
}, },
chartAction(type) { switchTooltip(myChart) {
this[this.domId].dispatchAction({ myChart.dispatchAction({
type: type || 'showTip', type: 'downplay',
seriesIndex: +this.moveAttr.seriesIndex, seriesIndex: 1,
dataIndex: +this.moveAttr.dataIndex dataIndex: currentIndex
})
currentIndex = (currentIndex + 1) % this.lineOptions.series[0].data.length
// 高亮当前图形
myChart.dispatchAction({
type: 'highlight',
seriesIndex: 1,
dataIndex: currentIndex
}) })
// 显示tooltip
myChart.dispatchAction({
type: 'showTip',
seriesIndex: 1,
dataIndex: currentIndex
})
},
startToolTipLoop(myChart) {
timer = setInterval(() => {
this.switchTooltip(myChart)
}, 3000)
},
closeSwitchTooltip() {
timer = undefined
clearInterval(timer)
} }
} }
} }
......
...@@ -36,6 +36,19 @@ ...@@ -36,6 +36,19 @@
<script> <script>
export default { export default {
name: 'Project', name: 'Project',
props: {
dataList: {
type: Array,
default: () => []
}
},
watch: {
dataList() {
this.projectList.map((item, index) => {
return Object.assign(item, this.dataList[index])
})
}
},
data() { data() {
return { return {
projectList: [ projectList: [
...@@ -78,7 +91,6 @@ export default { ...@@ -78,7 +91,6 @@ export default {
} }
}, },
mounted() { mounted() {
this.getBusinessType()
}, },
methods: { methods: {
toFixRatio(val) { toFixRatio(val) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-09-09 10:12:50 * @Date: 2024-09-09 10:12:50
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-09-14 16:28:25 * @LastEditTime: 2024-09-19 20:11:56
--> -->
<template> <template>
<div class="table-box"> <div class="table-box">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div style="width: 2.5vw;">GMV</div> <div style="width: 2.5vw;">GMV</div>
<div style="width: 1.7vw;">渗透率</div> <div style="width: 1.7vw;">渗透率</div>
</div> </div>
<dv-scroll-board ref="storeTable" :config="tableConfig" :waitTime="5000" style="width: 100%;height:28.08vh" /> <dv-scroll-board ref="storeTable" :config="tableConfig" style="width: 100%;height:28.08vh" />
</div> </div>
</template> </template>
<script> <script>
...@@ -42,7 +42,9 @@ export default { ...@@ -42,7 +42,9 @@ export default {
evenRowBGC: 'transparent', evenRowBGC: 'transparent',
oddRowBGC: 'transparent', oddRowBGC: 'transparent',
columnWidth: [50, 140, 60, 70], columnWidth: [50, 140, 60, 70],
align: ['left'] align: ['left'],
carousel: 'page',
waitTime: 5000
} }
} }
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2023-07-07 14:01:42 * @Date: 2023-07-07 14:01:42
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-09-10 17:05:47 * @LastEditTime: 2024-09-20 10:39:06
--> -->
<template> <template>
<div> <div>
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
let timer = null
let currentIndex = -1
import * as echarts from 'echarts' import * as echarts from 'echarts'
import BarOptions from './BarOptions' import BarOptions from './BarOptions'
import utils from '../../../utils/util.js' import utils from '../../../utils/util.js'
...@@ -57,13 +59,7 @@ export default { ...@@ -57,13 +59,7 @@ export default {
}, },
data() { data() {
return { return {
barLineOptions: [], barLineOptions: []
moveAttr: {
// speed: 900,
seriesIndex: 0,
dataIndex: 0
},
timer: null
} }
}, },
created() { created() {
...@@ -73,6 +69,7 @@ export default { ...@@ -73,6 +69,7 @@ export default {
this.barLineDom = document.getElementById(this.domId) this.barLineDom = document.getElementById(this.domId)
this[this.domId] = echarts.init(this.barLineDom) this[this.domId] = echarts.init(this.barLineDom)
this.chartBindEvent() this.chartBindEvent()
this.startToolTipLoop(this[this.domId])
}, },
methods: { methods: {
tooltipFormatter(obj) { tooltipFormatter(obj) {
...@@ -80,9 +77,9 @@ export default { ...@@ -80,9 +77,9 @@ export default {
var _html = '' var _html = ''
var _txt = '' var _txt = ''
this.tooltipFormatterObj.forEach(item => { 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>` _txt += `<div style="display:flex;"><div style="color: #c9c9c9;font-size: 9px;">${item.label}:</div><div style="color: #fff;font-size: 9px;">${_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;"> _html += `<div style="background-color: rgba(0, 0, 3, 0.8);border: 2px solid;border-image: linear-gradient(90deg, #074989, #30DCFF, #074989) 1;padding: 10px;">
${_txt} ${_txt}
</div>` </div>`
return _html return _html
...@@ -100,6 +97,42 @@ export default { ...@@ -100,6 +97,42 @@ export default {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this[this.domId].resize() this[this.domId].resize()
}) })
this[this.domId].on('mouseover', data => {
this.closeSwitchTooltip()
})
this[this.domId].on('mousedown', data => {
this.startToolTipLoop(this[this.domId])
})
},
switchTooltip(myChart) {
myChart.dispatchAction({
type: 'downplay',
seriesIndex: 1,
dataIndex: currentIndex
})
currentIndex = (currentIndex + 1) % 12
console.log(currentIndex, 'currentIndex', myChart)
// 高亮当前图形
myChart.dispatchAction({
type: 'highlight',
seriesIndex: 1,
dataIndex: currentIndex
})
// 显示tooltip
myChart.dispatchAction({
type: 'showTip',
seriesIndex: 1,
dataIndex: currentIndex
})
},
startToolTipLoop(myChart) {
timer = setInterval(() => {
this.switchTooltip(myChart)
}, 3000)
},
closeSwitchTooltip() {
timer = undefined
clearInterval(timer)
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:46:24 * @Date: 2022-10-25 10:46:24
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-09-14 16:17:13 * @LastEditTime: 2024-09-23 11:37:42
* @FilePath: \dj-data-view\src\components\barOptions.js * @FilePath: \dj-data-view\src\components\barOptions.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -60,7 +60,7 @@ function getBarOptions(obj, colorList) { ...@@ -60,7 +60,7 @@ function getBarOptions(obj, colorList) {
color: 'rgba(36, 74, 243, 0.39)' color: 'rgba(36, 74, 243, 0.39)'
}, },
itemStyle: { itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 // barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function (params) { color: function (params) {
// var colorItem = [] // var colorItem = []
return new echarts.graphic.LinearGradient(0, 0, 0, 1, [ return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
...@@ -106,7 +106,7 @@ function getBarReverseOptions(obj, colorList) { ...@@ -106,7 +106,7 @@ function getBarReverseOptions(obj, colorList) {
axisPointer: { axisPointer: {
type: 'shadow', type: 'shadow',
shadowStyle: { shadowStyle: {
color: 'rgba(210, 210, 210, 0.2)' color: 'rgba(36, 74, 243, 0.4)'
} }
}, },
borderWidth: 0, borderWidth: 0,
...@@ -172,7 +172,7 @@ function getBarReverseOptions(obj, colorList) { ...@@ -172,7 +172,7 @@ function getBarReverseOptions(obj, colorList) {
lineHeight: 16 lineHeight: 16
} }
}, },
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 // barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function (params) { color: function (params) {
// var colorItem = [] // var colorItem = []
return { return {
...@@ -204,7 +204,7 @@ function getBarReverseOptions1(obj, colorList) { ...@@ -204,7 +204,7 @@ function getBarReverseOptions1(obj, colorList) {
axisPointer: { axisPointer: {
type: 'shadow', type: 'shadow',
shadowStyle: { shadowStyle: {
color: 'rgba(210, 210, 210, 0.2)' color: 'rgba(36, 74, 243, 0.4)'
} }
}, },
borderWidth: 0, borderWidth: 0,
...@@ -233,7 +233,7 @@ function getBarReverseOptions1(obj, colorList) { ...@@ -233,7 +233,7 @@ function getBarReverseOptions1(obj, colorList) {
data: value.map(item => item.label) data: value.map(item => item.label)
}, },
grid: { grid: {
left: '8%', left: '10%',
right: '0%', right: '0%',
top: '0%', top: '0%',
bottom: '0%', bottom: '0%',
...@@ -270,10 +270,10 @@ function getBarReverseOptions1(obj, colorList) { ...@@ -270,10 +270,10 @@ function getBarReverseOptions1(obj, colorList) {
lineHeight: 16 lineHeight: 16
}, },
formatter: function(params) { formatter: function(params) {
return params.value + ' ' + params.data.rate + '%' return params.value + ' ' + params.data.ratio + '%'
} }
}, },
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 // barBorderRadius: [0, 2, 2, 0], // 柱体圆角
color: function(params) { color: function(params) {
// var colorItem = [] // var colorItem = []
return { return {
...@@ -421,7 +421,11 @@ function lineAndBarOptions(list) { ...@@ -421,7 +421,11 @@ function lineAndBarOptions(list) {
// }, // },
formatter: function(item) { formatter: function(item) {
const items = list[item[0].dataIndex] const items = list[item[0].dataIndex]
return `<div style="background-color: rgba(0, 0, 3, 0.8);font-size: 9px;border: 2px solid;border-image: linear-gradient(90deg, #01A4F9, #6DF5F9) 1;padding: 10px;border-radius: 4px;"><div style="display:flex;"><div style="color: #fff">当月总门店数:${utils.numAddSymbol(item[0].value)}<br>当月新增:${utils.numAddSymbol(item[1].value)}<br>上月总门店数:${utils.numAddSymbol(items.yesterdaytotalNum)}<br>上月月新增:${utils.numAddSymbol(items.yesterdayincreNum)}</div></div>` return `<div style="background-color: rgba(0, 0, 3, 0.8);font-size: 9px;border: 2px solid;border-image: linear-gradient(90deg, #01A4F9, #6DF5F9) 1;padding: 10px;border-radius: 4px;"><div style="display:flex;"><div style="color: #fff">当月总门店数:${utils.numAddSymbol(item[0].value)}<br>
当月新增:${utils.numAddSymbol(item[1].value)}<br>
${items.tongbi ? `同比增长:${items.tongbi}%` : ''}
</div>
</div>`
} }
}, },
xAxis: [ xAxis: [
...@@ -534,7 +538,7 @@ function lineAndBarOptions(list) { ...@@ -534,7 +538,7 @@ function lineAndBarOptions(list) {
barWidth: '24%', barWidth: '24%',
data: increNum, data: increNum,
itemStyle: { itemStyle: {
barBorderRadius: [2, 2, 0, 0], // 柱体圆角 // barBorderRadius: [2, 2, 0, 0], // 柱体圆角
color: function(params) { color: function(params) {
const colorList = [ const colorList = [
// ['#2AD191', '#00A89E', '#061422'], // ['#2AD191', '#00A89E', '#061422'],
......
// 雷达图 // 雷达图
const radarChartOption = { const radarChartOption = {
tooltip: {},
radar: { radar: {
// 初始指示器 // 初始指示器
indicator: [], indicator: [],
name: { name: {
rich: { rich: {
star: { star: {
fontSize: 10, fontSize: 8,
backgroundColor: { backgroundColor: {
image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/star-1.png' image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/star-1.png'
} }
}, },
halfStar: { halfStar: {
fontSize: 10, fontSize: 8,
backgroundColor: { backgroundColor: {
image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/pc-star-2.png' image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/pc-star-2.png'
} }
}, },
emptyStar: { emptyStar: {
fontSize: 10, fontSize: 8,
backgroundColor: { backgroundColor: {
image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/pc-star-0.png' image: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/aiCheck/pc-star-0.png'
} }
}, },
name: { name: {
color: '#fff', color: '#fff',
fontSize: 10, fontSize: 8,
align: 'center' align: 'center'
} }
}, },
...@@ -50,7 +49,10 @@ const radarChartOption = { ...@@ -50,7 +49,10 @@ const radarChartOption = {
return `{name|${v}}\n${createStarRating(indicator.score)}` return `{name|${v}}\n${createStarRating(indicator.score)}`
}, },
width: 85, width: 85,
height: 30 height: 30,
textStyle: {
padding: [-10, 10]
}
}, },
nameGap: 0, nameGap: 0,
shape: 'polygon', shape: 'polygon',
......
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-09-04 16:16:02 * @Date: 2024-09-04 16:16:02
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-09-10 17:16:19 * @LastEditTime: 2024-09-20 14:34:25
--> -->
<template> <template>
<div class="right-box"> <div class="right-box">
<box-title title="业绩总览" :textAlign="'center'"></box-title> <box-title title="业绩总览" :textAlign="'center'"></box-title>
<Project></Project> <Project :dataList="projectList"></Project>
<div class="second-box"> <div class="second-box">
<Category></Category> <Category :dataList="projectList"></Category>
<Inspection></Inspection> <Inspection></Inspection>
</div> </div>
<div class="second-box"> <div class="second-box">
...@@ -61,13 +61,15 @@ export default { ...@@ -61,13 +61,15 @@ export default {
label: '成交数', label: '成交数',
attrName: 'data3' attrName: 'data3'
} }
] ],
projectList: []
} }
}, },
create() { create() {
}, },
mounted() { mounted() {
this.getNear12trend() this.getNear12trend()
this.getBusinessType()
}, },
methods: { methods: {
async getNear12trend() { async getNear12trend() {
...@@ -87,6 +89,18 @@ export default { ...@@ -87,6 +89,18 @@ export default {
}) })
}) })
this.$refs.transformationTrendsRef.drawBar() this.$refs.transformationTrendsRef.drawBar()
},
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])
// })
}
})
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!