|
|
|
@ -5,6 +5,7 @@ import circleOption from '../../../../../components/option/circleOption'
|
|
|
|
|
import pieOption from '../../../../../components/option/pieOption'
|
|
|
|
|
import pictographicOption from '../../../../../components/option/percentRankOption'
|
|
|
|
|
import negaposiOption from '../../../../../components/option/negaposiOption'
|
|
|
|
|
import {doStr} from "../../../../../utils/doStr"
|
|
|
|
|
const app = getApp();
|
|
|
|
|
const dColor=['#FF4852','#FF6E25','#FFBF00','#20CC62','#00D6D6']
|
|
|
|
|
Component({
|
|
|
|
@ -255,15 +256,20 @@ Component({
|
|
|
|
|
sEndTime: wx.getStorageSync('sEndTime') || '',
|
|
|
|
|
sBrand: wx.getStorageSync('sBrand') || '',
|
|
|
|
|
}).then(res => {
|
|
|
|
|
let dName = []; let dPositive = [];let dNegative = [];
|
|
|
|
|
let [dName,dPositive,dNegative] = [[], [], []];
|
|
|
|
|
res.forEach(ele => {
|
|
|
|
|
dName.push(ele.key);
|
|
|
|
|
let total = ele.value[0].value*1 + ele.value[2].value*1;
|
|
|
|
|
// ele.value.forEach(e => {
|
|
|
|
|
// total = total + e.value * 1
|
|
|
|
|
// })
|
|
|
|
|
dPositive.push((ele.value[0].value * 100 / total).toFixed(0));
|
|
|
|
|
dNegative.push((ele.value[2].value * 100 / total).toFixed(0));
|
|
|
|
|
if(total == 0) {
|
|
|
|
|
dPositive.push(0)
|
|
|
|
|
dNegative.push(0)
|
|
|
|
|
} else {
|
|
|
|
|
dPositive.push((ele.value[0].value * 100 / total).toFixed(0));
|
|
|
|
|
dNegative.push((ele.value[2].value * 100 / total).toFixed(0));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.setData({affNegaposi: negaposiOption(dName,dPositive,dNegative)})
|
|
|
|
|
});
|
|
|
|
@ -425,7 +431,11 @@ Component({
|
|
|
|
|
sQingGan: this.data.kolActive == 0?1:2,
|
|
|
|
|
iSize: 6
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.setData({kolData: res})
|
|
|
|
|
let data = res || [];
|
|
|
|
|
data.forEach(ele => {
|
|
|
|
|
ele._source.user_author = doStr(ele._source.user_author, 10)
|
|
|
|
|
})
|
|
|
|
|
this.setData({kolData: data})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changeActive(event) {
|
|
|
|
|