dev
liuyongli 3 years ago
parent 5509216cf1
commit f11e64a7bd

@ -134,7 +134,8 @@
"van-collapse-item": "@vant/weapp/collapse-item/index",
"van-tag": "@vant/weapp/tag/index",
"van-picker": "@vant/weapp/picker/index",
"van-nav-bar": "@vant/weapp/nav-bar/index"
"van-nav-bar": "@vant/weapp/nav-bar/index",
"van-tree-select": "@vant/weapp/tree-select/index"
}
}

@ -119,7 +119,7 @@ Page({
app.globalData.request({
action: 'getSchemeDataToTheme',
token: wx.getStorageSync('token'),
sType: 'former '
sType: 'former'
}).then(res => {
this.setData({
issList: res

@ -11,11 +11,11 @@ Page({
brand: '',
intervalSel: 0,
newsList: [{
title: '读',
title: '读',
value: 1
},
{
title: '读',
title: '读',
value: 2
},
],
@ -96,24 +96,25 @@ Page({
}
},
getList() {
let sTimeType = wx.getStorageSync("sTimeType") || 34;
let sStartTime = wx.getStorageSync("sStartTime") || '';
let sEndTime = wx.getStorageSync("sEndTime") || '';
// let sTimeType = wx.getStorageSync("sTimeType") || 34;
// let sStartTime = wx.getStorageSync("sStartTime") || '';
// let sEndTime = wx.getStorageSync("sEndTime") || '';
let sCrisis = this.data.value;
let obj = {
action: "getSwsQyMessageList",
sTimeType: sTimeType,
sStartTime: sStartTime,
sEndTime: sEndTime,
// sTimeType: sTimeType,
// sStartTime: sStartTime,
// sEndTime: sEndTime,
iPageIndex: iPageIndex,
iPageSize: iPageSize,
// sType: "BrandData",
iReadState: this.data.iReadState,
sCrisis: sCrisis,
crisis: sCrisis,
// sBrand: this.data.brand,
// sSeriesName: sSeriesName,
token: wx.getStorageSync('token') || 't%2BrswgjvzGM='
}
console.log('dez',obj)
app.globalData.request(obj).then(res => {
if (res && res.length > 0) {
iPageIndex++;

@ -49,11 +49,14 @@ Page({
imageUrl: getApp().globalData.imageUrl,
mockData: [],
show1: false,
mainActiveIndex: 0,
mainActiveIndex2:0,
activeId: '',
//
ec: {
lazyLoad: true // 设置图表懒加载
}
},
showvalue:false,
},
// 标签切换点击事件
onChange(val) {
@ -190,27 +193,22 @@ Page({
}).then(res => {
let arr = []
res.forEach(ele => {
let data = ele.data
if (data) {
let obj = {
text: ele.value,
value: ele.key,
}
arr.push(obj)
let data = ele.data || []
let obj = {
text: ele.value,
id: ele.key,
}
if (data.length > 0) {
obj.children = [];
data.forEach(e => {
let ol = {
text: e.value,
value: e.key
id: e.key
}
arr.push(ol)
obj.children.push(ol)
})
} else {
let obj = {
text: ele.value,
value: ele.key,
}
arr.push(obj)
}
}
arr.push(obj)
})
this.setData({
grades3: arr
@ -238,27 +236,22 @@ Page({
}).then(res => {
let arr = []
res.forEach(ele => {
let data = ele.data
if (data) {
let obj = {
text: ele.value,
value: ele.key,
}
arr.push(obj)
let data = ele.data || []
let obj = {
text: ele.value,
id: ele.key,
}
if (data.length > 0) {
obj.children = [];
data.forEach(e => {
let ol = {
text: e.value,
value: e.key
id: e.key
}
arr.push(ol)
obj.children.push(ol)
})
} else {
let obj = {
text: ele.value,
value: ele.key,
}
arr.push(obj)
}
}
arr.push(obj)
})
this.setData({
grades1: arr,
@ -309,7 +302,8 @@ Page({
iPageSize = 20
this.setData({
ranking: [],
a: e.detail != 0
a: e.detail != 0,
showvalue:false
})
this.getTrend()
},
@ -409,4 +403,53 @@ Page({
active: n
})
},
// 树形结构父级点击
onClickNav({ detail = {} }) {
this.setData({
mainActiveIndex: detail.index || 0,
});
let {grades3} = this.data;
if(!grades3[detail.index].children) {
this.setData({
ranking: [],
sEnergyType:grades3[detail.index].id || "",
})
this.getTrend()
}
},
onClickNav2({ detail = {} }) {
this.setData({
mainActiveIndex2: detail.index || 0,
});
let {grades1} = this.data;
console.log('xds',grades1[detail.index])
if(!grades1[detail.index].children) {
this.setData({
ranking: [],
sSpec: grades1[detail.index].id || "",
})
this.getTrend()
}
},
// 树形结构子级点击
onClickItem({ detail = {} }) {
const activeId = this.data.activeId === detail.id ? null : detail.id;
let {mainActiveIndex} = this.data;
this.setData({
ranking: [],
sEnergyType: mainActiveIndex+","+activeId,
});
this.getTrend()
},
onClickItem2({ detail = {} }) {
const activeId = this.data.activeId === detail.id ? null : detail.id;
let {mainActiveIndex2} = this.data;
this.setData({
ranking: [],
sSpec: mainActiveIndex2+","+activeId,
});
this.getTrend()
},
})

@ -24,10 +24,13 @@
</scroll-view>
<view style="height: 60rpx;margin-top: 10px;">
<van-dropdown-menu custom-class="dropdown-menu" active-color="#027AFF;">
<van-dropdown-item value="{{ grade_value1 }}" options="{{ grades1 }}" bind:change="mySelect1" title="全部级别">
<van-dropdown-item value="{{ grade_value1 }}" title="全部级别">
<van-tree-select items="{{ grades1 }}" main-active-index="{{ mainActiveIndex2 }}" active-id="{{ activeId }}" bind:click-nav="onClickNav2" bind:click-item="onClickItem2"/>
</van-dropdown-item>
<van-dropdown-item value="{{ grade_value2 }}" options="{{ grades2 }}" bind:change="mySelect2" title="全部价格" />
<van-dropdown-item value="{{ grade_value3 }}" options="{{ grades3}}" bind:change="mySelect3" title="全部能源"></van-dropdown-item>
<van-dropdown-item value="{{ grade_value3 }}" title="全部能源">
<van-tree-select items="{{ grades3 }}" main-active-index="{{ mainActiveIndex }}" active-id="{{ activeId }}" bind:click-nav="onClickNav" bind:click-item="onClickItem"/>
</van-dropdown-item>
<van-dropdown-item value="{{ grade_value4 }}" options="{{ grades4 }}" bind:change="mySelect4" />
</van-dropdown-menu>
</view>

@ -6,6 +6,7 @@ Page({
height:app.globalData.navBarHeight + app.globalData.statusBarHeight,
statusBarHeight:app.globalData.statusBarHeight,
navBarHeight:app.globalData.navBarHeight,
show: false,
navData: [{
text: '品牌洞察',
component: 'brand-child'
@ -29,7 +30,7 @@ Page({
}
},
onLoad() {
},
onShow() {
if(!wx.getStorageSync('token')) {
@ -39,6 +40,14 @@ Page({
} else {
this.getTabBar().init();
}
this.setData({
show: true
})
},
themeHide() {
this.setData({
show: false
})
},
changeTab(val) {
let n = val.detail.index;

@ -12,6 +12,6 @@
<brand-child wx:if="{{active == 0}}"></brand-child>
<modal-child wx:if="{{active == 1}}"></modal-child>
<event-child wx:if="{{active == 2}}"></event-child>
<theme-child wx:if="{{active == 3}}"></theme-child>
<theme-child wx:if="{{active == 3 && show}}" bind:hide="themeHide"></theme-child>
<c-dropdown tabs="{{dataArr}}"></c-dropdown>
</view>

@ -397,7 +397,7 @@ Page({
"Classify": 0,
"StartTime": this.data.StartTime,
"EndTime": this.data.EndTime,
"Types": "theme",
"Types": "theme_v6",
"DetailsData": [dtData],
"Warning": {
"Statu": this.data.Statu,

@ -263,10 +263,10 @@ Component({
let date = d.toISOString().replace(/\D/g, '');
let result = this.data.result.length
let total = this.data.total
if (result == 0 && total>50000) {
if (result == 0 && total*1 > 50000) {
wx.showModal({
title: '提示',
content: '全部数据超过50000(万)条,是否要全部导出',
content: '全部数据超过50000条,是否要全部导出',
success: function (r) {
if (r.confirm) {
that.setData({

@ -49,4 +49,22 @@ Page({
this.setData({ compShow: true }) //重新渲染组件刷新页面
this.getData();
},
createReport(){
app.globalData.request({
action: 'getToPptTask',
sType: 'ToEventPptV6',
token: 't%2BrswgjvzGM=',
sTimeType: wx.getStorageSync('sTimeType') || 34,
sStartTime: wx.getStorageSync('sStartTime') || '',
sEndTime: wx.getStorageSync('sEndTime') || '',
sRele: wx.getStorageSync('sRele') || '',
// sBrand: wx.getStorageSync('sBrand') || '',
// sSeriesName: wx.getStorageSync('sSeriesName') || '',
}).then(res => {
wx.showModal({
title: '数据生成中,请前往”我的“查看生成进度',
showCancel: false
})
});
}
})

@ -1,6 +1,10 @@
<view>
<view class="top-brand-switch">
<view class="switch-container">
<view>
<view bindtap="createReport" class="tab-btn" span="8"><van-icon name="back-top" /> 生成报告</view>
</view>
<view class="switch-middle">
<view class="main-title">{{detailData.title}}</view>
<view class="van-multi-ellipsis--l2" style="font-size: 14px;font-weight: 400;color: rgba(255,255,255,0.6000);margin: 12rpx 32rpx 0rpx 32rpx;">{{detailData.description}}</view>

@ -4,16 +4,19 @@
color: #FFFFFF;
margin: 0rpx 32rpx 0rpx 32rpx;
}
.sub-title {
font-size: 14px;
font-weight: 400;
color: rgba(255,255,255,0.6000);
color: rgba(255, 255, 255, 0.6000);
margin: 12rpx 32rpx 0rpx 32rpx;
}
.top-brand-switch {
background: #006BFF;
padding: 1rpx 32rpx 32rpx 32rpx
}
.switch-container {
/* height: 330rpx; */
background: rgb(77, 159, 253);
@ -23,46 +26,66 @@
margin-top: 32rpx;
border-image: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)) 1 1;
}
.tab-btn {
text-align: center;
}
.bottom-title {
font-size: 13px;
font-weight: 400;
color: rgba(255,255,255,0.6000);
color: rgba(255, 255, 255, 0.6000);
}
.bottom-number {
font-size: 10px;
font-weight: 600;
color: #FFFFFF;
}
.switch-middle {
align-items: center;
}
.brand-number {
font-size: 18px;
font-weight: 600;
color: #FFFFFF;
}
/* 图表 */
.bottom-view {
background: #FFF;
border-radius: 12px 12px 0px 0px;
}
/* tabs */
.view-tabs .van-tabs__nav{
background-color: #006BFF;/* 标签背景颜色 */
}
.view-tabs .van-tab {
color: #999999; /* 字体颜色 */
background-color: #F9F9F9;/* 标签背景颜色 */
}
.view-tabs .van-tab--active{
color: #0084FF; /* 字体颜色 */
.view-tabs .van-tabs__nav {
background-color: #006BFF;
/* 标签背景颜色 */
}
.view-tabs .van-tab {
color: #999999;
/* 字体颜色 */
background-color: #F9F9F9;
/* 标签背景颜色 */
}
.view-tabs .van-tab--active {
color: #0084FF;
/* 字体颜色 */
font-size: 16px;
font-weight: 600;
}
.view-tabs .van-tabs__line {
}
.view-tabs .van-tabs__line {
background: transparent;
}
}
.tab-btn {
font-size: 14px;
text-align: center;
color: #FFFFFF;
margin-bottom: 8px;
}

@ -263,10 +263,10 @@ Page({
let date = d.toISOString().replace(/\D/g, '');
let result = this.data.result.length
let total = this.data.total
if (result == 0 && total>50000) {
if (result == 0 && total*1 > 50000) {
wx.showModal({
title: '提示',
content: '全部数据超过50000(万)条,是否要全部导出',
content: '全部数据超过50000条,是否要全部导出',
success: function (r) {
if (r.confirm) {
that.setData({

@ -363,10 +363,10 @@ Page({
let date = d.toISOString().replace(/\D/g, '');
let result = this.data.result.length
let total = this.data.total
if (result == 0 && total>50000) {
if (result == 0 && total*1 > 50000) {
wx.showModal({
title: '提示',
content: '全部数据超过50000(万)条,是否要全部导出',
content: '全部数据超过50000条,是否要全部导出',
success: function (r) {
if (r.confirm) {
that.setData({

@ -110,7 +110,7 @@
</van-checkbox-group>
</view>
<!-- style="width: 50%;margin-right: -32rpx;" -->
<view style="width: 55%;display: flex;">
<view style="width: 50%;display: flex;">
<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>

@ -42,6 +42,7 @@ Component({
},
editTheme(event) {
let id = event.currentTarget.dataset.id
this.triggerEvent('hide')
wx.navigateTo({
url: '/pages/insight/pages/editTheme/index' + '?Guid=' + id,
})

@ -167,9 +167,6 @@ Page({
let pos1 = path.lastIndexOf('/');
let pos2 = path.lastIndexOf('\\');
let position = Math.max(pos1, pos2);
console.log('frfrcf', pos1)
console.log('frfrcf', position)
console.log('frfrcf', path)
if (position < 0)
return path;
else

@ -113,7 +113,7 @@ Component({
app.globalData.request({
action: 'getSchemeDataToTheme',
token: wx.getStorageSync('token'),
sType:'former'
sType:'contrast'
}).then(res => {
this.setData({
themeList: res

@ -38,7 +38,7 @@
<button class="btns" bindtap='startCp'>开始对比</button>
<view class="event_recom">
<van-checkbox-group value="{{ result }}" bind:change="onChange">
<text style="font-size: 40rpx;font-weight: bolder;">主题推荐</text>
<text style="font-size: 40rpx;font-weight: bolder;">主题列表</text>
<view class="event_card" wx:for="{{themeList}}" wx:key="idxa">
<view class="card_head">
<view>

@ -21,9 +21,16 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/insight/pages/brandInsight/index",
"query": "img=http%3A%2F%2Fv.sws010.com%2Fimg%2Fbrand%2F33.png",
"launchMode": "default",
"scene": null
}
]
}
},
"libVersion": "2.25.2"
"libVersion": "2.25.4"
}
Loading…
Cancel
Save