|
|
|
@ -1,14 +1,14 @@
|
|
|
|
|
<!--
|
|
|
|
|
* @Author: your name
|
|
|
|
|
* @Date: 2021-10-25 13:20:36
|
|
|
|
|
* @LastEditTime: 2021-11-01 13:48:39
|
|
|
|
|
* @LastEditTime: 2021-11-01 17:34:18
|
|
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
|
|
* @Description: In User Settings Edit
|
|
|
|
|
* @FilePath: /data-show/src/views/ModelInsight/ml-brand-data/index.vue
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="mbd-outter">
|
|
|
|
|
<div class="mbd-outter" v-loading="load">
|
|
|
|
|
<v-label-div title="品牌数据"></v-label-div>
|
|
|
|
|
<div class="mbd-inner">
|
|
|
|
|
<div class="mbd-d1">
|
|
|
|
@ -74,6 +74,7 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
width: 274,
|
|
|
|
|
load: false,
|
|
|
|
|
form: {
|
|
|
|
|
sBrand: "",
|
|
|
|
|
sSeriesName: "",
|
|
|
|
@ -97,8 +98,10 @@ export default {
|
|
|
|
|
this.form.token = this.getToken;
|
|
|
|
|
this.form.sBrand = this.brand;
|
|
|
|
|
this.form.sSeriesName = this.model;
|
|
|
|
|
this.getData1();
|
|
|
|
|
this.getData2();
|
|
|
|
|
this.load = true;
|
|
|
|
|
Promise.all([this.getData1(), this.getData2()]).then(() => {
|
|
|
|
|
this.load = false;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
immediate: true,
|
|
|
|
@ -107,24 +110,37 @@ export default {
|
|
|
|
|
created() {},
|
|
|
|
|
methods: {
|
|
|
|
|
getData1() {
|
|
|
|
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
|
|
|
getBrandOverviewCount0528(obj).then((res) => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.count = data.count;
|
|
|
|
|
this.countPercent = data.countPercent;
|
|
|
|
|
this.totalArr = data.data;
|
|
|
|
|
console.log(this.countPercent)
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
|
|
|
getBrandOverviewCount0528(obj)
|
|
|
|
|
.then((res) => {
|
|
|
|
|
let data = res.data;
|
|
|
|
|
this.count = data.count;
|
|
|
|
|
this.countPercent = data.countPercent;
|
|
|
|
|
this.totalArr = data.data;
|
|
|
|
|
resolve(data);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
reject(false);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getData2() {
|
|
|
|
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
|
|
|
getAffections(obj).then((res) => {
|
|
|
|
|
let data = res.data || {};
|
|
|
|
|
this.affObj.a = data["正面"] || 0;
|
|
|
|
|
this.affObj.b = data["中性"] || 0;
|
|
|
|
|
this.affObj.c = data["负面"] || 0;
|
|
|
|
|
this.affObj.z =
|
|
|
|
|
this.affObj.a * 1 + this.affObj.b * 1 + this.affObj.c * 1;
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
let obj = Object.assign({}, this.getCtime2, this.form);
|
|
|
|
|
getAffections(obj).then((res) => {
|
|
|
|
|
let data = res.data || {};
|
|
|
|
|
this.affObj.a = data["正面"] || 0;
|
|
|
|
|
this.affObj.b = data["中性"] || 0;
|
|
|
|
|
this.affObj.c = data["负面"] || 0;
|
|
|
|
|
this.affObj.z =
|
|
|
|
|
this.affObj.a * 1 +
|
|
|
|
|
this.affObj.b * 1 +
|
|
|
|
|
this.affObj.c * 1;
|
|
|
|
|
resolve(data)
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
reject(false);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -164,7 +180,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.d2 {
|
|
|
|
|
font-size: 44px;
|
|
|
|
|
font-size: 44px;
|
|
|
|
|
font-family: Bebas;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|