张雄 3 years ago
parent e935bcfb97
commit 6434bc74b6

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue
--> -->
<template> <template>
<div class="cpt-outter" v-loading="load"> <div class="cpt-outter">
<v-label-div <v-label-div
title="论坛正面话题对比" title="论坛正面话题对比"
:showLine="false" :showLine="false"

@ -20,8 +20,8 @@
</template> </template>
<script> <script>
import { getInteractCount0528C } from "@/api/BrandComparison/BrandWeibo.js"; // import { getInteractCount0528C } from "@/api/BrandComparison/BrandWeibo.js";
import { createSingleColumnar } from "@/utils/gol/singleColumnar"; // import { createSingleColumnar } from "@/utils/gol/singleColumnar";
export default { export default {
name: "comparisonOfTheNumberOfWeiboInteractions", name: "comparisonOfTheNumberOfWeiboInteractions",
data() { data() {
@ -31,46 +31,45 @@ export default {
sBrand: "", sBrand: "",
}, },
opt: {}, opt: {},
load: false,
}; };
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getBComparison; // let arr = this.getBComparison;
let brands = []; // let brands = [];
arr.forEach((ele) => { // arr.forEach((ele) => {
brands.push(ele.name); // brands.push(ele.name);
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.getData(); // this.getData();
}, // },
getData() { // getData() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true; // this.load = true;
getInteractCount0528C(obj) // getInteractCount0528C(obj)
.then((res) => { // .then((res) => {
let data = res.data || []; // let data = res.data || [];
let dx = []; // let dx = [];
let ds = []; // let ds = [];
data.forEach((ele) => { // data.forEach((ele) => {
dx.push(ele.key); // dx.push(ele.key);
ds.push(ele.value); // ds.push(ele.value);
}); // });
this.opt = createSingleColumnar(dx, ds); // this.opt = createSingleColumnar(dx, ds);
this.load = false; // this.load = false;
resolve(data); // resolve(data);
}) // })
.catch(() => { // .catch(() => {
reject(false); // reject(false);
}); // });
}); // });
}, // },
}, // },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -11,7 +11,7 @@
<v-label-div title="论坛信息概括对比" :showLine="false" :eStyle="{'border-style': 'none'}"/> <v-label-div title="论坛信息概括对比" :showLine="false" :eStyle="{'border-style': 'none'}"/>
<div class="saco-item" v-for="(item,index) in sourceData" :key="index"> <div class="saco-item" v-for="(item,index) in sourceData" :key="index">
<span class="s1">{{item.key}}</span> <span class="s1">{{item.key}}</span>
<div class="d1"> <!-- <div class="d1">
<img class="d1-m1" src="../../../assets/images/BrandInsight/ic_lt.png"> <img class="d1-m1" src="../../../assets/images/BrandInsight/ic_lt.png">
<div class="d1-d1"> <div class="d1-d1">
<span class="ss1">论坛信息量</span> <span class="ss1">论坛信息量</span>
@ -38,13 +38,13 @@
<span class="ss1">论坛评论量</span> <span class="ss1">论坛评论量</span>
<span class="ss2">{{item.interactCount}}</span> <span class="ss2">{{item.interactCount}}</span>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {getCount0528C} from "@/api/BrandComparison/BbsBrand.js" // import {getCount0528C} from "@/api/BrandComparison/BbsBrand.js"
export default { export default {
name: "summaryAndComparisonOfForumInformation", name: "summaryAndComparisonOfForumInformation",
data() { data() {
@ -57,35 +57,35 @@ export default {
sourceData: [], sourceData: [],
} }
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getBComparison; // let arr = this.getBComparison;
let brands = []; // let brands = [];
arr.forEach(ele => { // arr.forEach(ele => {
brands.push(ele.name) // brands.push(ele.name)
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.getData(); // this.getData();
}, // },
getData() { // getData() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true; // this.load = true;
getCount0528C(obj).then((res) => { // getCount0528C(obj).then((res) => {
let data = res.data || []; // let data = res.data || [];
this.sourceData = data; // this.sourceData = data;
this.load = false; // this.load = false;
resolve(data) // resolve(data)
}).catch(() => { // }).catch(() => {
reject(false) // reject(false)
}); // });
}); // });
} // }
} // }
} }
</script> </script>

