|
|
|
@ -4,7 +4,9 @@ const dName=['新闻', '论坛','微信', '微博','APP', '短视频', '其他']
|
|
|
|
|
const dColor=['#FF4852','#FF6E25','#FFBF00','#20CC62','#00D6D6','#00AAFF','#7257FF']
|
|
|
|
|
Component({
|
|
|
|
|
properties: {
|
|
|
|
|
id: String
|
|
|
|
|
id: {
|
|
|
|
|
type: String
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data: {
|
|
|
|
|
showChart: true,
|
|
|
|
@ -17,9 +19,12 @@ Component({
|
|
|
|
|
//调性分布态势
|
|
|
|
|
affTransform: brokenLine([],[],[],[]),
|
|
|
|
|
//事件传播历程
|
|
|
|
|
eventLifetime: [],
|
|
|
|
|
eventSteps: [],
|
|
|
|
|
//媒体解读
|
|
|
|
|
mediaData: [],
|
|
|
|
|
//热门词云
|
|
|
|
|
wordCloudActive: 0,
|
|
|
|
|
wordCloudData: [],
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getData() {
|
|
|
|
@ -30,7 +35,7 @@ Component({
|
|
|
|
|
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
|
|
|
|
sStartTime: wx.getStorageSync('sStartTime') || '',
|
|
|
|
|
sEndTime: wx.getStorageSync('sEndTime') || '',
|
|
|
|
|
sRele: this.properties.id,
|
|
|
|
|
sRele: wx.getStorageSync('sRele') || '',
|
|
|
|
|
}).then(res => {
|
|
|
|
|
let dx = [];
|
|
|
|
|
let dValue = [[],[],[],[],[],[],[]];
|
|
|
|
@ -51,7 +56,7 @@ Component({
|
|
|
|
|
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
|
|
|
|
sStartTime: wx.getStorageSync('sStartTime') || '',
|
|
|
|
|
sEndTime: wx.getStorageSync('sEndTime') || '',
|
|
|
|
|
sRele: this.properties.id,
|
|
|
|
|
sRele: wx.getStorageSync('sRele') || '',
|
|
|
|
|
}).then(res => {
|
|
|
|
|
let arr = [];
|
|
|
|
|
for(let key in res) {
|
|
|
|
@ -67,7 +72,7 @@ Component({
|
|
|
|
|
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
|
|
|
|
sStartTime: wx.getStorageSync('sStartTime') || '',
|
|
|
|
|
sEndTime: wx.getStorageSync('sEndTime') || '',
|
|
|
|
|
sRele: this.properties.id,
|
|
|
|
|
sRele: wx.getStorageSync('sRele') || '',
|
|
|
|
|
}).then(res => {
|
|
|
|
|
let dx = []; let dAff = ['正面','中性','负面'];
|
|
|
|
|
let dValue = [[],[],[]];
|
|
|
|
@ -81,15 +86,25 @@ Component({
|
|
|
|
|
affTransform: brokenLine(dAff,dValue,dColor,dx)
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
// app.globalData.request({
|
|
|
|
|
// action: 'getEventSpreadProcess0528', //事件传播历程
|
|
|
|
|
// token: 't%2BrswgjvzGM=',
|
|
|
|
|
// sType: 'HotEvent',
|
|
|
|
|
// sTimeType: wx.getStorageSync('sTimeType') || 34,
|
|
|
|
|
// sRele: this.properties.id,
|
|
|
|
|
// }).then(res => {
|
|
|
|
|
// console.log(res)
|
|
|
|
|
// });
|
|
|
|
|
app.globalData.request({
|
|
|
|
|
action: 'getEventSpreadProcess0528', //事件传播历程
|
|
|
|
|
token: 't%2BrswgjvzGM=',
|
|
|
|
|
sType: 'HotEvent',
|
|
|
|
|
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
|
|
|
|
sStartTime: wx.getStorageSync('sStartTime') || '',
|
|
|
|
|
sEndTime: wx.getStorageSync('sEndTime') || '',
|
|
|
|
|
sRele: wx.getStorageSync('sRele') || '',
|
|
|
|
|
}).then(res => {
|
|
|
|
|
let arr = [];
|
|
|
|
|
res.forEach(ele => {
|
|
|
|
|
let obj = {
|
|
|
|
|
text: ele._source.firsttime+' '+ele._source.category,
|
|
|
|
|
desc: ele._source.title
|
|
|
|
|
};
|
|
|
|
|
arr.push(obj);
|
|
|
|
|
});
|
|
|
|
|
this.setData({eventSteps: arr})
|
|
|
|
|
});
|
|
|
|
|
app.globalData.request({
|
|
|
|
|
action: 'getSource', //媒体解读
|
|
|
|
|
token: 't%2BrswgjvzGM=',
|
|
|
|
@ -97,10 +112,40 @@ Component({
|
|
|
|
|
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
|
|
|
|
sStartTime: wx.getStorageSync('sStartTime') || '',
|
|
|
|
|
sEndTime: wx.getStorageSync('sEndTime') || '',
|
|
|
|
|
sRele: this.properties.id,
|
|
|
|
|
sRele: wx.getStorageSync('sRele') || '',
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.setData({mediaData: res})
|
|
|
|
|
});
|
|
|
|
|
this.getWordCloud();
|
|
|
|
|
},
|
|
|
|
|
getWordCloud() {
|
|
|
|
|
app.globalData.request({
|
|
|
|
|
action: this.data.wordCloudActive == 0?'getHotWord':this.data.wordCloudActive == 1?'getPositive':'getNegative', //热门词云 正面词云 负面词云
|
|
|
|
|
token: 't%2BrswgjvzGM=',
|
|
|
|
|
sType: 'HotEvent',
|
|
|
|
|
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
|
|
|
|
sStartTime: wx.getStorageSync('sStartTime') || '',
|
|
|
|
|
sEndTime: wx.getStorageSync('sEndTime') || '',
|
|
|
|
|
sRele: wx.getStorageSync('sRele') || '',
|
|
|
|
|
}).then(res => {
|
|
|
|
|
let arr1 = [];
|
|
|
|
|
let skey = {
|
|
|
|
|
34: 50,
|
|
|
|
|
3: 416,
|
|
|
|
|
20: 1500,
|
|
|
|
|
23: 250
|
|
|
|
|
};
|
|
|
|
|
Object.keys(res).forEach(key => {
|
|
|
|
|
let o = [key, res[key] / skey[wx.getStorageSync('sTimeType')]]
|
|
|
|
|
arr1.push(o)
|
|
|
|
|
});
|
|
|
|
|
const resArr = arr1.slice(0,50);
|
|
|
|
|
this.setData({wordCloudData: resArr})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
changeWordCloud(event) {
|
|
|
|
|
this.setData({wordCloudActive: event.detail.index});
|
|
|
|
|
this.getWordCloud()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
lifetimes: {
|
|
|
|
|