zx 3 years ago
parent 56ff2b0816
commit 8232f315a1

@ -69,7 +69,7 @@ export default function createWordCloud(data) {
shape: 'circle',
// rotationRange: [0, 0], //旋转角度的范围
rotationStep: 90, //旋转角度的步长
//shape: 'circle',
shape: 'circle',
sizeRange: [6, 48], //字体大小范围
gridSize: 8, //字间距
// maskImage: maskImage,

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