@ -14,7 +14,7 @@
<div class="ttm-item" v-for="(item,index) in showData" :key="index"> <div class="ttm-item" v-for="(item,index) in showData" :key="index">
<span class="s1" :style="{color: colors[index]}">{{item.name}}</span> <span class="s1" :style="{color: colors[index]}">{{item.name}}</span>
<div class="d1"> <div class="d1">
<v-echarts :opt="item.drawOpt"></v-echarts> <!-- <v-echarts :opt="item.drawOpt"></v-echarts> -->
</div> </div>
</div> </div>
</div> </div>
@ -22,8 +22,8 @@
</template> </template>
<script> <script>
import {getSourceTopCount0528C} from "@/api/BrandComparison/BrandWeiyi.js" // import {getSourceTopCount0528C} from "@/api/BrandComparison/BrandWeiyi.js"
import {createSingleColumnar} from "@/utils/gol/singleColumnar" // import {createSingleColumnar} from "@/utils/gol/singleColumnar"
export default { export default {
name: "tailTOPMedia", name: "tailTOPMedia",
data() { data() {
@ -38,52 +38,52 @@ export default {
load: false load: false
}; };
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getBComparison; // let arr = this.getBComparison;
let brands = []; // let brands = [];
arr.forEach(ele => { // arr.forEach(ele => {
brands.push(ele.name) // brands.push(ele.name)
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.getData(); // this.getData();
}, // },
getData() { // getData() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true; // this.load = true;
getSourceTopCount0528C(obj).then((res) => { // getSourceTopCount0528C(obj).then((res) => {
let data = res.data || []; // let data = res.data || [];
let sourceData = []; // let sourceData = [];
let colorList = this.colors; // let colorList = this.colors;
let index = 0; // let index = 0;
data.forEach( ele => { // data.forEach( ele => {
let mediaList = []; // let mediaList = [];
let valueList = []; // let valueList = [];
ele.value.forEach( e => { // ele.value.forEach( e => {
mediaList.push(e.key); // mediaList.push(e.key);
valueList.push(e.value); // valueList.push(e.value);
}); // });
let o = { // let o = {
name: ele.key, // name: ele.key,
drawOpt: createSingleColumnar(mediaList,valueList,colorList[index]) // drawOpt: createSingleColumnar(mediaList,valueList,colorList[index])
}; // };
index += 1; // index += 1;
sourceData.push(o); // sourceData.push(o);
this.showData = sourceData; // this.showData = sourceData;
}); // });
this.load = false; // this.load = false;
resolve(data) // resolve(data)
}).catch(() => { // }).catch(() => {
reject(false) // reject(false)
}); // });
}); // });
} // }
} // }
}; };
</script> </script>

