Browse Source

图例样式修改

master
j1ack 3 years ago
parent
commit
e6337f3e7c
  1. 10
      src/App.vue
  2. BIN
      src/assets/img/brand/green.png
  3. BIN
      src/assets/img/brand/org.png
  4. 16
      src/components/companySummary/business.vue
  5. 12
      src/components/companySummary/talent.vue
  6. 2
      src/components/ringPie/index.vue
  7. 47
      src/components/scrollArc/index.vue
  8. 28
      src/components/szBar/index.vue
  9. 40
      src/router/index.js
  10. 6
      src/views/Brand.vue

10
src/App.vue

@ -11,6 +11,16 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.kong{
color: #fff;
font-size: .24rem;
padding-top: 1.36rem;
text-align: center;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
#app { #app {
width: 100%; width: 100%;
height: 100%; height: 100%;

BIN
src/assets/img/brand/green.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
src/assets/img/brand/org.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

16
src/components/companySummary/business.vue

@ -1,9 +1,3 @@
<!--
描述: 业务范围
作者: Jack Chen
日期: 2020-05-09
-->
<template> <template>
<div class="business-container"> <div class="business-container">
<div class="chart" id="chart_left1"></div> <div class="chart" id="chart_left1"></div>
@ -11,6 +5,7 @@
</template> </template>
<script> <script>
let sum=0
export default { export default {
props: { props: {
chartData: { chartData: {
@ -21,14 +16,13 @@ export default {
name: "business", name: "business",
data() { data() {
return { return {
} }
}, },
mounted() { mounted() {
setTimeout(() => { setTimeout(() => {
// console.log(this.chartData) // console.log(this.chartData)
this.getEchartLeft1(); this.getEchartLeft1();
}, 500); }, 1000);
}, },
methods: { methods: {
getEchartLeft1() { getEchartLeft1() {
@ -171,10 +165,10 @@ export default {
position: 'top', position: 'top',
show: true, show: true,
formatter: function (params) { formatter: function (params) {
// console.log(params) sum+=parseInt(params.value)
// return params.data.realValue; // return params.data.realValue;
var percent = Number((params.value / 100) * 100).toFixed(2) + '%'; var percent = Number((params.value / sum) * 100).toFixed(2) + '%';
return percent; return percent?percent:0;
}, },
color: '#fff', color: '#fff',
fontSize: 12, fontSize: 12,

12
src/components/companySummary/talent.vue

@ -1,8 +1,3 @@
<!--
描述: 人才队伍
作者: Jack Chen
日期: 2020-05-09
-->
<template> <template>
<div class="talent-container"> <div class="talent-container">
@ -43,7 +38,7 @@ export default {
name: "talent", name: "talent",
data() { data() {
return { return {
sum:0,
} }
}, },
created() { created() {
@ -53,17 +48,18 @@ export default {
setTimeout(() => { setTimeout(() => {
// console.log(this.chartData) // console.log(this.chartData)
this.getEchartLeft2(); this.getEchartLeft2();
}, 500); }, 800);
}, },
methods: { methods: {
GetPercent(num, total) { GetPercent(num, total) {
this.sum=this.chartData.alipayPayAmount+this.chartData.weixinPayAmount+this.chartData.casePayAmount+this.chartData.robotPayAmount+this.chartData.unionPayAmount
num = parseFloat(num); num = parseFloat(num);
total = parseFloat(total); total = parseFloat(total);
if (isNaN(num) || isNaN(total)) { if (isNaN(num) || isNaN(total)) {
return "-"; return "-";
} }
return total <= 0 ? "0%" : (Math.round(num / total * 100) / 100.00); return Math.round(Number((num / this.sum) * 100));
}, },
getEchartLeft2() { getEchartLeft2() {
let myChart = echarts.init(document.getElementById('chart_left2')); let myChart = echarts.init(document.getElementById('chart_left2'));

2
src/components/ringPie/index.vue

@ -52,7 +52,7 @@ export default {
this.dataRate=Math.round(this.dataRate*100) this.dataRate=Math.round(this.dataRate*100)
this.shenRate=100-this.dataRate this.shenRate=100-this.dataRate
this.getEchart(); this.getEchart();
}, 500); }, 800);
}, },
methods: { methods: {
getEchart() { getEchart() {

47
src/components/scrollArc/index.vue

@ -21,6 +21,9 @@
</template> </template>
<script> <script>
import img from '../../assets/img/brand/green.png'
import img2 from '../../assets/img/brand/org.png'
export default { export default {
props: { props: {
chartData: { chartData: {
@ -51,7 +54,7 @@ export default {
this.dataOut.push(this.chartData.outStatistics[i].num) this.dataOut.push(this.chartData.outStatistics[i].num)
} }
this.getEchart(); this.getEchart();
}, 500); }, 800);
}, },
methods: { methods: {
getEchart() { getEchart() {
@ -60,6 +63,7 @@ export default {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
showContent: true, showContent: true,
// extraCssText: 'width:150px;height:auto;background:linear-gradient(left,rgba(87,136,255,1),rgba(87,136,255,.8),rgba(87,136,255,.5));color:#fff',
axisPointer: { axisPointer: {
type: 'shadow', type: 'shadow',
shadowStyle: { shadowStyle: {
@ -74,11 +78,32 @@ export default {
}, },
}, },
legend: { legend: {
data: ['入场车流', '出场车流'], itemWidth: 30,
itemHeight: 30,
data:[
{
name:'入场车流',
textStyle:{
fontSize:12,
fontWeight:'bolder',
color:'#fff'
},
icon:`image://${img}`,
},
{
name:'出场车流',
textStyle:{ textStyle:{
fontSize: 14,// fontSize:12,
color: '#ffffff'// fontWeight:'bolder',
color:'#fff',
}, },
icon:`image://${img2}`,
}
],
// textStyle:{
// fontSize: 14,//
// color: '#ffffff'//
// },
}, },
color: ['#1BDB7F','#EF8C62'], color: ['#1BDB7F','#EF8C62'],
grid: { grid: {
@ -119,9 +144,10 @@ export default {
type: 'line', type: 'line',
data: this.dataIn, data: this.dataIn,
symbolSize: 10, symbolSize: 10,
itemStyle: { showSymbol: false,
opacity: 0, // itemStyle: {
}, // opacity: 0,
// },
emphasis: { emphasis: {
label: { label: {
show: true, show: true,
@ -154,9 +180,10 @@ export default {
type: 'line', type: 'line',
data: this.dataOut, data: this.dataOut,
symbolSize: 10, symbolSize: 10,
itemStyle: { showSymbol: false,
opacity: 0, // itemStyle: {
}, // opacity: 0,
// },
emphasis: { emphasis: {
label: { label: {
show: true, show: true,

28
src/components/szBar/index.vue

@ -43,7 +43,7 @@ export default {
this.yData1.push(this.chartData.inStatistics[i].num) this.yData1.push(this.chartData.inStatistics[i].num)
} }
this.getEchart(); this.getEchart();
}, 500); }, 800);
}, },
methods: { methods: {
getEchart() { getEchart() {
@ -163,19 +163,19 @@ export default {
} }
}, },
barWidth: barWidth, barWidth: barWidth,
markPoint: { // markPoint: {
symbol: 'circle', // symbol: 'circle',
itemStyle: { // itemStyle: {
normal: { // normal: {
color: '#43FFFF', // color: '#43FFFF',
shadowColor: '#43FFFF', // shadowColor: '#43FFFF',
shadowBlur: 20 // shadowBlur: 20
} // }
}, // },
symbolSize: [5, 5], // // symbolSize: [5, 5], //
symbolOffset: [0, 0], // // symbolOffset: [0, 0], //
data: dataCoord, // data: dataCoord,
}, // },
data: this.yData1 data: this.yData1
}, },

40
src/router/index.js

@ -12,26 +12,26 @@ const routes = [
title: '智慧云停车大数据平台' title: '智慧云停车大数据平台'
} }
}, },
{ // {
path: '/login', // path: '/login',
redirect: '/' // redirect: '/'
}, // },
{ // {
path: '/home', // path: '/home',
name: 'Home', // name: 'Home',
component: () => import('@/views/Home.vue'), // component: () => import('@/views/Home.vue'),
meta: { // meta: {
title: '酷屏首页统计图' // title: '酷屏首页统计图'
} // }
}, // },
{ // {
path: '/login', // path: '/login',
name: 'Login', // name: 'Login',
component: () => import('@/views/Login.vue'), // component: () => import('@/views/Login.vue'),
meta: { // meta: {
title: '登录界面' // title: '登录界面'
} // }
}, // },
{ {
path:'/404', path:'/404',
name:'404', name:'404',

6
src/views/Brand.vue

@ -22,7 +22,7 @@
</div> --> </div> -->
<div class="left-top"> <div class="left-top">
<div class="topBg">今日收费TOP5</div> <div class="topBg">今日收费TOP5</div>
<table class="table"> <table class="table" v-if="rankData[0]">
<thead class="thead"> <thead class="thead">
<td class="td">排行</td> <td class="td">排行</td>
<td class="td">停车场名称</td> <td class="td">停车场名称</td>
@ -39,7 +39,11 @@
<td class="td">{{ item.totalAmount }} </td> <td class="td">{{ item.totalAmount }} </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p v-else class="kong">
空空如也~
</p>
</div> </div>
<div class="left-top"> <div class="left-top">

Loading…
Cancel
Save