Commit 191ba880 by 胡悦

Merge branch 'v1.0.0' of http://192.168.3.233:8090/h5/glsk-data-view-pd into v1.0.0

2 parents 79c8946d 33c5b932
<template>
<div class="legend" :style="legendStyle">
<div class="legend-box" :style="legendStyle">
<div class="legend-item flex" v-for="(item, index) in dataList" :key="index">
<div v-for="(itm, inx) in legentList" :key="inx">
<template v-if="inx == 0">
......@@ -11,7 +11,7 @@
<template v-else>
<div class="flex item-content">
<div v-show="itm.hasIcon">{{ itm.hasIcon }}</div>
<div>{{ item[itm.name] }}</div>
<div>{{ itm.type == 'number' ? numAddSymbol(item[itm.name]) : item[itm.name] }}</div>
</div>
</template>
</div>
......@@ -55,7 +55,7 @@ export default {
</script>
<style lang="scss" scoped>
.legend {
.legend-box {
margin-left: 0.42vw;
.legend-item {
font-size: 12px;
......
......@@ -127,15 +127,6 @@ export default {
show: false
}
},
emphasis: {
label: {
show: true,
fontSize: this.size,
fontWeight: 'bold',
color: '#fff',
formatter: '{d}%'
}
},
data: [0]
},
{
......@@ -159,7 +150,7 @@ export default {
fontSize: this.size,
fontWeight: 'bold',
color: '#fff',
formatter: '{d}%'
formatter: '{b}'
}
},
labelLine: {
......@@ -174,12 +165,12 @@ export default {
this.mainValue = 0
this.numDesc = ''
this.echartsPie.setOption(this.option)
// this.pieActive()
// this.mTime = setInterval(this.pieActive, 15000)
// // 鼠标划出
this.pieActive()
this.mTime = setInterval(this.pieActive, 1500)
// 鼠标划出
// this.echartsPie.on('mouseout', () => {
// if (this.mTime) clearInterval(this.mTime)
// this.mTime = setInterval(this.pieActive, 15000)
// this.mTime = setInterval(this.pieActive, 1500)
// })
// this.echartsPie.on('mouseover', data => {
// this.mainValue = data.data.value
......@@ -200,7 +191,7 @@ export default {
highlightPie() {
// 取消所有高亮并高亮当前图形
// 遍历饼图数据,取消所有图形的高亮效果
for (var idx in this.option.series[1].data) {
for (var idx in this.option.series[0].data) {
this.echartsPie.dispatchAction({
type: 'downplay',
seriesIndex: 0,
......@@ -213,7 +204,7 @@ export default {
seriesIndex: 0,
dataIndex: this.currentIndex
})
this.descColor = this.option.color[this.currentIndex]
// this.descColor = this.option.color[this.currentIndex]
},
// 高亮
pieActive() {
......
......@@ -9,7 +9,7 @@
</div>
</template>
<template v-else>
<div class="ranking-box-item-right">{{ item[itm.name] }}</div>
<div class="ranking-box-item-right">{{ itm.type == 'number' ? numAddSymbol(item[itm.name]) : item[itm.name] }}</div>
</template>
</div>
</div>
......
......@@ -2,7 +2,7 @@
<div class="storage-box">
<box-title title="入库使用情况"></box-title>
<pie-chart-shadow :id="chart.id" :list="listData" :height="chart.height"></pie-chart-shadow>
<Legend class="legend" :list="listData" :legentList="legentList" :colors="legendColors"></Legend>
<Legend class="legend" :list="listData" :legentList="legentList"></Legend>
</div>
</template>
......
......@@ -51,7 +51,8 @@ export default {
},
{
name: 'price',
hasIcon: '¥'
hasIcon: '¥',
type: 'number'
}
],
progressLegendColors: ['#34AFFF', '#FFC200', '#16E193']
......
......@@ -71,11 +71,13 @@ export default {
},
{
name: 'price',
hasIcon: '¥'
hasIcon: '¥',
type: 'number'
},
{
name: 'averagePrice',
hasIcon: '均价¥'
hasIcon: '均价¥',
type: 'number'
}
],
propertionLegendColors: ['#16E193', '#747DFF', '#E588FF', '#34AFFF', '#FFC200', '#EB6001']
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!