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