@ -9,7 +9,7 @@
<template> <template>
<div class="mccm-outter"> <div class="mccm-outter">
<v-label-div title="切换车型"> <v-label-div title="切换车型">
<a-button style="margin-right: 1rem" :loading="btnLoading" @click="handlerExport" v-if="getMComparison.length > 0" v-has="'btn_model_c_toppt'"></a-button> <!-- <a-button style="margin-right: 1rem" :loading="btnLoading" @click="handlerExport" v-if="getMComparison.length > 0" v-has="'btn_model_c_toppt'"></a-button> -->
<v-btn @click="goback"></v-btn> <v-btn @click="goback"></v-btn>
</v-label-div> </v-label-div>
<div class="mccm-inner"> <div class="mccm-inner">
@ -33,8 +33,8 @@
</template> </template>
<script> <script>
import { getToPptTask } from "@/api/BrandInsight"; // import { getToPptTask } from "@/api/BrandInsight";
import { getUserSeriesName } from "@/api/comm"; // import { getUserSeriesName } from "@/api/comm";
export default { export default {
name: "brandCompateHeader", name: "brandCompateHeader",
props: { props: {
@ -45,18 +45,18 @@ export default {
}, },
}, },
}, },
watch: { // watch: {
data: { // data: {
handler(val) { // handler(val) {
if (val.length > 0) { // if (val.length > 0) {
val.forEach((ele, index) => { // val.forEach((ele, index) => {
this.list[index] = Object.assign(this.list[index], ele); // this.list[index] = Object.assign(this.list[index], ele);
}); // });
} // }
}, // },
immediate: true, // immediate: true,
}, // },
}, // },
data() { data() {
return { return {
btnLoading: false, btnLoading: false,
@ -104,90 +104,90 @@ export default {
], ],
}; };
}, },
created() { // created() {
this.brand = this.getBrand.brandname || "奥迪"; // this.brand = this.getBrand.brandname || "";
this.modelData(); // this.modelData();
}, // },
methods: { // methods: {
goback() { // goback() {
this.$router.go(-1); // this.$router.go(-1);
}, // },
// // //
modelData() { // modelData() {
let model = this.getModel.name || ""; // let model = this.getModel.name || "";
if (!model) { // if (!model) {
this.getUserSeriesName(this.brand); // this.getUserSeriesName(this.brand);
} else { // } else {
this.model = model; // this.model = model;
} // }
}, // },
// // //
getUserSeriesName(brandName) { // getUserSeriesName(brandName) {
this.form.token = this.getToken; // this.form.token = this.getToken;
this.form.sBrandName = brandName; // this.form.sBrandName = brandName;
getUserSeriesName(this.form).then((res) => { // getUserSeriesName(this.form).then((res) => {
let data = res.data || []; // let data = res.data || [];
this.model = data[0].name; // this.model = data[0].name;
}); // });
}, // },
// // //
handlerChoose(n) { // handlerChoose(n) {
this.chooseIndex = n; // this.chooseIndex = n;
this.modelShow = true; // this.modelShow = true;
}, // },
// // //
handlerDel(n) { // handlerDel(n) {
let row = this.list[n]; // let row = this.list[n];
row.brand = ""; // row.brand = "";
row.model = ""; // row.model = "";
row.isDel = false; // row.isDel = false;
let filterArr = this.list.filter((ele) => { // let filterArr = this.list.filter((ele) => {
return ele.brand && ele.model; // return ele.brand && ele.model;
}); // });
this.$emit("del", n); // this.$emit("del", n);
this.$emit("change", filterArr); // this.$emit("change", filterArr);
}, // },
// // //
handlerBrand(arr) { // handlerBrand(arr) {
let n = this.list.findIndex((ele) => ele.model === arr[1].name); // let n = this.list.findIndex((ele) => ele.model === arr[1].name);
if (n != -1) return; // if (n != -1) return;
let row = this.list[this.chooseIndex]; // let row = this.list[this.chooseIndex];
row.brand = arr[0].brandname; // row.brand = arr[0].brandname;
row.model = arr[1].name; // row.model = arr[1].name;
row.isDel = true; // row.isDel = true;
let filterArr = this.list.filter((ele) => { // let filterArr = this.list.filter((ele) => {
return ele.brand && ele.model; // return ele.brand && ele.model;
}); // });
this.$emit("change", filterArr); // this.$emit("change", filterArr);
}, // },
handlerExport() { // handlerExport() {
this.btnLoading = true; // this.btnLoading = true;
let arr = this.getMComparison; // let arr = this.getMComparison;
let brands = []; // let brands = [];
let models = []; // let models = [];
arr.forEach((ele) => { // arr.forEach((ele) => {
brands.push(ele.brand); // brands.push(ele.brand);
models.push(ele.model); // models.push(ele.model);
}); // });
let sBrand = brands.toString(); // let sBrand = brands.toString();
let sSeriesName = models.toString(); // let sSeriesName = models.toString();
let obj = Object.assign({}, this.getCtime2, { // let obj = Object.assign({}, this.getCtime2, {
token: this.getToken, // token: this.getToken,
iContrastType: 2, // iContrastType: 2,
sBrand: sBrand, // sBrand: sBrand,
sSeriesName: sSeriesName, // sSeriesName: sSeriesName,
sType: 'ToSeriesPptV6' // sType: 'ToSeriesPptV6'
}); // });
getToPptTask(obj).then(() => { // getToPptTask(obj).then(() => {
this.$notification.open({ // this.$notification.open({
message: `数据生成中`, // message: ``,
description: '请前往个人中心查看下载进度', // description: '',
placement: 'bottomRight', // placement: 'bottomRight',
}); // });
this.btnLoading = false; // this.btnLoading = false;
}) // })
} // }
}, // },
}; };
</script> </script>

