|
|
|
@ -1,16 +1,16 @@
|
|
|
|
|
<!--
|
|
|
|
|
* @Author: your name
|
|
|
|
|
* @Date: 2021-10-13 17:54:56
|
|
|
|
|
* @LastEditTime: 2021-10-13 18:07:49
|
|
|
|
|
* @LastEditTime: 2021-11-08 17:26:04
|
|
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
|
|
* @Description: In User Settings Edit
|
|
|
|
|
* @FilePath: /data-show/src/views/TailInsightDetails/popular-word-cloud/index.vue
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="pwc-outter">
|
|
|
|
|
<v-label-div title="热门词云" :showLine="false" :eStyle="{'border-style': 'none'}">
|
|
|
|
|
<v-tab-group :btns="['正面', '负面']" @change="handlerChange"></v-tab-group>
|
|
|
|
|
</v-label-div>
|
|
|
|
|
<div class="pwc-outter" v-loading="load">
|
|
|
|
|
<v-label-div title="热门词云" :showLine="false" :eStyle="{'border-style': 'none'}">
|
|
|
|
|
<v-tab-group :btns="['正面', '负面']" @change="handlerChange"></v-tab-group>
|
|
|
|
|
</v-label-div>
|
|
|
|
|
<div class="pwc-inner">
|
|
|
|
|
<v-echarts :opt="opt"></v-echarts>
|
|
|
|
|
</div>
|
|
|
|
@ -18,51 +18,55 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import createWordCloud from "@/utils/gol/bubbleWord";
|
|
|
|
|
import {getPositive,getNegative} from '@/api/TailInsightdetails'
|
|
|
|
|
import { getPositive, getNegative } from "@/api/TailInsightdetails";
|
|
|
|
|
export default {
|
|
|
|
|
name: "popular-word-cloud",
|
|
|
|
|
props: ["brand", "model"],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
load: false,
|
|
|
|
|
type: 0,
|
|
|
|
|
form: {
|
|
|
|
|
sBrand: "",
|
|
|
|
|
token: "",
|
|
|
|
|
},
|
|
|
|
|
opt: {}
|
|
|
|
|
}
|
|
|
|
|
opt: {},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.form.token = this.getToken;
|
|
|
|
|
this.form.sBrand = this.getBrand.brandname || '奥迪';
|
|
|
|
|
this.getData1();
|
|
|
|
|
this.getData2();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handlerChange(n) {
|
|
|
|
|
this.form.token = this.getToken;
|
|
|
|
|
this.form.sBrand = this.getBrand.brandname || "奥迪";
|
|
|
|
|
this.getData1();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handlerChange(n) {
|
|
|
|
|
this.type = n;
|
|
|
|
|
this.getData1();
|
|
|
|
|
this.getData2();
|
|
|
|
|
if(n === 0) {
|
|
|
|
|
this.getData1();
|
|
|
|
|
} else {
|
|
|
|
|
this.getData2();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getData1(){
|
|
|
|
|
this.load = true;
|
|
|
|
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
|
|
|
getPositive(obj).then(res => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.opt = createWordCloud(data);
|
|
|
|
|
this.load = false;
|
|
|
|
|
});
|
|
|
|
|
getData1() {
|
|
|
|
|
this.load = true;
|
|
|
|
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
|
|
|
getPositive(obj).then((res) => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.opt = createWordCloud(data);
|
|
|
|
|
this.load = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getData2(){
|
|
|
|
|
getData2() {
|
|
|
|
|
this.load = true;
|
|
|
|
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
|
|
|
getNegative(obj).then(res => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.opt = createWordCloud(data);
|
|
|
|
|
this.load = false;
|
|
|
|
|
})
|
|
|
|
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
|
|
|
getNegative(obj).then((res) => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.opt = createWordCloud(data);
|
|
|
|
|
this.load = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|