|
@@ -45,7 +45,7 @@
|
|
|
label="栏目名称"
|
|
|
>
|
|
|
<template #default="scope">
|
|
|
- {{ scope.row.programName || '--' }}
|
|
|
+ {{ scope.row.programName || "--" }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" property="pinci">
|
|
@@ -108,7 +108,10 @@
|
|
|
// import config from "@/config/index";
|
|
|
import * as echarts from "echarts";
|
|
|
import comTable from "./table.vue";
|
|
|
-import { ProgramTypeDistribution } from "@/api/index.js";
|
|
|
+import {
|
|
|
+ ProgramTypeDistribution,
|
|
|
+ ProgramTypeDistributionChart,
|
|
|
+} from "@/api/index.js";
|
|
|
|
|
|
export default {
|
|
|
name: "AdvertisingEye_distribution",
|
|
@@ -157,15 +160,22 @@ export default {
|
|
|
filter: {},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- ProgramTypeDistribution({
|
|
|
- industryId: this.industry,
|
|
|
- dataType: this.industryRang + 1,
|
|
|
- type: this.soft_planting_list[this.soft_planting_act].type,
|
|
|
- }).then(all => {
|
|
|
- const li = (all || { data: [] }).data || [];
|
|
|
- this.tableList = li;
|
|
|
+ Promise.all([
|
|
|
+ ProgramTypeDistribution({
|
|
|
+ industryId: this.industry,
|
|
|
+ dataType: this.industryRang + 1,
|
|
|
+ type: this.soft_planting_list[this.soft_planting_act].type,
|
|
|
+ }),
|
|
|
+ ProgramTypeDistributionChart({
|
|
|
+ industryId: this.industry,
|
|
|
+ dataType: this.industryRang + 1,
|
|
|
+ type: this.soft_planting_list[this.soft_planting_act].type,
|
|
|
+ }),
|
|
|
+ ]).then(all => {
|
|
|
+ const li = (all[0] || { data: [] }).data || [];
|
|
|
+ this.tableList = all[1].data || [];
|
|
|
li.length && (this.titleName = li[0].name || "");
|
|
|
- this.softAdChart(li || []);
|
|
|
+ this.softAdChart(li);
|
|
|
});
|
|
|
},
|
|
|
soft_planting_change(i) {
|
|
@@ -238,9 +248,9 @@ export default {
|
|
|
},
|
|
|
numFor(num) {
|
|
|
if (isNaN(num)) return 0;
|
|
|
- if (num >= 100000000) return (num / 100000000).toFixed(2) + "亿";
|
|
|
- if (num >= 10000) return (num / 10000).toFixed(2) + "万";
|
|
|
- return Number(num).toFixed(2);
|
|
|
+ if (num >= 100000000) return (num / 100000000).toFixed(2) - 0 + "亿";
|
|
|
+ if (num >= 10000) return (num / 10000).toFixed(2) - 0 + "万";
|
|
|
+ return Number(num).toFixed(2) - 0;
|
|
|
},
|
|
|
},
|
|
|
beforeUnmount: function() {
|