|
@@ -104,7 +104,6 @@
|
|
<script>
|
|
<script>
|
|
// @ is an alias to /src
|
|
// @ is an alias to /src
|
|
import { defaultAjax } from "@/api/index";
|
|
import { defaultAjax } from "@/api/index";
|
|
-
|
|
|
|
import * as echarts from "echarts/core";
|
|
import * as echarts from "echarts/core";
|
|
import { PieChart, MapChart } from "echarts/charts";
|
|
import { PieChart, MapChart } from "echarts/charts";
|
|
import {
|
|
import {
|
|
@@ -168,7 +167,12 @@ export default {
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
formateNum(n) {
|
|
formateNum(n) {
|
|
- return (n + "").replace(/\B(?=(?:\d{3})+\b)/g, ",");
|
|
|
|
|
|
+ let num = n;
|
|
|
|
+ if (isNaN(n)) num = "0";
|
|
|
|
+ else if (n >= 100000000) num = ((n / 100000000).toFixed(2) - 0 + "").replace(/\B(?=(?:\d{3})+\b)/g, ",") + "亿";
|
|
|
|
+ else if (n >= 10000) num = ((n / 10000).toFixed(2) - 0 + "").replace(/\B(?=(?:\d{3})+\b)/g, ",") + "万";
|
|
|
|
+ else num = (num + "").replace(/\B(?=(?:\d{3})+\b)/g, ",");
|
|
|
|
+ return num;
|
|
},
|
|
},
|
|
pieChartFun() {
|
|
pieChartFun() {
|
|
const li = this.data.platform.map(v => {
|
|
const li = this.data.platform.map(v => {
|
|
@@ -301,19 +305,19 @@ export default {
|
|
var option = {
|
|
var option = {
|
|
tooltip: {
|
|
tooltip: {
|
|
trigger: "item",
|
|
trigger: "item",
|
|
- formatter: "{b}: {c} ({d}%)",
|
|
|
|
- rich: {
|
|
|
|
- b: {
|
|
|
|
- color: "#4C5058",
|
|
|
|
- fontSize: 14,
|
|
|
|
- fontWeight: "bold",
|
|
|
|
- lineHeight: 33,
|
|
|
|
- },
|
|
|
|
- per: {
|
|
|
|
- color: "#000",
|
|
|
|
- fontSize: 14,
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ formatter: "{b}: {c} ({d}%)",
|
|
|
|
+ rich: {
|
|
|
|
+ b: {
|
|
|
|
+ color: "#4C5058",
|
|
|
|
+ fontSize: 14,
|
|
|
|
+ fontWeight: "bold",
|
|
|
|
+ lineHeight: 33,
|
|
|
|
+ },
|
|
|
|
+ per: {
|
|
|
|
+ color: "#000",
|
|
|
|
+ fontSize: 14,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
},
|
|
},
|
|
legend: {
|
|
legend: {
|
|
show: false,
|
|
show: false,
|
|
@@ -340,7 +344,7 @@ export default {
|
|
},
|
|
},
|
|
labelLine: {
|
|
labelLine: {
|
|
length: 1,
|
|
length: 1,
|
|
- length2: 0
|
|
|
|
|
|
+ length2: 0,
|
|
},
|
|
},
|
|
data: feelingList,
|
|
data: feelingList,
|
|
},
|
|
},
|