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

* 'dev' of git.oa00.com:xiaowen/swsWecat:
  对比bug修改
  zx
dev
liuyongli 3 years ago
commit ad1e278169

@ -29,19 +29,23 @@ export default function multipleColumn(columnName = [], xMsg = [], data = []) {
color: 'black',
fontSize: 8
},
left: 10,
left: 20,
itemWidth: 12,
itemHeight: 12,
borderRadius: 1, //圆角半径
},
grid: {
left: 20,
containLabel: true,
},
xAxis: {
type: 'category',
axisTick: {
show: false
},
axisLabel: {
textStyle:{
fontSize:8
textStyle: {
fontSize: 8
}
},
data: xMsg
@ -49,8 +53,8 @@ export default function multipleColumn(columnName = [], xMsg = [], data = []) {
yAxis: [{
type: 'value',
axisLabel: {
textStyle:{
fontSize:8
textStyle: {
fontSize: 8
}
},
}],

@ -81,7 +81,7 @@ export default function negaposiOption(dName = [], data = {}) {
},
legend: {
data: msg,
left: 10,
left: 20,
// data:[{name:'正面'},{name:'中性'},{name:'负面'},]
textStyle: { //图例文字的样式
color: 'black',
@ -94,7 +94,7 @@ export default function negaposiOption(dName = [], data = {}) {
grid: {
bottom: 20,
height: 140,
left: 10,
left: 20,
containLabel: true
},
xAxis: [{

@ -1,5 +1,5 @@
// 多条柱状
export default function sHistogram(dx = [], ds = [], data = [], color2 = []) {
export default function sHistogram(dx = [], ds = [], data = [], color2 = [],barWidth=24) {
// MS判断多条数据还是单条数据 true为单条false为多条
return {
tooltip: {
@ -89,12 +89,12 @@ export default function sHistogram(dx = [], ds = [], data = [], color2 = []) {
}
}],
series: columar(data, ds, color2)
series: columar(data, ds, color2,barWidth)
}
}
function columar(data = [], ds = [], color2 = []) {
function columar(data = [], ds = [], color2 = [],barWidth=24) {
// MS判断多条数据还是单条数据 true为单条false为多条
let list = []
for (let i = 0; i < data.length; i++) {
@ -118,7 +118,7 @@ function columar(data = [], ds = [], color2 = []) {
list.push({
name: data[i],
type: 'bar',
barWidth: 24,
barWidth: barWidth,
data: ds[i],
stack: "Search Engine",
emphasis: { //折线图的高亮状态。

@ -53,6 +53,9 @@ Page({
return JSON.parse(ele)
})
wx.setStorageSync('eventData', arr)
this.setData(
{hasAdd:true}
)
wx.navigateBack({
delta: 1,
})
@ -155,5 +158,18 @@ Page({
option1:arr
})
})
if(options.switchEvent){
let switchEvent = JSON.parse(options.switchEvent)
this.setData({
switchEvent
})
}
},
onUnload(){
if(this.data.switchEvent && !this.data.hasAdd){
let boxArr = wx.getStorageSync('eventData')
boxArr.push(this.data.switchEvent)
wx.setStorageSync('eventData', boxArr)
}
}
})

@ -36,7 +36,7 @@
<text>{{item.events_series}}</text>
</view>
<view class="card_label" style="margin-top: 24rpx;">
<text style="color: rgba(153, 153, 153, 1);">传播周期(条)</text>
<text style="color: rgba(153, 153, 153, 1);">事件影响力</text>
<text>{{item.events_influence}}</text>
</view>
</view>

@ -7,21 +7,19 @@ Page({
*/
data: {
active: 0,
result:[],
themeList:[],
themeData:[],
issList:[],
titleList:[
{
title:'我的主题',
index:0,
active:true
},{
title:'往期主题',
index:1,
active:false
}
]
result: [],
themeList: [],
themeData: [],
issList: [],
titleList: [{
title: '我的主题',
index: 0,
active: true
}, {
title: '往期主题',
index: 1,
active: false
}]
},
/**
@ -29,45 +27,72 @@ Page({
*/
onLoad: function (options) {
this.getData()
if (options.switchTheme) {
let switchTheme = JSON.parse(options.switchTheme)
this.setData({
switchTheme
})
}
},
onUnload() {
if (this.data.switchTheme) {
this.back('switch')
}
},
changeTitle(e){
changeTitle(e) {
let index = e.currentTarget.dataset.index
let arr = this.data.titleList
for(let[index1,i] of arr.entries()){
if(index1==index){
i.active=true
}else{
i.active =false
for (let [index1, i] of arr.entries()) {
if (index1 == index) {
i.active = true
} else {
i.active = false
}
}
this.setData({
titleList:arr,
active:index
titleList: arr,
active: index
})
},
onChange(event) {
const {
detail
} = event
let themeData=[]
for(let i of detail){
let themeData = []
for (let i of detail) {
themeData.push(JSON.parse(i))
}
themeData.len=6
themeData.len = 6
this.setData({
result: detail,
themeData,
})
wx.setStorageSync('themeData', themeData)
wx.navigateBack({
delta: 1,
this.setData({
hasAdd:true
})
this.back('add')
},
getData(){
back(type) {
if (type == 'add') {
wx.navigateBack({
delta: 1,
})
} else if (type == "switch" && !this.data.hasAdd) {
console.log("执行切换");
let {
themeData
} = this.data
themeData.push(this.data.switchTheme)
wx.setStorageSync('themeData', themeData)
}
},
getData() {
let themeData = wx.getStorageSync('themeData')
let result =[]
themeData.forEach(ele=>{
if(ele)result.push(JSON.stringify(ele)),this.data.themeData.push(ele)
let result = []
themeData.forEach(ele => {
if (ele) result.push(JSON.stringify(ele)), this.data.themeData.push(ele)
})
this.setData({
result
@ -75,8 +100,17 @@ Page({
app.globalData.request({
action: 'getSchemeDataToTheme',
token: wx.getStorageSync('token'),
sType:'now'
}).then(res=>{
sType: 'now'
}).then(res => {
for (let i of themeData) {
if (i) {
for (let j = 0; j < res.length; j++) {
if (i.Id == res[j].Id) {
res.splice(j, 1)
}
}
}
}
this.setData({
themeList: res
})
@ -85,8 +119,8 @@ Page({
app.globalData.request({
action: 'getSchemeDataToTheme',
token: wx.getStorageSync('token'),
sType:'former '
}).then(res=>{
sType: 'former '
}).then(res => {
this.setData({
issList: res
})

@ -64,10 +64,10 @@
<text style="color: rgba(153, 153, 153, 1);">结束时间</text>
<text>{{item.EndTime}}</text>
</view>
<view class="card_label" style="margin-top: 24rpx;">
<!-- <view class="card_label" style="margin-top: 24rpx;">
<text style="color: rgba(153, 153, 153, 1);">传播周期(条)</text>
<text>{{item.events_influence}}</text>
</view>
</view> -->
</view>
</view>

@ -30,6 +30,11 @@ Page({
})
this.brandReq()
},
onUnload(){
wx.setStorageSync('brandRatioTime', {
sTimeType: '34'
})
},
onChange(event) {
const {detail} = event
const result = []
@ -74,7 +79,6 @@ Page({
let filter = this.data.result.filter(ele=>{
return ele!= "null"
})
console.log(filter);
if(filter.length==2){
Dialog.alert({
message: '至少需要两个品牌才可以对比哦!',
@ -124,7 +128,6 @@ Page({
}
}
}
console.log(arr);
this.setData({
mockData: arr
})

@ -13,7 +13,7 @@
<view class="info_box" wx:for="{{bbsInfo}}" wx:key="s">
<view class="info_left">
<view style="font-size:32rpx">{{item.key || '无'}}</view>
<view style="font-size:24rpx;color: rgba(153, 153, 153, 1);">品牌名称</view>
<view style="font-size:24rpx;color: rgba(153, 153, 153, 1);">车型名称</view>
</view>
<view class="info_right">
<view class="list_box">

@ -20,7 +20,7 @@
</view>
<view class="chart_box">
<view class="chart_title">品牌调性对比</view>
<view class="chart_title">车型调性对比</view>
<view class="table" style="height: 100%;">
<c-echars showChart="{{showChart}}" canvasId="brandbar-canvas" chartId="brandbar" chartOption="{{stackOption}}" height="100%"></c-echars>
</view>
@ -42,7 +42,7 @@
<view class="top_box">
<view class="top-title">
<view style="width: 45%;">品牌传播TOP媒体</view>
<view style="width: 45%;">车型传播TOP媒体</view>
<view style="width:50%;margin-right: 32rpx;">
<van-tabs type="card" active="{{ topActive }}" color="#BBBBBB" bind:change="changeModalHot">
<van-tab title="组一"></van-tab>
@ -142,7 +142,7 @@
</view>
</view>
<view class="chart_box">
<view class="chart_title">品牌事件对比</view>
<view class="chart_title">车型事件对比</view>
<view class="table" style="height: 100%;">
<c-echars showChart="{{showChart}}" canvasId="brandbar-canvas" chartId="brandbar" chartOption="{{brandOption5}}" height="100%"></c-echars>
</view>

@ -36,10 +36,14 @@ Page({
},
switchEvent(e) {
let index = e.currentTarget.dataset.index
this.data.boxArr.splice(index, 1)
let switchEvent = JSON.stringify(this.data.boxArr.splice(index, 1)[0])
wx.setStorageSync('eventData', this.data.boxArr)
this.setData({
switchEvent,
})
wx.navigateTo({
url: '/contrastPackages/addEvent/index',
url: `/contrastPackages/addEvent/index?switchEvent=${switchEvent}`,
})
},
changeTime(event) {

@ -61,7 +61,7 @@ page {
display: inline-block;
height: 208rpx;
width: 200rpx;
margin-left: 32rpx;
/* margin-left: 32rpx; */
background-color: #339cff;
border-radius: 8rpx;
border: 2rpx solid #85c3ff;

@ -53,7 +53,7 @@ Component({
}
// //横轴,数据,纵轴
this.setData({
brandOption4: sHistogram(xMsg, data, ['事件一','事件二'], [])
brandOption4: sHistogram(xMsg, data, ['事件一','事件二'], [],35)
})
})
//事件调性分布

@ -13,7 +13,7 @@
<view class="info_box" wx:for="{{bbsInfo}}" wx:key="key">
<view class="info_left">
<view style="font-size:32rpx">{{item.key || '无'}}</view>
<view style="font-size:24rpx;color: rgba(153, 153, 153, 1);">品牌名称</view>
<view style="font-size:24rpx;color: rgba(153, 153, 153, 1);">主题名称</view>
</view>
<view class="info_right">
<view class="list_box">

@ -21,6 +21,9 @@ Page({
onShow() {
this.getData()
this.reLoad()
this.setData({
switchTheme:""
})
},
del(e) {
let filter = this.data.boxArr.filter(ele=>ele!=null)
@ -43,13 +46,23 @@ Page({
},
switchTheme(e) {
let index = e.currentTarget.dataset.index
this.data.boxArr.splice(index, 1)
let switchTheme = this.data.boxArr.splice(index, 1)[0]
// this.data.boxArr.splice(index, 1)
console.log(this.data.boxArr);
this.setData({
switchTheme,
})
this.add()
},
add() {
wx.setStorageSync('themeData', this.data.boxArr)
let switchTheme = JSON.stringify(this.data.switchTheme)
let url = '/contrastPackages/addTheme/index'
if(this.data.switchTheme){
url = `/contrastPackages/addTheme/index?switchTheme=${switchTheme}`
}
wx.navigateTo({
url: '/contrastPackages/addTheme/index',
url: url,
})
},
changeTab(val) {

@ -22,7 +22,7 @@
<view class="chart_box">
<view class="chart_title">主题调性对比</view>
<view class="table" style="height: 100%;">
<c-echars showChart="{{showChart}}" canvasId="brandbar-canvas" chartId="brandbar" chartOption="{{evalOption}}" height="100%"></c-echars>
<c-echars showChart="{{showChart}}" canvasId="brandbar-canvas" chartId="brandbar" chartOption="{{evalOption}}" height="80%"></c-echars>
</view>
</view>

@ -6,7 +6,7 @@
</view>
<view class="chart_box">
<view class="chart_title">分渠道信息量</view>
<view class="table">
<view class="table" style="height: 100%;">
<c-echars height="100%" showChart="{{showChart}}" canvasId="eventbar-canvas" chartId="eventbar" chartOption="{{channelOption}}"></c-echars>
</view>
</view>

@ -22,7 +22,7 @@
<view class="chart_box">
<view class="chart_title">微博调性对比</view>
<view class="table" style="height: 100%;">
<c-echars showChart="{{showChart}}" canvasId="brandbar-canvas" chartId="brandbar" chartOption="{{evalOption}}" height="100%"></c-echars>
<c-echars showChart="{{showChart}}" canvasId="brandbar-canvas" chartId="brandbar" chartOption="{{evalOption}}" height="80%"></c-echars>
</view>
</view>
<view class="top_box">

@ -11,6 +11,7 @@ Component({
methods: {
toBrandInsight(e) {
let name = e.currentTarget.dataset.id.brandname; //获取点击的name
let img = e.currentTarget.dataset.id.img;
let obj = {
brandname: name,
img: e.currentTarget.dataset.id.img
@ -43,7 +44,7 @@ Component({
}
wx.setStorageSync('sBrand', name);
wx.navigateTo({
url: "/pages/insight/pages/brandInsight/index"
url: "/pages/insight/pages/brandInsight/index"+'?img='+img
})
},
},

@ -6,6 +6,10 @@ Page({
currentBrand: '',
compShow: true,
tabActive: 0,
brandImg: '',
},
onLoad(option) {
this.setData({brandImg: option.img});
},
onShow() {
this.setData({

@ -9,10 +9,10 @@
</van-row>
<van-divider custom-style="background: linear-gradient(117deg, rgba(245,245,245,0) 0%, #EEEEEE 50%, rgba(232,232,232,0) 100%);" hairline />
<view class="switch-middle" style="margin-left: 24rpx;">
<van-image round src=""></van-image>
<image class="userAvatar" src="{{brandImg}}" />
<view class="brand-number">
<view>{{currentBrand}}</view>
<view>{{totalCount}} <text style="font-size: 13px;font-weight: 400;color: rgba(255,255,255,0.6000);">数据总量</text></view>
<view> <text style="font-size: 13px;font-weight: 400;color: rgba(255,255,255,0.6000);margin-right: 12rpx;">数据总量</text>{{totalCount}}</view>
</view>
</view>
<van-divider custom-style="background: linear-gradient(117deg, rgba(245,245,245,0) 0%, #EEEEEE 50%, rgba(232,232,232,0) 100%);" hairline />

@ -54,4 +54,12 @@
}
.view-tabs .van-tabs__line {
background: transparent;
}
}
.userAvatar{
width: 80rpx;
height: 80rpx;
border-radius: 40rpx;
margin-right: 24rpx;
background: #FFF;
}

@ -13,10 +13,10 @@
<view class="brand-number">
<view>{{currentSeries}}</view>
<view>
<text>{{totalCount}}</text>
<text style="font-size: 13px;font-weight: 400;color: rgba(255,255,255,0.6000);"> 数据总量</text>
<text style="margin-left: 24rpx;">{{percent}}</text>
<text style="font-size: 13px;font-weight: 400;color: rgba(255,255,255,0.6000);"> 品牌占比</text>
<text style="margin-left: 12rpx;">{{totalCount}}</text>
<text style="margin-left: 24rpx;font-size: 13px;font-weight: 400;color: rgba(255,255,255,0.6000);"> 品牌占比</text>
<text style="margin-left: 12rpx;">{{percent}}</text>
</view>
</view>
</view>

@ -13,7 +13,6 @@ Page({
})
} else {
this.getTabBar().init();
console.log(this.data.active)
if (this.data.active == 2 || this.data.active == 3) {
this.reLoad()
}

@ -65,7 +65,6 @@ Component({
lifetimes: {
attached() {
//页面数据
// this.getOpenID()
wx.showLoading({
title: '数据载入中....',
})
@ -94,6 +93,19 @@ Component({
wx.hideLoading();
},1000)
})
if(wx.getStorageSync('brandData')){
console.log(wx.getStorageSync('brandData'));
let boxArr = []
let result = []
for(let i of wx.getStorageSync('brandData')){
i?boxArr.push(i):boxArr.push(null)
i?result.push(JSON.stringify(i)):""
}
this.setData({
boxArr,
result
})
}
},
ready() {

@ -120,6 +120,18 @@ Component({
mockData: arr
})
})
if(wx.getStorageSync('modelsData')){
let boxArr = []
let result = []
for(let i of wx.getStorageSync('modelsData')){
i?boxArr.push(i):boxArr.push(null)
i?result.push(JSON.stringify(i)):""
}
this.setData({
boxArr,
result
})
}
},
ready(){
wx.hideLoading()

@ -9,7 +9,6 @@ Component({
tempLate: ['一', '二', '三', '四', '五', '六', ]
},
methods: {
startCp() {
if (this.data.result.length < 2) {
Dialog.alert({
@ -80,7 +79,6 @@ Component({
},
lifetimes: {
attached() {
app.globalData.request({
action: 'getEventList',
token: wx.getStorageSync('token'),

@ -63,7 +63,7 @@
<text>{{item.events_series}}</text>
</view>
<view class="card_label" style="margin-top: 24rpx;">
<text style="color: rgba(153, 153, 153, 1);">传播周期(条)</text>
<text style="color: rgba(153, 153, 153, 1);">事件影响力</text>
<text>{{item.events_influence}}</text>
</view>
</view>

@ -71,6 +71,24 @@ Component({
let obj = JSON.parse(i)
boxArr.push(obj)
}
//判断重复
let have = false
for(let i=0;i<boxArr.length;i++){
if(have) break
for(let j=i+1;j<boxArr.length;j++){
if(boxArr[j] && boxArr[i].Id == boxArr[j].Id){
have=true
break
}
}
}
if(have){
Dialog.alert({
message: '有重复的主题,请先删除',
context: this
})
return
}
boxArr.length = 6
this.setData({
result: detail,

@ -62,10 +62,10 @@
<text style="color: rgba(153, 153, 153, 1);">结束时间</text>
<text>{{item.EndTime}}</text>
</view>
<view class="card_label" style="margin-top: 24rpx;">
<!-- <view class="card_label" style="margin-top: 24rpx;">
<text style="color: rgba(153, 153, 153, 1);">传播周期(条)</text>
<text>{{item.events_influence}}</text>
</view>
</view> -->
</view>
</van-checkbox-group>
</view>

Loading…
Cancel
Save