@ -7,13 +7,13 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue
--> -->
<template> <template>
<div class="cpt-outter" v-loading="load"> <div class="cpt-outter">
<v-label-div title="论坛负面话题对比" :showLine="false" :eStyle="{'border-style': 'none'}" /> <v-label-div title="论坛负面话题对比" :showLine="false" :eStyle="{'border-style': 'none'}" />
<div class="cpt-inner"> <div class="cpt-inner">
<div class="cpt-item" v-for="(item,index) in list" :key="index"> <div class="cpt-item" v-for="(item,index) in list" :key="index">
<span class="s1" :style="{color: colors[index]}">{{item.name}}</span> <span class="s1" :style="{color: colors[index]}">{{item.name}}</span>
<div class="d1"> <div class="d1">
<v-echarts :opt="item.drawOpt"></v-echarts> <!-- <v-echarts :opt="item.drawOpt"></v-echarts> -->
</div> </div>
</div> </div>
</div> </div>
@ -21,8 +21,8 @@
</template> </template>
<script> <script>
import { getTopicPosAndTopicNeg0528C } from "@/api/ModelComparison"; // import { getTopicPosAndTopicNeg0528C } from "@/api/ModelComparison";
import { createSideSingleColumn } from "@/utils/gol/sideSingleColumn"; // import { createSideSingleColumn } from "@/utils/gol/sideSingleColumn";
export default { export default {
name: "comparisonOfPositiveTopicsInTheForum", name: "comparisonOfPositiveTopicsInTheForum",
data() { data() {
@ -45,48 +45,48 @@ export default {
list: [], list: [],
}; };
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getMComparison || []; // let arr = this.getMComparison || [];
let brands = []; // let brands = [];
let models = []; // let models = [];
arr.forEach((ele) => { // arr.forEach((ele) => {
brands.push(ele.brand); // brands.push(ele.brand);
models.push(ele.model); // models.push(ele.model);
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.form.sSeriesName = models.toString(); // this.form.sSeriesName = models.toString();
this.getData(); // this.getData();
}, // },
getData() { // getData() {
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true; // this.load = true;
getTopicPosAndTopicNeg0528C(obj).then((res) => { // getTopicPosAndTopicNeg0528C(obj).then((res) => {
let data = res.data || []; // let data = res.data || [];
let arr = []; // let arr = [];
data.forEach((ele) => { // data.forEach((ele) => {
let z = ele.value[1].value || []; // let z = ele.value[1].value || [];
let dx = []; // let dx = [];
let ds = []; // let ds = [];
z.forEach((e) => { // z.forEach((e) => {
dx.push(e.key); // dx.push(e.key);
ds.push(e.value); // ds.push(e.value);
}); // });
let obj = { // let obj = {
name: ele.key, // name: ele.key,
drawOpt: createSideSingleColumn(dx, ds, "#bd9312"), // drawOpt: createSideSingleColumn(dx, ds, "#bd9312"),
}; // };
arr.push(obj); // arr.push(obj);
}); // });
this.list = arr; // this.list = arr;
this.load = false; // this.load = false;
}); // });
}, // },
}, // },
}; };
</script> </script>

@ -7,13 +7,13 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfPositiveTopicsInTheForum/index.vue
--> -->
<template> <template>
<div class="cpt-outter" v-loading="load"> <div class="cpt-outter">
<v-label-div title="论坛正面话题对比" :showLine="false" :eStyle="{'border-style': 'none'}"/> <v-label-div title="论坛正面话题对比" :showLine="false" :eStyle="{'border-style': 'none'}"/>
<div class="cpt-inner"> <div class="cpt-inner">
<div class="cpt-item" v-for="(item,index) in list" :key="index"> <div class="cpt-item" v-for="(item,index) in list" :key="index">
<span class="s1" :style="{color: colors[index]}">{{item.name}}</span> <span class="s1" :style="{color: colors[index]}">{{item.name}}</span>
<div class="d1"> <div class="d1">
<v-echarts :opt="item.drawOpt"></v-echarts> <!-- <v-echarts :opt="item.drawOpt"></v-echarts> -->
</div> </div>
</div> </div>
</div> </div>
@ -21,8 +21,8 @@
</template> </template>
<script> <script>
import { getTopicPosAndTopicNeg0528C } from "@/api/ModelComparison"; // import { getTopicPosAndTopicNeg0528C } from "@/api/ModelComparison";
import {createSideSingleColumn} from "@/utils/gol/sideSingleColumn" // import {createSideSingleColumn} from "@/utils/gol/sideSingleColumn"
export default { export default {
name: "comparisonOfPositiveTopicsInTheForum", name: "comparisonOfPositiveTopicsInTheForum",
data() { data() {
@ -45,48 +45,48 @@ export default {
list: [], list: [],
}; };
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getMComparison || []; // let arr = this.getMComparison || [];
let brands = []; // let brands = [];
let models = []; // let models = [];
arr.forEach((ele) => { // arr.forEach((ele) => {
brands.push(ele.brand); // brands.push(ele.brand);
models.push(ele.model); // models.push(ele.model);
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.form.sSeriesName = models.toString(); // this.form.sSeriesName = models.toString();
this.getData(); // this.getData();
}, // },
getData() { // getData() {
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true; // this.load = true;
getTopicPosAndTopicNeg0528C(obj).then((res) => { // getTopicPosAndTopicNeg0528C(obj).then((res) => {
let data = res.data || []; // let data = res.data || [];
let arr = []; // let arr = [];
data.forEach((ele) => { // data.forEach((ele) => {
let z = ele.value[0].value || []; // let z = ele.value[0].value || [];
let dx = []; // let dx = [];
let ds = []; // let ds = [];
z.forEach((e) => { // z.forEach((e) => {
dx.push(e.key); // dx.push(e.key);
ds.push(e.value); // ds.push(e.value);
}); // });
let obj = { // let obj = {
name: ele.key, // name: ele.key,
drawOpt: createSideSingleColumn(dx, ds, "#3373CC"), // drawOpt: createSideSingleColumn(dx, ds, "#3373CC"),
}; // };
arr.push(obj); // arr.push(obj);
}); // });
this.list = arr; // this.list = arr;
this.load = false; // this.load = false;
}); // });
}, // },
}, // },
} }
</script> </script>

@ -7,21 +7,21 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfTheNumberOfWeiboInteractions/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfTheNumberOfWeiboInteractions/index.vue
--> -->
<template> <template>
<div class="cotn-outter" v-loading="load"> <div class="cotn-outter">
<v-label-div <v-label-div
title="微博互动人数对比" title="微博互动人数对比"
:showLine="false" :showLine="false"
:eStyle="{ 'border-style': 'none' }" :eStyle="{ 'border-style': 'none' }"
></v-label-div> ></v-label-div>
<div class="cotn-inner"> <div class="cotn-inner">
<v-echarts :opt="opt"></v-echarts> <!-- <v-echarts :opt="opt"></v-echarts> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getInteractCount0528C } from "@/api/BrandComparison/BrandWeibo.js"; // import { getInteractCount0528C } from "@/api/BrandComparison/BrandWeibo.js";
import { createSingleColumnar } from "@/utils/gol/singleColumnar"; // import { createSingleColumnar } from "@/utils/gol/singleColumnar";
export default { export default {
name: "comparisonOfTheNumberOfWeiboInteractions", name: "comparisonOfTheNumberOfWeiboInteractions",
data() { data() {
@ -36,46 +36,46 @@ export default {
opt: {} opt: {}
}; };
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getMComparison; // let arr = this.getMComparison;
let brands = []; // let brands = [];
let models = []; // let models = [];
arr.forEach((ele) => { // arr.forEach((ele) => {
brands.push(ele.brand); // brands.push(ele.brand);
models.push(ele.model); // models.push(ele.model);
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.form.sSeriesName = models.toString(); // this.form.sSeriesName = models.toString();
this.getData(); // this.getData();
}, // },
getData() { // getData() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
this.load = true; // this.load = true;
getInteractCount0528C(obj) // getInteractCount0528C(obj)
.then((res) => { // .then((res) => {
let data = res.data || []; // let data = res.data || [];
let dx = []; // let dx = [];
let ds = []; // let ds = [];
data.forEach((ele) => { // data.forEach((ele) => {
dx.push(ele.key); // dx.push(ele.key);
ds.push(ele.value); // ds.push(ele.value);
}); // });
this.opt = createSingleColumnar(dx, ds, '#54BF93'); // this.opt = createSingleColumnar(dx, ds, '#54BF93');
this.load = false; // this.load = false;
resolve(data); // resolve(data);
}) // })
.catch(() => { // .catch(() => {
reject(false); // reject(false);
}); // });
}); // });
}, // },
}, // },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -7,21 +7,21 @@
* @FilePath: /data-show/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue * @FilePath: /data-show/src/views/BrandComparison/comparisonOfWeiboInformation/index.vue
--> -->
<template> <template>
<div class="cowi-outter" v-loading="load"> <div class="cowi-outter">
<v-label-div <v-label-div
title="微博信息量对比" title="微博信息量对比"
:showLine="false" :showLine="false"
:eStyle="{ 'border-style': 'none' }" :eStyle="{ 'border-style': 'none' }"
></v-label-div> ></v-label-div>
<div class="cowi-inner"> <div class="cowi-inner">
<v-echarts :opt="opt"></v-echarts> <!-- <v-echarts :opt="opt"></v-echarts> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getContrastCount0528C } from "@/api/BrandComparison/BrandWeibo.js"; // import { getContrastCount0528C } from "@/api/BrandComparison/BrandWeibo.js";
import { createSingleColumnar } from "@/utils/gol/singleColumnar"; // import { createSingleColumnar } from "@/utils/gol/singleColumnar";
export default { export default {
name: "comparisonOfWeiboInformation", name: "comparisonOfWeiboInformation",
data() { data() {
@ -36,46 +36,46 @@ export default {
opt: {} opt: {}
}; };
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getMComparison; // let arr = this.getMComparison;
let brands = []; // let brands = [];
let models = []; // let models = [];
arr.forEach((ele) => { // arr.forEach((ele) => {
brands.push(ele.brand); // brands.push(ele.brand);
models.push(ele.model); // models.push(ele.model);
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.form.sSeriesName = models.toString(); // this.form.sSeriesName = models.toString();
this.getData(); // this.getData();
}, // },
getData() { // getData() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
this.load = true; // this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
getContrastCount0528C(obj) // getContrastCount0528C(obj)
.then((res) => { // .then((res) => {
let data = res.data || []; // let data = res.data || [];
let dx = []; // let dx = [];
let ds = []; // let ds = [];
data.forEach(ele => { // data.forEach(ele => {
dx.push(ele.key); // dx.push(ele.key);
ds.push(ele.value) // ds.push(ele.value)
}) // })
this.opt = createSingleColumnar(dx,ds); // this.opt = createSingleColumnar(dx,ds);
this.load = false; // this.load = false;
resolve(data); // resolve(data);
}) // })
.catch(() => { // .catch(() => {
reject(false); // reject(false);
}); // });
}); // });
}, // },
}, // },
}; };
</script> </script>

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/brandTonalDistribution/index.vue * @FilePath: /data-show/src/views/BrandComparison/brandTonalDistribution/index.vue
--> -->
<template> <template>
<div class="bd-outter" v-loading="load"> <div class="bd-outter">
<v-label-div title="整体调性对比" :showLine="false" :eStyle="{ 'border-style': 'none' }"> </v-label-div> <v-label-div title="整体调性对比" :showLine="false" :eStyle="{ 'border-style': 'none' }"> </v-label-div>
<div class="bd-d1"> <div class="bd-d1">
<div class="dd1" style="margin-left: 16px"> <div class="dd1" style="margin-left: 16px">
@ -23,25 +23,25 @@
</div> </div>
</div> </div>
<div class="bd-inner"> <div class="bd-inner">
<roundata <!-- <roundata
v-for="(item,index) in list" v-for="(item,index) in list"
:key="index" :key="index"
:title="item.key" :title="item.key"
:color="colors[index]" :color="colors[index]"
:style="index === 0 ? 'margin-left: 4rem': 'margin-left: 7.5rem'" :style="index === 0 ? 'margin-left: 4rem': 'margin-left: 7.5rem'"
:data="item.value" :data="item.value"
></roundata> ></roundata> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { getEventAffectionsC } from "@/api/ModelComparison"; // import { getEventAffectionsC } from "@/api/ModelComparison";
import roundata from "./roundata"; // import roundata from "./roundata";
export default { export default {
name: "eventBrandTonalDistribution", name: "eventBrandTonalDistribution",
components: { components: {
roundata,
}, },
data() { data() {
return { return {
@ -58,39 +58,39 @@ export default {
] ]
}; };
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getMComparison; // let arr = this.getMComparison;
let brands = []; // let brands = [];
let models = []; // let models = [];
arr.forEach(ele => { // arr.forEach(ele => {
brands.push(ele.brand); // brands.push(ele.brand);
models.push(ele.model); // models.push(ele.model);
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.form.sSeriesName = models.toString(); // this.form.sSeriesName = models.toString();
this.getData(); // this.getData();
}, // },
// // //
getData() { // getData() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
this.load = true; // this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
getEventAffectionsC(obj).then((res) => { // getEventAffectionsC(obj).then((res) => {
let data = res.data || []; // let data = res.data || [];
this.list = data; // this.list = data;
this.load = false; // this.load = false;
resolve(data) // resolve(data)
}).catch(() => { // }).catch(() => {
reject(false) // reject(false)
}); // });
}); // });
}, // },
}, // },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -7,7 +7,7 @@
* @FilePath: /data-show/src/views/BrandComparison/overallWordCloudComparison/index.vue * @FilePath: /data-show/src/views/BrandComparison/overallWordCloudComparison/index.vue
--> -->
<template> <template>
<div class="owcc-outter" v-loading="load"> <div class="owcc-outter">
<v-label-div title="整体词云对比"> </v-label-div> <v-label-div title="整体词云对比"> </v-label-div>
<div class="owcc-inner"> <div class="owcc-inner">
<div class="owcc-item" v-for="(item, index) in dataSource" :key="index"> <div class="owcc-item" v-for="(item, index) in dataSource" :key="index">
@ -23,7 +23,7 @@
></v-tab-group> ></v-tab-group>
</v-label-div> </v-label-div>
<div class="owcc-draw"> <div class="owcc-draw">
<v-echarts :opt="item.opt"></v-echarts> <!-- <v-echarts :opt="item.opt"></v-echarts> -->
</div> </div>
</div> </div>
</div> </div>
@ -31,8 +31,8 @@
</template> </template>
<script> <script>
import { getPositiveAndNegative0528C } from "@/api/BrandComparison"; // import { getPositiveAndNegative0528C } from "@/api/BrandComparison";
import createWordCloud from "@/utils/gol/bubbleWord"; // import createWordCloud from "@/utils/gol/bubbleWord";
export default { export default {
name: "overallWordCloudComparison", name: "overallWordCloudComparison",
data() { data() {
@ -56,59 +56,59 @@ export default {
dataSource: [] dataSource: []
}; };
}, },
created() { // created() {
this.initData(); // this.initData();
}, // },
methods: { // methods: {
initData() { // initData() {
this.form.token = this.getToken; // this.form.token = this.getToken;
let arr = this.getMComparison; // let arr = this.getMComparison;
let brands = []; // let brands = [];
let models = []; // let models = [];
arr.forEach((ele) => { // arr.forEach((ele) => {
brands.push(ele.brand); // brands.push(ele.brand);
models.push(ele.model); // models.push(ele.model);
}); // });
this.form.sBrand = brands.toString(); // this.form.sBrand = brands.toString();
this.form.sSeriesName = models.toString(); // this.form.sSeriesName = models.toString();
this.getData(); // this.getData();
}, // },
getData() { // getData() {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
this.load = true; // this.load = true;
let obj = Object.assign({}, this.getCtime2, this.form); // let obj = Object.assign({}, this.getCtime2, this.form);
getPositiveAndNegative0528C(obj) // getPositiveAndNegative0528C(obj)
.then((res) => { // .then((res) => {
let data = res.data || []; // let data = res.data || [];
let arr = []; // let arr = [];
data.forEach(ele => { // data.forEach(ele => {
let obj = { // let obj = {
name: ele.key, // name: ele.key,
p: ele.value[0].value, // p: ele.value[0].value,
s: ele.value[1].value, // s: ele.value[1].value,
opt: createWordCloud(ele.value[0].value), // opt: createWordCloud(ele.value[0].value),
tapIndex: 0 // tapIndex: 0
} // }
arr.push(obj); // arr.push(obj);
}) // })
this.dataSource = arr; // this.dataSource = arr;
this.load = false; // this.load = false;
resolve(data); // resolve(data);
}) // })
.catch(() => { // .catch(() => {
reject(false); // reject(false);
}); // });
}); // });
}, // },
handlerTab(n,item) { // handlerTab(n,item) {
item.tapIndex = n; // item.tapIndex = n;
if(n === 0) { // if(n === 0) {
item.opt = createWordCloud(item.p) // item.opt = createWordCloud(item.p)
} else { // } else {
item.opt = createWordCloud(item.s) // item.opt = createWordCloud(item.s)
} // }
} // }
}, // },
}; };
</script> </script>

@ -13,7 +13,7 @@
</v-label-div> </v-label-div>
<div class="mfdh-inner"> <div class="mfdh-inner">
<div class="mfdh-in-d1"> <div class="mfdh-in-d1">
{{this.form.sSeriesName|doStr(8)}} {{this.form.sSeriesName|doStr(8)}}
</div> </div>
<span class="mfdh-in-d2"> </span> <span class="mfdh-in-d2"> </span>
<div class="mfdh-in-d3" style="width: 20rem"> <div class="mfdh-in-d3" style="width: 20rem">

Loading…
Cancel
Save