diff --git a/components/indexCom/atlasChild/index.js b/components/indexCom/atlasChild/index.js
index c7fb57f..163be6b 100644
--- a/components/indexCom/atlasChild/index.js
+++ b/components/indexCom/atlasChild/index.js
@@ -60,23 +60,15 @@ Component({
sStartTime: sStartTime,
sEndTime: sEndTime
}
- let skey = {
- 34: 6000,
- 3: 50000,
- 20: 180000,
- 23: 30000
- }
app.globalData.request(obj).then(res => {
const data = res
const arr1 = []
Object.keys(data).forEach(key => {
- let o = [key, data[key] / skey[sTimeType]]
+ let o = [key, data[key]]
arr1.push(o)
})
- const resArr = arr1.slice(0,50)
- console.log(resArr);
this.setData({
- HotWords: resArr,
+ HotWords: arr1,
showTu: true
})
resolve(true)
@@ -96,22 +88,15 @@ Component({
sStartTime: sStartTime,
sEndTime: sEndTime
}
- let skey = {
- 34: 6000,
- 3: 50000,
- 20: 180000,
- 23: 30000
- }
app.globalData.request(obj).then(res => {
const data = res
const arr2 = []
Object.keys(data).forEach(key => {
- let list = [key, data[key] / skey[sTimeType]]
+ let list = [key, data[key]]
arr2.push(list)
})
- const resArr = arr2.slice(0,50)
this.setData({
- PositiveWords: resArr,
+ PositiveWords: arr2,
showTu1: true
})
resolve(true)
@@ -132,22 +117,15 @@ Component({
sStartTime: sStartTime,
sEndTime: sEndTime
}
- let skey = {
- 34: 1300,
- 3: 8000,
- 20: 30000,
- 23: 5000
- }
app.globalData.request(obj).then(res => {
const data = res
const arr3 = []
Object.keys(data).forEach(key => {
- let list = [key, data[key] / skey[sTimeType]]
+ let list = [key, data[key]]
arr3.push(list)
})
- const resArr = arr3.slice(0,50)
this.setData({
- NegativeWords: resArr,
+ NegativeWords: arr3,
showTu2: true
})
resolve(true)
diff --git a/components/word-cloud/index.js b/components/word-cloud/index.js
index 65962ba..c1e8c41 100644
--- a/components/word-cloud/index.js
+++ b/components/word-cloud/index.js
@@ -55,7 +55,7 @@ Component({
const dpr = wx.getSystemInfoSync().pixelRatio
this.setData({
options: {
- "list": list,
+ "list": this.doData(list),
"gridSize": 10, // size of the grid in pixels
"weightFactor": 4, // number to multiply for size of each word in the list
"fontWeight": 'normal', // 'normal', 'bold' or a callback
@@ -108,5 +108,18 @@ Component({
const { detail } = event.currentTarget.dataset
this.triggerEvent('detail', detail);
},
+ doData(list = []) {
+ if(list.length === 0) {
+ return []
+ }
+ let arr = [];
+ let max = 18;
+ let maxVal = list[0][1];
+ list.forEach(ele => {
+ let a = [ele[0], ele[1] / maxVal * max];
+ arr.push(a)
+ })
+ return arr;
+ }
}
})
\ No newline at end of file
diff --git a/pages/insight/pages/addTheme/index.js b/pages/insight/pages/addTheme/index.js
index 42f1f07..692bbd7 100644
--- a/pages/insight/pages/addTheme/index.js
+++ b/pages/insight/pages/addTheme/index.js
@@ -18,12 +18,19 @@ Page({
activeIcon: 'more',
}
],
+ //表单
+ Name: '',
+ StartTime: moment().valueOf(),
+ EndTime: moment().valueOf(),
+ DetailsData: [],
+ AnalyzeWord: '', // 和 或 的主体词
+ HuoWord:'', // 和 或 的可选词
+ HuoWord2:'', // 或 的可选词
+ PaiChu: '', // 排除词
+ highAnalizeWord: '', // 高级模式分析词
+ //
active: 0,
activeNames: [],
- start: moment().format("YYYY-MM-DD HH:mm:ss"),
- startTime: moment().valueOf(),
- end: moment().format("YYYY-MM-DD HH:mm:ss"),
- endTime: moment().valueOf(),
show1: false,
show2: false,
dt: '',
@@ -40,21 +47,28 @@ Page({
onShow() {
},
+ //表单
+ themeNameInput(event) {
+ this.setData({ Name: event.detail.value})
+ },
+ //
changeTips(value) {
this.setData({
activeNames: value.detail,
});
},
- onConfirm() {
+ onConfirm(event) {
+ var time = moment(event.detail).format("YYYY-MM-DD HH:mm:ss")
this.setData({
show1: false,
- start: this.data.dt
+ StartTime: time
});
},
- onConfirm2() {
+ onConfirm2(event) {
+ var time = moment(event.detail).format("YYYY-MM-DD HH:mm:ss")
this.setData({
- show2: false,
- start: this.data.dt2
+ show1: false,
+ EndTime: time
});
},
onDisplay() {
diff --git a/pages/insight/pages/addTheme/index.wxml b/pages/insight/pages/addTheme/index.wxml
index 5e1fb38..123b2f4 100644
--- a/pages/insight/pages/addTheme/index.wxml
+++ b/pages/insight/pages/addTheme/index.wxml
@@ -11,7 +11,7 @@
主题名称
-
+
监测开始时间
@@ -21,10 +21,10 @@
-
+
-
+
@@ -76,27 +76,27 @@
必选词(必选词逗号间是和的关系)
-
+
可选词(可选词与必选词是或的关系)
-
+
- 主题词(主题词逗号之间是或的关系)
-
+ 主体词(主体词逗号之间是或的关系)
+
关键词组一(主题词逗号之间是或的关系)
-
+
关键词组二(主题词逗号之间是或的关系)
-
+
排除词(搜索结果将不会含有排除词的数据)
-
+
分析词设置
-
+
diff --git a/pages/insight/pages/addTheme/index.wxss b/pages/insight/pages/addTheme/index.wxss
index 95482f2..6bf4614 100644
--- a/pages/insight/pages/addTheme/index.wxss
+++ b/pages/insight/pages/addTheme/index.wxss
@@ -1,6 +1,6 @@
.at-content{
margin-top: 34rpx;
- width: 686rpx;
+ width: 92%;
/* height: 528rpx; */
margin-left:32rpx;
padding: 0rpx 0rpx 32rpx 0rpx;
diff --git a/pages/insight/pages/brandInsight/TailInsight/index.js b/pages/insight/pages/brandInsight/TailInsight/index.js
index 296df8a..064b0f0 100644
--- a/pages/insight/pages/brandInsight/TailInsight/index.js
+++ b/pages/insight/pages/brandInsight/TailInsight/index.js
@@ -101,18 +101,11 @@ Component({
sBrand: wx.getStorageSync('sBrand') || '',
}).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')]]
+ let o = [key, res[key]]
arr1.push(o)
});
- const resArr = arr1.slice(0,50);
- this.setData({wordCloudData: resArr})
+ this.setData({wordCloudData: arr1})
});
},
toEventDetail(value) {
diff --git a/pages/insight/pages/brandInsight/TailInsight/index.wxml b/pages/insight/pages/brandInsight/TailInsight/index.wxml
index dd2cd4d..5adbaa8 100644
--- a/pages/insight/pages/brandInsight/TailInsight/index.wxml
+++ b/pages/insight/pages/brandInsight/TailInsight/index.wxml
@@ -53,7 +53,8 @@
-
+
+
diff --git a/pages/insight/pages/brandInsight/weiboInsight/index.js b/pages/insight/pages/brandInsight/weiboInsight/index.js
index 9ee4cb7..6ac2401 100644
--- a/pages/insight/pages/brandInsight/weiboInsight/index.js
+++ b/pages/insight/pages/brandInsight/weiboInsight/index.js
@@ -377,18 +377,11 @@ Component({
sBrand: wx.getStorageSync('sBrand') || '',
}).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')]]
+ let o = [key, res[key]]
arr1.push(o)
});
- const resArr = arr1.slice(0,50);
- this.setData({wordCloudData: resArr})
+ this.setData({wordCloudData: arr1})
});
},
getKol() {
diff --git a/pages/insight/pages/eventInsight/evTailwing/index.js b/pages/insight/pages/eventInsight/evTailwing/index.js
index 46a48b5..4f7dac2 100644
--- a/pages/insight/pages/eventInsight/evTailwing/index.js
+++ b/pages/insight/pages/eventInsight/evTailwing/index.js
@@ -60,18 +60,11 @@ Component({
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')]]
+ let o = [key, res[key]]
arr1.push(o)
});
- const resArr = arr1.slice(0,50);
- this.setData({wordCloudData: resArr})
+ this.setData({wordCloudData: arr1})
});
},
changeWordCloud(event) {
diff --git a/pages/insight/pages/eventInsight/evTotal/index.js b/pages/insight/pages/eventInsight/evTotal/index.js
index fa9dd9c..41acaaf 100644
--- a/pages/insight/pages/eventInsight/evTotal/index.js
+++ b/pages/insight/pages/eventInsight/evTotal/index.js
@@ -129,18 +129,11 @@ Component({
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')]]
+ let o = [key, res[key]]
arr1.push(o)
});
- const resArr = arr1.slice(0,50);
- this.setData({wordCloudData: resArr})
+ this.setData({wordCloudData: arr1})
});
},
changeWordCloud(event) {
diff --git a/pages/insight/pages/modalInsight/TailInsight/index.js b/pages/insight/pages/modalInsight/TailInsight/index.js
index 97de4b4..f8faa88 100644
--- a/pages/insight/pages/modalInsight/TailInsight/index.js
+++ b/pages/insight/pages/modalInsight/TailInsight/index.js
@@ -89,18 +89,11 @@ Component({
sSeriesName: wx.getStorageSync('sSeriesName') || ''
}).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')]]
+ let o = [key, res[key]]
arr1.push(o)
});
- const resArr = arr1.slice(0,50);
- this.setData({wordCloudData: resArr})
+ this.setData({wordCloudData: arr1})
});
},
toEventDetail(value) {
diff --git a/pages/insight/pages/modalInsight/weiboInsight/index.js b/pages/insight/pages/modalInsight/weiboInsight/index.js
index 8d528c3..64984a0 100644
--- a/pages/insight/pages/modalInsight/weiboInsight/index.js
+++ b/pages/insight/pages/modalInsight/weiboInsight/index.js
@@ -285,18 +285,11 @@ Component({
sSeriesName: wx.getStorageSync('sSeriesName') || ''
}).then(res => {
let arr1 = [];
- let skey = {
- 34: 5,
- 3: 41,
- 20: 150,
- 23: 25
- };
Object.keys(res).forEach(key => {
- let o = [key, res[key] / skey[wx.getStorageSync('sTimeType')]]
+ let o = [key, res[key]]
arr1.push(o)
});
- const resArr = arr1.slice(0,50);
- this.setData({wordCloudData: resArr})
+ this.setData({wordCloudData: arr1})
});
},
getKol() {