commit
92ef838a7a
@ -0,0 +1,146 @@
|
||||
import httpService from "@/request"
|
||||
|
||||
//首页点击 - 洞察详情
|
||||
export function getCountAndaffections(params) {
|
||||
let obj = Object.assign({action: 'getCountAndaffections', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 车型TOP
|
||||
export function getCartypeTop10(params) {
|
||||
let obj = Object.assign({action: 'getCartypeTop10', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 精华分布
|
||||
export function getIsjingGroupBy(params) {
|
||||
let obj = Object.assign({action: 'getIsjingGroupBy', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 用户区域
|
||||
export function getUserRegionGroupBy(params) {
|
||||
let obj = Object.assign({action: 'getUserRegionGroupBy', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 是否认证
|
||||
export function getUserAttestationGroupBy(params) {
|
||||
let obj = Object.assign({action: 'getUserAttestationGroupBy', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 传播趋势
|
||||
export function getTimeCount(params) {
|
||||
let obj = Object.assign({action: 'getTimeCount', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 内容类型
|
||||
export function getWtypeWeiBo0528(params) {
|
||||
let obj = Object.assign({action: 'getWtypeWeiBo0528', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 关注车型TOP
|
||||
export function getGuanZhuSeriesname(params) {
|
||||
let obj = Object.assign({action: 'getGuanZhuSeriesname', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 图文分布
|
||||
export function getPicboolGroupBy(params) {
|
||||
let obj = Object.assign({action: 'getPicboolGroupBy', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 热门词云
|
||||
export function getHotWord(params) {
|
||||
let obj = Object.assign({action: 'getHotWord', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 消息数据
|
||||
export function getList(params) {
|
||||
let obj = Object.assign({action: 'getList', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
||||
//首页点击 - 内容top声量
|
||||
export function getDirectWeiBo0528(params) {
|
||||
let obj = Object.assign({action: 'getDirectWeiBo0528', sType: 'BrandOverview'}, params)
|
||||
return httpService({
|
||||
url: `/api/v6.ashx`,
|
||||
method: 'post',
|
||||
data: obj,
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
}
|
@ -0,0 +1,324 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 09:00:09
|
||||
* @LastEditTime: 2021-10-16 15:54:30
|
||||
* @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-tab-group-control v-if="form.sSource == '懂车帝'"
|
||||
:btns="['全部', '车友圈']"
|
||||
:active="getCarCircle"
|
||||
@change="handlerTab" style="margin-right: 24px"
|
||||
></v-tab-group-control>
|
||||
<v-tab-group-control v-if="form.sSource == '汽车之家'"
|
||||
:btns="['全部', '论坛']"
|
||||
:active="getCarCircle"
|
||||
@change="handlerTab" style="margin-right: 24px"
|
||||
></v-tab-group-control>
|
||||
<v-btn @click="goback">返回专项分析</v-btn>
|
||||
</v-label-div>
|
||||
<div class="wd-d1-bd">
|
||||
<div class="d1"> {{ form.sSource }} </div>
|
||||
<div class="d2" style="margin-left: 114px">
|
||||
<img class="dd1" src="../../assets/images/BrandInsight/ic_xxzl.png" />
|
||||
<div class="dd2">
|
||||
<span class="s1">{{ total }}</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">{{ totalRep }}</span>
|
||||
<span class="s2">互动人数</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" v-if="form.sSource == '新浪微博' || (form.sSource == '汽车之家') || (form.sSource == '懂车帝' && getCarCircle == 1)">
|
||||
<vue-lazy-component>
|
||||
<weibo-communication-trend></weibo-communication-trend>
|
||||
<weiboCommunicationTrendStoken slot="skeleton"></weiboCommunicationTrendStoken>
|
||||
</vue-lazy-component>
|
||||
<spreadTOPmodels></spreadTOPmodels>
|
||||
</div>
|
||||
<div class="wd-d2" v-else>
|
||||
<vue-lazy-component>
|
||||
<weibo-communication-trend-long></weibo-communication-trend-long>
|
||||
<weiboCommunicationTrendLongStoken slot="skeleton"></weiboCommunicationTrendLongStoken>
|
||||
</vue-lazy-component>
|
||||
</div>
|
||||
<div class="wd-d3" v-if="form.sSource == '新浪微博' || (form.sSource == '汽车之家') || (form.sSource == '懂车帝' && getCarCircle == 1)"></div>
|
||||
<div class="wd-d3" v-else>
|
||||
<!-- <subscribeSeries></subscribeSeries> -->
|
||||
<spreadTOPmodels></spreadTOPmodels>
|
||||
<vue-lazy-component>
|
||||
<weiboContentTOPVolume></weiboContentTOPVolume>
|
||||
<weiboContentTOPVolumeStoken slot="skeleton"></weiboContentTOPVolumeStoken>
|
||||
</vue-lazy-component>
|
||||
</div>
|
||||
<div class="wd-d4">
|
||||
<vue-lazy-component>
|
||||
<weiboContentType></weiboContentType>
|
||||
<weiboContentTypeStoken slot="skeleton"></weiboContentTypeStoken>
|
||||
</vue-lazy-component>
|
||||
<vue-lazy-component>
|
||||
<weiboCharacters></weiboCharacters>
|
||||
<weiboCharactersStoken slot="skeleton"></weiboCharactersStoken>
|
||||
</vue-lazy-component>
|
||||
<vue-lazy-component>
|
||||
<weiboWordCloud></weiboWordCloud>
|
||||
<weiboWordCloudStoken slot="skeleton"></weiboWordCloudStoken>
|
||||
</vue-lazy-component>
|
||||
</div>
|
||||
<div class="wd-d3" v-if="form.sSource == '新浪微博' || form.sSource == '汽车之家' || (form.sSource == '懂车帝' && getCarCircle == 1)">
|
||||
<vue-lazy-component v-if="form.sSource == '新浪微博' || form.sSource == '汽车之家'">
|
||||
<weiboUserActiveArea></weiboUserActiveArea>
|
||||
<weiboUserActiveAreaStoken slot="skeleton"></weiboUserActiveAreaStoken>
|
||||
</vue-lazy-component>
|
||||
<popularEventsList v-if="form.sSource == '懂车帝' && getCarCircle == 1"></popularEventsList>
|
||||
<vue-lazy-component>
|
||||
<weiboContentTOPVolume></weiboContentTOPVolume>
|
||||
<weiboContentTOPVolumeStoken slot="skeleton"></weiboContentTOPVolumeStoken>
|
||||
</vue-lazy-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import weiboCommunicationTrend from "./weiboCommunicationTrend";
|
||||
import weiboCommunicationTrendLong from "./weiboCommunicationTrendLong";
|
||||
import weiboContentType from "./weiboContentType";
|
||||
import weiboCharacters from "./weiboCharacters";
|
||||
import weiboUserActiveArea from "./weiboUserActiveArea";
|
||||
import weiboContentTOPVolume from "./weiboContentTOPVolume";
|
||||
import weiboWordCloud from "./weiboWordCloud";
|
||||
import spreadTOPmodels from "./spreadTOPmodels";
|
||||
import subscribeSeries from "./subscribeSeries";
|
||||
import popularEventsList from "./popularEventsList";
|
||||
//骨架屏
|
||||
import weiboCommunicationTrendStoken from "./weiboCommunicationTrendStoken";
|
||||
import weiboCommunicationTrendLongStoken from "./weiboCommunicationTrendLongStoken";
|
||||
import weiboContentTypeStoken from "./weiboContentTypeStoken";
|
||||
import weiboCharactersStoken from "./weiboCharactersStoken";
|
||||
import weiboUserActiveAreaStoken from "./weiboUserActiveAreaStoken";
|
||||
import weiboContentTOPVolumeStoken from "./weiboContentTOPVolumeStoken";
|
||||
import weiboWordCloudStoken from "./weiboWordCloudStoken";
|
||||
import {getCountAndaffections} from "@/api/KeyMediaSpecial/index.js"
|
||||
export default {
|
||||
name: "WeiboDetails",
|
||||
inject: ['reload'],
|
||||
components: {
|
||||
weiboCommunicationTrend, // 微博传播趋势
|
||||
weiboCommunicationTrendLong,
|
||||
weiboContentType, // 微博内容类型
|
||||
weiboCharacters, // 微博人物画像
|
||||
weiboUserActiveArea, // 微博用户活跃地区
|
||||
weiboContentTOPVolume, // 微博内容TOP声量
|
||||
weiboWordCloud, // 词云分布
|
||||
spreadTOPmodels, // 传播TOP车型
|
||||
subscribeSeries, // 关注TOP车型
|
||||
popularEventsList, //数据列表
|
||||
//骨架屏
|
||||
weiboCommunicationTrendStoken, // 微博传播趋势
|
||||
weiboCommunicationTrendLongStoken,
|
||||
weiboContentTypeStoken, // 微博内容类型
|
||||
weiboCharactersStoken, // 微博人物画像
|
||||
weiboUserActiveAreaStoken, // 微博用户活跃地区
|
||||
weiboContentTOPVolumeStoken, // 微博内容TOP声量
|
||||
weiboWordCloudStoken, // 词云分布
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
width: 200,
|
||||
form: {
|
||||
token: "",
|
||||
sSpecialGuid: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
countObj: {
|
||||
carseriesCount: 0,
|
||||
count: 0,
|
||||
userCount: 0,
|
||||
vCount: 0,
|
||||
},
|
||||
countObj2: {
|
||||
正面: 0,
|
||||
中性: 0,
|
||||
负面: 0,
|
||||
},
|
||||
total: 0,
|
||||
totalRep: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
goback() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
getData() {
|
||||
getCountAndaffections(this.form).then(res => {
|
||||
let data = res.data.Affections || {};
|
||||
this.total = res.data.Count;
|
||||
this.totalRep = res.data.ReplyCount;
|
||||
this.countObj2 = {
|
||||
正面: data[0].Value,
|
||||
中性: data[1].Value,
|
||||
负面: data[2].Value,
|
||||
}
|
||||
})
|
||||
},
|
||||
handlerTab(val) {
|
||||
this.setCarCircle(val);
|
||||
this.reload();
|
||||
}
|
||||
},
|
||||
};
|
||||
</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>
|
@ -0,0 +1,107 @@
|
||||
<!--
|
||||
* @Author: xw
|
||||
* @Date: 2021-10-12 10:50:44
|
||||
* @LastEditTime: 2021-11-17 15:56:14
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 热门事件列表
|
||||
* @FilePath: /data-show/src/views/BrandInsight/popularEventsList/index.vue
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="pe-ouuter" v-loading="load">
|
||||
<v-label-div title="消息数据" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="pe-inner">
|
||||
<dv-scroll-board :config="config" :style="{ width: '100%', height: '25rem' }" @click="handlerItem"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { getHotEventsList0528 } from "@/api/BrandInsight";
|
||||
import {getList} from "@/api/KeyMediaSpecial/index.js"
|
||||
export default {
|
||||
name: "popularEventsList",
|
||||
props: ["brand"],
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
iPageIndex: 1,
|
||||
iPageSize: 100,
|
||||
},
|
||||
config: {},
|
||||
darr: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
// this.load = true;
|
||||
getList(this.form).then(res => {
|
||||
let data = res.data;
|
||||
let arr = [];
|
||||
let arr2 = [];
|
||||
data.forEach(ele => {
|
||||
let a = [
|
||||
`<span style='cursor: pointer;'>${ele._source.title}</span>`,
|
||||
ele._source.user_author,
|
||||
ele._source.sourcetime,
|
||||
];
|
||||
let b = [
|
||||
`<span style='cursor: pointer;'>${ele._source.itle}</span>`,
|
||||
ele._source.user_author,
|
||||
ele._source.sourcetime,
|
||||
ele._source.id
|
||||
];
|
||||
arr.push(a);
|
||||
arr2.push(b);
|
||||
this.darr = arr2;
|
||||
this.config = {
|
||||
headerBGC: "rgba(16,33,59)",
|
||||
oddRowBGC: "#173b6d",
|
||||
evenRowBGC: "rgba(69, 149, 244, 0)",
|
||||
columnWidth: [500,180,180],
|
||||
rowNum: 8,
|
||||
header: ["消息列表", "作者", "时间"],
|
||||
data: arr,
|
||||
};
|
||||
this.load = false;
|
||||
})
|
||||
})
|
||||
},
|
||||
handlerItem(row) {
|
||||
// let ele = this.darr[row.rowIndex];
|
||||
// if(row.columnIndex === 0) {
|
||||
// let id = ele[4];
|
||||
// this.$router.push({path: '/eventDEC', query: {events_id: id}});
|
||||
// }
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.pe-ouuter {
|
||||
width: 934px;
|
||||
height: 459px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.pe-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,81 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 18:18:20
|
||||
* @LastEditTime: 2021-11-01 09:59:18
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="stm-outter" v-loading="load">
|
||||
<v-label-div title="传播声量TOP车型" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="stm-inner">
|
||||
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCartypeTop10} from "@/api/KeyMediaSpecial/index.js"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "spreadTOPmodels",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
opt: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getCartypeTop10(this.form).then(res => {
|
||||
let data = res.data || {};
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
for(let key in data) {
|
||||
dx.push(key);
|
||||
ds.push(data[key])
|
||||
}
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false;
|
||||
})
|
||||
},
|
||||
clickEchars(data) {
|
||||
let ele = data;
|
||||
let model = ele.axisValueLabel;
|
||||
this.setModel({name: model});
|
||||
this.$router.push("/modelInsight");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.stm-outter {
|
||||
width: 936px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.stm-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 18:23:25
|
||||
* @LastEditTime: 2021-10-12 18:31:20
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
export default function createOpt(dx,ds) {
|
||||
return {
|
||||
grid: {
|
||||
top: "10%",
|
||||
left: "16px",
|
||||
right: "5%",
|
||||
bottom: "16px",
|
||||
containLabel: true,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
|
||||
formatter: function (params) {
|
||||
var result = "";
|
||||
var dotHtml =
|
||||
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
|
||||
params.forEach(function (item) {
|
||||
result += item.axisValue + "</br>" + dotHtml + item.data;
|
||||
});
|
||||
return result;
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
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: [
|
||||
{
|
||||
name: "2001",
|
||||
data: ds,
|
||||
type: "bar",
|
||||
barWidth: 24,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: '#fff',
|
||||
fontSize: 14
|
||||
}
|
||||
},
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "rgba(99,187,143,0.4)", // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#51bc8f", // 100% 处的颜色#3373CC
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 18:18:20
|
||||
* @LastEditTime: 2021-11-01 09:59:18
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="stm-outter" v-loading="load">
|
||||
<v-label-div title="关注TOP车型" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="stm-inner">
|
||||
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getGuanZhuSeriesname} from "@/api/KeyMediaSpecial/index.js"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "spreadTOPmodels",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
opt: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getGuanZhuSeriesname(this.form).then(res => {
|
||||
let data = res.data || {};
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
for(let key in data) {
|
||||
dx.push(key);
|
||||
ds.push(data[key])
|
||||
}
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false;
|
||||
})
|
||||
},
|
||||
clickEchars(data) {
|
||||
let ele = data;
|
||||
let model = ele.axisValueLabel;
|
||||
this.setModel({name: model});
|
||||
this.$router.push("/modelInsight");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.stm-outter {
|
||||
width: 936px;
|
||||
height: 412px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.stm-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 18:23:25
|
||||
* @LastEditTime: 2021-10-12 18:31:20
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
export default function createOpt(dx,ds) {
|
||||
return {
|
||||
grid: {
|
||||
top: "10%",
|
||||
left: "16px",
|
||||
right: "5%",
|
||||
bottom: "16px",
|
||||
containLabel: true,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
backgroundColor: "#08182F",
|
||||
color: "#fff",
|
||||
borderColor: "#3373CC",
|
||||
textStyle: {
|
||||
color: "#fff", //设置文字颜色
|
||||
},
|
||||
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;",
|
||||
formatter: function (params) {
|
||||
var result = "";
|
||||
var dotHtml =
|
||||
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#1197b8"></span>';
|
||||
params.forEach(function (item) {
|
||||
result += item.axisValue + "</br>" + dotHtml + item.data;
|
||||
});
|
||||
return result;
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
type: "category",
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
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: [
|
||||
{
|
||||
name: "2001",
|
||||
data: ds,
|
||||
type: "bar",
|
||||
barWidth: 24,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: '#fff',
|
||||
fontSize: 14
|
||||
}
|
||||
},
|
||||
color: new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 0,
|
||||
color: "#CC9D1240", // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#CC9D12", // 100% 处的颜色#3373CC
|
||||
},
|
||||
],
|
||||
false
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
@ -0,0 +1,194 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:48:56
|
||||
* @LastEditTime: 2021-11-09 13:16:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCharacters/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wc-outter" v-loading="load">
|
||||
<v-label-div title="内容分布">
|
||||
<div>
|
||||
<v-tab-group
|
||||
v-if="form.ilimitType == 1 || form.ilimitType == 2"
|
||||
: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">
|
||||
<div v-if="labelArr.length<=3">
|
||||
<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>
|
||||
<vue-scroll v-if="labelArr.length>3">
|
||||
<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: '5.14rem' }"
|
||||
></v-label-ctx>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSexMergeWeiBo } from "@/api/WeiboDetails";
|
||||
import {getUserAttestationGroupBy, getIsjingGroupBy, getPicboolGroupBy} from "@/api/KeyMediaSpecial/index.js";
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "weiboCharacters",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
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.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 获取后台数据
|
||||
getData() {
|
||||
// this.load = true;
|
||||
getUserAttestationGroupBy(this.form).then((res) => {
|
||||
let data = res.data || {};
|
||||
this.doVal(data)
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
// 将对象变成数组
|
||||
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:
|
||||
getUserAttestationGroupBy(Object.assign({}, this.getCtime2, this.form)).then((res) => {
|
||||
let data = res.data || {};
|
||||
this.doVal(data)
|
||||
this.load = false;
|
||||
});
|
||||
break;
|
||||
case 1:
|
||||
getIsjingGroupBy(Object.assign({}, this.getCtime2, this.form)).then((res) => {
|
||||
let data = res.data || {};
|
||||
this.doVal(data)
|
||||
this.load = false;
|
||||
});
|
||||
break;
|
||||
case 2:
|
||||
getPicboolGroupBy(Object.assign({}, this.getCtime2, this.form)).then((res) => {
|
||||
let data = res.data || {};
|
||||
this.doVal(data)
|
||||
this.load = false;
|
||||
});
|
||||
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,72 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-09 09:49:50
|
||||
* @LastEditTime: 2021-10-28 13:07:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/Index/userPortrait/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
|
||||
function createData(ds = [], colors) {
|
||||
let arr = [];
|
||||
ds.map((ele, index) => {
|
||||
let obj = {
|
||||
value: ele.Value,
|
||||
name: ele.Key,
|
||||
itemStyle: {
|
||||
color: colors[index]
|
||||
}
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
return arr;
|
||||
}
|
||||
export default function createOpt(ds = [], color = []) {
|
||||
const data = createData(ds, color);
|
||||
return {
|
||||
series: [
|
||||
{
|
||||
name: 'Access From0',
|
||||
type: 'pie',
|
||||
radius: ['65%', '80%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center',
|
||||
lineHeight: 36
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '20',
|
||||
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: ['86%', '94%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
center: ['50%', '50%'],//边框位置
|
||||
data: data
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:48:56
|
||||
* @LastEditTime: 2021-11-09 13:16:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCharacters/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wc-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboCharacters",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
colors: [
|
||||
"#54BF93",
|
||||
"#3373CC",
|
||||
"#CC9D12",
|
||||
"#f15c80",
|
||||
"#e4d354",
|
||||
"#8085e8",
|
||||
"#8d4653",
|
||||
"#91e8e1",
|
||||
"#f7a35c",
|
||||
"#90ed7d",
|
||||
"#54BF93",
|
||||
"#3373CC",
|
||||
"#CC9D12",
|
||||
"#f15c80",
|
||||
"#e4d354",
|
||||
"#8085e8",
|
||||
"#8d4653",
|
||||
"#91e8e1",
|
||||
"#f7a35c",
|
||||
"#90ed7d",
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,134 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:11:41
|
||||
* @LastEditTime: 2021-11-09 13:16:55
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter" v-loading="load">
|
||||
<v-label-div title="传播态势">
|
||||
</v-label-div>
|
||||
<div class="wct-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
<!-- <div class="vshow" v-if="modelShow" :style="modelStyle">
|
||||
<vLabel-div title="实时热点事件">
|
||||
<a-button @click="closeBox">关闭</a-button>
|
||||
</vLabel-div>
|
||||
<div class="vshow-item" v-for="(item, index) in urlArr" :key="index">
|
||||
<a class="vshow-link" :href="item.url" v-if="item.column == activeCol" target="tar">{{item.title}}</a>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getTimeCount} from "@/api/KeyMediaSpecial/index.js"
|
||||
import {doStr} from "@/utils/gol/dataTool"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "weibo-communication-trend",
|
||||
data() {
|
||||
return {
|
||||
//弹出框//
|
||||
modelStyle:{
|
||||
left: '',
|
||||
top: ''
|
||||
},
|
||||
modelShow: false,
|
||||
ecbox:{//图表宽高
|
||||
width:618,
|
||||
height:490
|
||||
},
|
||||
ecmodel:{//弹框宽高
|
||||
width:300,
|
||||
height:280
|
||||
},
|
||||
activeCol: 0,
|
||||
//-*-//
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
opt: createOpt(),
|
||||
urlArr: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
//--弹出框--//
|
||||
// clickMark(data) {
|
||||
// this.activeCol = data.index
|
||||
// this.modelShow = true;
|
||||
// let mw = window.event;
|
||||
// if((this.ecbox.width - mw.offsetX - 20) > this.ecmodel.width) {
|
||||
// this.modelStyle.left = mw.offsetX + 20 + "px"
|
||||
// } else {
|
||||
// this.modelStyle.left = mw.offsetX - this.ecmodel.width - 20 + "px"
|
||||
// }
|
||||
// if((this.ecbox.height - mw.offsetY - 20) > this.ecmodel.height) {
|
||||
// this.modelStyle.top = mw.offsetY + "px"
|
||||
// } else {
|
||||
// this.modelStyle.top = mw.offsetY - this.ecmodel.height + "px"
|
||||
// }
|
||||
// },
|
||||
// closeBox() {
|
||||
// this.modelShow = false;
|
||||
// },
|
||||
//----//
|
||||
getData() {
|
||||
this.load = true;
|
||||
getTimeCount(this.form).then(res => {
|
||||
let data = res.data || [];
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.Time);
|
||||
ds.push(ele.value);
|
||||
})
|
||||
this.opt = createOpt(dx, ds)
|
||||
this.load = false
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wct-outter {
|
||||
width: 936px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.wct-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
.vshow{
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
background: rgb(3, 18, 36);
|
||||
border: 4px solid #0f2a4d;
|
||||
.vshow-item {
|
||||
padding: 11px;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color: rgb(54, 189, 239);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 15:32:24
|
||||
* @LastEditTime: 2021-11-19 19:50:21
|
||||
* @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 = [], hotIndex = []) {
|
||||
let mark = [];
|
||||
hotIndex.forEach(ele => {
|
||||
let obj = {
|
||||
name: 'Max',
|
||||
xAxis: ele, yAxis: ds[ele],
|
||||
symbol: 'pin',
|
||||
symbolSize: 16,
|
||||
symbolOffset: [0, '-70%'],
|
||||
}
|
||||
mark.push(obj)
|
||||
})
|
||||
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 rex = "00:00:00";
|
||||
let isCont = false;
|
||||
let str = value;
|
||||
for(let i = 0;i<dx.length-1;i++){
|
||||
//连续两条带小时
|
||||
if(dx[i].indexOf(rex) === -1 && dx[i+1].indexOf(rex) === -1){
|
||||
isCont = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isCont == true) {
|
||||
str = value.substring(10, 16)
|
||||
} else {
|
||||
str = value.substring(5, 10)
|
||||
}
|
||||
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)'
|
||||
}]),
|
||||
}},
|
||||
markPoint: {
|
||||
data: mark,
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
@ -0,0 +1,134 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:11:41
|
||||
* @LastEditTime: 2021-11-09 13:16:55
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter" v-loading="load">
|
||||
<v-label-div title="传播态势">
|
||||
</v-label-div>
|
||||
<div class="wct-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
<!-- <div class="vshow" v-if="modelShow" :style="modelStyle">
|
||||
<vLabel-div title="实时热点事件">
|
||||
<a-button @click="closeBox">关闭</a-button>
|
||||
</vLabel-div>
|
||||
<div class="vshow-item" v-for="(item, index) in urlArr" :key="index">
|
||||
<a class="vshow-link" :href="item.url" v-if="item.column == activeCol" target="tar">{{item.title}}</a>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getTimeCount} from "@/api/KeyMediaSpecial/index.js"
|
||||
import {doStr} from "@/utils/gol/dataTool"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "weibo-communication-trend",
|
||||
data() {
|
||||
return {
|
||||
//弹出框//
|
||||
modelStyle:{
|
||||
left: '',
|
||||
top: ''
|
||||
},
|
||||
modelShow: false,
|
||||
ecbox:{//图表宽高
|
||||
width:618,
|
||||
height:490
|
||||
},
|
||||
ecmodel:{//弹框宽高
|
||||
width:300,
|
||||
height:280
|
||||
},
|
||||
activeCol: 0,
|
||||
//-*-//
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
opt: createOpt(),
|
||||
urlArr: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
//--弹出框--//
|
||||
// clickMark(data) {
|
||||
// this.activeCol = data.index
|
||||
// this.modelShow = true;
|
||||
// let mw = window.event;
|
||||
// if((this.ecbox.width - mw.offsetX - 20) > this.ecmodel.width) {
|
||||
// this.modelStyle.left = mw.offsetX + 20 + "px"
|
||||
// } else {
|
||||
// this.modelStyle.left = mw.offsetX - this.ecmodel.width - 20 + "px"
|
||||
// }
|
||||
// if((this.ecbox.height - mw.offsetY - 20) > this.ecmodel.height) {
|
||||
// this.modelStyle.top = mw.offsetY + "px"
|
||||
// } else {
|
||||
// this.modelStyle.top = mw.offsetY - this.ecmodel.height + "px"
|
||||
// }
|
||||
// },
|
||||
// closeBox() {
|
||||
// this.modelShow = false;
|
||||
// },
|
||||
//----//
|
||||
getData() {
|
||||
this.load = true;
|
||||
getTimeCount(this.form).then(res => {
|
||||
let data = res.data || [];
|
||||
let dx = []; //time
|
||||
let ds = []; //value
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.Time);
|
||||
ds.push(ele.value);
|
||||
})
|
||||
this.opt = createOpt(dx, ds)
|
||||
this.load = false
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wct-outter {
|
||||
width: 1887px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.wct-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
.vshow{
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
background: rgb(3, 18, 36);
|
||||
border: 4px solid #0f2a4d;
|
||||
.vshow-item {
|
||||
padding: 11px;
|
||||
width: 100%;
|
||||
font-size: 15px;
|
||||
color: rgb(54, 189, 239);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 15:32:24
|
||||
* @LastEditTime: 2021-11-19 19:50:21
|
||||
* @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 = [], hotIndex = []) {
|
||||
let mark = [];
|
||||
hotIndex.forEach(ele => {
|
||||
let obj = {
|
||||
name: 'Max',
|
||||
xAxis: ele, yAxis: ds[ele],
|
||||
symbol: 'pin',
|
||||
symbolSize: 16,
|
||||
symbolOffset: [0, '-70%'],
|
||||
}
|
||||
mark.push(obj)
|
||||
})
|
||||
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 rex = "00:00:00";
|
||||
let isCont = false;
|
||||
let str = value;
|
||||
for(let i = 0;i<dx.length-1;i++){
|
||||
//连续两条带小时
|
||||
if(dx[i].indexOf(rex) === -1 && dx[i+1].indexOf(rex) === -1){
|
||||
isCont = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isCont == true) {
|
||||
str = value.substring(10, 16)
|
||||
} else {
|
||||
str = value.substring(5, 10)
|
||||
}
|
||||
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)'
|
||||
}]),
|
||||
}},
|
||||
markPoint: {
|
||||
data: mark,
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:11:41
|
||||
* @LastEditTime: 2021-11-09 13:16:55
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weibo-communication-trend",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wct-outter {
|
||||
width: 1872px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.wct-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,38 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:11:41
|
||||
* @LastEditTime: 2021-11-09 13:16:55
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weibo-communication-trend",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</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,175 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 15:54:06
|
||||
* @LastEditTime: 2021-11-04 17:03:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentTOPVolume/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="d22" v-if="(form.sSource == '汽车之家') || (form.sSource == '懂车帝')">
|
||||
<div class="wct-small-outter">
|
||||
<v-label-div title="内容TOP声量"> </v-label-div>
|
||||
<div class="wct-inner">
|
||||
<vue-scroll>
|
||||
<div class="d-rank" style="margin-left: 16px">
|
||||
<div class="rank1">
|
||||
<v-ranking-kmd v-for="(item,index) in d4" :key="index" :lineShow="index === 0 ? false : true" :num="index + 1" :label="item.label|doStr(8)" :val="item.val" @toMedia="toKeyMedia(item)"></v-ranking-kmd>
|
||||
</div>
|
||||
</div>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wct-small-outter">
|
||||
<v-label-div title="关注TOP车型"> </v-label-div>
|
||||
<div class="wct-inner">
|
||||
<vue-scroll>
|
||||
<div class="d-rank" style="margin-left: 16px">
|
||||
<div class="rank1">
|
||||
<v-ranking-kmd v-for="(item,index) in d3" :key="index" :lineShow="index === 0 ? false : true" :num="index + 1" :label="item.label|doStr(8)" :val="item.val" @toMedia="toKeyMedia(item)"></v-ranking-kmd>
|
||||
</div>
|
||||
</div>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wct-outter" v-loading="load" v-else>
|
||||
<v-label-div title="内容TOP声量"> </v-label-div>
|
||||
<div class="wct-inner">
|
||||
<div class="dd2">
|
||||
<div class="d-rank" style="margin-left: 16px;display: flex">
|
||||
<div class="rank1">
|
||||
<v-ranking-kmd v-for="(item,index) in d1" :key="index" :lineShow="index === 0 ? false : true" :num="index + 1" :label="item.label|doStr(8)" :val="item.val" @toMedia="toKeyMedia(item)"></v-ranking-kmd>
|
||||
</div>
|
||||
<div class="rank1" style="margin-left: 14px">
|
||||
<v-ranking-kmd v-for="(item,index) in d2" :key="index" :lineShow="index === 0 ? false : true" :num="index + 6" :label="item.label|doStr(8)" :val="item.val" @toMedia="toKeyMedia(item)"></v-ranking-kmd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {comparePig} from "@/utils/gol/dataTool"
|
||||
import {getGuanZhuSeriesname} from "@/api/KeyMediaSpecial/index.js"
|
||||
import vRankingKmd from "./v-ranking-kmd"
|
||||
import {getDirectWeiBo0528} from "@/api/KeyMediaSpecial/index.js"
|
||||
export default {
|
||||
name: "weiboContentTOPVolume",
|
||||
components: {
|
||||
vRankingKmd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
d1: [],
|
||||
d2: [],
|
||||
d3: [],
|
||||
d4: [],
|
||||
list: [],
|
||||
colors: ['#3373CC', '#63AECC', '#54BF93', '#CC9D12', '#3373CC', '#63AECC', '#54BF93', '#CC9D12']
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
// this.load = true;
|
||||
getDirectWeiBo0528(this.form).then(res => {
|
||||
let data = res.data || [];
|
||||
data.sort(comparePig('value'));
|
||||
let mediaList = [];
|
||||
data.forEach(ele => {
|
||||
let obj = { label: ele.key, val: ele.value};
|
||||
mediaList.push(obj);
|
||||
})
|
||||
this.d1 = mediaList.slice(0, 5);
|
||||
this.d2 = mediaList.slice(5, 10);
|
||||
this.d4 = mediaList;
|
||||
this.load = false;
|
||||
});
|
||||
getGuanZhuSeriesname(this.form).then(res => {
|
||||
let data = res.data || [];
|
||||
let arr = [];
|
||||
for(let key in data) {
|
||||
let obj = {label: key, val: data[key]};
|
||||
arr.push(obj)
|
||||
}
|
||||
this.d3 = arr
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.d22 {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.wct-outter {
|
||||
width: 936px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wct-small-outter {
|
||||
width: 460px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
overflow: hidden;
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
.wct-inner {
|
||||
width: 100%;
|
||||
margin-top: 16px;
|
||||
height: calc(100% - 48px);
|
||||
.wct-d1 {
|
||||
position: relative;
|
||||
width: 233px;
|
||||
height: 206px;
|
||||
display: inline-block;
|
||||
.wct-d1-dd1 {
|
||||
position: absolute;
|
||||
padding: 0px 16px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
top: 140px;
|
||||
left: 0px;
|
||||
span {
|
||||
color: #d8d8d8;
|
||||
font-size: 12px;
|
||||
.ss1 {
|
||||
font-family: Bebas;
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,236 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-08 16:44:08
|
||||
* @LastEditTime: 2021-11-18 11:57:14
|
||||
* @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 @click="goKeyMedia(label)" 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-kmd",
|
||||
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
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goKeyMedia(obj) {
|
||||
this.$emit('toMedia', obj)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.v-r-container {
|
||||
width: 430px;
|
||||
height: auto;
|
||||
.v-r-line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background:#0a1d3b;
|
||||
margin-top: 13px;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
.v-r-inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
margin-top: 6px;
|
||||
color: #fff;
|
||||
background: #0a1d3b;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.v-r-label {
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
margin-left: 40px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
.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: #9099a6;
|
||||
font-size: 16px;
|
||||
line-height: 48px;
|
||||
font-family: Bebas;
|
||||
}
|
||||
}
|
||||
.v-r-right {
|
||||
position: absolute;
|
||||
width: 404px;
|
||||
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: 404px;
|
||||
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: 404px;
|
||||
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: 404px;
|
||||
height: 48px;
|
||||
border-top: 2px solid #54BF93;
|
||||
top: 0px;
|
||||
left: 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,66 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 15:54:06
|
||||
* @LastEditTime: 2021-11-04 17:03:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentTOPVolume/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboContentTOPVolume",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
}
|
||||
};
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wct-outter {
|
||||
width: 936px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wct-inner {
|
||||
width: 100%;
|
||||
margin-top: 16px;
|
||||
height: calc(100% - 48px);
|
||||
.wct-d1 {
|
||||
position: relative;
|
||||
width: 233px;
|
||||
height: 206px;
|
||||
display: inline-block;
|
||||
.wct-d1-dd1 {
|
||||
position: absolute;
|
||||
padding: 0px 16px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
top: 140px;
|
||||
left: 0px;
|
||||
span {
|
||||
color: #d8d8d8;
|
||||
font-size: 12px;
|
||||
.ss1 {
|
||||
font-family: Bebas;
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,132 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:24:56
|
||||
* @LastEditTime: 2021-11-09 13:17:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentType/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter" v-loading="load">
|
||||
<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/KeyMediaSpecial/index.js"
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "weiboContentType",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
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.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getWtypeWeiBo0528(this.form).then((res) => {
|
||||
let data = res.data || [];
|
||||
let arr = [];
|
||||
data.forEach(ele => {
|
||||
if(ele.value != 0 ) {
|
||||
let obj = {key: ele.key, value: ele.value};
|
||||
arr.push(obj);
|
||||
}
|
||||
})
|
||||
this.doVal(arr);
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
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;
|
||||
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,72 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-09 09:49:50
|
||||
* @LastEditTime: 2021-10-28 13:07:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/Index/userPortrait/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
|
||||
function createData(ds = [], colors) {
|
||||
let arr = [];
|
||||
ds.map((ele, index) => {
|
||||
let obj = {
|
||||
value: ele.value,
|
||||
name: ele.key,
|
||||
itemStyle: {
|
||||
color: colors[index]
|
||||
}
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
return arr;
|
||||
}
|
||||
export default function createOpt(ds = [], color = []) {
|
||||
const data = createData(ds, color);
|
||||
return {
|
||||
series: [
|
||||
{
|
||||
name: 'Access From0',
|
||||
type: 'pie',
|
||||
radius: ['65%', '80%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center',
|
||||
lineHeight: 36
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '20',
|
||||
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: ['86%', '94%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
center: ['50%', '50%'],//边框位置
|
||||
data: data
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:24:56
|
||||
* @LastEditTime: 2021-11-09 13:17:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentType/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboContentType",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,113 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 11:25:20
|
||||
* @LastEditTime: 2021-11-10 17:13:41
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wua-outter" v-loading="load">
|
||||
<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 {getUserRegionGroupBy} from "@/api/KeyMediaSpecial/index.js"
|
||||
import createOptD1 from "./opt1";
|
||||
import createOptD2 from "./opt2";
|
||||
export default {
|
||||
name: "weiboUserActiveArea",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
opt1: createOptD1(),
|
||||
opt2: createOptD2(),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getUserRegionGroupBy(this.form).then((res) => {
|
||||
let data = res.data || {};
|
||||
let dx = []; //省份
|
||||
let ds = []; //数据
|
||||
let arr = [];
|
||||
data.forEach((ele) => {
|
||||
dx.push(ele.Key);
|
||||
ds.push(ele.Value);
|
||||
let obj = {
|
||||
name: ele.Key,
|
||||
value: ele.Value,
|
||||
};
|
||||
arr.push(obj)
|
||||
});
|
||||
let dm = arr //省份和数据
|
||||
this.opt1 = createOptD1(dx, ds);
|
||||
this.opt2 = createOptD2(dm);
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
// 将对象变成数组
|
||||
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: 'rgba(59,106,179,0.4)'
|
||||
}, {
|
||||
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,49 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 11:25:20
|
||||
* @LastEditTime: 2021-11-10 17:13:41
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wua-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboUserActiveArea",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,89 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:06:52
|
||||
* @LastEditTime: 2021-10-14 19:14:42
|
||||
* @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="词云分布">
|
||||
</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 {getHotWord} from "@/api/KeyMediaSpecial/index.js"
|
||||
import createWordCloud from "@/utils/gol/bubbleWord";
|
||||
//import createOpt from "./opt";
|
||||
export default {
|
||||
name: "weiboWordCloud",
|
||||
data() {
|
||||
return {
|
||||
opt: {},
|
||||
load: false,
|
||||
positiveData: {},
|
||||
negativeData: {},
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
sSource: '',
|
||||
ilimitType: 0,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.form.sSource = this.$route.query.source || "抖音";
|
||||
if(this.form.sSource == '汽车之家') {
|
||||
this.form.ilimitType = 1;
|
||||
} else if (this.form.sSource == '懂车帝' && this.getCarCircle == 1) {
|
||||
this.form.ilimitType = 2;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
Promise.all([this.getH()]).then(() => {
|
||||
// 什么也不执行
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
// 正面
|
||||
getH() {
|
||||
return new Promise((resolve, reject) => {
|
||||
getHotWord(this.form)
|
||||
.then((res) => {
|
||||
this.positiveData = res.data || {};
|
||||
this.opt = createWordCloud(res.data);
|
||||
resolve(res);
|
||||
})
|
||||
.catch(() => {
|
||||
reject(false);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wwc-outter {
|
||||
width: 618px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.wwc-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:06:52
|
||||
* @LastEditTime: 2021-10-14 19:14:42
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboWordCloud/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wwc-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboWordCloud",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,74 @@
|
||||
<!--
|
||||
* @Author: xw
|
||||
* @Date: 2021-10-09 11:28:39
|
||||
* @LastEditTime: 2021-12-23 16:34:58
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 晴雨表
|
||||
* @FilePath: /data-show/src/views/Index/barometer/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="bm-outter" v-loading="load">
|
||||
<v-label-div title="调性趋势"></v-label-div>
|
||||
<div class="bm-bd">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import createOpt from "./opt";
|
||||
import {getAffectionsTime} from "@/api/SpecialAnalize";
|
||||
export default {
|
||||
name: "barometer",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
opt: {},
|
||||
pdata: [],
|
||||
form: {
|
||||
token: '',
|
||||
sSpecialGuid: "",
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true
|
||||
getAffectionsTime(this.form).then(res => {
|
||||
let data = res.data || [];
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.Time);
|
||||
ds.push(ele.Data);
|
||||
})
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.bm-outter {
|
||||
width: 630px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
overflow: hidden;
|
||||
.bm-bd {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
.tis {
|
||||
display: flex;
|
||||
justify-items: flex-end;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,85 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 16:48:36
|
||||
* @LastEditTime: 2021-11-01 18:07:12
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/forumHotTopicDirection/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="fhtd-outter" v-loading="load">
|
||||
<v-label-div title="内容方向" :eStyle="{ 'border-style': 'none' }" />
|
||||
<div class="fhtd-inner">
|
||||
<div class="d1" style="margin-top: 24px">
|
||||
<v-ranking-fhtd :num="index + 1" :label="item.key" :val="item.value" :lineShow="index === 0 ?false : true" v-for="(item,index) in d1" :key="index"></v-ranking-fhtd>
|
||||
</div>
|
||||
<div class="d2" style="margin-left: 16px;margin-top: 24px">
|
||||
<v-ranking-fhtd :num="5 + index + 1" :label="item.key" :val="item.value" :lineShow="index === 0 ?false : true" v-for="(item,index) in d2" :key="index"></v-ranking-fhtd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDirectWeiBo0528 } from "@/api/SpecialAnalize";
|
||||
import vRankingFhtd from "./v-ranking-fhtd";
|
||||
export default {
|
||||
name: "forumHotTopicDirection",
|
||||
props: ["brand"],
|
||||
components: {
|
||||
"v-ranking-fhtd": vRankingFhtd,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
},
|
||||
d1: [],
|
||||
d2: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 将数组分成几份
|
||||
group(array, subGroupLength) {
|
||||
let index = 0;
|
||||
let newArray = [];
|
||||
while (index < array.length) {
|
||||
newArray.push(array.slice(index, (index += subGroupLength)));
|
||||
}
|
||||
return newArray;
|
||||
},
|
||||
getData() {
|
||||
this.load = true;
|
||||
getDirectWeiBo0528(this.form).then((res) => {
|
||||
let data = res.data;
|
||||
let groupedArray = this.group(data, 4);
|
||||
this.d1 = groupedArray[0];
|
||||
this.d2 = groupedArray[1];
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.fhtd-outter {
|
||||
width: 608px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.fhtd-inner {
|
||||
padding: 0px 16px 16px 16px;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,230 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-08 16:44:08
|
||||
* @LastEditTime: 2021-11-09 16:25:31
|
||||
* @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: 280px;
|
||||
height: auto;
|
||||
.v-r-line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background:#0a1d3b;
|
||||
margin-top: 13px;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
.v-r-inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
margin-top: 6px;
|
||||
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: #99a2ad;
|
||||
font-size: 16px;
|
||||
line-height: 48px;
|
||||
font-family: Bebas;
|
||||
}
|
||||
}
|
||||
.v-r-right {
|
||||
position: absolute;
|
||||
width: 255px;
|
||||
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: 255px;
|
||||
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: 255px;
|
||||
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: 255px;
|
||||
height: 48px;
|
||||
border-top: 2px solid #54BF93;
|
||||
top: 0px;
|
||||
left: 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:06:52
|
||||
* @LastEditTime: 2021-10-14 19:14:42
|
||||
* @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="热门词云"></v-label-div>
|
||||
<div class="wwc-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getHotWord } from "@/api/SpecialAnalize";
|
||||
import createWordCloud from "@/utils/gol/bubbleWord";
|
||||
//import createOpt from "./opt";
|
||||
export default {
|
||||
name: "weiboWordCloud",
|
||||
data() {
|
||||
return {
|
||||
opt: {},
|
||||
load: false,
|
||||
positiveData: {},
|
||||
negativeData: {},
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getHotWord(this.form).then(res => {
|
||||
let data = res.data || {};
|
||||
this.opt = createWordCloud(data);
|
||||
this.load = false;
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wwc-outter {
|
||||
width: 608px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.wwc-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,299 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 09:00:09
|
||||
* @LastEditTime: 2021-10-16 15:54:30
|
||||
* @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="name+'专项分析'">
|
||||
<v-btn @click="goback">返回专项列表</v-btn>
|
||||
</v-label-div>
|
||||
<div class="wd-d1-bd">
|
||||
<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/ModelInsight/ic_qrpl.png" />
|
||||
<div class="dd2">
|
||||
<span class="s1">{{ countObj.ReplyCount }}</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">
|
||||
<vue-lazy-component>
|
||||
<weibo-communication-trend></weibo-communication-trend>
|
||||
<weiboCommunicationTrendStoken slot="skeleton"></weiboCommunicationTrendStoken>
|
||||
</vue-lazy-component>
|
||||
<transformTopMedia></transformTopMedia>
|
||||
<source-dis></source-dis>
|
||||
</div>
|
||||
<div class="wd-d3">
|
||||
<vue-lazy-component>
|
||||
<weiboCharacters></weiboCharacters>
|
||||
<weiboCharactersStoken slot="skeleton"></weiboCharactersStoken>
|
||||
</vue-lazy-component>
|
||||
<affection-type></affection-type>
|
||||
<content-direction></content-direction>
|
||||
</div>
|
||||
<div class="wd-d3">
|
||||
<sourceTopTen></sourceTopTen>
|
||||
<vue-lazy-component>
|
||||
<weiboContentType></weiboContentType>
|
||||
<weiboContentTypeStoken slot="skeleton"></weiboContentTypeStoken>
|
||||
</vue-lazy-component>
|
||||
</div>
|
||||
<div class="wd-d3">
|
||||
<vue-lazy-component>
|
||||
<weiboUserActiveArea></weiboUserActiveArea>
|
||||
<weiboUserActiveAreaStoken slot="skeleton"></weiboUserActiveAreaStoken>
|
||||
</vue-lazy-component>
|
||||
<hotWordCloud></hotWordCloud>
|
||||
</div>
|
||||
<div class="wd-d4">
|
||||
<v-label-div title="尾翼分析"></v-label-div>
|
||||
<div style="display: flex;justify-content: flex-start;">
|
||||
<wyTransform></wyTransform>
|
||||
<vue-lazy-component>
|
||||
<modelPopularity></modelPopularity>
|
||||
<modelPopularityStoken slot="skeleton"></modelPopularityStoken>
|
||||
</vue-lazy-component>
|
||||
<wyAffectionPercent></wyAffectionPercent>
|
||||
<vue-lazy-component>
|
||||
<weiboWordCloud></weiboWordCloud>
|
||||
<weiboWordCloudStoken slot="skeleton"></weiboWordCloudStoken>
|
||||
</vue-lazy-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wd-d5">
|
||||
<saleForm></saleForm>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import weiboCommunicationTrend from "./weiboCommunicationTrend";
|
||||
import weiboContentType from "./weiboContentType";
|
||||
import weiboCharacters from "./weiboCharacters";
|
||||
import weiboUserActiveArea from "./weiboUserActiveArea";
|
||||
import modelPopularity from "./modelPopularity";
|
||||
import weiboWordCloud from "./weiboWordCloud";
|
||||
import sourceDis from "./sourceDis";
|
||||
import transformTopMedia from "./transformTopMedia";
|
||||
import affectionType from "./affectionType";
|
||||
import contentDirection from "./contentDirection";
|
||||
import sourceTopTen from "./sourceTopTen"
|
||||
import hotWordCloud from "./hotWordCloud";
|
||||
import wyTransform from "./wyTransform";
|
||||
import wyAffectionPercent from "./wyAffectionPercent";
|
||||
import saleForm from "./saleForm";
|
||||
//骨架屏
|
||||
import weiboCommunicationTrendStoken from "./weiboCommunicationTrendStoken";
|
||||
import weiboContentTypeStoken from "./weiboContentTypeStoken";
|
||||
import weiboCharactersStoken from "./weiboCharactersStoken";
|
||||
import weiboUserActiveAreaStoken from "./weiboUserActiveAreaStoken";
|
||||
import modelPopularityStoken from "./modelPopularityStoken";
|
||||
import weiboWordCloudStoken from "./weiboWordCloudStoken";
|
||||
import {getCountAndaffections} from "@/api/SpecialAnalize"
|
||||
export default {
|
||||
name: "SpecialAnalizeBoard",
|
||||
components: {
|
||||
weiboCommunicationTrend, // 传播趋势
|
||||
weiboContentType, // 微博内容类型
|
||||
weiboCharacters, // 微博人物画像
|
||||
weiboUserActiveArea, // 微博用户活跃地区
|
||||
modelPopularity, // 车型热度
|
||||
weiboWordCloud, // 词云分布
|
||||
sourceDis, //渠道分布
|
||||
transformTopMedia, //传播top媒体
|
||||
affectionType, //调性趋势
|
||||
contentDirection, //内容方向
|
||||
sourceTopTen, //TOp10渠道占比
|
||||
hotWordCloud, //热门词云
|
||||
wyTransform, //尾翼传播态势
|
||||
wyAffectionPercent, //尾翼调性占比
|
||||
saleForm, //销量趋势
|
||||
//骨架屏
|
||||
weiboCommunicationTrendStoken, // 传播趋势
|
||||
weiboContentTypeStoken, // 微博内容类型
|
||||
weiboCharactersStoken, // 微博人物画像
|
||||
weiboUserActiveAreaStoken, // 微博用户活跃地区
|
||||
modelPopularityStoken, // 车型热度
|
||||
weiboWordCloudStoken, // 词云分布
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
width: 200,
|
||||
form: {
|
||||
token: "",
|
||||
sSpecialGuid: '',
|
||||
},
|
||||
countObj: {
|
||||
Count: 0,
|
||||
ReplyCount: 0,
|
||||
},
|
||||
countObj2: {
|
||||
正面: 0,
|
||||
中性: 0,
|
||||
负面: 0,
|
||||
},
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.setHeaderType(4);
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.name = this.$route.query.name;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
goback() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
getData() {
|
||||
getCountAndaffections(this.form).then(res => {
|
||||
let data = res.data;
|
||||
this.countObj.Count = data.Count;
|
||||
this.countObj.ReplyCount = data.ReplyCount;
|
||||
this.total = data.Affections[0].Value*1+data.Affections[1].Value*1+data.Affections[2].Value*1;
|
||||
this.countObj2.正面 = data.Affections[0].Value;
|
||||
this.countObj2.中性 = data.Affections[1].Value;
|
||||
this.countObj2.负面 = data.Affections[2].Value;
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</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: 578px;
|
||||
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;
|
||||
margin-top: 16px;
|
||||
border: 2px solid #0f2a4d;
|
||||
}
|
||||
.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>
|
@ -0,0 +1,76 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 18:42:40
|
||||
* @LastEditTime: 2021-11-09 11:58:09
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/modelPopularity/index.vue
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="mp-outter" v-loading="load">
|
||||
<v-label-div title="重点媒体" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="mp-inner">
|
||||
<vue-scroll>
|
||||
<v-ranking-mpth
|
||||
v-for="(item, index) in labelArr"
|
||||
:key="index"
|
||||
:num="index + 1"
|
||||
:label="item.key"
|
||||
:val="item.value"
|
||||
></v-ranking-mpth>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getSourceTopWY} from "@/api/SpecialAnalize";
|
||||
import vRankingMpth from './v-ranking-mpth'
|
||||
export default {
|
||||
name: "modelPopularity",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
},
|
||||
labelArr: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
vRankingMpth,
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
getData() {
|
||||
getSourceTopWY(this.form).then(res => {
|
||||
let data = res.data;
|
||||
let arr = [];
|
||||
for(let key in data) {
|
||||
let obj = {key: key, value: data[key]};
|
||||
arr.push(obj)
|
||||
};
|
||||
this.labelArr = arr;
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.mp-outter {
|
||||
width: 460px;
|
||||
height: 460px;
|
||||
// border: 2px solid #0f2a4d;
|
||||
.mp-inner {
|
||||
padding: 0px 16px 0px 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,39 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 18:42:40
|
||||
* @LastEditTime: 2021-11-09 11:58:09
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/modelPopularity/index.vue
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="mp-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "modelPopularity",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
iType: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,60 @@
|
||||
<template>
|
||||
<div class="sf-outter" v-loading="load">
|
||||
<v-label-div title="销量分析(近一年)"></v-label-div>
|
||||
<div class="sf-inner">
|
||||
<v-echarts :opt="opt" ></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getSeriesTimeCountToYear} from "@/api/SpecialAnalize";
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "saleForm",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
token: '',
|
||||
sSpecialGuid: '',
|
||||
},
|
||||
time: '',
|
||||
opt: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getSeriesTimeCountToYear(this.form).then(res => {
|
||||
let data = res.data;
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.Time);
|
||||
ds.push(ele.Count);
|
||||
})
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.sf-outter {
|
||||
width: 1924px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.sf-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 16:40:53
|
||||
* @LastEditTime: 2021-11-19 19:48:04
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/forumCommunicationTrend/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
import { bigNumberTransform } from "@/utils/gol/dataTool"
|
||||
export default function createOpt(dx = [], ds = []) {
|
||||
return {
|
||||
grid: {
|
||||
top: "15%",
|
||||
left: "3%",
|
||||
right: "5%",
|
||||
bottom: "3%",
|
||||
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,
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: "#fff",
|
||||
},
|
||||
},
|
||||
axisLabel : {
|
||||
formatter: (value) => {
|
||||
return value
|
||||
}
|
||||
},
|
||||
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: "#CC9D12",
|
||||
areaStyle: {normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: '#CC9D12'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(0,0,0,0)'
|
||||
}]),
|
||||
}},
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:48:56
|
||||
* @LastEditTime: 2021-11-09 13:16:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCharacters/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wc-outter" v-loading="load">
|
||||
<v-label-div title="渠道分布"></v-label-div>
|
||||
<div class="wc-inner">
|
||||
<div class="d1">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
<div class="d2">
|
||||
<div v-if="labelArr.length<=3">
|
||||
<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>
|
||||
<vue-scroll v-if="labelArr.length>3">
|
||||
<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: '5.14rem' }"
|
||||
></v-label-ctx>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSourcetype } from "@/api/SpecialAnalize";
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "weiboCharacters",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
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.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 获取后台数据
|
||||
getData() {
|
||||
this.load = true;
|
||||
getSourcetype(this.form).then((res) => {
|
||||
let data = res.data || {};
|
||||
let total = 0;
|
||||
let labelArr = [];
|
||||
for(let key in data) {
|
||||
total = total + data[key];
|
||||
let obj = {key: key, value: data[key]};
|
||||
labelArr.push(obj);
|
||||
};
|
||||
this.total = total;
|
||||
this.labelArr = labelArr;
|
||||
this.opt = createOpt(labelArr, this.colors);
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</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,72 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-09 09:49:50
|
||||
* @LastEditTime: 2021-10-28 13:07:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/Index/userPortrait/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
|
||||
function createData(ds = [], colors) {
|
||||
let arr = [];
|
||||
ds.map((ele, index) => {
|
||||
let obj = {
|
||||
value: ele.value,
|
||||
name: ele.key,
|
||||
itemStyle: {
|
||||
color: colors[index]
|
||||
}
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
return arr;
|
||||
}
|
||||
export default function createOpt(ds = [], color = []) {
|
||||
const data = createData(ds, color);
|
||||
return {
|
||||
series: [
|
||||
{
|
||||
name: 'Access From0',
|
||||
type: 'pie',
|
||||
radius: ['65%', '80%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center',
|
||||
lineHeight: 36
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '20',
|
||||
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: ['86%', '94%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
center: ['50%', '50%'],//边框位置
|
||||
data: data
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
<!--
|
||||
* @Author: xw
|
||||
* @Date: 2021-10-09 10:53:21
|
||||
* @LastEditTime: 2021-12-23 16:36:32
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: 传播声量TOP10
|
||||
* @FilePath: /data-show/src/views/Index/spreadTheSound/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="st-outter" v-loading="load">
|
||||
<v-label-div title="TOP10渠道占比"></v-label-div>
|
||||
<div class="st-bd">
|
||||
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import createOpt from "./opt";
|
||||
import { getHomeBrandSourceType0528 } from "@/api/home";
|
||||
import {getBrandOrSeriesNameBySourceTypeGroupBy} from "@/api/SpecialAnalize";
|
||||
import {
|
||||
getBrandName,
|
||||
getUserSeriesName,
|
||||
getBrandOrSeriesLevel,
|
||||
} from "@/api/comm";
|
||||
export default {
|
||||
name: "spread-the-sound",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
token: '',
|
||||
sSpecialGuid: "",
|
||||
},
|
||||
opt: {},
|
||||
pdata: [],
|
||||
type: 0, //0品牌 1车型
|
||||
visible: false,
|
||||
ModalText: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 获取数据
|
||||
getData() {
|
||||
this.load = true;
|
||||
getBrandOrSeriesNameBySourceTypeGroupBy(this.form).then((res) => {
|
||||
let data = res.data;
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
data.forEach((ele) => {
|
||||
let key = ele.Key;
|
||||
let value = ele.Data;
|
||||
dx.push(key);
|
||||
ds.push(value);
|
||||
});
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
// 分页显示数据
|
||||
handlerData(arr) {
|
||||
let dx = [];
|
||||
let ds = [];
|
||||
arr.forEach((ele) => {
|
||||
let key = ele.key;
|
||||
let value = ele.value;
|
||||
dx.push(key);
|
||||
ds.push(value);
|
||||
});
|
||||
this.opt = createOpt(dx, ds);
|
||||
},
|
||||
clickEchars(data) {
|
||||
let ele = data;
|
||||
if (this.type === 1) {
|
||||
let model = ele.axisValueLabel;
|
||||
let obj = {
|
||||
token: this.getToken,
|
||||
sSeriesName: model,
|
||||
};
|
||||
getBrandOrSeriesLevel(obj).then(() => {
|
||||
getBrandName(obj).then((res) => {
|
||||
this.setModel({ name: model });
|
||||
this.setHeaderType(3);
|
||||
this.setBrand({ brandname: res.data });
|
||||
this.$router.push("/modelInsight");
|
||||
});
|
||||
})
|
||||
} else {
|
||||
let brand = ele.axisValueLabel;
|
||||
getBrandOrSeriesLevel({
|
||||
token: this.getToken,
|
||||
sBrand: brand,
|
||||
}).then(() => {
|
||||
this.getUserSeriesName(brand); //同步车型
|
||||
this.setBrand({ brandname: brand });
|
||||
this.setHeaderType(3);
|
||||
this.$router.push("/brandInsight");
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取车型
|
||||
getUserSeriesName(brandName) {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sBrandName = brandName;
|
||||
getUserSeriesName(this.form).then((res) => {
|
||||
let data = res.data || [];
|
||||
this.models = data;
|
||||
this.chooseModel = this.models[0];
|
||||
this.setModel(this.chooseModel);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.st-outter {
|
||||
width: 1266px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.st-bd {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
.tis {
|
||||
display: flex;
|
||||
justify-items: flex-end;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,99 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 16:48:36
|
||||
* @LastEditTime: 2021-11-01 18:07:12
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/BrandInsight/forumHotTopicDirection/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="fhtd-outter" v-loading="load">
|
||||
<v-label-div title="传播TOP媒体" :eStyle="{ 'border-style': 'none' }" />
|
||||
<div class="fhtd-inner">
|
||||
<div class="d1" style="margin-top: 16px">
|
||||
<v-ranking-fhtd @toMedia="goKeyMedia(item)" :num="index + 1" :label="item.key" :val="item.value" :lineShow="index === 0 ?false : true" v-for="(item,index) in d1" :key="index"></v-ranking-fhtd>
|
||||
</div>
|
||||
<div class="d2" style="margin-left: 16px;margin-top: 16px">
|
||||
<v-ranking-fhtd @toMedia="goKeyMedia(item)" :num="5 + index + 1" :label="item.key" :val="item.value" :lineShow="index === 0 ?false : true" v-for="(item,index) in d2" :key="index"></v-ranking-fhtd>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSourceTop } from "@/api/SpecialAnalize";
|
||||
import vRankingFhtd from "./v-ranking-fhtd";
|
||||
export default {
|
||||
name: "forumHotTopicDirection",
|
||||
props: ["brand"],
|
||||
components: {
|
||||
"v-ranking-fhtd": vRankingFhtd,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
},
|
||||
d1: [],
|
||||
d2: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 将数组分成几份
|
||||
group(array, subGroupLength) {
|
||||
let index = 0;
|
||||
let newArray = [];
|
||||
while (index < array.length) {
|
||||
newArray.push(array.slice(index, (index += subGroupLength)));
|
||||
}
|
||||
return newArray;
|
||||
},
|
||||
getData() {
|
||||
this.load = true;
|
||||
getSourceTop(this.form).then((res) => {
|
||||
let data = res.data || [];
|
||||
let arr = [];
|
||||
for(let key in data) {
|
||||
let obj = {key: key, value: data[key]};
|
||||
arr.push(obj);
|
||||
};
|
||||
let groupedArray = this.group(arr, 5);
|
||||
this.d1 = groupedArray[0];
|
||||
this.d2 = groupedArray[1];
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
goKeyMedia(item) {
|
||||
this.$router.push({
|
||||
path: '/keyMediaSpecial',
|
||||
query: {
|
||||
source: item.key,
|
||||
sSpecialGuid: this.form.sSpecialGuid
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.fhtd-outter {
|
||||
width: 630px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
margin-left: 16px;
|
||||
.fhtd-inner {
|
||||
padding: 0px 16px 16px 16px;
|
||||
height: auto;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,235 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-08 16:44:08
|
||||
* @LastEditTime: 2021-11-09 16:25:31
|
||||
* @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" @click="goKeyMedia(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
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goKeyMedia(obj) {
|
||||
this.$emit('toMedia', obj)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.v-r-container {
|
||||
width: 290px;
|
||||
height: auto;
|
||||
.v-r-line {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background:#0a1d3b;
|
||||
margin-top: 13px;
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
.v-r-inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
margin-top: 6px;
|
||||
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: #99a2ad;
|
||||
font-size: 16px;
|
||||
line-height: 48px;
|
||||
font-family: Bebas;
|
||||
}
|
||||
}
|
||||
.v-r-right {
|
||||
position: absolute;
|
||||
width: 265px;
|
||||
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: 265px;
|
||||
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: 265px;
|
||||
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: 265px;
|
||||
height: 48px;
|
||||
border-top: 2px solid #54BF93;
|
||||
top: 0px;
|
||||
left: 24px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,180 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:48:56
|
||||
* @LastEditTime: 2021-11-09 13:16:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCharacters/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wc-outter" v-loading="load">
|
||||
<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">
|
||||
<div v-if="labelArr.length<=3">
|
||||
<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>
|
||||
<vue-scroll v-if="labelArr.length>3">
|
||||
<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: '5.14rem' }"
|
||||
></v-label-ctx>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAttestationSex, getUserAttestationGroupBy} from "@/api/SpecialAnalize";
|
||||
import createOpt from "./opt";
|
||||
export default {
|
||||
name: "weiboCharacters",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
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.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 获取后台数据
|
||||
getData() {
|
||||
this.load = true;
|
||||
getAttestationSex(this.form).then((res) => {
|
||||
let data = res.data || {};
|
||||
let sex = data;
|
||||
this.sex = this.toArr(sex);
|
||||
this.doVal(this.sex);
|
||||
this.load = false;
|
||||
});
|
||||
getUserAttestationGroupBy(this.form).then((res) => {
|
||||
let data = res.data || {};
|
||||
data.forEach(ele => {
|
||||
ele.key = ele.Key;
|
||||
ele.value = ele.Value;
|
||||
})
|
||||
this.attestation = data;
|
||||
});
|
||||
},
|
||||
// 将对象变成数组
|
||||
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;
|
||||
default:
|
||||
this.doVal(this.sex);
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wc-outter {
|
||||
width: 618px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
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,72 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-09 09:49:50
|
||||
* @LastEditTime: 2021-10-28 13:07:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/Index/userPortrait/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
|
||||
function createData(ds = [], colors) {
|
||||
let arr = [];
|
||||
ds.map((ele, index) => {
|
||||
let obj = {
|
||||
value: ele.value,
|
||||
name: ele.key,
|
||||
itemStyle: {
|
||||
color: colors[index]
|
||||
}
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
return arr;
|
||||
}
|
||||
export default function createOpt(ds = [], color = []) {
|
||||
const data = createData(ds, color);
|
||||
return {
|
||||
series: [
|
||||
{
|
||||
name: 'Access From0',
|
||||
type: 'pie',
|
||||
radius: ['65%', '80%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center',
|
||||
lineHeight: 36
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '20',
|
||||
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: ['86%', '94%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
center: ['50%', '50%'],//边框位置
|
||||
data: data
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:48:56
|
||||
* @LastEditTime: 2021-11-09 13:16:07
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCharacters/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wc-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboCharacters",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
colors: [
|
||||
"#54BF93",
|
||||
"#3373CC",
|
||||
"#CC9D12",
|
||||
"#f15c80",
|
||||
"#e4d354",
|
||||
"#8085e8",
|
||||
"#8d4653",
|
||||
"#91e8e1",
|
||||
"#f7a35c",
|
||||
"#90ed7d",
|
||||
"#54BF93",
|
||||
"#3373CC",
|
||||
"#CC9D12",
|
||||
"#f15c80",
|
||||
"#e4d354",
|
||||
"#8085e8",
|
||||
"#8d4653",
|
||||
"#91e8e1",
|
||||
"#f7a35c",
|
||||
"#90ed7d",
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,84 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:11:41
|
||||
* @LastEditTime: 2021-11-09 13:16:55
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter" v-loading="load">
|
||||
<v-label-div title="传播趋势">
|
||||
</v-label-div>
|
||||
<div class="wct-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getTimeCount} from "@/api/SpecialAnalize"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "weibo-communication-trend",
|
||||
data() {
|
||||
return {
|
||||
//弹出框//
|
||||
modelStyle:{
|
||||
left: '',
|
||||
top: ''
|
||||
},
|
||||
modelShow: false,
|
||||
ecbox:{//图表宽高
|
||||
width:618,
|
||||
height:490
|
||||
},
|
||||
ecmodel:{//弹框宽高
|
||||
width:300,
|
||||
height:280
|
||||
},
|
||||
activeCol: 0,
|
||||
//-*-//
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
},
|
||||
opt: createOpt(),
|
||||
urlArr: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getTimeCount(this.form).then(res => {
|
||||
let data = res.data || [];
|
||||
let dx = []; let ds = [];
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.Time);
|
||||
ds.push(ele.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,116 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 15:32:24
|
||||
* @LastEditTime: 2021-11-19 19:50:21
|
||||
* @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 = [], hotIndex = []) {
|
||||
let mark = [];
|
||||
hotIndex.forEach(ele => {
|
||||
let obj = {
|
||||
name: 'Max',
|
||||
xAxis: ele, yAxis: ds[ele],
|
||||
symbol: 'pin',
|
||||
symbolSize: 16,
|
||||
symbolOffset: [0, '-70%'],
|
||||
}
|
||||
mark.push(obj)
|
||||
})
|
||||
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 rex = "00:00:00";
|
||||
let isCont = false;
|
||||
let str = value;
|
||||
for(let i = 0;i<dx.length-1;i++){
|
||||
//连续两条带小时
|
||||
if(dx[i].indexOf(rex) === -1 && dx[i+1].indexOf(rex) === -1){
|
||||
isCont = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isCont == true) {
|
||||
str = value.substring(10, 16)
|
||||
} else {
|
||||
str = value.substring(5, 10)
|
||||
}
|
||||
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)'
|
||||
}]),
|
||||
}},
|
||||
markPoint: {
|
||||
data: mark,
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:11:41
|
||||
* @LastEditTime: 2021-11-09 13:16:55
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weibo-communication-trend",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
</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,119 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:24:56
|
||||
* @LastEditTime: 2021-11-09 13:17:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentType/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter" v-loading="load">
|
||||
<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: "weiboContentType",
|
||||
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.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);
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
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: 608px;
|
||||
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,72 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-09 09:49:50
|
||||
* @LastEditTime: 2021-10-28 13:07:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/Index/userPortrait/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
|
||||
function createData(ds = [], colors) {
|
||||
let arr = [];
|
||||
ds.map((ele, index) => {
|
||||
let obj = {
|
||||
value: ele.value,
|
||||
name: ele.key,
|
||||
itemStyle: {
|
||||
color: colors[index]
|
||||
}
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
return arr;
|
||||
}
|
||||
export default function createOpt(ds = [], color = []) {
|
||||
const data = createData(ds, color);
|
||||
return {
|
||||
series: [
|
||||
{
|
||||
name: 'Access From0',
|
||||
type: 'pie',
|
||||
radius: ['65%', '80%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center',
|
||||
lineHeight: 36
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '20',
|
||||
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: ['86%', '94%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
center: ['50%', '50%'],//边框位置
|
||||
data: data
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:24:56
|
||||
* @LastEditTime: 2021-11-09 13:17:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboContentType/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboContentType",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,103 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 11:25:20
|
||||
* @LastEditTime: 2021-11-10 17:13:41
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wua-outter" v-loading="load">
|
||||
<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 {getUserRegionGroupBy} from "@/api/SpecialAnalize";
|
||||
import { getRegionWeiBo } from "@/api/WeiboDetails";
|
||||
import createOptD1 from "./opt1";
|
||||
import createOptD2 from "./opt2";
|
||||
export default {
|
||||
name: "weiboUserActiveArea",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
token: '',
|
||||
sSpecialGuid: "",
|
||||
},
|
||||
opt1: createOptD1(),
|
||||
opt2: createOptD2(),
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getRegionWeiBo(this.form).then((res) => {
|
||||
let data = res.data || {};
|
||||
let arr = this.toArr(data);
|
||||
let dx = []; //省份
|
||||
let ds = []; //数据
|
||||
arr.forEach((ele) => {
|
||||
ele.name = ele.name.replace('省','')
|
||||
let value = ele.value;
|
||||
dx.push(ele.name);
|
||||
ds.push(value);
|
||||
});
|
||||
let dm = arr //省份和数据
|
||||
this.opt1 = createOptD1(dx, ds);
|
||||
this.opt2 = createOptD2(dm);
|
||||
this.load = false;
|
||||
});
|
||||
},
|
||||
// 将对象变成数组
|
||||
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: 1264px;
|
||||
height: 460px;
|
||||
border: 2px solid #0f2a4d;
|
||||
.wua-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
.d1 {
|
||||
width: 809px;
|
||||
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: 'rgba(59,106,179,0.4)'
|
||||
}, {
|
||||
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,49 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 11:25:20
|
||||
* @LastEditTime: 2021-11-10 17:13:41
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboUserActiveArea/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wua-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboUserActiveArea",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,62 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:06:52
|
||||
* @LastEditTime: 2021-10-14 19:14:42
|
||||
* @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 :showLine="false" title="词云分布" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="wwc-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getHotWordWY} from "@/api/SpecialAnalize";
|
||||
import createWordCloud from "@/utils/gol/bubbleWord";
|
||||
//import createOpt from "./opt";
|
||||
export default {
|
||||
name: "weiboWordCloud",
|
||||
data() {
|
||||
return {
|
||||
opt: {},
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
getHotWordWY(this.form).then(res => {
|
||||
let data = res.data || {};
|
||||
this.opt = createWordCloud(data);
|
||||
this.load = false;
|
||||
})
|
||||
}
|
||||
},
|
||||
};
|
||||
</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,39 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 19:06:52
|
||||
* @LastEditTime: 2021-10-14 19:14:42
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboWordCloud/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wwc-outter">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "weiboWordCloud",
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
sBrand: "",
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</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,82 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-11-09 16:27:20
|
||||
* @LastEditTime: 2021-11-10 14:56:15
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/ModelForumDetails/MainPostUserAnalysis/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="mpua-outter" v-loading="load">
|
||||
<v-label-div title="调性占比" :showLine="false" :eStyle="{'border-style': 'none'}"></v-label-div>
|
||||
<div class="mpua-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import createOpt from "./opt"
|
||||
import {getAffectionsTimeWY} from "@/api/SpecialAnalize";
|
||||
export default {
|
||||
name: "FollowPostUserAnalysis",
|
||||
data() {
|
||||
return {
|
||||
load: false,
|
||||
form: {
|
||||
token: "",
|
||||
sSpecialGuid: "",
|
||||
},
|
||||
sex: [],
|
||||
rz: [],
|
||||
opt: {},
|
||||
colors: [
|
||||
"#3373CC",
|
||||
"#54BF93",
|
||||
"#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.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
getAffectionsTimeWY(this.form).then(res => {
|
||||
let data = res.data;
|
||||
console.log(data);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.mpua-outter {
|
||||
width: 472px;
|
||||
height: 412px;
|
||||
.mpua-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-09 09:49:50
|
||||
* @LastEditTime: 2021-10-28 13:07:24
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/Index/userPortrait/opt.js
|
||||
*/
|
||||
import * as echarts from "echarts";
|
||||
// let colors = ['#3373CC', '#CC9D12', '#54BF93','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
|
||||
function createData(ds = [], colors) {
|
||||
let arr = [];
|
||||
ds.map((ele, index) => {
|
||||
let obj = {
|
||||
value: ele.value,
|
||||
name: ele.key,
|
||||
itemStyle: {
|
||||
color: colors[index]
|
||||
}
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
return arr;
|
||||
}
|
||||
export default function createOpt(ds = [], color = []) {
|
||||
const data = createData(ds, color);
|
||||
return {
|
||||
series: [
|
||||
{
|
||||
name: 'Access From0',
|
||||
type: 'pie',
|
||||
radius: ['65%', '80%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center',
|
||||
lineHeight: 48
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: '24',
|
||||
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: ['86%', '94%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
center: ['50%', '50%'],//边框位置
|
||||
data: data
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
<!--
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-14 10:11:41
|
||||
* @LastEditTime: 2021-11-09 13:16:55
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Description: In User Settings Edit
|
||||
* @FilePath: /data-show/src/views/WeiboDetails/weiboCommunicationTrend/index.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="wct-outter" v-loading="load">
|
||||
<v-label-div title="传播态势" :showLine="false" :eStyle="{'border-style': 'none'}">
|
||||
</v-label-div>
|
||||
<div class="wct-inner">
|
||||
<v-echarts :opt="opt"></v-echarts>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getTimeCountWY} from "@/api/SpecialAnalize"
|
||||
import createOpt from "./opt"
|
||||
export default {
|
||||
name: "weibo-communication-trend",
|
||||
data() {
|
||||
return {
|
||||
//弹出框//
|
||||
modelStyle:{
|
||||
left: '',
|
||||
top: ''
|
||||
},
|
||||
modelShow: false,
|
||||
ecbox:{//图表宽高
|
||||
width:618,
|
||||
height:490
|
||||
},
|
||||
ecmodel:{//弹框宽高
|
||||
width:300,
|
||||
height:280
|
||||
},
|
||||
activeCol: 0,
|
||||
//-*-//
|
||||
load: false,
|
||||
form: {
|
||||
sSpecialGuid: "",
|
||||
token: "",
|
||||
},
|
||||
opt: createOpt(),
|
||||
urlArr: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.token = this.getToken;
|
||||
this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
this.load = true;
|
||||
getTimeCountWY(this.form).then(res => {
|
||||
let data = res.data || [];
|
||||
let dx = []; let ds = [];
|
||||
data.forEach(ele => {
|
||||
dx.push(ele.Time);
|
||||
ds.push(ele.value);
|
||||
})
|
||||
this.opt = createOpt(dx, ds);
|
||||
this.load = false
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.wct-outter {
|
||||
width: 460px;
|
||||
height: 460px;
|
||||
.wct-inner {
|
||||
width: 100%;
|
||||
height: calc(100% - 48px);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-10-12 15:32:24
|
||||
* @LastEditTime: 2021-11-19 19:50:21
|
||||
* @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 = [], hotIndex = []) {
|
||||
let mark = [];
|
||||
hotIndex.forEach(ele => {
|
||||
let obj = {
|
||||
name: 'Max',
|
||||
xAxis: ele, yAxis: ds[ele],
|
||||
symbol: 'pin',
|
||||
symbolSize: 16,
|
||||
symbolOffset: [0, '-70%'],
|
||||
}
|
||||
mark.push(obj)
|
||||
})
|
||||
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 rex = "00:00:00";
|
||||
let isCont = false;
|
||||
let str = value;
|
||||
for(let i = 0;i<dx.length-1;i++){
|
||||
//连续两条带小时
|
||||
if(dx[i].indexOf(rex) === -1 && dx[i+1].indexOf(rex) === -1){
|
||||
isCont = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(isCont == true) {
|
||||
str = value.substring(10, 16)
|
||||
} else {
|
||||
str = value.substring(5, 10)
|
||||
}
|
||||
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: '#63AECC',
|
||||
areaStyle: {normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
|
||||
offset: 0,
|
||||
color: '#63AECC'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: 'rgba(0,0,0,0)'
|
||||
}]),
|
||||
}},
|
||||
markPoint: {
|
||||
data: mark,
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
Loading…
Reference in new issue