zx-品牌对比-改动

prod
张雄 4 years ago
parent b450dcb3fc
commit a73aa61fb7

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue * @FilePath: /data-show/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue
--> -->
<template> <template>
<div class="bcm-outter"> <div class="bcm-outter" v-loading="load">
<v-label-div title="品牌传播TOP媒体"> </v-label-div> <v-label-div title="品牌传播TOP媒体"> </v-label-div>
<div class="bcm-inner"> <div class="bcm-inner">
<div class="bcm-item" v-for="(item, index) in arrList" :key="index"> <div class="bcm-item" v-for="(item, index) in arrList" :key="index">
@ -43,11 +43,12 @@ export default {
"#CC7733", "#CC7733",
"#CC5B41", "#CC5B41",
], ],
load: false,
form: { form: {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
arrList:[], arrList: [],
}; };
}, },
created() { created() {
@ -67,15 +68,18 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getSourceTopCount0528C(obj) getSourceTopCount0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
data.forEach(ele => { //
for(let index = 0 ; index<ele.value.length;index++){ data.forEach((ele) => {
for (let index = 0; index < ele.value.length; index++) {
ele.value[index].num = index + 1; ele.value[index].num = index + 1;
} }
}); });
this.arrList = data; this.arrList = data;
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -12,13 +12,13 @@
<div class="bec-inner"> <div class="bec-inner">
<v-echarts :opt="opt1"></v-echarts> <v-echarts :opt="opt1"></v-echarts>
</div> </div>
<v-label-div <!-- <v-label-div
title="事件上榜车型" title="事件上榜车型"
:showLine="false" :showLine="false"
:eStyle="{ 'border-style': 'none' }" :eStyle="{ 'border-style': 'none' }"
> >
</v-label-div> </v-label-div> -->
<div class="bec-one"> <!-- <div class="bec-one">
<div class="bec-one-item" v-for="(item, index) in list" :key="index"> <div class="bec-one-item" v-for="(item, index) in list" :key="index">
<span class="s1" :style="{ color: colors[index] }">{{ <span class="s1" :style="{ color: colors[index] }">{{
item.name item.name
@ -27,13 +27,13 @@
<v-echarts :opt="item.drawOpt"></v-echarts> <v-echarts :opt="item.drawOpt"></v-echarts>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
import { getSourcetypeC } from "@/api/BrandComparison/HotEvent.js"; import { getSourcetypeC } from "@/api/BrandComparison/HotEvent.js";
import { getContrastCount0528C } from "@/api/BrandComparison/HotEvent.js"; //import { getContrastCount0528C } from "@/api/BrandComparison/HotEvent.js";
import { createSideSingleColumn } from "@/utils/gol/sideSingleColumn"; import { createSideSingleColumn } from "@/utils/gol/sideSingleColumn";
import createOpt from "./opt"; import createOpt from "./opt";
export default { export default {
@ -148,19 +148,19 @@ export default {
}); });
}); });
}, },
getTypeData() { // getTypeData() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
getContrastCount0528C(obj) // getContrastCount0528C(obj)
.then((res) => { // .then((res) => {
let data = res.data || []; // let data = res.data || [];
resolve(data); // resolve(data);
}) // })
.catch(() => { // .catch(() => {
reject(false); // reject(false);
}); // });
}); // });
}, // },
}, },
}; };
</script> </script>

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/brandRearWingComparison/index.vue * @FilePath: /data-show/src/views/BrandComparison/brandRearWingComparison/index.vue
--> -->
<template> <template>
<div class="brw-outter"> <div class="brw-outter" v-loading="load">
<v-label-div title="尾翼趋势对比" :showLine="false" :eStyle="{'border-style': 'none'}"/> <v-label-div title="尾翼趋势对比" :showLine="false" :eStyle="{'border-style': 'none'}"/>
<div class="brw-inner"> <div class="brw-inner">
<v-echarts :opt="opt"></v-echarts> <v-echarts :opt="opt"></v-echarts>
@ -23,6 +23,7 @@ export default {
data() { data() {
return { return {
opt: {}, opt: {},
load: false,
form: { form: {
token: "", token: "",
sBrand: "" sBrand: ""
@ -45,6 +46,7 @@ export default {
}, },
getData() { getData() {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getCountTime0528C(obj) getCountTime0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -57,6 +59,7 @@ export default {
ds.push(value); ds.push(value);
}); });
this.opt = createOpt(dx, ds); this.opt = createOpt(dx, ds);
this.load = false;
}) })
}, },
}, },

