Commit 11af1fa7 by 胡悦

提交运营看板修改

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