From f50592d7acc7dd15e21baaa500d8c3797acab77a Mon Sep 17 00:00:00 2001
From: zx <604444282@qq.com>
Date: Wed, 3 Aug 2022 17:11:27 +0800
Subject: [PATCH] zx
---
components/indexCom/eventChild/index.js | 2 +-
pages/brandCrisis/index.js | 1 +
pages/insight/eventChild/index.js | 3 +-
pages/insight/index.js | 2 +-
pages/insight/pages/brandInsight/index.js | 16 ++++
pages/insight/pages/brandInsight/index.wxml | 2 +-
.../pages/eventInsight/evDatalist/index.js | 2 +-
.../pages/eventInsight/evDatalist/index.wxml | 2 +-
.../pages/eventInsight/evTailwing/index.js | 37 ++++++++-
.../pages/eventInsight/evTailwing/index.json | 3 +-
.../pages/eventInsight/evTailwing/index.wxml | 14 ++++
.../pages/eventInsight/evTailwing/index.wxss | 20 +++++
.../pages/eventInsight/evTotal/index.js | 75 +++++++++++++++----
.../pages/eventInsight/evTotal/index.json | 3 +-
.../pages/eventInsight/evTotal/index.wxml | 28 ++++++-
.../pages/eventInsight/evTotal/index.wxss | 26 +++++++
.../pages/eventInsight/evWeibo/index.js | 8 +-
pages/insight/pages/eventInsight/index.js | 9 ---
pages/insight/pages/modalInsight/index.js | 17 +++++
pages/insight/pages/modalInsight/index.wxml | 2 +-
20 files changed, 231 insertions(+), 41 deletions(-)
diff --git a/components/indexCom/eventChild/index.js b/components/indexCom/eventChild/index.js
index 003567b..03237ec 100644
--- a/components/indexCom/eventChild/index.js
+++ b/components/indexCom/eventChild/index.js
@@ -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'
diff --git a/pages/brandCrisis/index.js b/pages/brandCrisis/index.js
index c4a6e92..eb5ddff 100644
--- a/pages/brandCrisis/index.js
+++ b/pages/brandCrisis/index.js
@@ -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
})
diff --git a/pages/insight/eventChild/index.js b/pages/insight/eventChild/index.js
index 8465ce8..97119f9 100644
--- a/pages/insight/eventChild/index.js
+++ b/pages/insight/eventChild/index.js
@@ -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: {
diff --git a/pages/insight/index.js b/pages/insight/index.js
index 6f4deda..d0e18da 100644
--- a/pages/insight/index.js
+++ b/pages/insight/index.js
@@ -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();
diff --git a/pages/insight/pages/brandInsight/index.js b/pages/insight/pages/brandInsight/index.js
index 02b8acb..326a90f 100644
--- a/pages/insight/pages/brandInsight/index.js
+++ b/pages/insight/pages/brandInsight/index.js
@@ -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 })
},
diff --git a/pages/insight/pages/brandInsight/index.wxml b/pages/insight/pages/brandInsight/index.wxml
index e17ec1a..fba0f5f 100644
--- a/pages/insight/pages/brandInsight/index.wxml
+++ b/pages/insight/pages/brandInsight/index.wxml
@@ -5,7 +5,7 @@
切换品牌
数据列表
- 生成报告
+ 生成报告
diff --git a/pages/insight/pages/eventInsight/evDatalist/index.js b/pages/insight/pages/eventInsight/evDatalist/index.js
index 6c25096..d92ed16 100644
--- a/pages/insight/pages/eventInsight/evDatalist/index.js
+++ b/pages/insight/pages/eventInsight/evDatalist/index.js
@@ -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})
});
diff --git a/pages/insight/pages/eventInsight/evDatalist/index.wxml b/pages/insight/pages/eventInsight/evDatalist/index.wxml
index dabd255..a98c2d4 100644
--- a/pages/insight/pages/eventInsight/evDatalist/index.wxml
+++ b/pages/insight/pages/eventInsight/evDatalist/index.wxml
@@ -20,7 +20,7 @@
- 返回
+
diff --git a/pages/insight/pages/eventInsight/evTailwing/index.js b/pages/insight/pages/eventInsight/evTailwing/index.js
index ecff214..46a48b5 100644
--- a/pages/insight/pages/eventInsight/evTailwing/index.js
+++ b/pages/insight/pages/eventInsight/evTailwing/index.js
@@ -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: {
diff --git a/pages/insight/pages/eventInsight/evTailwing/index.json b/pages/insight/pages/eventInsight/evTailwing/index.json
index d4f7169..3598f02 100644
--- a/pages/insight/pages/eventInsight/evTailwing/index.json
+++ b/pages/insight/pages/eventInsight/evTailwing/index.json
@@ -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
}
\ No newline at end of file
diff --git a/pages/insight/pages/eventInsight/evTailwing/index.wxml b/pages/insight/pages/eventInsight/evTailwing/index.wxml
index 0bab5a7..b2b3203 100644
--- a/pages/insight/pages/eventInsight/evTailwing/index.wxml
+++ b/pages/insight/pages/eventInsight/evTailwing/index.wxml
@@ -11,4 +11,18 @@
+
+
+ 热门词云
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/insight/pages/eventInsight/evTailwing/index.wxss b/pages/insight/pages/eventInsight/evTailwing/index.wxss
index e3ae9a9..d49c958 100644
--- a/pages/insight/pages/eventInsight/evTailwing/index.wxss
+++ b/pages/insight/pages/eventInsight/evTailwing/index.wxss
@@ -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;
}
\ No newline at end of file
diff --git a/pages/insight/pages/eventInsight/evTotal/index.js b/pages/insight/pages/eventInsight/evTotal/index.js
index f627cb5..fa9dd9c 100644
--- a/pages/insight/pages/eventInsight/evTotal/index.js
+++ b/pages/insight/pages/eventInsight/evTotal/index.js
@@ -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: {
diff --git a/pages/insight/pages/eventInsight/evTotal/index.json b/pages/insight/pages/eventInsight/evTotal/index.json
index d4f7169..3598f02 100644
--- a/pages/insight/pages/eventInsight/evTotal/index.json
+++ b/pages/insight/pages/eventInsight/evTotal/index.json
@@ -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
}
\ No newline at end of file
diff --git a/pages/insight/pages/eventInsight/evTotal/index.wxml b/pages/insight/pages/eventInsight/evTotal/index.wxml
index 0c8ac00..5fefb9f 100644
--- a/pages/insight/pages/eventInsight/evTotal/index.wxml
+++ b/pages/insight/pages/eventInsight/evTotal/index.wxml
@@ -5,7 +5,7 @@
-
+
传播重点媒体
@@ -31,6 +31,17 @@
+
+ 事件传播历程
+
+
+
+
媒体解读
@@ -40,4 +51,19 @@
+
+
+ 热门词云
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/insight/pages/eventInsight/evTotal/index.wxss b/pages/insight/pages/eventInsight/evTotal/index.wxss
index ff69f5f..d00eae0 100644
--- a/pages/insight/pages/eventInsight/evTotal/index.wxss
+++ b/pages/insight/pages/eventInsight/evTotal/index.wxss
@@ -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;
}
\ No newline at end of file
diff --git a/pages/insight/pages/eventInsight/evWeibo/index.js b/pages/insight/pages/eventInsight/evWeibo/index.js
index fcf388d..d9c5cf9 100644
--- a/pages/insight/pages/eventInsight/evWeibo/index.js
+++ b/pages/insight/pages/eventInsight/evWeibo/index.js
@@ -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 => {
diff --git a/pages/insight/pages/eventInsight/index.js b/pages/insight/pages/eventInsight/index.js
index c5b4f00..e2925b9 100644
--- a/pages/insight/pages/eventInsight/index.js
+++ b/pages/insight/pages/eventInsight/index.js
@@ -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')
}
})
\ No newline at end of file
diff --git a/pages/insight/pages/modalInsight/index.js b/pages/insight/pages/modalInsight/index.js
index ba2b941..8a783db 100644
--- a/pages/insight/pages/modalInsight/index.js
+++ b/pages/insight/pages/modalInsight/index.js
@@ -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 })
},
diff --git a/pages/insight/pages/modalInsight/index.wxml b/pages/insight/pages/modalInsight/index.wxml
index a7c1372..da9cdcd 100644
--- a/pages/insight/pages/modalInsight/index.wxml
+++ b/pages/insight/pages/modalInsight/index.wxml
@@ -5,7 +5,7 @@
切换车型
数据列表
- 生成报告
+ 生成报告