@ -41,9 +41,9 @@ export default function createOpt(dx = [], ds = []) {
let data = createData(ds); let data = createData(ds);
return { return {
grid: { grid: {
left: 16, left: 10,
right: 26, right: '5%',
bottom: 16, bottom: 10,
top: 52, top: 52,
containLabel: true containLabel: true
}, },
@ -60,10 +60,13 @@ export default function createOpt(dx = [], ds = []) {
legend: { legend: {
icon: 'roundRect', icon: 'roundRect',
textStyle: { //图例文字的样式 textStyle: { //图例文字的样式
color: '#fff' color: '#fff',
fontSize: 10
}, },
y: 12, y: 12,
x: 16 x: 16,
itemWidth: 12,
itemHeight: 12
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/brandTonalDistribution/index.vue * @FilePath: /data-show/src/views/BrandComparison/brandTonalDistribution/index.vue
--> -->
<template> <template>
<div class="bd-outter"> <div class="bd-outter" v-loading="load">
<v-label-div title="品牌调性分布"> </v-label-div> <v-label-div title="品牌调性分布"> </v-label-div>
<div class="bd-d1"> <div class="bd-d1">
<div class="dd1" style="margin-left: 16px"> <div class="dd1" style="margin-left: 16px">
@ -49,6 +49,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
colors: ['#3373CC', '#63AECC', '#54BF93', '#CC9D12', '#CC7733', '#CC5B41'], colors: ['#3373CC', '#63AECC', '#54BF93', '#CC9D12', '#CC7733', '#CC5B41'],
list: [ list: [
@ -73,9 +74,11 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getAffectionsC(obj).then((res) => { getAffectionsC(obj).then((res) => {
let data = res.data || []; let data = res.data || [];
this.list = data; this.list = data;
this.load = false;
resolve(data) resolve(data)
}).catch(() => { }).catch(() => {
reject(false) reject(false)

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfForumPostingTrends/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfForumPostingTrends/index.vue
--> -->
<template> <template>
<div class="cop-outter"> <div class="cop-outter" v-loading="load">
<v-label-div <v-label-div
title="论坛发帖趋势对比" title="论坛发帖趋势对比"
:showLine="false" :showLine="false"
@ -30,6 +30,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
opt: {}, opt: {},
}; };
}, },
@ -49,6 +50,7 @@ export default {
}, },
getData() { getData() {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true,
getCountTime0528C(obj) getCountTime0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -61,6 +63,7 @@ export default {
ds.push(value); ds.push(value);
}); });
this.opt = createOpt(dx, ds); this.opt = createOpt(dx, ds);
this.load = false
}) })
}, },
}, },

