zx 3 years ago
parent 3f6c568575
commit f50592d7ac

@ -21,7 +21,7 @@ Component({
toEventDetail(value) {
let id = value.currentTarget.dataset.id;
let token = wx.getStorageSync('token') || ''
// wx.setStorageSync('sRele', id);
wx.setStorageSync('sRele', id);
if (!token) {
wx.navigateTo({
url: '/pages/mine/pages/bindUser/index'

@ -217,6 +217,7 @@ Page({
},
handlerHEvent(e) {
let row = e.currentTarget.dataset.row;
wx.setStorageSync('sRele', row.events_id);
wx.navigateTo({
url: "/pages/insight/pages/eventInsight/index" + '?id=' + row.events_id
})

@ -10,9 +10,8 @@ Component({
let id = value.currentTarget.dataset.id;
wx.setStorageSync('sRele', id);
wx.navigateTo({
url: "/pages/insight/pages/eventInsight/index" + '?id=' + id
url: "/pages/insight/pages/eventInsight/index?id=" + id
})
console.log(value)
}
},
lifetimes: {

@ -34,7 +34,7 @@ Page({
onShow() {
if(!wx.getStorageSync('token')) {
wx.navigateTo({
url: "/pages/mine/pages/bindUser/index",
url: "/pages/mine/pages/bindUser/index?isHome=1",
})
} else {
this.getTabBar().init();

@ -50,6 +50,22 @@ Page({
url: '/pages/insight/pages/brandInsight/brandDataList/index',
})
},
createReport() {
app.globalData.request({
action: 'getToPptTask',
sType: 'ToBrandPptV6',
token: 't%2BrswgjvzGM=',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sBrand: wx.getStorageSync('sBrand') || '',
}).then(res => {
wx.showModal({
title: '数据生成中,请前往”我的“查看生成进度',
showCancel: false
})
});
},
goBack() {
wx.navigateBack({ delta: 1 })
},

@ -5,7 +5,7 @@
<van-row>
<van-col class="tab-btn" bindtap="goBack" span="8"><van-icon name="exchange" /> 切换品牌</van-col>
<van-col bindtap="toDataList" class="tab-btn" span="8"><van-icon name="description" /> 数据列表</van-col>
<van-col class="tab-btn" span="8"><van-icon name="back-top" /> 生成报告</van-col>
<van-col bindtap="createReport" class="tab-btn" span="8"><van-icon name="back-top" /> 生成报告</van-col>
</van-row>
<van-divider custom-style="background: linear-gradient(117deg, rgba(245,245,245,0) 0%, #EEEEEE 50%, rgba(232,232,232,0) 100%);" hairline />
<view class="switch-middle" style="margin-left: 24rpx;">

@ -43,7 +43,7 @@ Component({
isSourcetype: 0, //1返回渠道 0不返回
iTimeType: 0, //0发布时间 1入库时间
sCrisis: (this.data.sCrisis).join(','),
sRele: this.properties.id,
sRele: wx.getStorageSync('sRele') || '',
}).then(res => {
this.setData({dataList: res})
});

@ -20,7 +20,7 @@
</view>
</van-dropdown-item>
<van-dropdown-item id="back" title="更多筛选">
返回
</van-dropdown-item>
</van-dropdown-menu>
</view>

@ -10,6 +10,9 @@ Component({
//传播态势
tailTransChart: singleLine([],[]),
keyMediaData: histogram([],[],[],'#20CC62'),
//热门词云
wordCloudActive: 0,
wordCloudData: [],
},
methods: {
getData() {
@ -20,7 +23,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 = [];
res.forEach(ele => {
@ -35,7 +38,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 = [];
for(let key in res) {
@ -44,6 +47,36 @@ Component({
}
this.setData({ keyMediaData: histogram(dx,dValue,[],'#20CC62')})
});
this.getWordCloud();
},
getWordCloud() {
app.globalData.request({
action: this.data.wordCloudActive == 0?'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: 400,
20: 1500,
23: 240
};
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: {

@ -1,6 +1,7 @@
{
"usingComponents": {
"c-echars": "../../../../../components/c-echars/index"
"c-echars": "../../../../../components/c-echars/index",
"word-cloud": "../../../../../components/word-cloud/index"
},
"component": true
}

@ -11,4 +11,18 @@
<c-echars showChart="{{showChart}}" canvasId="km-canvas" chartId="km" chartOption="{{keyMediaData}}" height="100%"></c-echars>
</view>
</view>
<view class="evtw-item">
<view class="evtw-area-title">
<view style="width: 45%;">热门词云</view>
<view style="width: 55%;">
<van-tabs type="card" active="{{ wordCloudActive }}" color="#BBBBBB" bind:change="changeWordCloud">
<van-tab title="正面"></van-tab>
<van-tab title="负面"></van-tab>
</van-tabs>
</view>
</view>
<view class="wd-cloud">
<word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud>
</view>
</view>
</view>

@ -157,4 +157,24 @@
}
.evtw-media-item {
padding: 24rpx 16rpx 0rpx 32rpx;
}
/* 词云 */
.evtw-area-title {
width: 100%;
font-size: 18px;
padding-left: 32rpx;
font-weight: 600;
color: #333333;
display: flex;
justify-content: flex-start;
}
.wd-cloud {
position: relative;
width: calc(100% - 32px);
height: 484rpx;
background-color: #fff;
margin-top: 32rpx;
border-radius: 4rpx;
padding: 16px;
overflow: hidden;
}

@ -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: {

@ -1,6 +1,7 @@
{
"usingComponents": {
"c-echars": "../../../../../components/c-echars/index"
"c-echars": "../../../../../components/c-echars/index",
"word-cloud": "../../../../../components/word-cloud/index"
},
"component": true
}

@ -5,7 +5,7 @@
<c-echars showChart="{{showChart}}" canvasId="evt-trans" chartId="evt-transLine" chartOption="{{eventTransform}}" height="100%"></c-echars>
</view>
</view>
<view class="evt-item" style="height: 824rpx;">
<view class="evt-item" style="height: 889rpx;">
<view class="evt-chart-title">传播重点媒体</view>
<view class="evt-rank-list">
<view class="ranking">
@ -31,6 +31,17 @@
<c-echars showChart="{{showChart}}" canvasId="evt-trans" chartId="evt-transLine" chartOption="{{affTransform}}" height="100%"></c-echars>
</view>
</view>
<view class="evt-item">
<view class="evt-chart-title">事件传播历程</view>
<scroll-view scroll-y class="evt-chart-item" style="height: 600rpx;">
<van-steps
steps="{{ eventSteps }}"
active="{{ eventSteps.length - 1 }}"
direction="vertical"
desc-class="event-transform-title"
/>
</scroll-view>
</view>
<view class="evt-item">
<view class="evt-chart-title">媒体解读</view>
<scroll-view class="evt-chart-item" style="height: 560rpx;" scroll-y>
@ -40,4 +51,19 @@
</view>
</scroll-view>
</view>
<view class="evt-item">
<view class="evw-area-title">
<view style="width: 40%;">热门词云</view>
<view style="width: 60%;">
<van-tabs type="card" active="{{ wordCloudActive }}" color="#BBBBBB" bind:change="changeWordCloud">
<van-tab title="热门"></van-tab>
<van-tab title="正面"></van-tab>
<van-tab title="负面"></van-tab>
</van-tabs>
</view>
</view>
<view class="wd-cloud">
<word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud>
</view>
</view>
</view>

@ -157,4 +157,30 @@
}
.evt-media-item {
padding: 24rpx 16rpx 0rpx 32rpx;
}
/* 词云 */
.evw-area-title {
width: 100%;
font-size: 18px;
padding-left: 32rpx;
font-weight: 600;
color: #333333;
display: flex;
justify-content: flex-start;
}
.wd-cloud {
position: relative;
width: calc(100% - 32px);
height: 484rpx;
background-color: #fff;
margin-top: 32rpx;
border-radius: 4rpx;
padding: 16px;
overflow: hidden;
}
.event-transform-title {
font-size: 14px;
font-weight: 600;
color: #333333;
margin-top: 24rpx;
}

@ -31,7 +31,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 total = res.正面 * 1 + res.中性 * 1 + res.负面 * 1;
let arr = [];
@ -48,7 +48,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 data = res;
let getCoreDiffuseWeiBo = data.getCoreDiffuseWeiBo || [];
@ -86,7 +86,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 sexTotal = 0; let sexArr = [];
if(this.data.weiboUserTabActibe == 0) {
@ -137,7 +137,7 @@ Component({
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sRele: this.properties.id,
sRele: wx.getStorageSync('sRele') || '',
sQingGan: this.data.kolActive == 0?1:2,
iSize: 6
}).then(res => {

@ -12,12 +12,6 @@ Page({
onShow() {
this.getData();
},
onLoad(e){
this.setData({
time:e.time
})
console.log(this.data.time)
},
getData() {
app.globalData.request({
action: 'getEventData',
@ -42,8 +36,5 @@ Page({
this.setData({
tabActive: n
})
},
toDataList() {
console.log('test')
}
})

@ -64,6 +64,23 @@ Page({
url: '/pages/insight/pages/modalInsight/modalDataList/index',
})
},
createReport() {
app.globalData.request({
action: 'getToPptTask',
sType: 'ToBrandPptV6',
token: 't%2BrswgjvzGM=',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sBrand: this.currentBrand,
sSeriesName: wx.getStorageSync('sSeriesName') || '',
}).then(res => {
wx.showModal({
title: '数据生成中,请前往”我的“查看生成进度',
showCancel: false
})
});
},
goBack() {
wx.navigateBack({ delta: 1 })
},

@ -5,7 +5,7 @@
<van-row>
<van-col class="tab-btn" bindtap="goBack" span="8"><van-icon name="exchange" /> 切换车型</van-col>
<van-col bindtap="toDataList" class="tab-btn" span="8"><van-icon name="description" /> 数据列表</van-col>
<van-col class="tab-btn" span="8"><van-icon name="back-top" /> 生成报告</van-col>
<van-col bindtap="createReport" class="tab-btn" span="8"><van-icon name="back-top" /> 生成报告</van-col>
</van-row>
<van-divider custom-style="background: linear-gradient(117deg, rgba(245,245,245,0) 0%, #EEEEEE 50%, rgba(232,232,232,0) 100%);" hairline />
<view class="switch-middle" style="margin-left: 24rpx;">

Loading…
Cancel
Save