Commit beb57e01 by 王志慧

Merge branch 'dev_v1.0.0' of http://192.168.3.233:8090/gh/data-view into dev_v1.0.0

2 parents 3ccbcc9f e1267c00
......@@ -91,6 +91,8 @@ img {
padding: 0.5vh 8px;
user-select: none;
box-sizing: border-box;
height: 3.1vh;
overflow: hidden;
}
.title-icon {
......
......@@ -198,16 +198,17 @@ p {
padding: 0.5vh 0.87vh;
border-top: 1px solid #373739;
.rank-title-block {
flex: 0 0 55px;
// flex: 0 0 55px;
width: 55px;
.rank-title {
box-sizing: border-box;
width: 100%;
text-align: center;
font-size: 0.6em;
// font-size: 0.6em;
font-size: 9px;
background: #353535;
padding: 0.2vh 5px;
height: 1.8vh;
line-height: 1.8vh;
opacity: 0.7;
cursor: pointer;
}
......@@ -236,7 +237,7 @@ p {
padding-bottom: 0;
}
}
.rank-line:top-child {
.rank-line:first-of-type{
border-width: 0;
}
}
......
......@@ -201,6 +201,15 @@ const getNMonth = (n, fmt = 'yyyy-MM-dd') => {
return new Date(new Date().setMonth(new Date().getMonth() + n)).format(fmt)
}
const debounce = function(func, wait = 200) {
let timeout
return function(event) {
clearTimeout(timeout)
timeout = setTimeout(() => {
func.call(this, event)
}, wait)
}
}
const utils = {
removeLocalStorage,
setClipboardData,
......@@ -228,7 +237,8 @@ const utils = {
numAddSymbol,
getCurrentDate,
getNDate,
getNMonth
getNMonth,
debounce
}
Object.keys(utils).map(key => {
......
......@@ -182,17 +182,19 @@ export default {
<style lang="scss" scoped>
.title {
padding: 1vh 0.556vw;
padding: 1vh 8px;
height: 4vh;
}
.analyze-content {
display: flex;
padding: 0 8px 1.8vh;
padding: 0 8px;
box-sizing: border-box;
.bg {
background-color: #262525;
}
.content-left {
flex: 1;
height: 100%;
}
.contetn-right {
width: 50%;
......
......@@ -113,7 +113,8 @@ export default {
</script>
<style lang="scss" scoped>
.title {
padding: 1vh 0.556vw;
padding: 1vh 8px;
height: 4vh;
}
.ranking-container {
flex: 1;
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-01 14:26:28
* @LastEditTime: 2022-07-04 17:32:35
-->
<template>
<div>
......@@ -42,6 +42,7 @@
<script>
import { changeMixin } from '@/mixins'
import datas from '../../utils/data'
import utils from '../../utils/util'
import * as echarts from 'echarts'
export default {
name: 'Flow',
......@@ -183,9 +184,14 @@ export default {
}
this.echartsFunnel.setOption(this.option)
// 鼠标划入
this.echartsFunnel.on('mouseover', data => {
this.getSaleTrans(this.paramsData, data.data.type)
})
utils.debounce(
this.echartsFunnel.on('mouseover', data => {
this.getSaleTrans(this.paramsData, data.data.type)
})
)
// this.echartsFunnel.on('mouseover', data => {
// this.getSaleTrans(this.paramsData, data.data.type)
// })
},
getSaleTrans(val, queryItem = 'enter') {
const params = {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-06-30 19:38:58
* @LastEditTime: 2022-07-04 17:40:52
-->
<template>
<div>
......@@ -80,13 +80,13 @@ export default {
}
})
this.$set(this, 'hasData', !flag.every(i => !i))
this.draw()
this.draw(val.reportType)
})
.catch(() => {
this.hasData = false
})
},
draw() {
draw(reportType) {
this.option = {
tooltip: {
trigger: 'axis',
......@@ -164,7 +164,8 @@ export default {
lineStyle: {
color: '#606266'
}
}
},
splitNumber: 4
},
series: [
{
......@@ -173,7 +174,6 @@ export default {
symbol: 'circle',
smooth: true,
showSymbol: false,
stack: 'Total',
data: []
},
{
......@@ -182,7 +182,6 @@ export default {
symbol: 'circle',
smooth: true,
showSymbol: false,
stack: 'Total',
data: []
},
{
......@@ -191,7 +190,6 @@ export default {
symbol: 'circle',
smooth: true,
showSymbol: false,
stack: 'Total',
data: []
},
{
......@@ -200,7 +198,6 @@ export default {
symbol: 'circle',
showSymbol: false,
smooth: true,
stack: 'Total',
data: []
},
{
......@@ -209,12 +206,16 @@ export default {
symbol: 'circle',
showSymbol: false,
smooth: true,
stack: 'Total',
data: []
}
]
}
this.option.xAxis.data = this.dataList[0].map(item => item.statDate)
const xData = []
this.option.xAxis.data = xData
this.dataList[0].map(e => {
const month = new Date(e.statDate).getMonth()
xData.push(reportType == 0 ? `${month == 0 ? '1月' : `${Number(month) + 1}月`}` : e.statDate)
})
this.list.forEach((i, index) => {
this.option.series[index].data = this.dataList[index].map(item => item.num)
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!