Commit 3014c221 by 李伟康

修改样式

1 parent 6c266171
......@@ -166,6 +166,7 @@ p {
color: #ffffff;
// padding: 4px 8px;
font-size: 0.75em;
overflow: hidden;
.txt-orange {
color: #eb6001;
}
......
function getLineOptions(obj) {
function getLineOptions (obj) {
const { tooltipFormatter } = obj
var lineOptions = {
tooltip: {
......@@ -9,7 +9,8 @@ function getLineOptions(obj) {
color: '#FFFFFF',
fontSize: '8px'
},
formatter: tooltipFormatter || ''
formatter: tooltipFormatter || '',
confine:true
},
grid: {
left: '3%',
......
......@@ -8,11 +8,23 @@
<template>
<div>
<div class="title">转化趋势</div>
<div v-show="hasData" style="width: 100%">
<div id="lineTrend" :style="{ height: height - 4.1 + 'vh' }"></div>
<div
v-show="hasData"
class="linetrend-box"
>
<div
id="lineTrend"
:style="{ height: height - 4.1 + 'vh' }"
></div>
</div>
<div v-show="!hasData" class="empty">
<img src="../../assets/images/empty.png" alt="" />
<div
v-show="!hasData"
class="empty"
>
<img
src="../../assets/images/empty.png"
alt=""
/>
</div>
</div>
</template>
......@@ -24,7 +36,7 @@ export default {
name: 'Trend',
props: ['height'],
mixins: [changeMixin],
data() {
data () {
return {
echartsTrend: {},
option: {},
......@@ -34,17 +46,17 @@ export default {
hasData: true
}
},
mounted() {
mounted () {
this.echartsTrend = echarts.init(document.getElementById('lineTrend'))
window.addEventListener('resize', () => {
this.echartsTrend.resize()
})
},
methods: {
init(val) {
init (val) {
this.getChartData(val)
},
getChartData(val) {
getChartData (val) {
var params = {
req: {
// queryItem: 'enter',
......@@ -86,13 +98,14 @@ export default {
this.hasData = false
})
},
draw(reportType) {
draw (reportType) {
this.option = {
tooltip: {
trigger: 'axis',
show: true,
borderWidth: 0,
backgroundColor: 'rgba(68,68,68,0.80)',
confine: true,
// position: (point, params, dom, rect, size) => {
// var x = 0 // x坐标位置
// var y = 0 // y坐标位置
......@@ -226,3 +239,9 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.linetrend-box {
width: 100%;
overflow: hidden;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!