Merge remote-tracking branch 'refs/remotes/origin/dev' into dev

dev
Esdese 3 years ago
commit 5bff31f243

@ -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)

@ -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;
}
}
})

@ -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() {

@ -11,7 +11,7 @@
<view>
<view class="form-content" wx:if="{{active == 0}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">主题名称</view>
<input placeholder="请输入主题名称" placeholder-class="placeholder-style" ></input>
<input value="{{Name}}" bindinput="themeNameInput" placeholder="请输入主题名称" placeholder-class="placeholder-style" ></input>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 32rpx">监测开始时间</view>
<van-cell-group inset>
<van-cell title="请选择时间" custom-class="date-picker-cell" is-link value="{{ start }}" bind:click="onDisplay" />
@ -21,10 +21,10 @@
<van-cell title="请选择时间" custom-class="date-picker-cell" is-link value="{{ end }}" bind:click="onDisplay2" />
</van-cell-group>
<van-popup show="{{ show1 }}" position="bottom">
<van-datetime-picker type="datetime" value="{{startTime}}" bind:confirm="onConfirm" bind:cancel="onCancel" />
<van-datetime-picker type="datetime" value="{{StartTime}}" bind:confirm="onConfirm" bind:cancel="onCancel" />
</van-popup>
<van-popup show="{{ show2 }}" position="bottom">
<van-datetime-picker type="datetime" value="{{endTime}}" bind:confirm="onConfirm2" bind:cancel="onCancel2" />
<van-datetime-picker type="datetime" value="{{EndTime}}" bind:confirm="onConfirm2" bind:cancel="onCancel2" />
</van-popup>
</view>
<view class="form-content" wx:if="{{active == 0}}">
@ -76,27 +76,27 @@
</van-cell-group>
<view wx:if="{{currWordType == '必选词和的关系'}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">必选词(必选词逗号间是和的关系)</view>
<textarea placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" ></textarea>
<textarea value="{{AnalyzeWord}}" placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">可选词(可选词与必选词是或的关系)</view>
<textarea placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
<textarea value="{{HuoWord}}" placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
</view>
<view wx:if="{{currWordType == '主题词或的关系'}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">主题词(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">主体词(主体词逗号之间是或的关系)</view>
<textarea value="{{AnalyzeWord}}" placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">关键词组一(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
<textarea value="{{HuoWord}}" placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">关键词组二(主题词逗号之间是或的关系)</view>
<textarea placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
<textarea value="{{HuoWord2}}" placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" ></textarea>
</view>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">排除词(搜索结果将不会含有排除词的数据)</view>
<textarea placeholder="请输入排除词多个词用隔开最多支持5个排除词" placeholder-class="placeholder-style" ></textarea>
<textarea value="{{PaiChu}}" placeholder="请输入排除词多个词用隔开最多支持5个排除词" placeholder-class="placeholder-style" ></textarea>
<van-popup show="{{ wtShow }}" position="bottom">
<van-picker columns="{{ wtColumns }}" bind:cancel="wtCancel" bind:confirm="wtConfirm" show-toolbar />
</van-popup>
</view>
<view wx:if="{{totalMode == 1}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">分析词设置</view>
<textarea placeholder="请输入分析词" placeholder-class="placeholder-style" ></textarea>
<textarea value="{{highAnalizeWord}}" placeholder="请输入分析词" placeholder-class="placeholder-style" ></textarea>
</view>
</view>
<view class="form-content" wx:if="{{active == 2}}">

@ -1,6 +1,6 @@
.at-content{
margin-top: 34rpx;
width: 686rpx;
width: 92%;
/* height: 528rpx; */
margin-left:32rpx;
padding: 0rpx 0rpx 32rpx 0rpx;

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

@ -53,7 +53,8 @@
</view>
</view>
<view class="wd-cloud">
<word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud>
<!-- <word-cloud canvasId="ta-wc" list="{{wordCloudData}}" width="100%" height="200" color="#FF1C20"></word-cloud> -->
<c-echars showChart="{{showChart}}" canvasId="wdcd-canvas" chartId="wdcd" chartOption="{{wordCloudData}}" height="100%"></c-echars>
</view>
</view>
<view class="ta-item">

@ -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() {

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

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

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

@ -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() {

Loading…
Cancel
Save