parent
d9966f538b
commit
fdbfc5b0ee
@ -0,0 +1,69 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-13 14:14:49
|
||||
* @LastEditTime: 2021-11-08 18:17:36
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/EventDetails/distributionOfHotEventChannels/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="doe-outter">
|
||||
<div class="doe-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getEventsSourceTypeByEventsType0528} from '@/api/EventDetails'
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "MEDDistributionOfHotEventChannels",
|
||||
data() {
|
||||
return {
|
||||
opt: {},
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || '奥迪';
|
||||
this.getDdta();
|
||||
},
|
||||
methods:{
|
||||
// 获取后台数据
|
||||
getDdta(){
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getEventsSourceTypeByEventsType0528(obj).then(res => {
|
||||
let data = res.data || [];
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
let key = ele.key;
|
||||
let value = ele.value;
|
||||
dx.push(key);
|
||||
ds.push(value);
|
||||
})
|
||||
this.opt = createOpt(dx, ds);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.doe-outter {
|
||||
width: 100%;
|
||||
height: 344px;
|
||||
margin-left: 16px;
|
||||
.doe-inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,183 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-13 11:31:08
|
||||
* @LastEditTime: 2021-11-08 18:15:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/EventDetails/eventCorrelation/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="ec-outter">
|
||||
<div class="ec-top" align="center">
|
||||
<v-btn @click="goback">返回品牌洞察</v-btn>
|
||||
</div>
|
||||
<div class="ec-inner">
|
||||
<span class="ec-label">{{model}}</span>
|
||||
<div class="ec-footer">
|
||||
<img class="m1" src="../../../assets/images/BrandInsight/ic_glsl.png" />
|
||||
<a-popover title="事件关联数量">
|
||||
<template slot="content">
|
||||
<div class="pd-item" v-for="(item,index) in list" :key="index">
|
||||
<span>{{item.key}}</span>
|
||||
<span>{{item.value}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="d1">
|
||||
<span class="s1">{{zolNum|formatMoney(0,'',',')}}</span>
|
||||
<span class="s2">事件关联数量(条)</span>
|
||||
</div>
|
||||
</a-popover>
|
||||
</div>
|
||||
<div class="ec-footer-1">
|
||||
<img class="m1" src="../../../assets/images/ModelInsight/ic_ppzb.png" />
|
||||
<a-popover title="事件关联数量">
|
||||
<template slot="content">
|
||||
<div class="pd-item" v-for="(item,index) in list" :key="index">
|
||||
<span>{{item.key}}</span>
|
||||
<span>{{item.value}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="d1">
|
||||
<span class="s1">{{zolNum|formatMoney(0,'',',')}}</span>
|
||||
<span class="s2">品牌传播占比</span>
|
||||
</div>
|
||||
</a-popover>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getBrandOverviewCount0528 } from "@/api/EventDetails";
|
||||
export default {
|
||||
name: "MEDEventCorrelation",
|
||||
data() {
|
||||
return {
|
||||
brand: "",
|
||||
model: "",
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
zolNum: 0,
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.brand = this.getBrand.brandname || "奥迪";
|
||||
this.model = this.getModel.name
|
||||
this.getDdta();
|
||||
},
|
||||
methods: {
|
||||
getDdta() {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getBrandOverviewCount0528(obj).then((res) => {
|
||||
let data = res.data;
|
||||
this.zolNum = data.count;
|
||||
this.list = data.data;
|
||||
});
|
||||
},
|
||||
goback() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.ec-outter {
|
||||
display: flex;
|
||||
width: 620px;
|
||||
height: 560px;
|
||||
justify-content: center;
|
||||
margin-left: 16px;
|
||||
.ec-top {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
.ec-inner {
|
||||
position: relative;
|
||||
width: 600px;
|
||||
height: 520px;
|
||||
margin-top: 38px;
|
||||
background-image: url("../../../assets/images/BrandInsight/img_tz.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
background-position-x: 50%;
|
||||
.ec-label {
|
||||
text-align: center;
|
||||
display: block;
|
||||
font-size: 40px;
|
||||
color: #b2daf7;
|
||||
margin-top: 110px;
|
||||
}
|
||||
.ec-footer {
|
||||
position: absolute;
|
||||
width: auto;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
bottom: 16px;
|
||||
left: 0px;
|
||||
.m1 {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
.d1 {
|
||||
margin-left: 20px;
|
||||
.s1 {
|
||||
display: block;
|
||||
font-family: Bebas;
|
||||
font-size: 38px;
|
||||
color: #fff;
|
||||
}
|
||||
.s2 {
|
||||
display: block;
|
||||
font-size: 22px;
|
||||
color: #afb2b7;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ec-footer-1 {
|
||||
position: absolute;
|
||||
width: auto;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
bottom: 16px;
|
||||
right: 0px;
|
||||
.m1 {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
.d1 {
|
||||
margin-left: 20px;
|
||||
.s1 {
|
||||
display: block;
|
||||
font-family: Bebas;
|
||||
font-size: 38px;
|
||||
color: #fff;
|
||||
}
|
||||
.s2 {
|
||||
display: block;
|
||||
font-size: 22px;
|
||||
color: #afb2b7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.pd-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #fff;
|
||||
border-bottom: 1px solid #173b6d;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-13 08:59:57
|
||||
* @LastEditTime: 2021-11-08 17:53:28
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 热点事件传播导向
|
||||
* @FilePath: /data-show/src/views/EventDetails/hotEventPropagationOriented/index.vue
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="hepo-outter">
|
||||
<v-label-div title="热点事件传播导向" />
|
||||
<div class="hepo-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getPropagationDirection0528} from '@/api/EventDetails'
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "MEDHotEventPropagationOriented",
|
||||
props: ["brand"],
|
||||
data() {
|
||||
return {
|
||||
opt: createOpt(),
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || '奥迪';
|
||||
this.getDdta();
|
||||
},
|
||||
methods:{
|
||||
// 获取后台数据
|
||||
getDdta() {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getPropagationDirection0528(obj).then(res => {
|
||||
let data = res.data;
|
||||
let population = data.links;
|
||||
let citylist = data.data;
|
||||
this.opt = createOpt(citylist, population)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.hepo-outter {
|
||||
width: 620px;
|
||||
height: 560px;
|
||||
border: 2px solid #0F2A4D;
|
||||
.hepo-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,98 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-13 09:09:51
|
||||
* @LastEditTime: 2021-10-27 17:32:39
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/EventDetails/hotEventPropagationOriented/opt.js
|
||||
*/
|
||||
// const citylist = [
|
||||
// {name: '领导人'},
|
||||
// {name: '自然'},
|
||||
// {name: '明星代言人'},
|
||||
// {name: '车展'},
|
||||
// {name: '新车上市'},
|
||||
// {name: '新闻'},
|
||||
// {name: '论坛'},
|
||||
// {name: '微博'},
|
||||
// {name: 'APP'},
|
||||
// {name: '短视频'},
|
||||
// {name: '吉利'},
|
||||
// {name: '奔驰'},
|
||||
// {name: '宝马'},
|
||||
// {name: '特斯拉'},
|
||||
// {name: '奥迪'},
|
||||
// {name: '女车主表态'},
|
||||
// {name: '广州车展'},
|
||||
// {name: '销量大增'},
|
||||
// ];
|
||||
// const population=[
|
||||
// {source: "领导人", target: "APP", value: 2000},
|
||||
// {source: "APP", target: "宝马", value: 3000},
|
||||
// //
|
||||
// {source: "明星代言人", target: "论坛", value: 1000},
|
||||
// //
|
||||
// {source: "自然", target: "论坛", value: 2100},
|
||||
// {source: "论坛", target: "宝马", value: 3100},
|
||||
// {source: "宝马", target: "广州车展", value: 5100},
|
||||
// //
|
||||
// {source: "自然", target: "新闻", value: 3234},
|
||||
// {source: "新闻", target: "吉利", value: 3000},
|
||||
// {source: "吉利", target: "销量大增", value: 6000},
|
||||
// //
|
||||
// {source: "车展", target: "微博", value: 1234},
|
||||
// {source: "微博", target: "特斯拉", value: 3234},
|
||||
// {source: "特斯拉", target: "销量大增", value: 4234},
|
||||
// //
|
||||
// {source: "新车上市", target: "APP", value: 1234},
|
||||
// {source: "APP", target: "宝马", value: 1234},
|
||||
// //
|
||||
// {source: "新车上市", target: "短视频", value: 2234},
|
||||
// {source: "短视频", target: "奔驰", value: 2234},
|
||||
// {source: "奔驰", target: "广州车展", value: 2234},
|
||||
// //
|
||||
// {source: "APP", target: "奥迪", value: 2234},
|
||||
// {source: "奥迪", target: "销量大增", value: 2234},
|
||||
// //
|
||||
// {source: "奔驰", target: "女车主表态", value: 5234},
|
||||
// ];
|
||||
export default function createOpt(citylist=[],population=[]) {
|
||||
return {
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
triggerOn: 'mousemove',
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'sankey',
|
||||
data: citylist,
|
||||
links: population,
|
||||
focusNodeAdjacency: 'allEdges', //鼠标悬停到节点或边上,相邻接的节点和边高亮显示
|
||||
left: 16,
|
||||
right: 120,
|
||||
top: 16,
|
||||
bottom: 16,
|
||||
itemStyle: {
|
||||
borderWidth: 1,
|
||||
},
|
||||
lineStyle: {
|
||||
color: 'target',
|
||||
curveness: 0.5,
|
||||
opacity:0.5
|
||||
},
|
||||
label: {
|
||||
color: "#fff",
|
||||
fontWeight: 'bold',
|
||||
fontSize: 10
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-13 11:54:38
|
||||
* @LastEditTime: 2021-11-08 17:52:40
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/EventDetails/hotOther/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="ho-outter">
|
||||
<v-label-div title="热点事件传播导向" />
|
||||
<div class="ho-bd">
|
||||
<dv-scroll-board :config="config" :style="{ width: '100%', height: '27rem' }" />
|
||||
</div>
|
||||
<div class="ho-footer">
|
||||
<span class="ho-f-s1">共 <span style="color: #2c66b5;">{{total}}</span> 条</span>
|
||||
<a-pagination v-model="form.iPageIndex" :total="total" show-less-items @change="handlerPagnation"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHotEventsList } from "@/api/EventDetails";
|
||||
export default {
|
||||
name: "MEDHotOther",
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
form: {
|
||||
token: "",
|
||||
ssBrand: "",
|
||||
iPageIndex: 1,
|
||||
iPageSize: 20,
|
||||
},
|
||||
total: 0,
|
||||
config: {
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || "奥迪";
|
||||
this.getDdta();
|
||||
},
|
||||
methods: {
|
||||
// 获取后台数据
|
||||
getDdta() {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getHotEventsList(obj).then((res) => {
|
||||
let data = res.data || [];
|
||||
let totalNum = res.totalNum || 0;
|
||||
this.total = totalNum;
|
||||
let arr = [];
|
||||
data.forEach((ele) => {
|
||||
let a = [
|
||||
ele.events_title,
|
||||
ele.events_influence,
|
||||
ele.maxSourcetime,
|
||||
ele.events_brand,
|
||||
];
|
||||
arr.push(a);
|
||||
});
|
||||
this.config = {
|
||||
headerBGC: "#0c203b",
|
||||
oddRowBGC: "#173b6d",
|
||||
evenRowBGC: "rgba(69, 149, 244, 0)",
|
||||
rowNum: 10,
|
||||
columnWidth: [170,60,160],
|
||||
header: ["事件列表", "影响力", "时间", "关联品牌"],
|
||||
data: arr,
|
||||
};
|
||||
});
|
||||
},
|
||||
// 分页处理
|
||||
handlerPagnation(page) {
|
||||
this.form.iPageIndex = page;
|
||||
this.getDdta()
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.ho-outter {
|
||||
position: relative;
|
||||
width: 620px;
|
||||
height: 560px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.ho-bd {
|
||||
margin-top: 16px;
|
||||
padding: 0px 16px;
|
||||
width: 100%;
|
||||
height: calc(100% - 120px);
|
||||
}
|
||||
.ho-footer {
|
||||
position: absolute;
|
||||
padding: 0px 16px;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
left: 0px;
|
||||
bottom: 14px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.ho-f-s1 {
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,72 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-13 08:53:49
|
||||
* @LastEditTime: 2021-11-08 18:19:28
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 事件详情
|
||||
* @FilePath: /data-show/src/views/EventDetails/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="d-container">
|
||||
<div class="ed-d1">
|
||||
<MEDHotEventPropagationOriented></MEDHotEventPropagationOriented>
|
||||
<MEDEventCorrelation></MEDEventCorrelation>
|
||||
<MEDHotOther></MEDHotOther>
|
||||
</div>
|
||||
<div class="ed-d2">
|
||||
<div class="ed-d2-inner">
|
||||
<v-label-div title="热点事件渠道分布"/>
|
||||
<div class="ed-d2-bd">
|
||||
<MEDDistributionOfHotEventChannels></MEDDistributionOfHotEventChannels>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MEDHotEventPropagationOriented from "./MEDHotEventPropagationOriented"
|
||||
import MEDEventCorrelation from "./MEDEventCorrelation"
|
||||
import MEDHotOther from "./MEDHotOther"
|
||||
import MEDDistributionOfHotEventChannels from "./MEDDistributionOfHotEventChannels"
|
||||
export default {
|
||||
name: "ModelEventDetails",
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
MEDHotEventPropagationOriented, // 热点事件传播导向桑基图
|
||||
MEDEventCorrelation, // 中间
|
||||
MEDHotOther, // 热点事件传播导向列表
|
||||
MEDDistributionOfHotEventChannels // 热点事件渠道分布
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.ed-d1 {
|
||||
display: flex;
|
||||
padding: 0px 16px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.ed-d2 {
|
||||
padding: 0px 16px;
|
||||
height: 392px;
|
||||
margin-top: 16px;
|
||||
.ed-d2-inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 2px solid #0F2A4D;
|
||||
.ed-d2-bd {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,180 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 18:42:40
|
||||
* @LastEditTime: 2021-11-08 18:25:18
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/modelPopularity/index.vue
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="mp-outter">
|
||||
<v-label-div title="车型热度">
|
||||
<div>
|
||||
<v-tab-group
|
||||
:btns="['热门', '热赞', '热议', '热转']"
|
||||
@change="handlerTab"
|
||||
></v-tab-group>
|
||||
</div>
|
||||
</v-label-div>
|
||||
<div class="mp-inner">
|
||||
<v-ranking-mpth
|
||||
v-for="(item, index) in labelArr"
|
||||
:key="index"
|
||||
:num="index + 1"
|
||||
:label="item.key"
|
||||
:val="item.value"
|
||||
></v-ranking-mpth>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCartypeWeiBo0528 } from "@/api/WeiboDetails/index.js";
|
||||
import { getTopCarseriesObj } from "@/api/WeiboDetails/index.js";
|
||||
import vRankingMpth from "./v-ranking-mpth";
|
||||
export default {
|
||||
name: "MWDmodelPopularity",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
iType: "",
|
||||
},
|
||||
labelArr: [],
|
||||
hotSeries: [],
|
||||
hotTypes: [],
|
||||
hotComs: [],
|
||||
hotTrans: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
vRankingMpth,
|
||||
},
|
||||
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.getData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
getData() {
|
||||
Promise.all([
|
||||
this.getHotSeries(),
|
||||
this.getHotTypes(),
|
||||
this.getHotComs(),
|
||||
this.getHotTrans(),
|
||||
]).then(() => {
|
||||
// 什么也不执行
|
||||
this.handlerTab(0);
|
||||
});
|
||||
},
|
||||
//热门
|
||||
getHotSeries() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.form.iType = "";
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getCartypeWeiBo0528(obj)
|
||||
.then((res) => {
|
||||
let data = res.data || {};
|
||||
this.hotSeries = this.toArr(data);
|
||||
resolve(res);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
//热赞
|
||||
getHotTypes() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.form.iType = 1; //改变参数写在里面
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getTopCarseriesObj(obj)
|
||||
.then((res) => {
|
||||
this.hotTypes = res.data;
|
||||
resolve(res);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
//热议
|
||||
getHotComs() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.form.iType = 2;
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getTopCarseriesObj(obj)
|
||||
.then((res) => {
|
||||
this.hotComs = res.data;
|
||||
resolve(res);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
//热转
|
||||
getHotTrans() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.form.iType = 3;
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getTopCarseriesObj(obj)
|
||||
.then((res) => {
|
||||
this.hotTrans = res.data;
|
||||
resolve(res);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 将对象变成数组
|
||||
toArr(obj) {
|
||||
let arr = [];
|
||||
for (let key in obj) {
|
||||
let o = {
|
||||
key: key,
|
||||
value: obj[key],
|
||||
};
|
||||
arr.push(o);
|
||||
}
|
||||
return arr;
|
||||
},
|
||||
// 切换数据
|
||||
handlerTab(n) {
|
||||
switch (n) {
|
||||
case 0:
|
||||
this.labelArr = this.hotSeries;
|
||||
break;
|
||||
case 1:
|
||||
this.labelArr = this.hotTypes;
|
||||
break;
|
||||
case 2:
|
||||
this.labelArr = this.hotComs;
|
||||
break;
|
||||
case 3:
|
||||
this.labelArr = this.hotTrans;
|
||||
break;
|
||||
default:
|
||||
this.labelArr = this.hotSeries;
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.mp-outter {
|
||||
width: 460px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.mp-inner {
|
||||
padding: 0px 16px 16px 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,230 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-08 16:44:08
|
||||
* @LastEditTime: 2021-10-14 19:01:34
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/components/v-ranking/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="v-r-container">
|
||||
<div class="v-r-line" v-if="lineShow"></div>
|
||||
<div class="v-r-inner">
|
||||
<div :class="ls">
|
||||
<span class="s1">{{ num|numStr }}</span>
|
||||
</div>
|
||||
<div :class="rs">
|
||||
<span class="v-r-label">{{label}}</span>
|
||||
<div class="v-r-res">
|
||||
<span class="s1">传播量</span>
|
||||
<span class="s2">{{val}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "v-ranking-fhtd",
|
||||
props: {
|
||||
num: {
|
||||
type: [String, Number],
|
||||
default: 1,
|
||||
},
|
||||
val: {
|
||||
type: [String, Number],
|
||||
default: 0
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
lineShow: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
|
||||
},
|
||||
watch: {
|
||||
num: {
|
||||
handler(val) {
|
||||
if(val == 1) {
|
||||
this.ls = "v-r-left-1"
|
||||
this.rs = "v-r-right-1"
|
||||
} else if(val == 2) {
|
||||
this.ls = "v-r-left-2"
|
||||
this.rs = "v-r-right-2"
|
||||
} else if(val == 3) {
|
||||
this.ls = "v-r-left-3"
|
||||
this.rs = "v-r-right-3"
|
||||
} else {
|
||||
this.ls = "v-r-left"
|
||||
this.rs = "v-r-right"
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ls: "v-r-left",
|
||||
rs: "v-r-right"
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
numStr(val) {
|
||||
let str = ""
|
||||
if(0<val && val<10) {
|
||||
str = '0' + val
|
||||
} else {
|
||||
str = val + ''
|
||||
}
|
||||
return str
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.v-r-container {
|
||||
width: 428px;
|
||||
height: auto;
|
||||
.v-r-line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background:#0a1d3b;
|
||||
margin-top: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.v-r-inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
margin-top: 16px;
|
||||
color: #fff;
|
||||
background: #0a1d3b;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.v-r-label {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
margin-left: 40px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.v-r-res {
|
||||
margin-right: 16px;
|
||||
span {
|
||||
display: block;
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
}
|
||||
.s1 {
|
||||
color: #9ba4af;
|
||||
}
|
||||
.s2 {
|
||||
color: #fff;
|
||||
font-family: Bebas;
|
||||
}
|
||||
}
|
||||
.v-r-left {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
text-align: center;
|
||||
line-height: 48px;
|
||||
.s1 {
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
line-height: 48px;
|
||||
font-family: Bebas;
|
||||
}
|
||||
}
|
||||
.v-r-right {
|
||||
position: absolute;
|
||||
width: 402px;
|
||||
height: 48px;
|
||||
border-top: 2px solid transparent;
|
||||
top: 0px;
|
||||
left: 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.v-r-left-1 {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
text-align: center;
|
||||
border: 2px solid #cc9d12;
|
||||
border-radius: 48px;
|
||||
.s1 {
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
line-height: 42px;
|
||||
text-shadow: 0px 0px 8px #cc9d12;
|
||||
font-family: Bebas;
|
||||
}
|
||||
}
|
||||
.v-r-right-1 {
|
||||
position: absolute;
|
||||
width: 402px;
|
||||
height: 48px;
|
||||
border-top: 2px solid #CC9D12;
|
||||
top: 0px;
|
||||
left: 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.v-r-left-2 {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
text-align: center;
|
||||
border: 2px solid #3373CC;
|
||||
border-radius: 48px;
|
||||
.s1 {
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
line-height: 42px;
|
||||
text-shadow: 0px 0px 8px #3373CC;
|
||||
font-family: Bebas;
|
||||
}
|
||||
}
|
||||
.v-r-right-2 {
|
||||
position: absolute;
|
||||
width: 402px;
|
||||
height: 48px;
|
||||
border-top: 2px solid #3373CC;
|
||||
top: 0px;
|
||||
left: 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.v-r-left-3 {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
text-align: center;
|
||||
border: 2px solid #54BF93;
|
||||
border-radius: 48px;
|
||||
.s1 {
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
line-height: 42px;
|
||||
text-shadow: 0px 0px 8px #54BF93;
|
||||
font-family: Bebas;
|
||||
}
|
||||
}
|
||||
.v-r-right-3 {
|
||||
position: absolute;
|
||||
width: 402px;
|
||||
height: 48px;
|
||||
border-top: 2px solid #54BF93;
|
||||
top: 0px;
|
||||
left: 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,169 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:48:56
|
||||
* @LastEditTime: 2021-11-08 18:29:34
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCharacters/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wc-outter">
|
||||
<v-label-div title="微博人物画像">
|
||||
<div>
|
||||
<v-tab-group
|
||||
:btns="['性别', '认证', '分类']"
|
||||
@change="handlerTab"
|
||||
></v-tab-group>
|
||||
</div>
|
||||
</v-label-div>
|
||||
<div class="wc-inner">
|
||||
<div class="d1">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
<div class="d2">
|
||||
<vue-scroll>
|
||||
<v-label-ctx
|
||||
v-for="(item, index) in labelArr"
|
||||
:key="index"
|
||||
:label="item.key"
|
||||
:cont="item.value"
|
||||
:percentage="((item.value / total) * 100).toFixed(2) + '%'"
|
||||
:color="colors[index]"
|
||||
:eStyle="{ height: '8.54rem' }"
|
||||
></v-label-ctx>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSexMergeWeiBo } from "@/api/WeiboDetails";
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "MWDweiboCharacters",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
RegionWeiBo: [],
|
||||
attestation: [],
|
||||
sex: [],
|
||||
total: 0,
|
||||
labelArr: [],
|
||||
|
||||
opt: createOpt(),
|
||||
colors: [
|
||||
"#54BF93",
|
||||
"#3373CC",
|
||||
"#CC9D12",
|
||||
"#f15c80",
|
||||
"#e4d354",
|
||||
"#8085e8",
|
||||
"#8d4653",
|
||||
"#91e8e1",
|
||||
"#f7a35c",
|
||||
"#90ed7d",
|
||||
"#54BF93",
|
||||
"#3373CC",
|
||||
"#CC9D12",
|
||||
"#f15c80",
|
||||
"#e4d354",
|
||||
"#8085e8",
|
||||
"#8d4653",
|
||||
"#91e8e1",
|
||||
"#f7a35c",
|
||||
"#90ed7d",
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 获取后台数据
|
||||
getData() {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getSexMergeWeiBo(obj).then((res) => {
|
||||
let data = res.data || {};
|
||||
let RegionWeiBo = data.RegionWeiBo;
|
||||
let attestation = data.attestation;
|
||||
let sex = data.sex;
|
||||
this.RegionWeiBo = this.toArr(RegionWeiBo);
|
||||
this.attestation = this.toArr(attestation);
|
||||
this.sex = this.toArr(sex);
|
||||
this.doVal(this.sex);
|
||||
});
|
||||
},
|
||||
// 将对象变成数组
|
||||
toArr(obj) {
|
||||
let arr = [];
|
||||
for (let key in obj) {
|
||||
let o = {
|
||||
key: key,
|
||||
value: obj[key],
|
||||
};
|
||||
arr.push(o);
|
||||
}
|
||||
return arr;
|
||||
},
|
||||
// 给页面变化值赋值
|
||||
doVal(arr = []) {
|
||||
let total = 0;
|
||||
arr.forEach((ele) => {
|
||||
total += ele.value * 1;
|
||||
});
|
||||
this.total = total;
|
||||
this.labelArr = arr;
|
||||
this.opt = createOpt(this.labelArr, this.colors);
|
||||
},
|
||||
// 切换数据
|
||||
handlerTab(n) {
|
||||
switch (n) {
|
||||
case 0:
|
||||
this.doVal(this.sex);
|
||||
break;
|
||||
case 1:
|
||||
this.doVal(this.attestation);
|
||||
break;
|
||||
case 2:
|
||||
this.doVal(this.RegionWeiBo);
|
||||
break;
|
||||
default:
|
||||
this.doVal(this.sex);
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wc-outter {
|
||||
width: 618px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
overflow: hidden;
|
||||
.wc-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.d1 {
|
||||
width: 280px;
|
||||
height: 100%;
|
||||
}
|
||||
.d2 {
|
||||
width: 300px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,71 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:11:41
|
||||
* @LastEditTime: 2021-11-08 18:30:57
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter">
|
||||
<v-label-div title="微博传播趋势">
|
||||
</v-label-div>
|
||||
<div class="wct-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCountTime0528} from "@/api/WeiboDetails"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "MWDweiboCommunicationTrend",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
opt: createOpt()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getCountTime0528(obj).then(res => {
|
||||
let data = res.data || [];
|
||||
let dx = []; //time
|
||||
let ds = []; //value
|
||||
data.forEach(ele => {
|
||||
let key = ele.Time;
|
||||
let value = ele.value;
|
||||
dx.push(key);
|
||||
ds.push(value);
|
||||
})
|
||||
this.opt = createOpt(dx, ds)
|
||||
this.load = false
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wct-outter {
|
||||
width: 618px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.wct-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 15:32:24
|
||||
* @LastEditTime: 2021-10-14 10:21:55
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
export default function createOpt(dx = [], ds = []) {
|
||||
return {
|
||||
grid: {
|
||||
top: 16,
|
||||
left: 16,
|
||||
right: "5%",
|
||||
bottom: 10,
|
||||
containLabel: true,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: (value) => {
|
||||
let str = value.substring(10, 16)
|
||||
return str;
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
data: dx
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#FFF",
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: (value) => {
|
||||
let str = bigNumberTransform(value);
|
||||
return str;
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
type: "dashed", // y轴分割线类型
|
||||
color: "#012b4b",
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: ds,
|
||||
type: 'line',
|
||||
color: '#546fc5',
|
||||
areaStyle: {normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: '#546fc5'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(0,0,0,0)'
|
||||
}]),
|
||||
}}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 16:05:12
|
||||
* @LastEditTime: 2021-11-04 17:05:41
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentTOPVolume/opt.js
|
||||
* startAngle: 180,
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
export default function createOpt(name, color, num, maxVal) {
|
||||
return {
|
||||
tooltip: {
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
|
||||
formatter: function(param) {
|
||||
let value = param.data.value;
|
||||
let name = param.data.name;
|
||||
return `<span>${name}</span><br><span>声量:${value}</span>`
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: name,
|
||||
type: 'gauge',
|
||||
startAngle: 180,
|
||||
endAngle: 0,
|
||||
min: 0,
|
||||
max: maxVal * 5,
|
||||
splitNumber: 5,
|
||||
detail: { show: false, formatter: '{value}%' },
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
width: 7,
|
||||
color: [
|
||||
[1, new echarts.graphic.LinearGradient(0, 0, 1, 0, [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#020f1f"
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: color
|
||||
}
|
||||
])
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
distance: -30,
|
||||
color: "#d8d8d8",
|
||||
},
|
||||
splitLine: {
|
||||
distance: -6,
|
||||
length: 12,
|
||||
lineStyle: {
|
||||
color: '#d8d8d8',
|
||||
width: 2
|
||||
}
|
||||
},
|
||||
// 刻度线
|
||||
axisTick: {
|
||||
show: true,
|
||||
length: 15,
|
||||
lineStyle: {
|
||||
color: "auto",
|
||||
width: 5
|
||||
}
|
||||
},
|
||||
data: [{ value: num, name: name, title: {show: true, color: color,fontWeight: 'bold'},itemStyle:{color: color}}],
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:24:56
|
||||
* @LastEditTime: 2021-11-08 18:34:14
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentType/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter">
|
||||
<v-label-div title="微博内容类型"> </v-label-div>
|
||||
<div class="wct-inner">
|
||||
<div class="d1">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
<div class="d2">
|
||||
<v-label-ctx
|
||||
v-for="(item, index) in labelArr"
|
||||
:key="index"
|
||||
:label="item.key"
|
||||
:cont="item.value"
|
||||
:percentage="((item.value / total) * 100).toFixed(2) + '%'"
|
||||
:color="colors[index]"
|
||||
:eStyle="{ height: '8.54rem' }"
|
||||
></v-label-ctx>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getWtypeWeiBo0528 } from "@/api/WeiboDetails";
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "MWDweiboContentType",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
labelArr: [],
|
||||
total: 0,
|
||||
opt: createOpt(),
|
||||
colors: [
|
||||
"#54BF93",
|
||||
"#3373CC",
|
||||
"#CC9D12",
|
||||
"#f15c80",
|
||||
"#e4d354",
|
||||
"#8085e8",
|
||||
"#8d4653",
|
||||
"#91e8e1",
|
||||
"#f7a35c",
|
||||
"#90ed7d",
|
||||
"#54BF93",
|
||||
"#3373CC",
|
||||
"#CC9D12",
|
||||
"#f15c80",
|
||||
"#e4d354",
|
||||
"#8085e8",
|
||||
"#8d4653",
|
||||
"#91e8e1",
|
||||
"#f7a35c",
|
||||
"#90ed7d",
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getWtypeWeiBo0528(obj).then((res) => {
|
||||
let data = res.data || [];
|
||||
this.doVal(data);
|
||||
});
|
||||
console.log();
|
||||
},
|
||||
doVal(arr = []) {
|
||||
let total = 0;
|
||||
arr.forEach((ele) => {
|
||||
total += ele.value * 1;
|
||||
});
|
||||
this.total = total;
|
||||
this.labelArr = arr;
|
||||
this.opt = createOpt(this.labelArr, this.colors);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.wct-outter {
|
||||
width: 618px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
overflow: hidden;
|
||||
.wct-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.d1 {
|
||||
width: 280px;
|
||||
height: 100%;
|
||||
}
|
||||
.d2 {
|
||||
width: 300px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,62 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:15:58
|
||||
* @LastEditTime: 2021-11-08 18:36:34
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboSpreadFission/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wsf-outter">
|
||||
<v-label-div title="微博传播裂变">
|
||||
</v-label-div>
|
||||
<div class="wsf-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getGraphData} from "@/api/getEchars";
|
||||
//import {getDiffuseZhuTi} from "@/api/WeiboDetails";
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "MWDweiboSpreadFission",
|
||||
data() {
|
||||
return {
|
||||
opt: {},
|
||||
form: {
|
||||
token:"",
|
||||
sBrand:""
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.drawGraph();
|
||||
},
|
||||
methods: {
|
||||
drawGraph() {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getGraphData(obj).then(res => {
|
||||
this.opt = createOpt(res.data)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wsf-outter {
|
||||
width: 460px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.wsf-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,57 @@
|
||||
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:32:39
|
||||
* @LastEditTime: 2021-10-14 19:40:03
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboSpreadFission/opt.js
|
||||
*/
|
||||
export default function createOpt(data) {
|
||||
return {
|
||||
title: {
|
||||
show: false,
|
||||
text: 'NPM Dependencies'
|
||||
},
|
||||
animationDurationUpdate: 1500,
|
||||
animationEasingUpdate: 'quinticInOut',
|
||||
series: [
|
||||
{
|
||||
type: 'graph',
|
||||
layout: 'none',
|
||||
// progressiveThreshold: 700,
|
||||
data: data.nodes.map(function (node) {
|
||||
return {
|
||||
x: node.x,
|
||||
y: node.y,
|
||||
id: node.id,
|
||||
name: node.label,
|
||||
symbolSize: node.size,
|
||||
itemStyle: {
|
||||
color: node.color
|
||||
}
|
||||
};
|
||||
}),
|
||||
edges: data.edges.map(function (edge) {
|
||||
return {
|
||||
source: edge.sourceID,
|
||||
target: edge.targetID
|
||||
};
|
||||
}),
|
||||
emphasis: {
|
||||
focus: 'adjacency',
|
||||
label: {
|
||||
position: 'right',
|
||||
show: true
|
||||
}
|
||||
},
|
||||
roam: true,
|
||||
lineStyle: {
|
||||
width: 0.5,
|
||||
curveness: 0.3,
|
||||
opacity: 0.7
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:41:24
|
||||
* @LastEditTime: 2021-11-08 18:37:34
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboTonalDistribution/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wtd-outter">
|
||||
<v-label-div title="调性分布"> </v-label-div>
|
||||
<div class="wtd-inner">
|
||||
<div class="wtd-item" v-for="(value,key) in obj"
|
||||
:key="key">
|
||||
<v-percent :percentage="value.positive"></v-percent>
|
||||
<span class="s1">{{value.show}}</span>
|
||||
<v-percent color="#b78e11" :percentage="value.negative" reverse></v-percent>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getBoauthenAffectionsWeiBo0528 } from "@/api/WeiboDetails";
|
||||
export default {
|
||||
name: "MWDweiboTonalDistribution",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
token: "",
|
||||
sBrand: "",
|
||||
},
|
||||
obj: {
|
||||
bigV:{positive:0.1,negative:0.1,show:"个人大V"},
|
||||
media:{positive:0.1,negative:0.1,show:"媒体"},
|
||||
enterprice:{positive:0.1,negative:0.1,show:"企业"},
|
||||
goverment:{positive:0.1,negative:0.1,show:"政府"},
|
||||
famousPerson:{positive:0.1,negative:0.1,show:"名人"},
|
||||
uncertified:{positive:0.1,negative:0.1,show:"未认证"},
|
||||
certified:{positive:0.1,negative:0.1,show:"已认证"}
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.Brand;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getBoauthenAffectionsWeiBo0528(obj).then(res => {
|
||||
let data = res.data;
|
||||
data.forEach(ele => {
|
||||
switch (ele.key) {
|
||||
case ("个人大V"):
|
||||
this.obj.bigV.positive = ele.value[0]/(ele.value[0].value+ele.value[2].value+0.1); //index[0]为正面数据
|
||||
this.obj.bigV.negative = ele.value[2].value/(ele.value[0].value+ele.value[2].value+0.1); //index[2]为负面数据
|
||||
break;
|
||||
case ("媒体"):
|
||||
this.obj.media.positive = ele.value[0].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
this.obj.media.negative = ele.value[2].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
break;
|
||||
case ("企业"):
|
||||
this.obj.enterprice.positive = ele.value[0].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
this.obj.enterprice.negative = ele.value[2].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
break;
|
||||
case ("政府"):
|
||||
this.obj.goverment.positive = ele.value[0].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
this.obj.goverment.negative = ele.value[2].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
break;
|
||||
case ("名人"):
|
||||
this.obj.famousPerson.positive = ele.value[0].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
this.obj.famousPerson.negative = ele.value[2].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
break;
|
||||
case ("非认证"):
|
||||
this.obj.uncertified.positive = ele.value[0].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
this.obj.uncertified.negative = ele.value[2].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
break;
|
||||
case ("已认证"):
|
||||
this.obj.certified.positive = ele.value[0].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
this.obj.certified.negative = ele.value[2].value/(ele.value[0].value+ele.value[2].value+0.1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wtd-outter {
|
||||
width: 460px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.wtd-inner {
|
||||
width: 100%;
|
||||
padding: 20px 16px;
|
||||
.wtd-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 36px;
|
||||
.s1 {
|
||||
display: block;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,112 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:59:04
|
||||
* @LastEditTime: 2021-10-14 20:58:54
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboTonalDistribution/opt.js
|
||||
*/
|
||||
export default function createOpt() {
|
||||
return {
|
||||
grid: {
|
||||
left: 16,
|
||||
right: 16,
|
||||
bottom: 0,
|
||||
top: 40,
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
legend: {
|
||||
position: 'center',
|
||||
icon: 'roundRect',
|
||||
y: 16,
|
||||
textStyle: { //图例文字的样式
|
||||
color: '#fff'
|
||||
},
|
||||
data: ['负面', '正面']
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
show: false,
|
||||
splitLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
type: 'dashed'
|
||||
}
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
axisLine: { show: false },
|
||||
axisLabel: { show: false },
|
||||
axisTick: { show: false },
|
||||
splitLine: { show: false },
|
||||
data: [
|
||||
'已认证',
|
||||
'非认证',
|
||||
'名人博主',
|
||||
'政府',
|
||||
'企业',
|
||||
'媒体',
|
||||
'个人大V',
|
||||
]
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '正面',
|
||||
type: 'bar',
|
||||
stack: '总量',
|
||||
barWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
formatter: '{b}',
|
||||
position: 'left',
|
||||
color: '#fff',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
data: [
|
||||
{ value: 0.07 },
|
||||
{ value: 0.09 },
|
||||
{ value: 0.23 },
|
||||
{ value: 0.17 },
|
||||
{ value: 0.36 },
|
||||
{ value: 0.26 },
|
||||
{ value: 0.28 },
|
||||
]
|
||||
}, {
|
||||
name: '负面',
|
||||
type: 'bar',
|
||||
stack: '总量',
|
||||
barWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
formatter: '{b}',
|
||||
position: 'right',
|
||||
color: '#fff',
|
||||
fontWeight: 'bold'
|
||||
},
|
||||
itemStyle: {
|
||||
color: '#CC9D12',
|
||||
},
|
||||
data: [
|
||||
{ value: -0.07 },
|
||||
{ value: -0.09 },
|
||||
{ value: -0.23 },
|
||||
{ value: -0.17 },
|
||||
{ value: -0.36 },
|
||||
{ value: -0.26 },
|
||||
{ value: -0.28 },
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 11:25:20
|
||||
* @LastEditTime: 2021-11-08 18:33:13
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wua-outter">
|
||||
<v-label-div title="微博用户活跃地区"> </v-label-div>
|
||||
<div class="wua-inner">
|
||||
<div class="d1">
|
||||
<v-echarts :opt="opt1"></v-echarts>
|
||||
</div>
|
||||
<div class="d2">
|
||||
<v-echars-map :opt="opt2"></v-echars-map>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRegionWeiBo } from "@/api/WeiboDetails";
|
||||
import createOptD1 from "./opt1";
|
||||
import createOptD2 from "./opt2";
|
||||
export default {
|
||||
name: "MWDweiboUserActiveArea",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
opt1: createOptD1(),
|
||||
opt2: createOptD2(),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getRegionWeiBo(obj).then((res) => {
|
||||
let data = res.data || {};
|
||||
let arr = this.toArr(data);
|
||||
let dx = []; //省份
|
||||
let ds = []; //数据
|
||||
arr.forEach((ele) => {
|
||||
let name = ele.name || "";
|
||||
if(name.indexOf('省') === -1) {
|
||||
ele.name = ele.name + '市'
|
||||
}
|
||||
let value = ele.value;
|
||||
dx.push(ele.name);
|
||||
ds.push(value);
|
||||
});
|
||||
let dm = arr //省份和数据
|
||||
this.opt1 = createOptD1(dx, ds);
|
||||
this.opt2 = createOptD2(dm);
|
||||
});
|
||||
},
|
||||
// 将对象变成数组
|
||||
toArr(obj) {
|
||||
let arr = [];
|
||||
for (let key in obj) {
|
||||
let o = {
|
||||
name: key,
|
||||
value: obj[key] * 1,
|
||||
};
|
||||
arr.push(o);
|
||||
}
|
||||
return arr;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wua-outter {
|
||||
width: 936px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.wua-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.d1 {
|
||||
width: 479px;
|
||||
height: 100%;
|
||||
}
|
||||
.d2 {
|
||||
width: 420px;
|
||||
height: 100%;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,83 @@
|
||||
|
||||
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-09 12:38:34
|
||||
* @LastEditTime: 2021-10-14 11:48:19
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/Index/tailInsight/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
export default function createOptD1(dx=[],ds=[]) {
|
||||
return {
|
||||
grid: {
|
||||
left: 16,
|
||||
right: '5%',
|
||||
bottom: 10,
|
||||
top: "1%",
|
||||
containLabel: true
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: (value) => {
|
||||
let str = bigNumberTransform(value);
|
||||
return str;
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
type: "dashed", // y轴分割线类型
|
||||
color: "#012b4b",
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
data: dx,
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
inverse: true
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '2011',
|
||||
type: 'bar',
|
||||
barWidth: 20,
|
||||
data: ds,
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
|
||||
offset: 0,
|
||||
color: '#010B19'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: '#2f68b4'
|
||||
}]),
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 11:53:16
|
||||
* @LastEditTime: 2021-11-04 17:17:02
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/opt2.js
|
||||
*/
|
||||
|
||||
export default function createOptD2(dm) {
|
||||
return {
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
|
||||
},
|
||||
// geo: {
|
||||
// show: true,
|
||||
// map: 'china',
|
||||
// roam: false,//地图设置不可拖拽,固定的
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// borderWidth: 0,
|
||||
// shadowColor: 'rgba(0,54,255, 1)',
|
||||
// shadowBlur: 100
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
visualMap: {
|
||||
type: 'continuous',
|
||||
show: false,
|
||||
min: 0,
|
||||
max: 2000,
|
||||
text: ['高', '低'],
|
||||
orient: 'horizontal',
|
||||
itemWidth: 15,
|
||||
itemHeight: 200,
|
||||
right: 0,
|
||||
bottom: 30,
|
||||
inRange: {
|
||||
color: ['#0393d2', '#75ddff']
|
||||
},
|
||||
textStyle: {
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: "微博区域",
|
||||
type: "map",
|
||||
mapType: "china",
|
||||
roam: false,
|
||||
zoom: 1,//默认地图在容器中显示zoom:1,可根据需求放大缩小地图
|
||||
left: 16,
|
||||
top: 20,
|
||||
right: 10,
|
||||
bottom: 10,
|
||||
selectedMode:'multiple',
|
||||
colorBy: 'data',
|
||||
itemStyle: {
|
||||
areaColor: '#001f5b',//地图区域背景颜色
|
||||
borderColor: '#005cf9',//地图边界颜色
|
||||
shadowColor: '#005cf9',
|
||||
emphasis: {
|
||||
areaColor: '#3066ba',//鼠标滑过区域颜色
|
||||
label: {
|
||||
color: '#fff'
|
||||
}
|
||||
}
|
||||
},
|
||||
label: {
|
||||
normal: {
|
||||
show: false
|
||||
},
|
||||
},
|
||||
|
||||
// select: {
|
||||
// label: {
|
||||
// show: false
|
||||
// },
|
||||
// itemStyle: {
|
||||
// areaColor: '#3edffe'
|
||||
// }
|
||||
// },
|
||||
data: dm
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:06:52
|
||||
* @LastEditTime: 2021-11-08 18:35:35
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboWordCloud/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wwc-outter" v-loading="load">
|
||||
<v-label-div title="词云分布">
|
||||
<div>
|
||||
<v-tab-group
|
||||
:btns="['正面', '负面']"
|
||||
@change="handlerTab"
|
||||
></v-tab-group>
|
||||
</div>
|
||||
</v-label-div>
|
||||
<div class="wwc-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getNegative } from "@/api/WeiboDetails";
|
||||
import { getPositive } from "@/api/WeiboDetails";
|
||||
import createWordCloud from "@/utils/gol/bubbleWord";
|
||||
//import createOpt from "./opt";
|
||||
export default {
|
||||
name: "MWDweiboWordCloud",
|
||||
data() {
|
||||
return {
|
||||
opt: {},
|
||||
load: false,
|
||||
positiveData: {},
|
||||
negativeData: {},
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || this.brand;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
Promise.all([this.getH(), this.getF()]).then(() => {
|
||||
// 什么也不执行
|
||||
this.handlerTab(0);
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
// 正面
|
||||
getH() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getPositive(obj)
|
||||
.then((res) => {
|
||||
this.positiveData = res.data || {};
|
||||
resolve(res);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 负面
|
||||
getF() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getNegative(obj)
|
||||
.then((res) => {
|
||||
this.negativeData = res.data || {};
|
||||
resolve(res);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 切换数据
|
||||
handlerTab(n) {
|
||||
switch (n) {
|
||||
case 0:
|
||||
this.opt = createWordCloud(this.positiveData);
|
||||
break;
|
||||
case 1:
|
||||
this.opt = createWordCloud(this.negativeData);
|
||||
break;
|
||||
default:
|
||||
this.opt = createWordCloud(this.positiveData);
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wwc-outter {
|
||||
width: 460px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.wwc-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,292 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 09:00:09
|
||||
* @LastEditTime: 2021-11-08 18:37:49
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 微博详情
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="d-container">
|
||||
<div class="wd-outter">
|
||||
<div class="wd-d1">
|
||||
<v-label-div title="微博洞察详情">
|
||||
<v-btn @click="goback">返回洞察详情</v-btn>
|
||||
</v-label-div>
|
||||
<div class="wd-d1-bd">
|
||||
<div class="d1">
|
||||
{{ form.sBrand }}
|
||||
</div>
|
||||
<div class="d2" style="margin-left: 114px">
|
||||
<img
|
||||
class="dd1"
|
||||
src="../../assets/images/BrandInsight/ic_xxzl.png"
|
||||
/>
|
||||
<div class="dd2">
|
||||
<span class="s1">{{ countObj.count }}</span>
|
||||
<span class="s2">信息总量</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d2">
|
||||
<img
|
||||
class="dd1"
|
||||
src="../../assets/images/BrandInsight/ic_dvsl.png"
|
||||
/>
|
||||
<div class="dd2">
|
||||
<span class="s1">{{ countObj.vCount }}</span>
|
||||
<span class="s2">参与大V数量</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d2">
|
||||
<img
|
||||
class="dd1"
|
||||
src="../../assets/images/BrandInsight/ic_yhs.png"
|
||||
/>
|
||||
<div class="dd2">
|
||||
<span class="s1">{{ countObj.userCount }}</span>
|
||||
<span class="s2">参与用户数</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d2">
|
||||
<img
|
||||
class="dd1"
|
||||
src="../../assets/images/BrandInsight/ic_yqdx.png"
|
||||
/>
|
||||
<a-popover title="舆情调性">
|
||||
<template slot="content">
|
||||
<template v-for="(item, key) in countObj2">
|
||||
<div class="pd-item" :key="key">
|
||||
<span >{{key}}</span>
|
||||
<span>{{item}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
<div class="dd3">
|
||||
<span
|
||||
class="s3"
|
||||
:style="{ width: (countObj2['正面'] / total) * width + 'px' }"
|
||||
></span>
|
||||
<span
|
||||
class="s3"
|
||||
:style="{
|
||||
width: (countObj2['中性'] / total) * width + 'px',
|
||||
background: '#54BF93',
|
||||
}"
|
||||
></span>
|
||||
<span
|
||||
class="s3"
|
||||
:style="{
|
||||
width: (countObj2['负面'] / total) * width + 'px',
|
||||
background: '#CC9D12',
|
||||
}"
|
||||
></span>
|
||||
</div>
|
||||
</a-popover>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wd-d2">
|
||||
<MWDweiboCommunicationTrend></MWDweiboCommunicationTrend>
|
||||
<MWDweiboContentType></MWDweiboContentType>
|
||||
<MWDweiboCharacters></MWDweiboCharacters>
|
||||
</div>
|
||||
<div class="wd-d3">
|
||||
<MWDweiboUserActiveArea></MWDweiboUserActiveArea>
|
||||
<MWDweiboContentTOPVolume></MWDweiboContentTOPVolume>
|
||||
</div>
|
||||
<div class="wd-d4">
|
||||
<MWDmodelPopularity></MWDmodelPopularity>
|
||||
<MWDweiboWordCloud></MWDweiboWordCloud>
|
||||
<MWDweiboSpreadFission></MWDweiboSpreadFission>
|
||||
<MWDweiboTonalDistribution></MWDweiboTonalDistribution>
|
||||
</div>
|
||||
<div class="wd-d5">
|
||||
<MWDpositiveViewKOL></MWDpositiveViewKOL>
|
||||
<MWDnegativeOpinionKOL></MWDnegativeOpinionKOL>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MWDweiboCommunicationTrend from "./MWDweiboCommunicationTrend";
|
||||
import MWDweiboContentType from "./MWDweiboContentType";
|
||||
import MWDweiboCharacters from "./MWDweiboCharacters";
|
||||
import MWDweiboUserActiveArea from "./MWDweiboUserActiveArea";
|
||||
import MWDweiboContentTOPVolume from "./MWDweiboContentTOPVolume";
|
||||
import MWDmodelPopularity from "./MWDmodelPopularity";
|
||||
import MWDweiboWordCloud from "./MWDweiboWordCloud";
|
||||
import MWDweiboSpreadFission from "./MWDweiboSpreadFission";
|
||||
import MWDweiboTonalDistribution from "./MWDweiboTonalDistribution";
|
||||
import MWDpositiveViewKOL from "./MWDpositiveViewKOL";
|
||||
import MWDnegativeOpinionKOL from "./MWDnegativeOpinionKOL";
|
||||
import { getBrandWeiBoCount0528 } from "@/api/WeiboDetails/index.js";
|
||||
import { getAffections } from "@/api/WeiboDetails/index.js";
|
||||
export default {
|
||||
name: "ModelWeiboDetails",
|
||||
components: {
|
||||
MWDweiboCommunicationTrend, // 微博传播趋势
|
||||
MWDweiboContentType, // 微博内容类型
|
||||
MWDweiboCharacters, // 微博人物画像
|
||||
MWDweiboUserActiveArea, // 微博用户活跃地区
|
||||
MWDweiboContentTOPVolume, // 微博内容TOP声量
|
||||
MWDmodelPopularity, // 车型热度
|
||||
MWDweiboWordCloud, // 词云分布
|
||||
MWDweiboSpreadFission, // 微博传播裂变
|
||||
MWDweiboTonalDistribution, // 调性分布
|
||||
MWDpositiveViewKOL, // 正面观点KOL
|
||||
MWDnegativeOpinionKOL, // 负面观点KOL
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
width: 200,
|
||||
form: {
|
||||
token: "",
|
||||
sBrand: "",
|
||||
},
|
||||
countObj: {
|
||||
carseriesCount: 0,
|
||||
count: 0,
|
||||
userCount: 0,
|
||||
vCount: 0,
|
||||
},
|
||||
countObj2: {
|
||||
正面: 0,
|
||||
中性: 0,
|
||||
负面: 0,
|
||||
},
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrand = this.getBrand.brandname || "奥迪";
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
goback() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
getData() {
|
||||
let obj = Object.assign({}, this.getCtime2, this.form);
|
||||
getBrandWeiBoCount0528(obj).then((res) => {
|
||||
let data = res.data;
|
||||
this.countObj = Object.assign(this.countObj, data);
|
||||
});
|
||||
getAffections(obj).then((res) => {
|
||||
let data = res.data || {};
|
||||
let total = 0;
|
||||
for (let key in data) {
|
||||
total += data[key] * 1;
|
||||
}
|
||||
this.countObj2 = Object.assign(this.countObj2, data);
|
||||
this.total = total;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wd-outter {
|
||||
padding: 0px 16px 16px 16px;
|
||||
}
|
||||
.wd-d1 {
|
||||
width: 100%;
|
||||
height: 222px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.wd-d1-bd {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
.d1 {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-image: url("../../assets/images/BrandInsight/img_lq.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
margin-left: 114px;
|
||||
text-align: center;
|
||||
line-height: 150px;
|
||||
font-size: 24px;
|
||||
color: #b2daf7;
|
||||
}
|
||||
.d2 {
|
||||
width: 378px;
|
||||
height: 82px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.dd1 {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
.dd2 {
|
||||
margin-left: 20px;
|
||||
height: 100%;
|
||||
.s1 {
|
||||
display: block;
|
||||
font-size: 34px;
|
||||
font-family: Bebas;
|
||||
color: #ffffff;
|
||||
}
|
||||
.s2 {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
color: #8f969c;
|
||||
}
|
||||
}
|
||||
.dd3 {
|
||||
margin-left: 20px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
.s3 {
|
||||
width: 87px;
|
||||
height: 33px;
|
||||
display: inline-block;
|
||||
margin-right: 2px;
|
||||
background: #3373cc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.wd-d2 {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.wd-d3 {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.wd-d4 {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.wd-d5 {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-top: 16px;
|
||||
}
|
||||
.pd-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #fff;
|
||||
border-bottom: 1px solid #173b6d;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue