dev
liuyongli 3 years ago
parent 9396c9c903
commit 9f3535ad8d

@ -18,7 +18,7 @@ Component({
},
lifetimes: {
attached() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);

@ -2,6 +2,6 @@
"usingComponents": {
"word-cloud": "../../word-cloud/index",
"word-cloud-car":"../../wdCloudCar/index",
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -1,6 +1,6 @@
<view class="p-container">
<!-- 时间组件 -->
<time-component bindchange="changeTime"></time-component>
<time-component-home bindchange="changeTime"></time-component-home>
<view class="brand">
<view class="text" bindtap="a">热门词云</view>
<word-cloud-car height="{{300}}" list="{{HotWords}}"></word-cloud-car>

@ -17,7 +17,7 @@ Component({
},
lifetimes: {
attached() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);

@ -2,6 +2,6 @@
"component": true,
"usingComponents": {
"c-echars": "/components/c-echars/index",
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -1,6 +1,6 @@
<view class="p-container">
<!-- 时间组件 -->
<time-component bindchange="changeTime"></time-component>
<time-component-home bindchange="changeTime"></time-component-home>
<view class="brand">
<view class="text">正负调性</view>
<view class="brand_tu">

@ -18,7 +18,7 @@ Component({
},
lifetimes: {
attached() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);

@ -2,6 +2,6 @@
"component": true,
"usingComponents": {
"c-echars": "../../c-echars/index",
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -1,6 +1,6 @@
<view class="p-container">
<!-- 时间组件 -->
<time-component bindchange="changeTime"></time-component>
<time-component-home bindchange="changeTime"></time-component-home>
<view class="trend">
<view class="text">入库数据趋势</view>
<view class="trend_tu">

@ -9,7 +9,7 @@ Component({
lifetimes: {
attached() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);

@ -1,6 +1,6 @@
{
"component": true,
"usingComponents": {
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -1,6 +1,6 @@
<view class="p-container">
<!-- 时间组件 -->
<time-component bindchange="changeTime"></time-component>
<time-component-home bindchange="changeTime"></time-component-home>
<view class="list_event" style="{{bgImage}}">
<view class="event_title" bindtap="bindtaps">热点事件</view>
<view class="event_content" wx:for="{{questes}}" wx:if="{{index < 5}}" wx:key="events_id" data-id='{{item.events_id}}' bindtap="toEventDetail">

@ -9,7 +9,7 @@ Component({
},
lifetimes: {
attached() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);

@ -2,6 +2,6 @@
"component": true,
"usingComponents": {
"c-echars": "../../c-echars/index",
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -1,6 +1,6 @@
<view class="p-container">
<!-- 时间组件 -->
<time-component bindchange="changeTime"></time-component>
<time-component-home bindchange="changeTime"></time-component-home>
<view class="brand">
<view class="text">品牌传播声量</view>
<view class="brand_tu">

@ -6,7 +6,7 @@ Component({
},
lifetimes: {
attached() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);

@ -1,6 +1,6 @@
{
"component": true,
"usingComponents": {
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -1,24 +1,23 @@
<view class="p-container">
<!-- 时间组件 -->
<time-component bindchange="changeTime"></time-component>
<view class="list_event">
<view class="event_title" bindtap="a">传播重点媒体排行</view>
<view class="ranking">
<view class="title">排名</view>
<view class="title">媒体</view>
<view class="title2">传播量</view>
</view>
<view>
<view class="rank" wx:for="{{ranking}}" wx:key="index" wx:if="{{index<10}}" >
<view class="dis_image">
<image class="rank_num" wx:if="{{index === 0}}" src="{{imageUrl}}/img_diyi.png"></image>
<image class="rank_num" wx:if="{{index === 1}}" src="{{imageUrl}}/img_dier.png"></image>
<image class="rank_num" wx:if="{{index === 2}}" src="{{imageUrl}}/img_disan.png"></image>
<view class="num" wx:if="{{index !== 0 &&index !== 1 &&index !== 2 }}">{{index >= 9 ? index + 1 : '0' + (index + 1)}}</view>
</view>
<view class="media">{{item.name}}</view>
<view class="volume">{{item.value}}</view>
</view>
<time-component-home bindchange="changeTime"></time-component-home>
<view class="list_event">
<view class="event_title" bindtap="a">传播重点媒体排行</view>
<view class="ranking">
<view class="title">排名</view>
<view class="title">媒体</view>
<view class="title2">传播量</view>
</view>
<view>
<view class="rank" wx:for="{{ranking}}" wx:key="index" wx:if="{{index<10}}">
<view class="dis_image">
<image class="rank_num" wx:if="{{index === 0}}" src="{{imageUrl}}/img_diyi.png"></image>
<image class="rank_num" wx:if="{{index === 1}}" src="{{imageUrl}}/img_dier.png"></image>
<image class="rank_num" wx:if="{{index === 2}}" src="{{imageUrl}}/img_disan.png"></image>
<view class="num" wx:if="{{index !== 0 &&index !== 1 &&index !== 2 }}">{{index >= 9 ? index + 1 : '0' + (index + 1)}}</view>
</view>
<view class="media">{{item.name}}</view>
<view class="volume">{{item.value}}</view>
</view>
</view>
</view>
</view>

@ -11,7 +11,7 @@ Component({
},
lifetimes:{
attached(){
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);

@ -2,6 +2,6 @@
"component": true,
"usingComponents": {
"c-echars": "../../c-echars/index",
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -1,7 +1,7 @@
<scroll-view class="p-container">
<view>
<!-- 时间组件 -->
<time-component bindchange="changeTime"></time-component>
<time-component-home bindchange="changeTime"></time-component-home>
<view class="brand">
<view class="text">性别</view>
<view class="statistical">

@ -2,6 +2,6 @@
"component": true,
"usingComponents": {
"c-echars": "../../c-echars/index",
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -11,7 +11,7 @@ Component({
},
lifetimes: {
attached() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
this.getData(sTimeType, sStartTime, sEndTime);

@ -2,6 +2,6 @@
"component": true,
"usingComponents": {
"c-echars": "../../c-echars/index",
"time-component":"/components/timecomponent/index"
"time-component-home":"/components/timecomponentHome/index"
}
}

@ -1,6 +1,6 @@
<view class="p-container">
<!-- 时间组件 -->
<time-component bindchange="changeTime"></time-component>
<time-component-home bindchange="changeTime"></time-component-home>
<view class="brand">
<view class="text">品牌传播声量</view>
<view class="brand_tu">

@ -8,7 +8,7 @@ Component({
sTimeType: '34',
intervalSel: 0,
show: false,
start: moment().format("YYYY-MM-DD HH:mm:ss"),
start: moment().format('YYYY-MM-DD HH:mm:ss'),
startTime: moment().valueOf(),
end: moment().format("YYYY-MM-DD HH:mm:ss"),
endTime: moment().valueOf(),
@ -26,6 +26,14 @@ Component({
this.setData({
intervalSel: n
})
if(st == '4') {
this.setData({
show: true,
start:moment(wx.getStorageSync('sStartTime')).format('YYYY-MM-DD HH:mm:ss'),
end:moment(wx.getStorageSync('sEndTime')).format('YYYY-MM-DD HH:mm:ss'),
})
}
} else {
wx.setStorageSync('sTimeType', 34);
wx.setStorageSync('sStartTime', '');
@ -43,12 +51,14 @@ Component({
let start = "";
let end = "";
if(this.data.intervalSel === 3) {
wx.setStorageSync('sStartTime', this.data.start);
let st = moment().subtract(1, 'day').format('YYYY-MM-DD HH:mm:ss')
wx.setStorageSync('sStartTime', st);
wx.setStorageSync('sEndTime', this.data.end);
start = this.data.start;
start = st;
end = this.data.end;
this.setData({
show: true
show: true,
start: st,
})
} else {
wx.setStorageSync('sStartTime', '');

@ -1,17 +1,15 @@
<view class="timelist">
<view wx:for="{{timelist}}" class="{{index === intervalSel?'active':''}}" wx:key="index" data-index="{{index}}" bindtap="priceSel">{{item}}
</view>
<view wx:for="{{timelist}}" class="{{index === intervalSel?'active':''}}" wx:key="index" data-index="{{index}}" bindtap="priceSel">{{item}}
</view>
</view>
<view wx:if="{{show}}">
<view wx:if="{{show}}" class="t-list">
<van-cell title="选择开始时间" is-link value="{{ start }}" bind:click="onDisplay" />
<van-cell title="选择结束时间" is-link value="{{ end }}" bind:click="onDisplay1" />
<van-popup show="{{ show1 }}" position="bottom">
<van-datetime-picker type="datetime" value="{{startTime}}" bind:input="onInput" bind:confirm="onConfirm"
bind:cancel="onCancel" />
<van-datetime-picker type="datetime" value="{{startTime}}" bind:input="onInput" bind:confirm="onConfirm" bind:cancel="onCancel" />
</van-popup>
<van-popup show="{{ show2 }}" position="bottom">
<van-datetime-picker type="datetime" value="{{endTime}}" bind:input="onInput1" bind:confirm="onConfirm1"
bind:cancel="onCancel1" />
<van-datetime-picker type="datetime" value="{{endTime}}" bind:input="onInput1" bind:confirm="onConfirm1" bind:cancel="onCancel1" />
</van-popup>
<van-dialog use-slot title="注意" show="{{ showDialog }}" bind:confirm="cdialog">
<view class="tc-d-t">结束时间不能小于开始时间</view>

@ -1,14 +1,15 @@
.timelist {
width: 672rpx;
width: calc(100% - 32px);
padding: 0px 16px;
height: 80rpx;
line-height: 80rpx;
margin:0 auto;
margin: 0 auto;
display: flex;
flex-wrap: nowrap;
background: white;
justify-content:space-between;
padding-left: 8rpx;
padding-right: 8rpx;
justify-content: space-between;
/* padding-left: 8rpx;
padding-right: 8rpx; */
margin-top: 32rpx;
/* border-radius: 8rpx; */
}
@ -30,9 +31,15 @@
margin-top: 8rpx;
border-radius: 4rpx;
}
.tc-d-t {
font-size: 14px;
padding: 15px 0px;
color: #909497;
text-align: center;
}
.t-list {
width: 100%;
/* padding: 0px 16px; */
}

@ -2,143 +2,148 @@ import Dialog from '../../miniprogram_npm/@vant/weapp/dialog/dialog';
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
boxArr: new Array(6),
tabActive: 0,
result: [],
sonCom: true,
popupShow: false,
mockData:[],
tempLate:['一','二','三','四','五','六',]
},
/**
* 页面的初始数据
*/
data: {
boxArr: new Array(6),
tabActive: 0,
result: [],
sonCom: true,
popupShow: false,
mockData: [],
tempLate: ['一', '二', '三', '四', '五', '六', ]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
boxArr: wx.getStorageSync('brandData'),
result:wx.getStorageSync('brandData').map(ele=>{
return JSON.stringify(ele)
})
})
wx.setStorageSync('brandRatioTime', {
sTimeType: '34'
})
this.brandReq()
},
onUnload(){
wx.setStorageSync('brandRatioTime', {
sTimeType: '34'
})
},
onChange(event) {
const {detail} = event
const result = []
for(let i=0;i<=detail.length;i++){
if(detail[i]=='null') detail.splice(i,1),i--
}
if(detail.length>6){
Dialog.alert({
message: '至多六个',
context:this
})
return
}
for(let i of detail){
result.push(JSON.parse(i))
}
result.length = 6
this.setData({
result:detail,
boxArr:result
})
},
changeTab(val) {
let n = val.detail.index;
this.setData({
tabActive: n
})
},
addBrand() {
this.setData({
popupShow: true
})
},
popupClose() {
this.setData({
popupShow: false
})
wx.setStorageSync('brandData', this.data.boxArr)
this.reLoad()
},
del(e) {
let filter = this.data.result.filter(ele=>{
return ele!= "null"
})
if(filter.length==2){
Dialog.alert({
message: '至少需要两个品牌才可以对比哦!',
context:this
})
return
}
let index = e.currentTarget.dataset.index
let result = [...this.data.result]
let boxArr = []
result.splice(index, 1)
for (let i of result) {
boxArr.push(JSON.parse(i))
}
boxArr.length = 6
this.setData({
result: result,
boxArr: boxArr
})
wx.setStorageSync('brandData', this.data.boxArr)
this.reLoad()
},
changeTime(event) {
let {
detail
} = event
wx.setStorageSync('brandRatioTime', detail)
this.reLoad()
},
//获取品牌
brandReq() {
app.globalData.request({
action: 'getUserBrand',
token: wx.getStorageSync('token'),
}).then(res => {
let arr = []
for (let i = 65; i <= 90; i++) {
arr.push({
name: String.fromCharCode(i),
data: []
});
}
for (let i of res) {
for (let j of arr) {
if (i.firstword == j.name) {
j.data.push(i)
}
}
}
this.setData({
mockData: arr
})
})
},
reLoad() {
this.setData({
sonCom: false
})
this.setData({
sonCom: true
})
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
boxArr: wx.getStorageSync('brandData'),
result: wx.getStorageSync('brandData').map(ele => {
return JSON.stringify(ele)
})
})
wx.setStorageSync('brandRatioTime', {
sTimeType: '34'
})
this.brandReq()
},
onUnload() {
wx.setStorageSync('brandRatioTime', {
sTimeType: '34'
})
},
onChange(event) {
this.triggerEvent('hide')
const {
detail
} = event
const result = []
for (let i = 0; i <= detail.length; i++) {
if (detail[i] == 'null') detail.splice(i, 1), i--
}
if (detail.length > 6) {
Dialog.alert({
message: '至多六个',
context: this
})
return
}
for (let i of detail) {
result.push(JSON.parse(i))
}
result.length = 6
this.setData({
result: detail,
boxArr: result
})
},
changeTab(val) {
let n = val.detail.index;
this.setData({
tabActive: n
})
},
addBrand() {
this.setData({
popupShow: true
})
},
popupClose() {
this.setData({
popupShow: false
})
wx.setStorageSync('brandData', this.data.boxArr)
this.reLoad()
},
del(e) {
this.triggerEvent('hide')
let filter = this.data.result.filter(ele => {
return ele != "null"
})
if (filter.length == 2) {
Dialog.alert({
message: '至少需要两个品牌才可以对比哦!',
context: this
})
return
}
let index = e.currentTarget.dataset.index
let result = [...this.data.result]
let boxArr = []
result.splice(index, 1)
for (let i of result) {
boxArr.push(JSON.parse(i))
}
boxArr.length = 6
this.setData({
result: result,
boxArr: boxArr
})
wx.setStorageSync('brandData', boxArr)
this.reLoad()
},
changeTime(event) {
let {
detail
} = event
wx.setStorageSync('brandRatioTime', detail)
this.reLoad()
},
//获取品牌
brandReq() {
app.globalData.request({
action: 'getUserBrand',
token: wx.getStorageSync('token'),
}).then(res => {
let arr = []
for (let i = 65; i <= 90; i++) {
arr.push({
name: String.fromCharCode(i),
data: []
});
}
for (let i of res) {
for (let j of arr) {
if (i.firstword == j.name) {
j.data.push(i)
}
}
}
this.setData({
mockData: arr
})
})
},
reLoad() {
this.setData({
sonCom: false
})
this.setData({
sonCom: true
})
}
})

@ -1,5 +1,6 @@
<wxs src="./filter.wxs" module="filter"></wxs>
<view class="box">
<view class="top-brand-switch">
<view class="tiem_com">
<time-custom bind:change="changeTime"></time-custom>
</view>
@ -11,7 +12,7 @@
<view class="event1">添加品牌{{ tempLate[index]}}</view>
</view>
<view class="del_box" wx:else>
<view class="del" bindtap="del" bindtap="del" data-index="{{index}}">
<view class="del" bindtap="del" data-index="{{index}}">
<text style="font-size: 24rpx;display: inline-block;margin-left: 64rpx;">×</text>
<text style="font-size: 24rpx;font-weight: 100;"> 删除</text>
</view>
@ -21,8 +22,9 @@
<view class="car_barnd">{{item.brandname}}</view>
</view>
</view>
</view>
</view>
<view class="event_recom1">
<van-tabs class="view-tabs" active="{{ tabActive }}" bind:change="changeTab" swipe-threshold="3">
<van-tab title="概括" wx:key="0"></van-tab>

@ -11,7 +11,8 @@ page {
.add1 {
width: 750rpx;
margin-top: 16rpx;
margin-top: 8rpx;
padding: 16rpx 0;
overflow-x: scroll;
white-space: nowrap;
}
@ -194,4 +195,8 @@ page {
.my_cell text {
font-size: 28rpx;
margin-left: 24rpx;
}
.top-brand-switch {
background: #006BFF;
/* padding: 2rpx 32rpx rpx 32rpx */
}

@ -107,7 +107,7 @@
</view>
</view>
</view>
<view class="chart_box" style="margin-top:36rpx;">
<view class="chart_box">
<view class="chart_title">微博用户性别对比</view>
<view class="table">
<c-echars showChart="{{showChart}}" canvasId="brandbar-canvas" chartId="brandbar" chartOption="{{genderOption}}" height="100%"></c-echars>

@ -70,7 +70,7 @@ Page({
})
},
getData() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
let sSeriesName = wx.getStorageSync("sSeriesName") || '';
@ -128,7 +128,7 @@ Page({
})
},
getCrisis() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
let sCrisis = wx.getStorageSync("sCrisis") || '1,2,3';
@ -157,7 +157,7 @@ Page({
})
},
getHotEventsList() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
let sSeriesName = wx.getStorageSync("sSeriesName") || '';
@ -184,7 +184,7 @@ Page({
this.setData({
showChart: false
})
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sTimeType = wx.getStorageSync("sTimeType2") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
let sSeriesName = wx.getStorageSync("sSeriesName") || '';

@ -1,6 +1,6 @@
{
"usingComponents": {
"c-echars": "../../components/c-echars/index",
"time-component": "../../components/timecomponent/index"
"time-component-home":"../../components/timecomponentHome/index"
}
}

@ -55,7 +55,7 @@
<view class="bc-top-bt"></view>
</view>
<view class="bc-cont">
<time-component bindchange="changeTime"></time-component>
<time-component-home bindchange="changeTime"></time-component-home>
</view>
<view class="brand-info">
<view class="bi-title">品牌信息</view>

@ -150,19 +150,19 @@ Page({
});
},
onConfirm(event) {
var time = moment(event.detail).format("YYYY-MM-DD HH:mm:ss")
var time = event.detail
this.setData({
show1: false,
StartTime: time,
start: time
start: moment(time).format('YYYY-MM-DD HH:mm:ss') //显示
});
},
onConfirm2(event) {
var time = moment(event.detail).format("YYYY-MM-DD HH:mm:ss")
var time = event.detail
this.setData({
show2: false,
EndTime: time,
end: time
end: moment(time).format('YYYY-MM-DD HH:mm:ss') //显示
});
},
onDisplay() {
@ -303,7 +303,6 @@ Page({
},
// 分析词设置
bindAnalyzeWord(event) {
this.setData({
AnalyzeWord: event.detail.value
})
@ -325,7 +324,6 @@ Page({
},
// 定向监测
bindSource(event) {
console.log('vf',this.data.AnalyzeWord)
this.setData({
Source: event.detail.value
})
@ -357,19 +355,20 @@ Page({
let Statu = this.data.Statu
if (Statu == 0) {
let dtData = {
"AnalyzeWord": this.data.totalMode == 1 ? this.data.highAnalizeWord : this.data.AnalyzeWord,
"AnalyzeWord": this.data.totalMode == 1 ? this.data.highAnalizeWord.replace("+","%2B") : this.data.AnalyzeWord.replace("+","%2B"),
"HuoWord": this.data.HuoWord,
"PaiChu": this.data.PaiChu,
"IsAdvancedQuery": this.data.totalMode == 0 && this.data.currWordType == '必选词和的关系' ? 0 : this.data.totalMode == 1 ? 1 : 2,
"Source": this.data.Source,
"UserAuthor": this.data.UserAuthor
};
let jsonObj = {
"Guids": null,
"Name": this.data.Name,
"Classify": 0,
"StartTime": this.data.StartTime,
"EndTime": this.data.EndTime,
"StartTime": this.data.start,
"EndTime": this.data.end,
"Types": "theme_v6",
"DetailsData": [dtData],
"Warning": {
@ -385,7 +384,7 @@ Page({
var dtJson = JSON.stringify(jsonObj)
}else{
let dtData = {
"AnalyzeWord": this.data.totalMode == 1 ? this.data.highAnalizeWord : this.data.AnalyzeWord,
"AnalyzeWord": this.data.totalMode == 1 ? this.data.highAnalizeWord.replace("+","%2B") : this.data.AnalyzeWord.replace("+","%2B"),
"HuoWord": this.data.HuoWord,
"PaiChu": this.data.PaiChu,
"IsAdvancedQuery": this.data.totalMode == 0 && this.data.currWordType == '必选词和的关系' ? 0 : this.data.totalMode == 1 ? 1 : 2,
@ -396,8 +395,8 @@ Page({
"Guids": null,
"Name": this.data.Name,
"Classify": 0,
"StartTime": this.data.StartTime,
"EndTime": this.data.EndTime,
"StartTime": this.data.start,
"EndTime": this.data.end,
"Types": "theme_v6",
"DetailsData": [dtData],
}

@ -88,7 +88,7 @@
</van-cell-group>
<view wx:if="{{currWordType == '必选词和的关系'}}">
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">必选词(必选词逗号间是和的关系)</view>
<textarea value="{{AnalyzeWord}}" placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" bindinput="bindAnalyzeWord">{{AnalyzeWord}}</textarea>
<textarea value="{{AnalyzeWord}}" placeholder="请输入主题词多个词用隔开最多支持5个主题词" placeholder-class="placeholder-style" bindinput="bindAnalyzeWord"></textarea>
<view style="font-size:28rpx;font-weight:bolder;margin-left: 32rpx;margin-top: 16rpx">可选词(可选词与必选词是或的关系)</view>
<textarea value="{{HuoWord}}" placeholder="请输入关键词多个词用隔开最多支持5个关键词" placeholder-class="placeholder-style" bindinput="bindHuoWord"></textarea>
</view>

@ -20,8 +20,8 @@
</view>
<view class="ta-item">
<view class="ta-chart-title">尾翼整体调性</view>
<view class="ta-chart-item1" style="display: flex;">
<view class="circle-chart" style="margin-right: 24rpx;">
<view class="ta-chart-item2" style="display: flex;">
<view class="circle-chart">
<c-echars showChart="{{showChart}}" canvasId="wytotal-canvas" chartId="wytotal" chartOption="{{weiyiTotal}}" height="100%"></c-echars>
</view>
<view class="circle-data">

@ -33,6 +33,11 @@
padding: 0 32rpx;
height: 360rpx;
}
.ta-chart-item2{
width: calc(100% - 32rpx);
/* padding: 0 32rpx; */
height: 360rpx;
}
.ranking{
display: flex;
justify-content: space-between;

@ -78,7 +78,7 @@
</van-checkbox-group>
</view>
<view style="padding: 0 30px 0 0 ;">
<van-button disabled="{{total == 0}}" 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>

@ -26,7 +26,7 @@
</view>
<view class="wb-item">
<view class="wb-chart-title">微博KOL</view>
<view class="wb-chart-item1" style="display: flex;margin-left: 32rpx;">
<view class="wb-chart-item1" style="display: flex;">
<view class="circle-chart" style="margin-right: 24rpx;">
<c-echars showChart="{{showChart}}" canvasId="wbkol-canvas" chartId="wbkol" chartOption="{{weiboKol}}" height="100%"></c-echars>
</view>
@ -50,7 +50,7 @@
</view>
<view class="wb-item">
<view class="wb-chart-title">微博内容类型</view>
<view class="wb-chart-item1" style="display: flex;margin-left: 32rpx;">
<view class="wb-chart-item1" style="display: flex;">
<view class="circle-chart" style="margin-right: 24rpx;">
<c-echars showChart="{{showChart}}" canvasId="wbtype-canvas" chartId="wbtype" chartOption="{{weiboType}}" height="100%"></c-echars>
</view>
@ -83,7 +83,7 @@
</van-tabs>
</view>
</view>
<view class="wb-chart-item1" style="display: flex;margin-left: 32rpx;margin-top: 32rpx;">
<view class="wb-chart-item1" style="display: flex;margin-top: 32rpx;">
<view class="circle-chart" style="margin-right: 24rpx;">
<c-echars showChart="{{showChart}}" canvasId="wbuser-canvas" chartId="wbuser" chartOption="{{weiboUserChart}}" height="100%"></c-echars>
</view>

@ -95,7 +95,6 @@ Page({
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
Guids: this.data.Guid,
}).then(res => {
// todo: 回显预警信息
let warning = res.Warning.Es || {};
let that = this;
@ -152,10 +151,7 @@ Page({
startShow: new Date(res.StartTime).valueOf(),
endShow: new Date(res.EndTime).valueOf(),
Statu:res.Warning.Statu
})
console.log('xf',res.Warning.Statu)
});
},
@ -427,7 +423,7 @@ Page({
}
});
let dtData = {
"AnalyzeWord": this.data.AnalyzeWord,
"AnalyzeWord": this.data.AnalyzeWord.replace("+","%2B"),
"HuoWord": this.data.HuoWord,
"PaiChu": this.data.PaiChu,
"IsAdvancedQuery": this.data.totalMode == 0 && this.data.currWordType == '必选词和的关系' ? 0 : this.data.totalMode == 1 ? 1 : 2,

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

@ -56,7 +56,7 @@
.circle-chart {
width: 50%;
height: 340rpx;
margin-left: 24rpx;
/* margin-left: 24rpx; */
}
.circle-data {
width: 50%;

@ -78,7 +78,7 @@
</van-checkbox-group>
</view>
<view style="padding: 0 30px 0 0 ;">
<van-button disabled="{{total == 0}}" 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>

@ -26,7 +26,7 @@
</view>
<view class="wb-item">
<view class="wb-chart-title">微博KOL</view>
<view class="wb-chart-item1" style="display: flex;margin-left: 32rpx;">
<view class="wb-chart-item1" style="display: flex;">
<view class="circle-chart" style="margin-right: 24rpx;">
<c-echars showChart="{{showChart}}" canvasId="wbkol-canvas" chartId="wbkol" chartOption="{{weiboKol}}" height="100%"></c-echars>
</view>
@ -50,7 +50,7 @@
</view>
<view class="wb-item">
<view class="wb-chart-title">微博内容类型</view>
<view class="wb-chart-item1" style="display: flex;margin-left: 32rpx;">
<view class="wb-chart-item1" style="display: flex;">
<view class="circle-chart" style="margin-right: 24rpx;">
<c-echars showChart="{{showChart}}" canvasId="wbtype-canvas" chartId="wbtype" chartOption="{{weiboType}}" height="100%"></c-echars>
</view>
@ -83,7 +83,7 @@
</van-tabs>
</view>
</view>
<view class="wb-chart-item1" style="display: flex;margin-left: 32rpx;margin-top: 32rpx;">
<view class="wb-chart-item1" style="display: flex;margin-top: 32rpx;">
<view class="circle-chart" style="margin-right: 24rpx;">
<c-echars showChart="{{showChart}}" canvasId="wbuser-canvas" chartId="wbuser" chartOption="{{weiboUserChart}}" height="100%"></c-echars>
</view>

@ -121,8 +121,8 @@
</view>
<view class="tb-item">
<view class="tb-chart-title">调性分布占比</view>
<view class="tb-chart-item1" style="display: flex;margin-left: 32rpx;">
<view class="circle-chart" style="margin-right: 24rpx;">
<view class="wb-chart-item1" style="display: flex;">
<view class="circle-chart" style="margin-right: 48rpx;">
<c-echars showChart="{{showChart}}" canvasId="wytotal-canvas" chartId="wytotal" chartOption="{{affPercent}}" height="100%"></c-echars>
</view>
<view class="circle-data">
@ -170,7 +170,7 @@
</van-tabs>
</view>
</view>
<view class="wb-chart-item1" style="display: flex;margin-left: 32rpx;">
<view class="wb-chart-item1" style="display: flex;">
<view class="circle-chart" style="margin-right: 48rpx;">
<c-echars showChart="{{showChart}}" canvasId="wbuser-canvas" chartId="wbuser" chartOption="{{themeUserChart}}" height="100%"></c-echars>
</view>
@ -252,8 +252,8 @@
</view>
<view class="tb-item">
<view class="tb-chart-title">调性分布占比</view>
<view class="tb-chart-item1" style="display: flex;margin-left: 32rpx;">
<view class="circle-chart" style="margin-right: 24rpx;">
<view class="wb-chart-item1" style="display: flex;">
<view class="circle-chart" style="margin-right: 48rpx;">
<c-echars showChart="{{showChart}}" canvasId="wytotal-canvas" chartId="wytotal" chartOption="{{affWeiboPercent}}" height="100%"></c-echars>
</view>
<view class="circle-data">

@ -179,7 +179,7 @@
.circle-data {
width: 50%;
height: 340rpx;
padding: 0 10rpx ;
padding: 10rpx 20rpx ;
}
.circle-data-item {
color: #999999;

@ -115,7 +115,7 @@
</view>
<!-- style="width: 50%;margin-right: -32rpx;" -->
<view style="width: 50%;display: flex;justify-content: space-between;padding: 0 10rpx;">
<van-button disabled="{{total == 0}}" bind:click="openReport" color="#0084FF" class="theme-add-btn" plain>生成数据</van-button>
<van-button disabled="{{total == 0}}" bind:click="openReport" color="#0084FF" class="theme-add-btn" plain>所有数据</van-button>
<van-button bind:click="toThemeBoard" color="#0084FF" class="theme-add-btn">数据看板</van-button>
</view>
</view>

@ -60,7 +60,8 @@
}
.top-time .van-checkbox{
display: inline-block !important;
margin-bottom: -3px
margin-bottom: -3px;
font-size: 10px;
}
/* 筛选项 */
.filter {

@ -1,73 +1,78 @@
const app = getApp();
Component({
data: {
tabActive: 0,
themeData: [],
data: {
tabActive: 0,
themeData: [],
},
methods: {
toAddTheme() {
this.triggerEvent('hide')
wx.navigateTo({
url: "/pages/insight/pages/addTheme/index"
})
},
methods: {
toAddTheme() {
wx.navigateTo({
url: "/pages/insight/pages/addTheme/index"
})
},
changeTab(event) {
this.setData({ tabActive: event.detail.index});
this.getData()
},
getData() {
changeTab(event) {
this.setData({
tabActive: event.detail.index
});
this.getData()
},
getData() {
app.globalData.request({
action: 'getSchemeDataToTheme',
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
pageIndex: 1,
pageSize: 100,
sType: this.data.tabActive == 0 ? 'now' : 'former'
}).then(res => {
let data = res;
let nd = new Date().valueOf();
data.forEach(ele => {
if (new Date(ele.EndTime).valueOf() < nd) {
ele.Classify = 1
}
})
this.setData({
themeData: data
})
});
},
toThemeDataList(event) {
let id = event.currentTarget.dataset.id.Guids;
let start = event.currentTarget.dataset.id.StartTime;
let end = event.currentTarget.dataset.id.EndTime;
let Name = event.currentTarget.dataset.id.Name;
wx.navigateTo({
url: '/pages/insight/pages/themeList/index' + '?Guid=' + id + '&StartTime=' + start + '&EndTime=' + end + '&Name=' + Name,
})
},
editTheme(event) {
let id = event.currentTarget.dataset.id
this.triggerEvent('hide')
wx.navigateTo({
url: '/pages/insight/pages/editTheme/index' + '?Guid=' + id,
})
},
deleteTheme(event) {
wx.showModal({
title: '是否要删除该主题?',
success: (result) => {
if (result.cancel == false) {
app.globalData.request({
action: 'getSchemeDataToTheme',
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
pageIndex: 1,
pageSize: 100,
sType: this.data.tabActive == 0 ? 'now' : 'former'
action: 'delCarBigDataByGuid',
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
Guids: event.currentTarget.dataset.id
}).then(res => {
let data = res;
let nd = new Date().valueOf();
data.forEach(ele => {
if(new Date(ele.EndTime).valueOf() < nd) {
ele.Classify = 1
}
})
this.setData({themeData: data})
this.getData()
});
},
toThemeDataList(event) {
let id = event.currentTarget.dataset.id.Guids;
let start = event.currentTarget.dataset.id.StartTime;
let end = event.currentTarget.dataset.id.EndTime;
let Name = event.currentTarget.dataset.id.Name;
wx.navigateTo({
url: '/pages/insight/pages/themeList/index' + '?Guid=' + id +'&StartTime='+start+'&EndTime='+end+'&Name='+Name,
})
},
editTheme(event) {
let id = event.currentTarget.dataset.id
this.triggerEvent('hide')
wx.navigateTo({
url: '/pages/insight/pages/editTheme/index' + '?Guid=' + id,
})
},
deleteTheme(event) {
wx.showModal({
title: '是否要删除该主题?',
success: (result) => {
if(result.cancel == false) {
app.globalData.request({
action: 'delCarBigDataByGuid',
token: wx.getStorageSync('token') || 't%2BrswgjvzGM=',
Guids: event.currentTarget.dataset.id
}).then(res => {
this.getData()
});
}
}
});
}
},
lifetimes: {
attached() {
this.getData()
}
}
});
}
},
lifetimes: {
attached() {
this.getData()
}
}
})

@ -1,36 +1,36 @@
// index.js
Page({
data: {
active: 0,
showChart: true,
wshow: true,
},
onShow() {
if (!wx.getStorageSync('token')) {
wx.navigateTo({
url: "/pages/mine/pages/bindUser/index?isHome=1",
})
} else {
this.getTabBar().init();
if (this.data.active == 2 || this.data.active == 3 ||this.data.active == 1) {
this.reLoad()
}
}
},
changeTab(val) {
let n = val.detail.index;
this.setData({
active: n
})
},
reLoad() {
this.setData({
wshow: false
})
this.setData({
wshow: true
})
data: {
active: 0,
showChart: true,
wshow: true,
},
onShow() {
if (!wx.getStorageSync('token')) {
wx.navigateTo({
url: "/pages/mine/pages/bindUser/index?isHome=1",
})
} else {
this.getTabBar().init();
if (this.data.active == 2 || this.data.active == 3 || this.data.active == 1) {
this.reLoad()
}
}
this.setData({
wshow: true
})
},
themeHide() {
this.setData({
wshow: false
})
},
changeTab(val) {
let n = val.detail.index;
this.setData({
active: n
})
},
});

@ -1,9 +1,17 @@
<view class="container">
<!-- <c-echars showChart="{{showChart}}" canvasId="eventbar-canvas" chartId="eventbar" chartOption="{{chartOption}}" height="100%"></c-echars> -->
<van-tabs class="menu-tabs" active="{{ active }}" ellipsis="{{false}}" animated="{{true}}" bind:change="changeTab">
<van-tab title="品牌对比"><brand-child wx:if="{{active===0}}"></brand-child></van-tab>
<van-tab title="车型对比"><model-child wx:if="{{active===1}}"></model-child></van-tab>
<van-tab title="事件对比"><event-child wx:if="{{active===2 && wshow}}"></event-child></van-tab>
<van-tab title="主题对比"><theme-child wx:if="{{active===3 && wshow}}"></theme-child></van-tab>
</van-tabs>
<!-- <c-echars showChart="{{showChart}}" canvasId="eventbar-canvas" chartId="eventbar" chartOption="{{chartOption}}" height="100%"></c-echars> -->
<van-tabs class="menu-tabs" active="{{ active }}" ellipsis="{{false}}" animated="{{true}}" bind:change="changeTab">
<van-tab title="品牌对比">
<brand-child wx:if="{{active===0 && wshow}} " bind:hide="themeHide"></brand-child>
</van-tab>
<van-tab title="车型对比">
<model-child wx:if="{{active===1 && wshow}} " bind:hide="themeHide"></model-child>
</van-tab>
<van-tab title="事件对比">
<event-child wx:if="{{active===2 && wshow}} " bind:hide="themeHide"></event-child>
</van-tab>
<van-tab title="主题对比">
<theme-child wx:if="{{active===3 && wshow}}" bind:hide="themeHide"></theme-child>
</van-tab>
</van-tabs>
</view>

@ -10,7 +10,6 @@
<view class="event">添加主题{{tempLate[index]}}</view>
</view>
<view class="del_box" wx:else>
<view class="del_top">
<view style="display:inline-block;margin-left:26rpx;" bindtap="switchTheme" data-index="{{index}}">
<van-icon name="sort" size="12px" color="white" />
@ -42,7 +41,7 @@
<view class="event_card" wx:for="{{themeList}}" wx:key="idxa">
<view class="card_head">
<view>
<van-checkbox name="{{filter.stringify(item)}}" shape="square" class="van-checkbox"></van-checkbox>
<van-checkbox name="{{filter.stringify(item)}}" shape="square" ></van-checkbox>
<view style="display: inline-block; font-size: 24rpx;color: rgba(153, 153, 153, 1);margin-left:16rpx;">
{{item.AddTime}}
</view>

Loading…
Cancel
Save