@ -40,9 +40,9 @@ export default function createOpt(dx = [], ds = []) {
let data = createData(ds); let data = createData(ds);
return { return {
grid: { grid: {
left: 16, left: 10,
right: 26, right: '5%',
bottom: 16, bottom: 10,
top: 52, top: 52,
containLabel: true containLabel: true
}, },
@ -59,10 +59,13 @@ export default function createOpt(dx = [], ds = []) {
legend: { legend: {
icon: 'roundRect', icon: 'roundRect',
textStyle: { //图例文字的样式 textStyle: { //图例文字的样式
color: '#fff' color: '#fff',
fontSize: 10
}, },
y: 12, y: 12,
x: 16 x: 16,
itemWidth: 12,
itemHeight: 12
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue
--> -->
<template> <template>
<div class="cpt-outter"> <div class="cpt-outter" v-loading="load">
<v-label-div <v-label-div
title="论坛负面话题对比" title="论坛负面话题对比"
:showLine="false" :showLine="false"
@ -45,6 +45,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
showData: [], showData: [],
list: [ list: [
{ {
@ -115,6 +116,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getTopicPosAndTopicNeg0528C(obj) getTopicPosAndTopicNeg0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -134,6 +136,7 @@ export default {
sourceData.push(o); sourceData.push(o);
}); });
this.showData = sourceData; this.showData = sourceData;
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue
--> -->
<template> <template>
<div class="cpt-outter"> <div class="cpt-outter" v-loading="load">
<v-label-div <v-label-div
title="论坛正面话题对比" title="论坛正面话题对比"
:showLine="false" :showLine="false"
@ -45,6 +45,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
showData: [], showData: [],
}; };
}, },
@ -65,6 +66,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getTopicPosAndTopicNeg0528C(obj) getTopicPosAndTopicNeg0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -84,6 +86,7 @@ export default {
sourceData.push(o); sourceData.push(o);
}); });
this.showData = sourceData; this.showData = sourceData;
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfTheNumberOfWeiboInteractions/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfTheNumberOfWeiboInteractions/index.vue
--> -->
<template> <template>
<div class="cotn-outter"> <div class="cotn-outter" v-loading="load">
<v-label-div <v-label-div
title="微博互动人数对比" title="微博互动人数对比"
:showLine="false" :showLine="false"
@ -30,7 +30,8 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
opt: {} opt: {},
load: false,
}; };
}, },
created() { created() {
@ -50,6 +51,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getInteractCount0528C(obj) getInteractCount0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -60,6 +62,7 @@ export default {
ds.push(ele.value); ds.push(ele.value);
}); });
this.opt = createSingleColumnar(dx, ds); this.opt = createSingleColumnar(dx, ds);
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue
--> -->
<template> <template>
<div class="cowi-outter"> <div class="cowi-outter" v-loading="load">
<v-label-div <v-label-div
title="微博信息量对比" title="微博信息量对比"
:showLine="false" :showLine="false"
@ -30,6 +30,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
opt: {} opt: {}
}; };
}, },
@ -50,6 +51,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getContrastCount0528C(obj) getContrastCount0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -60,6 +62,7 @@ export default {
ds.push(ele.value) ds.push(ele.value)
}) })
this.opt = createSingleColumnar(dx,ds); this.opt = createSingleColumnar(dx,ds);
this.load = false
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/weiboTuneComparison/index.vue * @FilePath: /data-show/src/views/BrandComparison/weiboTuneComparison/index.vue
--> -->
<template> <template>
<div class="wtc-outter"> <div class="wtc-outter" v-loading="load">
<v-label-div <v-label-div
title="论坛调性对比" title="论坛调性对比"
:showLine="false" :showLine="false"
@ -54,6 +54,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
colors: [ colors: [
"#3373CC", "#3373CC",
"#63AECC", "#63AECC",
@ -82,10 +83,12 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getAffectionsC(obj) getAffectionsC(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
this.dataSource = data; this.dataSource = data;
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -91,20 +91,23 @@ export default function createOpt(dataList = [],dx = [], brandList = []) {
let info = createData(dataList,dx); let info = createData(dataList,dx);
return { return {
grid: { grid: {
top: "56px", left: 10,
left: "16px", right: '5%',
right: "28px", bottom: 10,
bottom: "16px", top: 52,
containLabel: true, containLabel: true,
}, },
color: colors, color: colors,
legend: { legend: {
data: brandList, data: brandList,
textStyle: { //图例文字的样式 textStyle: { //图例文字的样式
color: '#fff' color: '#fff',
fontSize: 10
}, },
y: 12, y: 12,
x: 16 x: 16,
itemWidth: 12,
itemHeight: 12
}, },
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/overallWordCloudComparison/index.vue * @FilePath: /data-show/src/views/BrandComparison/overallWordCloudComparison/index.vue
--> -->
<template> <template>
<div class="owcc-outter"> <div class="owcc-outter" v-loading="load">
<v-label-div title="整体词云对比"> </v-label-div> <v-label-div title="整体词云对比"> </v-label-div>
<div class="owcc-inner"> <div class="owcc-inner">
<div class="owcc-item" v-for="(item, index) in dataSource" :key="index"> <div class="owcc-item" v-for="(item, index) in dataSource" :key="index">
@ -42,6 +42,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
colors: [ colors: [
"#3373CC", "#3373CC",
"#63AECC", "#63AECC",
@ -70,6 +71,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getPositiveAndNegative0528C(obj) getPositiveAndNegative0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -85,7 +87,7 @@ export default {
arr.push(obj); arr.push(obj);
}) })
this.dataSource = arr; this.dataSource = arr;
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/summaryAndComparisonOfForumInformation/index.vue * @FilePath: /data-show/src/views/BrandComparison/summaryAndComparisonOfForumInformation/index.vue
--> -->
<template> <template>
<div class="saco-outter"> <div class="saco-outter" v-loading="load">
<v-label-div title="论坛信息概括对比" :showLine="false" :eStyle="{'border-style': 'none'}"/> <v-label-div title="论坛信息概括对比" :showLine="false" :eStyle="{'border-style': 'none'}"/>
<div class="saco-item" v-for="(item,index) in sourceData" :key="index"> <div class="saco-item" v-for="(item,index) in sourceData" :key="index">
<span class="s1">{{item.key}}</span> <span class="s1">{{item.key}}</span>
@ -53,6 +53,7 @@ export default {
token: "", token: "",
sBrand: "" sBrand: ""
}, },
load: false,
sourceData: [], sourceData: [],
} }
}, },
@ -73,9 +74,11 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getCount0528C(obj).then((res) => { getCount0528C(obj).then((res) => {
let data = res.data || []; let data = res.data || [];
this.sourceData = data; this.sourceData = data;
this.load = false;
resolve(data) resolve(data)
}).catch(() => { }).catch(() => {
reject(false) reject(false)

@ -8,7 +8,7 @@
--> -->
<template> <template>
<div class="ttm-outter"> <div class="ttm-outter" v-loading="load">
<v-label-div title="尾翼TOP媒体" :showLine="false" :eStyle="{'border-style': 'none'}" /> <v-label-div title="尾翼TOP媒体" :showLine="false" :eStyle="{'border-style': 'none'}" />
<div class="ttm-inner"> <div class="ttm-inner">
<div class="ttm-item" v-for="(item,index) in showData" :key="index"> <div class="ttm-item" v-for="(item,index) in showData" :key="index">
@ -35,7 +35,7 @@ export default {
}, },
colors: ['#3373CC', '#63AECC', '#54BF93', '#CC9D12', '#CC7733', '#CC5B41'], colors: ['#3373CC', '#63AECC', '#54BF93', '#CC9D12', '#CC7733', '#CC5B41'],
showData: [], showData: [],
load: false
}; };
}, },
created() { created() {
@ -55,6 +55,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getSourceTopCount0528C(obj).then((res) => { getSourceTopCount0528C(obj).then((res) => {
let data = res.data || []; let data = res.data || [];
let sourceData = []; let sourceData = [];
@ -74,7 +75,8 @@ export default {
index += 1; index += 1;
sourceData.push(o); sourceData.push(o);
this.showData = sourceData; this.showData = sourceData;
}) });
this.load = false;
resolve(data) resolve(data)
}).catch(() => { }).catch(() => {
reject(false) reject(false)

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue * @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue
--> -->
<template> <template>
<div class="wua-outter"> <div class="wua-outter" v-loading="load">
<v-label-div <v-label-div
title="用户区域分布" title="用户区域分布"
:showLine="false" :showLine="false"
@ -40,6 +40,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load:false,
dataSource: [], dataSource: [],
brandArr: [], brandArr: [],
}; };
@ -64,6 +65,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getRegionWeiBoC(obj) getRegionWeiBoC(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -94,6 +96,7 @@ export default {
}); });
this.dataSource = mapArr; this.dataSource = mapArr;
this.brandArr = brandList; this.brandArr = brandList;
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue * @FilePath: /data-show/src/views/BrandComparison/brandCommunicationTOPMedia/index.vue
--> -->
<template> <template>
<div class="bcm-outter"> <div class="bcm-outter" v-loading="load">
<v-label-div <v-label-div
title="微博内容方向对比" title="微博内容方向对比"
:showLine="false" :showLine="false"
@ -52,6 +52,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
sourceData: [], sourceData: [],
}; };
}, },
@ -72,6 +73,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getDirect0528C(obj) getDirect0528C(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
@ -92,6 +94,7 @@ export default {
} }
}); });
this.sourceData = showData; this.sourceData = showData;
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/weiboTuneComparison/index.vue * @FilePath: /data-show/src/views/BrandComparison/weiboTuneComparison/index.vue
--> -->
<template> <template>
<div class="wtc-outter"> <div class="wtc-outter" v-loading="load">
<v-label-div <v-label-div
title="微博调性对比" title="微博调性对比"
:showLine="false" :showLine="false"
@ -51,6 +51,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
colors: ["#3373CC","#63AECC","#54BF93","#CC9D12","#CC7733","#CC5B41"], colors: ["#3373CC","#63AECC","#54BF93","#CC9D12","#CC7733","#CC5B41"],
dataSource: [] dataSource: []
}; };
@ -76,10 +77,12 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getAffectionsC(obj) getAffectionsC(obj)
.then((res) => { .then((res) => {
let data = res.data || []; let data = res.data || [];
this.dataSource = data; this.dataSource = data;
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/weiboUserPortrait/index.vue * @FilePath: /data-show/src/views/BrandComparison/weiboUserPortrait/index.vue
--> -->
<template> <template>
<div class="wup-outter"> <div class="wup-outter" v-loading="load">
<v-label-div <v-label-div
title="微博用户画像" title="微博用户画像"
:showLine="false" :showLine="false"
@ -65,6 +65,7 @@ export default {
token: "", token: "",
sBrand: "", sBrand: "",
}, },
load: false,
opt1: {}, opt1: {},
opt2: {}, opt2: {},
sourceData: [], sourceData: [],
@ -114,6 +115,7 @@ export default {
getData() { getData() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true;
getSexMergeWeiBoC(obj) getSexMergeWeiBoC(obj)
.then((res) => { .then((res) => {
let data = res.data; let data = res.data;
@ -131,6 +133,7 @@ export default {
this.brandArr = brandList; this.brandArr = brandList;
this.sourceData = dataArr; this.sourceData = dataArr;
this.doVal(0); this.doVal(0);
this.load = false;
resolve(data); resolve(data);
}) })
.catch(() => { .catch(() => {

@ -43,8 +43,7 @@ export default function createOpt1(ds = [], color = []) {
label: { label: {
show: false, show: false,
position: 'center', position: 'center',
fontSize: '40', lineheight: 28,
color: "#ffff",
}, },
emphasis: { emphasis: {
label: { label: {
@ -52,9 +51,9 @@ export default function createOpt1(ds = [], color = []) {
fontSize: '22', fontSize: '22',
color: "#ffff", color: "#ffff",
fontWeight: 'bold', fontWeight: 'bold',
formatter: (p)=>{ formatter: function (p) {
return p.data.name + '\n' + p.percent + '%' + '\n' + p.data.value; return `${p.data.name}\n${p.percent}%\n${p.data.value}`
}, }
} }
}, },
labelLine: { labelLine: {

@ -52,9 +52,9 @@ export default function createOpt2(ds = [], color = []) {
fontSize: '22', fontSize: '22',
color: "#ffff", color: "#ffff",
fontWeight: 'bold', fontWeight: 'bold',
formatter: (p) => { formatter: function (p) {
return p.data.name + '\n' + p.percent + '%' + '\n' + p.data.value; return `${p.data.name}\n${p.percent}%\n${p.data.value}`
}, }
} }
}, },
labelLine: { labelLine: {

Loading…
Cancel
Save