Merge branch 'dev' of git.oa00.com:xiaowen/swsWecat into dev

* 'dev' of git.oa00.com:xiaowen/swsWecat:
  zx
  zx
dev
liuyongli 3 years ago
commit c4331497a4

@ -87,7 +87,7 @@ Component({
let total = res.正面 * 1 + res.中性 * 1 + res.负面 * 1;
let arr = [];
for(let key in res) {
let obj = {name: key, value: res[key], percent: (res[key]/total*100).toFixed(0)};
let obj = {name: key, value: res[key], percent: total != 0 ? (res[key]/total*100).toFixed(0):0};
arr.push(obj)
};
this.setData({ weiyiTotal: pieOption(dColor,arr), weiyiTotalData: arr})

@ -76,7 +76,7 @@
</van-checkbox-group>
</view>
<view style="margin-left: 36%;">
<van-button bind:click="openReport" color="#0084FF" custom-style="width: 120%" class="theme-add-btn" plain>生成数据</van-button>
<van-button disabled="{{total == 0}}" bind:click="openReport" color="#0084FF" custom-style="width: 120%" class="theme-add-btn" plain>生成数据</van-button>
</view>
</view>
<van-dialog use-slot title="导出选项" show="{{reportShow}}" bind:confirm="report" show-cancel-button>

@ -1,5 +1,5 @@
<view class="tdl-content">
<view style="color: #333333;font-size: 12px">共{{total}}条信息数据</view>
<view style="color: #333333;font-size: 12px;margin-bottom: 24rpx">共{{total}}条信息数据</view>
<view class="tdl-item" wx:for="{{tailDataList}}" wx:key="index">
<view class="top-time">
<view class="top-time-item">{{item._source.sourcetime}}</view>
@ -20,16 +20,4 @@
<view style="margin-left: 64rpx;">作者:{{item._source.user_author}}</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view style="padding: 32rpx">
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.srctitle}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -98,9 +98,9 @@ Component({
}).then(res => {
let total = res.正面 * 1 + res.中性 * 1 + res.负面 * 1
let obj = {
positive: (res.正面 / total * 100).toFixed(0),
middle: (res.中性 / total * 100).toFixed(0),
negative: (res.负面 / total * 100).toFixed(0),
positive: total != 0 ? (res.正面 / total * 100).toFixed(0) : 0,
middle: total != 0 ? (res.中性 / total * 100).toFixed(0) : 0,
negative: total != 0 ? (res.负面 / total * 100).toFixed(0) : 0,
}
this.setData({
weiboAff: obj
@ -146,7 +146,7 @@ Component({
let obj = {
value: ele.value,
name: ele.key,
percent: (ele.value * 100 / total).toFixed(0)
percent: total != 0 ? (ele.value * 100 / total).toFixed(0) : 0
};
arr.push(obj)
});
@ -173,7 +173,7 @@ Component({
let obj = {
value: ele.value,
name: ele.key,
percent: (ele.value * 100 / total).toFixed(0)
percent: total != 0 ? (ele.value * 100 / total).toFixed(0) : 0
};
arr.push(obj)
});
@ -331,7 +331,7 @@ Component({
let obj = {
value: res.sex[key],
name: key,
percent: (res.sex[key] * 100 / sexTotal).toFixed(0)
percent: sexTotal != 0 ? (res.sex[key] * 100 / sexTotal).toFixed(0) : 0
};
sexArr.push(obj)
};
@ -343,7 +343,7 @@ Component({
let obj = {
value: res.attestation[key],
name: key,
percent: (res.attestation[key] * 100 / sexTotal).toFixed(0)
percent: sexTotal != 0 ? (res.attestation[key] * 100 / sexTotal).toFixed(0) : 0
};
sexArr.push(obj)
};
@ -355,7 +355,7 @@ Component({
let obj = {
value: res.RegionWeiBo[key],
name: key,
percent: (res.RegionWeiBo[key] * 100 / sexTotal).toFixed(0)
percent: sexTotal != 0 ? (res.RegionWeiBo[key] * 100 / sexTotal).toFixed(0) : 0
};
sexArr.push(obj)
};

@ -44,7 +44,7 @@
</van-dropdown-menu>
</view>
<view class="tdl-content">
<view style="color: #333333;font-size: 12px">共{{total}}条信息数据</view>
<view style="color: #333333;font-size: 12px;margin-bottom: 24rpx;">共{{total}}条信息数据</view>
<van-checkbox-group value="{{ result }}" bind:change="onChange">
<view class="tdl-item" wx:for="{{dataList}}" wx:key="index">
<view class="top-time">
@ -79,7 +79,7 @@
</van-checkbox-group>
</view>
<view style="margin-left: 36%;">
<van-button bind:click="openReport" color="#0084FF" custom-style="width: 120%" class="theme-add-btn" plain>生成数据</van-button>
<van-button disabled="{{total == 0}}" bind:click="openReport" color="#0084FF" custom-style="width: 120%" class="theme-add-btn" plain>生成数据</van-button>
</view>
</view>
<van-dialog use-slot title="导出选项" show="{{reportShow}}" bind:confirm="report" show-cancel-button>

@ -54,7 +54,7 @@ Component({
app.globalData.request({
action: this.data.wordCloudActive == 0?'getPositive':'getNegative', // 正面词云 负面词云
token: 't%2BrswgjvzGM=',
sType: 'HotEvent',
sType: 'BrandWeiYi',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',

@ -76,7 +76,7 @@
</van-checkbox-group>
</view>
<view style="margin-left: 36%;">
<van-button bind:click="openReport" color="#0084FF" custom-style="width: 120%" class="theme-add-btn" plain>生成数据</van-button>
<van-button disabled="{{total == 0}}" bind:click="openReport" color="#0084FF" custom-style="width: 120%" class="theme-add-btn" plain>生成数据</van-button>
</view>
</view>
<van-dialog use-slot title="导出选项" show="{{reportShow}}" bind:confirm="report" show-cancel-button>

@ -2,8 +2,6 @@ const app = getApp();
Page({
data: {
tailDataList: [],
copyShow: false,
copyData: {},
iPageIndex: 1,
iPageSize: 25,
total: 0

@ -1,5 +1,5 @@
<view class="tdl-content">
<view style="color: #333333;font-size: 12px">共{{total}}条信息数据</view>
<view style="color: #333333;font-size: 12px;margin-bottom: 24rpx">共{{total}}条信息数据</view>
<view class="tdl-item" wx:for="{{tailDataList}}" wx:key="index">
<view class="top-time">
<view class="top-time-item">{{item._source.sourcetime}}</view>
@ -20,16 +20,4 @@
<view style="margin-left: 64rpx;">作者:{{item._source.user_author}}</view>
</view>
</view>
<van-dialog use-slot title="复制成功" show="{{copyShow}}">
<view>
<view style="font-size: 17px;font-weight: 600;color: #D0D0D0;line-height: 24px;margin-bottom: 24rpx">已复制到剪贴板,快去分享吧</view>
<view>发布时间:{{copyData.sourcetime}}</view>
<!-- <view>车型:{{copyData.sourcetime}}</view> -->
<view>来源:{{copyData.source}}</view>
<view>标题:{{copyData.srctitle}}</view>
<view style="word-break: break-all">链接:{{copyData.url}}</view>
<view>调性:{{copyData.affections == 1?'正面':copyData.affections == 2?'中性':'负面'}}</view>
<view>作者:{{copyData.user_author}}</view>
</view>
</van-dialog>
</view>

@ -96,7 +96,7 @@ Page({
let total = data.正面 * 1 + data.中性 * 1 + data.负面 * 1;
let arr = [];
for(let key in data) {
let obj = {name: key, value: data[key], percent: (data[key]/total*100).toFixed(0)};
let obj = {name: key, value: data[key], percent: total != 0 ? (data[key]/total*100).toFixed(0):0};
arr.push(obj)
};
this.setData({ affPercent: pieOption(dColor,arr), affPercentData: arr})
@ -261,9 +261,9 @@ Page({
getUserChar() {
let obj = {
token: 't%2BrswgjvzGM=',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sTimeType: 4,
sStartTime: this.data.sStartTime,
sEndTime: this.data.sEndTime,
sQuDao: this.data.sQuDao,
sQingGan: this.data.sQingGan,
sTitle: this.data.sTitle,
@ -283,7 +283,7 @@ Page({
let obj = {
value: res.sex[key],
name: key,
percent: (res.sex[key]*100/sexTotal).toFixed(0)
percent: sexTotal!=0? (res.sex[key]*100/sexTotal).toFixed(0):0
};
sexArr.push(obj)
};
@ -295,7 +295,7 @@ Page({
let obj = {
value: res.attestation[key],
name: key,
percent: (res.attestation[key]*100/sexTotal).toFixed(2)
percent: sexTotal!=0? (res.attestation[key]*100/sexTotal).toFixed(2):0
};
sexArr.push(obj)
};
@ -306,9 +306,9 @@ Page({
getWordCloud() {
let obj = {
token: 't%2BrswgjvzGM=',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sTimeType: 4,
sStartTime: this.data.sStartTime,
sEndTime: this.data.sEndTime,
sQuDao: this.data.sQuDao,
sQingGan: this.data.sQingGan,
sTitle: this.data.sTitle,
@ -325,9 +325,9 @@ Page({
getBigv() {
let obj = {
token: 't%2BrswgjvzGM=',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sTimeType: 4,
sStartTime: this.data.sStartTime,
sEndTime: this.data.sEndTime,
sQuDao: this.data.sQuDao,
sQingGan: this.data.sQingGan,
sTitle: this.data.sTitle,
@ -352,7 +352,7 @@ Page({
let totalAff = affData.正面 * 1 + affData.中性 * 1 + affData.负面 * 1;
let arr = [];
for(let key in affData) {
let obj = {name: key, value: affData[key], percent: (affData[key]/totalAff*100).toFixed(0)};
let obj = {name: key, value: affData[key], percent: totalAff!=0? (affData[key]/totalAff*100).toFixed(0):0};
arr.push(obj)
};
this.setData({ affWeiboPercent: pieOption(dColor,arr), affWeiboPercentData: arr})

@ -110,7 +110,7 @@
</van-checkbox-group>
</view>
<view style="width: 75%;margin-right: -32rpx;">
<van-button bind:click="openReport" custom-style="width: 45%" color="#0084FF" class="theme-add-btn" plain>生成数据</van-button>
<van-button disabled="{{total == 0}}" bind:click="openReport" custom-style="width: 45%" color="#0084FF" class="theme-add-btn" plain>生成数据</van-button>
<van-button bind:click="toThemeBoard" custom-style="width: 45%" color="#0084FF" class="theme-add-btn">数据看板</van-button>
</view>
</view>

Loading…
Cancel
Save