You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.1 KiB
89 lines
2.1 KiB
<!--
|
|
* @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> |