zx-品牌对比-改动

prod
张雄 3 years ago
parent b450dcb3fc
commit a73aa61fb7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -11,8 +11,8 @@ function createData(ds = [], colors) {
let arr = [];
ds.map((ele, index) => {
let obj = {
value: ele.value,
name: ele.key,
value: ele.value,
name: ele.key,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 1, 1, 0, [{
//给颜色设置渐变色 前面4个参数给第一个设置1第四个设置0 ,就是水平渐变
@ -32,52 +32,51 @@ function createData(ds = [], colors) {
import * as echarts from "echarts";
export default function createOpt1(ds = [], color = []) {
const data = createData(ds, color);
return {
series: [
{
name: 'Access From0',
type: 'pie',
radius: ['63%', '77%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center',
fontSize: '40',
color: "#ffff",
},
emphasis: {
label: {
show: true,
fontSize: '22',
color: "#ffff",
fontWeight: 'bold',
formatter: (p)=>{
return p.data.name + '\n' + p.percent + '%' + '\n' + p.data.value;
},
}
},
labelLine: {
show: false
},
data: data,
},
{
name: 'Access From1',
type: 'pie',
radius: ['80%', '84%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
center: ['50%', '50%'],//边框位置
data: data,
}
]
}
const data = createData(ds, color);
return {
series: [
{
name: 'Access From0',
type: 'pie',
radius: ['63%', '77%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center',
lineheight: 28,
},
emphasis: {
label: {
show: true,
fontSize: '22',
color: "#ffff",
fontWeight: 'bold',
formatter: function (p) {
return `${p.data.name}\n${p.percent}%\n${p.data.value}`
}
}
},
labelLine: {
show: false
},
data: data,
},
{
name: 'Access From1',
type: 'pie',
radius: ['80%', '84%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
center: ['50%', '50%'],//边框位置
data: data,
}
]
}
}

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

Loading…
Cancel
Save