Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b686ee78d | |||
| 57452b7536 | |||
| 5a2437f6ca | |||
| 10b9a0bf16 |
@@ -52,7 +52,11 @@
|
||||
"pages/order/editBusinessBicence/index",
|
||||
"pages/order/editLicenseImg/index",
|
||||
"pages/order/editInsImg/index",
|
||||
"pages/order/editOtherImg/index"
|
||||
"pages/order/editOtherImg/index",
|
||||
"pages/storeData/index",
|
||||
"pages/storeData/customerData/index",
|
||||
"pages/storeData/wechatData/index",
|
||||
"pages/storeData/orderData/index"
|
||||
],
|
||||
"echarts": [
|
||||
{
|
||||
|
||||
Vendored
+7
-3
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
const env = "p";
|
||||
const env = "d";
|
||||
|
||||
const version = 1,
|
||||
|
||||
@@ -151,6 +151,14 @@ api = {
|
||||
|
||||
appCusorderdataInfo:'app/cusorderdata/info', //保单信息确认
|
||||
|
||||
appBizStats:'app/biz/stats', //门店数据首页
|
||||
appBizStats_customer:'app/biz/stats_customer', //客户数据
|
||||
appBizStats_wxqy:'app/biz/stats_wxqy', //企微数据
|
||||
appBizStats_order:'app/biz/stats_order', //订单数据
|
||||
appBizStats_days:'app/biz/stats_days', //客户/订单走势图
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//远程图片存储地址
|
||||
|
||||
@@ -896,4 +896,39 @@ apiQuery.putAppCusorderdataInfo = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//门店数据首页
|
||||
apiQuery.getAppBizStats = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appBizStats, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//客户数据
|
||||
apiQuery.getAppBizStats_customer = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appBizStats_customer, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//企微数据
|
||||
apiQuery.getAppBizStats_wxqy = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appBizStats_wxqy, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//订单数据
|
||||
apiQuery.getAppBizStats_order = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appBizStats_order, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//客户/订单走势图
|
||||
apiQuery.getAppBizStats_days = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(false, Config.api.appBizStats_days, 2, params, "GET", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
@@ -21,6 +21,10 @@
|
||||
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon2-tab-1.png' lazy-load="{{true}}"></image>
|
||||
<view>车辆盘点</view>
|
||||
</view>
|
||||
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/storeData/index" wx:if="{{userInfo.group_id>1}}">
|
||||
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon-tab-2.png' lazy-load="{{true}}"></image>
|
||||
<view>门店数据</view>
|
||||
</view>
|
||||
<view class="relative fn-flex-item" bindtap="pushLink" data-url="/pages/allot/list/index">
|
||||
<view class="absolute peg-tip box-center ml30 bg-f9394d bds-2-fff img-24x24 text-center font-18 color-fff ulib-r750 z-index-1" wx:if="{{diaoboNum}}"><text class="absolute box-center-middle">{{diaoboNum}}</text></view>
|
||||
<image class='img-60x60' mode="aspectFill" src='{{imgUrl}}index/icon2-tab-2.png' lazy-load="{{true}}"></image>
|
||||
@@ -137,7 +141,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 客户数据 -->
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<!-- <view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">客户数据</view>
|
||||
<view class="absolute right-0 box-middle pt10 pb10 pl20 pr20 bg-ffedeb color-ff4a3a ulib-r10 font-22">累计线索总量 {{cust_total}} 条</view>
|
||||
@@ -163,7 +167,7 @@
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- 订单数据 -->
|
||||
<!-- <view class="mt40 inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
|
||||
@@ -0,0 +1,534 @@
|
||||
import _ from '../../../commons/js/commons';
|
||||
import popularData from '../../../commons/js/lib/popularData';
|
||||
import * as echarts from '../../../ecCanvas/components/ec-canvas/echarts';
|
||||
const app = getApp()
|
||||
|
||||
let BarChartData;
|
||||
let Pie1ChartData;
|
||||
let Pie2ChartData;
|
||||
function BarChart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = BarChartData
|
||||
chart.setOption(option);
|
||||
chart.on('click',function(e){
|
||||
console.log(e)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
function Pie1Chart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = Pie1ChartData
|
||||
chart.setOption(option);
|
||||
chart.on('click',function(e){
|
||||
console.log(e)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
function Pie2Chart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = Pie2ChartData
|
||||
chart.setOption(option);
|
||||
chart.on('click',function(e){
|
||||
console.log(e)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
|
||||
Page({
|
||||
data: {
|
||||
imgUrl: _.config.imgUrl,//静态图片路径
|
||||
showPie1Chart:false,//是否显示Pie1图表
|
||||
ecPie1:{},
|
||||
showPie2Chart:false,//是否显示Pie2图表
|
||||
ecPie2:{},
|
||||
showBarChart:false,//是否显示Bar图表
|
||||
ecBar:{},
|
||||
},
|
||||
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
popularData.getDateLater(0,0).then(res => {
|
||||
this.setData({
|
||||
s_date:res[0],
|
||||
e_date:res[1],
|
||||
current_date:res[1],
|
||||
})
|
||||
})
|
||||
|
||||
this.getAppBizStats_customer()
|
||||
|
||||
},
|
||||
|
||||
//选择日期
|
||||
changeDate(e){
|
||||
if(e.currentTarget.dataset.type=="s_date"){
|
||||
let begin = new Date(e.detail.value).getTime();
|
||||
let end = new Date(this.data.e_date).getTime();
|
||||
let day = 0
|
||||
if(end>=begin){
|
||||
day = (end - begin)/(24*60*60*1000);
|
||||
this.setData({
|
||||
s_date: e.detail.value,
|
||||
})
|
||||
}
|
||||
else{
|
||||
day = (begin - end)/(24*60*60*1000);
|
||||
let s_date = this.data.e_date
|
||||
let e_date = e.detail.value
|
||||
this.setData({
|
||||
s_date,
|
||||
e_date,
|
||||
})
|
||||
}
|
||||
if (day > 365) {
|
||||
wx.showToast({
|
||||
title: '请选择一年时间内',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getAppBizStats_customer()
|
||||
}
|
||||
}
|
||||
if(e.currentTarget.dataset.type=="e_date"){
|
||||
let begin = new Date(this.data.s_date).getTime();
|
||||
let end = new Date(e.detail.value).getTime();
|
||||
let day = 0
|
||||
if(end>=begin){
|
||||
day = (end - begin)/(24*60*60*1000);
|
||||
this.setData({
|
||||
e_date: e.detail.value,
|
||||
})
|
||||
}
|
||||
else{
|
||||
day = (begin - end)/(24*60*60*1000);
|
||||
let e_date = this.data.s_date
|
||||
let s_date = e.detail.value
|
||||
this.setData({
|
||||
s_date,
|
||||
e_date,
|
||||
})
|
||||
}
|
||||
if (day > 365) {
|
||||
wx.showToast({
|
||||
title: '请选择一年时间内',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getAppBizStats_customer()
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//客户数据
|
||||
getAppBizStats_customer(){
|
||||
this.setData({
|
||||
showPie1Chart:false,
|
||||
showPie2Chart:false,
|
||||
showBarChart:false,
|
||||
})
|
||||
|
||||
let params = {};
|
||||
params['s_time'] = this.data.s_date;
|
||||
params['e_time'] = this.data.e_date;
|
||||
_.apiQuery.getAppBizStats_customer(params).then(res => {
|
||||
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.data.title
|
||||
})
|
||||
|
||||
// Pie1ChartData = getPie1Option()
|
||||
Pie1ChartData = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 10
|
||||
},
|
||||
labelBar: {
|
||||
show: false
|
||||
},
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['45%', '65%'],
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: []
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
Pie1ChartData.series[0].data = res.data.pie1.series_data_1
|
||||
Pie1ChartData.series[1].data = res.data.pie1.series_data_2
|
||||
this.setData({
|
||||
Pie1title:res.data.pie1.title,
|
||||
showPie1Chart:true,
|
||||
['ecPie1.onInit']:Pie1Chart,
|
||||
})
|
||||
|
||||
// Pie2ChartData = getPie2Option()
|
||||
Pie2ChartData = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 10
|
||||
},
|
||||
labelBar: {
|
||||
show: false
|
||||
},
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['45%', '65%'],
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: []
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
Pie2ChartData.series[0].data = res.data.pie2.series_data_1
|
||||
Pie2ChartData.series[1].data = res.data.pie2.series_data_2
|
||||
this.setData({
|
||||
Pie2title:res.data.pie2.title,
|
||||
showPie2Chart:true,
|
||||
['ecPie2.onInit']:Pie2Chart,
|
||||
})
|
||||
|
||||
//BarChartData = getBarOption()
|
||||
BarChartData = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: []
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
grid: {
|
||||
top: '5%',
|
||||
left: '2%',
|
||||
right: '5%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [],
|
||||
type: 'bar',
|
||||
top: 0,
|
||||
bottom:'0',
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
BarChartData.xAxis.data = res.data.bar.xAxis_data
|
||||
BarChartData.series[0].data = res.data.bar.series_data
|
||||
this.setData({
|
||||
Bartitle:res.data.bar.title,
|
||||
showBarChart:true,
|
||||
['ecBar.onInit']:BarChart,
|
||||
})
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//推送链接
|
||||
pushLink(e) {
|
||||
if(e.currentTarget.dataset.url){
|
||||
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh: function () {
|
||||
this.getAppBizStats_customer()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
function getPie1Option() {
|
||||
return {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 10
|
||||
},
|
||||
labelBar: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1548, name: 'H' },
|
||||
{ value: 775, name: 'A' },
|
||||
{ value: 679, name: 'B', }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['45%', '65%'],
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '转介绍' },
|
||||
{ value: 335, name: '网络推广' },
|
||||
{ value: 310, name: '外展外拓' },
|
||||
{ value: 251, name: '自媒体' },
|
||||
]
|
||||
},
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
function getPie2Option() {
|
||||
return {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 10
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 258, name: 'H' },
|
||||
{ value: 77, name: 'A' },
|
||||
{ value: 67, name: 'B', }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['45%', '65%'],
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b|{b}}{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{ value: 48, name: '转介绍' },
|
||||
{ value: 35, name: '网络推广' },
|
||||
{ value: 30, name: '外展外拓' },
|
||||
{ value: 21, name: '自媒体' },
|
||||
]
|
||||
},
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
function getBarOption() {
|
||||
|
||||
return{
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九','郑十']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
grid: {
|
||||
top: '5%',
|
||||
left: '2%',
|
||||
right: '5%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [120, 200, 150, 80, 70, 110, 130, 10],
|
||||
type: 'bar',
|
||||
top: 0,
|
||||
bottom:'0',
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#ff7052",
|
||||
"backgroundColor": "#ffffff",
|
||||
"backgroundColorTop": "#ff7052",
|
||||
"usingComponents": {
|
||||
"ec-canvas": "../../../ecCanvas/components/ec-canvas/ec-canvas"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<view class="container img-top-cover" style="background-image:url({{imgUrl}}storedata/theme.png);">
|
||||
<view class="text-center pt30 pb30">
|
||||
<view class="inline-block bg-fff-op20 pt5 pb5 pl20 pr20 font-22 color-fff ulib-r750">
|
||||
<picker class="inline-block" mode="date" value="{{s_date}}" end="{{current_date}}" bindchange="changeDate" data-type="s_date">
|
||||
<view>
|
||||
<text>{{s_date}}</text>
|
||||
<i class="iconfont ml5 icon-xuanze"></i>
|
||||
</view>
|
||||
</picker>
|
||||
<text class="pl10 pr10">至</text>
|
||||
<picker class="inline-block" mode="date" value="{{e_date}}" end="{{current_date}}" bindchange="changeDate" data-type="e_date">
|
||||
<view>
|
||||
<text>{{e_date}}</text>
|
||||
<i class="iconfont ml5 icon-xuanze"></i>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{Pie1title}}</view>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-400 z-index-0">
|
||||
<view class="absolute wp100 height-400" wx:if="{{showPie1Chart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie1 }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{Pie2title}}</view>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-400 z-index-0">
|
||||
<view class="absolute wp100 height-400" wx:if="{{showPie2Chart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie2 }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{Bartitle}}</view>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-500 z-index-0">
|
||||
<view class="absolute wp100 height-500" wx:if="{{showBarChart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecBar }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<lcb-footer></lcb-footer>
|
||||
@@ -0,0 +1 @@
|
||||
/* pages/storeData/index.wxss */
|
||||
@@ -0,0 +1,388 @@
|
||||
import _ from '../../commons/js/commons';
|
||||
import popularData from '../../commons/js/lib/popularData';
|
||||
import * as echarts from '../../ecCanvas/components/ec-canvas/echarts';
|
||||
const app = getApp()
|
||||
|
||||
let lineChartData;
|
||||
let FunnelChartData;
|
||||
function lineChart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = lineChartData
|
||||
chart.setOption(option);
|
||||
return chart;
|
||||
}
|
||||
function FunnelChart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = FunnelChartData
|
||||
chart.setOption(option);
|
||||
return chart;
|
||||
}
|
||||
|
||||
Page({
|
||||
data: {
|
||||
imgUrl: _.config.imgUrl,//静态图片路径
|
||||
showFunnelChart:false,//是否显示Funnel图表
|
||||
ecFunnel:{},
|
||||
showLineChart:false,//是否显示Line图表
|
||||
ecLine:{},
|
||||
daysIndex:0,
|
||||
daysArray:['近7日','近30日'],
|
||||
},
|
||||
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
popularData.getDateLater(0,0).then(res => {
|
||||
this.setData({
|
||||
s_date:res[0],
|
||||
e_date:res[1],
|
||||
current_date:res[1],
|
||||
})
|
||||
})
|
||||
|
||||
this.getAppBizStats()
|
||||
this.getAppBizStats_days()
|
||||
|
||||
},
|
||||
|
||||
//选择日期
|
||||
changeDate(e){
|
||||
if(e.currentTarget.dataset.type=="s_date"){
|
||||
let begin = new Date(e.detail.value).getTime();
|
||||
let end = new Date(this.data.e_date).getTime();
|
||||
let day = 0
|
||||
if(end>=begin){
|
||||
day = (end - begin)/(24*60*60*1000);
|
||||
this.setData({
|
||||
s_date: e.detail.value,
|
||||
})
|
||||
}
|
||||
else{
|
||||
day = (begin - end)/(24*60*60*1000);
|
||||
let s_date = this.data.e_date
|
||||
let e_date = e.detail.value
|
||||
this.setData({
|
||||
s_date,
|
||||
e_date,
|
||||
})
|
||||
}
|
||||
if (day > 365) {
|
||||
wx.showToast({
|
||||
title: '请选择一年时间内',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getAppBizStats()
|
||||
}
|
||||
}
|
||||
if(e.currentTarget.dataset.type=="e_date"){
|
||||
let begin = new Date(this.data.s_date).getTime();
|
||||
let end = new Date(e.detail.value).getTime();
|
||||
let day = 0
|
||||
if(end>=begin){
|
||||
day = (end - begin)/(24*60*60*1000);
|
||||
this.setData({
|
||||
e_date: e.detail.value,
|
||||
})
|
||||
}
|
||||
else{
|
||||
day = (begin - end)/(24*60*60*1000);
|
||||
let e_date = this.data.s_date
|
||||
let s_date = e.detail.value
|
||||
this.setData({
|
||||
s_date,
|
||||
e_date,
|
||||
})
|
||||
}
|
||||
if (day > 365) {
|
||||
wx.showToast({
|
||||
title: '请选择一年时间内',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getAppBizStats()
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//门店数据-漏斗
|
||||
getAppBizStats(){
|
||||
this.setData({
|
||||
showFunnelChart:false,
|
||||
})
|
||||
|
||||
let params = {};
|
||||
params['s_time'] = this.data.s_date;
|
||||
params['e_time'] = this.data.e_date;
|
||||
_.apiQuery.getAppBizStats(params).then(res => {
|
||||
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.data.title
|
||||
})
|
||||
|
||||
this.setData({
|
||||
tabs:res.data.tabs,
|
||||
})
|
||||
|
||||
// FunnelChartData = getFunnelOption()
|
||||
FunnelChartData = {
|
||||
series: [
|
||||
{
|
||||
name: 'Expected',
|
||||
type: 'funnel',
|
||||
top: '1%',
|
||||
bottom:'5%',
|
||||
left: '2%',
|
||||
width: '80%',
|
||||
label: {
|
||||
position: 'right',
|
||||
formatter: '{b}'
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
itemStyle: {
|
||||
opacity: 0.7
|
||||
},
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: 'Actual',
|
||||
type: 'funnel',
|
||||
top:'1%',
|
||||
bottom:'5%',
|
||||
left: '2%',
|
||||
width: '80%',
|
||||
maxSize: '80%',
|
||||
label: {
|
||||
position: 'inside',
|
||||
formatter: '{c}',
|
||||
color: '#000'
|
||||
},
|
||||
itemStyle: {
|
||||
opacity: 0.4,
|
||||
borderColor: '#fff',
|
||||
borderWidth:1
|
||||
},
|
||||
data: [],
|
||||
z: 100
|
||||
}
|
||||
]
|
||||
};
|
||||
if(res.data.funnel.actual_data[0].value==0&&res.data.funnel.actual_data[1].value==0&&res.data.funnel.actual_data[2].value==0){
|
||||
FunnelChartData.series[1].itemStyle.opacity = 0
|
||||
}
|
||||
|
||||
FunnelChartData.series[0].data = res.data.funnel.expected_data
|
||||
FunnelChartData.series[1].data = res.data.funnel.actual_data
|
||||
this.setData({
|
||||
funneltitle:res.data.funnel.title,
|
||||
showFunnelChart:true,
|
||||
['ecFunnel.onInit']:FunnelChart,
|
||||
})
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//客户/订单走势图
|
||||
getAppBizStats_days(){
|
||||
this.setData({
|
||||
showLineChart:false,
|
||||
})
|
||||
|
||||
let params = {};
|
||||
params['days'] = this.data.daysIndex == 0?'7':'30';
|
||||
_.apiQuery.getAppBizStats_days(params).then(res => {
|
||||
|
||||
// lineChartData = getLineOption()
|
||||
lineChartData = {
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
top: 'bottom',
|
||||
data: []
|
||||
},
|
||||
grid: {
|
||||
top: '3%',
|
||||
left: '2%',
|
||||
right: '5%',
|
||||
bottom: '20%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: []
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: []
|
||||
};
|
||||
|
||||
lineChartData.legend.data = res.data.legend_data
|
||||
lineChartData.xAxis.data = res.data.xAxis
|
||||
lineChartData.series = res.data.series
|
||||
this.setData({
|
||||
linetitle:res.data.title,
|
||||
showLineChart:true,
|
||||
['ecLine.onInit']:lineChart,
|
||||
})
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
//选择天数
|
||||
changeDays(e) {
|
||||
this.setData({
|
||||
daysIndex: e.detail.value
|
||||
})
|
||||
this.getAppBizStats_days()
|
||||
},
|
||||
|
||||
//推送链接
|
||||
pushLink(e) {
|
||||
if(e.currentTarget.dataset.url){
|
||||
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh: function () {
|
||||
this.getAppBizStats()
|
||||
this.getAppBizStats_days()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
function getFunnelOption() {
|
||||
return {
|
||||
// legend: {
|
||||
// top: 'bottom',
|
||||
// data: ['客户量', '到店数', '成交数']
|
||||
// },
|
||||
series: [
|
||||
{
|
||||
name: 'Expected',
|
||||
type: 'funnel',
|
||||
top: '1%',
|
||||
bottom:'5%',
|
||||
left: '2%',
|
||||
width: '80%',
|
||||
label: {
|
||||
position: 'right',
|
||||
formatter: '{b}'
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
itemStyle: {
|
||||
opacity: 0.7
|
||||
},
|
||||
data: [
|
||||
{ value: 33.3, name: '成交数(10%)' },
|
||||
{ value: 66.6, name: '到店数(25%)' },
|
||||
{ value: 100, name: '客户量' }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Actual',
|
||||
type: 'funnel',
|
||||
top:'1%',
|
||||
bottom:'5%',
|
||||
left: '2%',
|
||||
width: '80%',
|
||||
maxSize: '80%',
|
||||
label: {
|
||||
position: 'inside',
|
||||
formatter: '{c}',
|
||||
color: '#000'
|
||||
},
|
||||
itemStyle: {
|
||||
opacity: 0.4,
|
||||
borderColor: '#fff',
|
||||
borderWidth:1
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// position: 'inside',
|
||||
// formatter: '{b}: {c}'
|
||||
// }
|
||||
// },
|
||||
data: [
|
||||
{ value: 20, name: '成交数' },
|
||||
{ value: 50, name: '到店数' },
|
||||
{ value:200, name: '客户量' }
|
||||
],
|
||||
z: 100
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
function getLineOption() {
|
||||
|
||||
return{
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
top: 'bottom',
|
||||
data: ['近七日客户数', '近七日订单数',]
|
||||
},
|
||||
grid: {
|
||||
top: '3%',
|
||||
left: '2%',
|
||||
right: '5%',
|
||||
bottom: '20%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['1', '2', '3','4','5','6','7',]
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '近七日客户数',
|
||||
type: 'line',
|
||||
stack: '总量',
|
||||
data: [20, 30, 50, 60, 66, 70, 73, ],
|
||||
smooth: true,
|
||||
},
|
||||
{
|
||||
name: '近七日订单数',
|
||||
type: 'line',
|
||||
stack: '总量',
|
||||
data: [10, 15, 22,25, 26, 30, 35,],
|
||||
smooth: true,
|
||||
},
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#ff7052",
|
||||
"backgroundColor": "#ffffff",
|
||||
"backgroundColorTop": "#ff7052",
|
||||
"usingComponents": {
|
||||
"ec-canvas": "../../ecCanvas/components/ec-canvas/ec-canvas"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<view class="container img-top-cover" style="background-image:url({{imgUrl}}storedata/theme.png);">
|
||||
<view class="text-center pt30 pb30">
|
||||
<view class="inline-block bg-fff-op20 pt5 pb5 pl20 pr20 font-22 color-fff ulib-r750">
|
||||
<picker class="inline-block" mode="date" value="{{s_date}}" end="{{current_date}}" bindchange="changeDate" data-type="s_date">
|
||||
<view>
|
||||
<text>{{s_date}}</text>
|
||||
<i class="iconfont ml5 icon-xuanze"></i>
|
||||
</view>
|
||||
</picker>
|
||||
<text class="pl10 pr10">至</text>
|
||||
<picker class="inline-block" mode="date" value="{{e_date}}" end="{{current_date}}" bindchange="changeDate" data-type="e_date">
|
||||
<view>
|
||||
<text>{{e_date}}</text>
|
||||
<i class="iconfont ml5 icon-xuanze"></i>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb40 pl30 pr30 fn-flex text-center color-fff">
|
||||
<block wx:for='{{tabs}}' wx:key='index'>
|
||||
<view class="fn-flex-item" bindtap="pushLink" data-url="{{item.url}}">
|
||||
<view class="inline-block text-left">
|
||||
<view>
|
||||
<text class="font-40">{{item.value_1}}</text>
|
||||
<text class="font-28">{{item.value_2}}</text>
|
||||
</view>
|
||||
<view class="font-22">
|
||||
<text>{{item.title}}</text>
|
||||
<i class="iconfont ml5 icon-gengduo"></i>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="relative inner30 pb60 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{funneltitle}}</view>
|
||||
<!-- <picker class="absolute right-0 box-middle" bindchange="changeCity" value="{{cityIndex}}" range="{{cityArray}}">
|
||||
<view class="pt10 pb10 pl20 pr20 bg-f6 ulib-r10 font-22">
|
||||
<text>厦门</text>
|
||||
<text>{{cityArray[cityIndex]}}</text>
|
||||
<i class="iconfont ml10 icon-xiala color-999"></i>
|
||||
</view>
|
||||
</picker> -->
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-400 z-index-0">
|
||||
<view class="absolute wp100 height-400" wx:if="{{showFunnelChart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecFunnel }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
<view class="absolute left-0 bottom-0 mb40 wp100 text-center font-22 color-999">注:时间跨度越大越具参考性</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{linetitle}}</view>
|
||||
<picker class="absolute right-0 box-middle" bindchange="changeDays" value="{{daysIndex}}" range="{{daysArray}}">
|
||||
<view class="pt10 pb10 pl20 pr20 bg-f6 ulib-r10 font-22">
|
||||
<text>厦门</text>
|
||||
<text>{{daysArray[daysIndex]}}</text>
|
||||
<i class="iconfont ml10 icon-xiala color-999"></i>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-500 z-index-0">
|
||||
<view class="absolute wp100 height-500" wx:if="{{showLineChart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecLine }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<lcb-footer></lcb-footer>
|
||||
@@ -0,0 +1 @@
|
||||
/* pages/storeData/index.wxss */
|
||||
@@ -0,0 +1,613 @@
|
||||
import _ from '../../../commons/js/commons';
|
||||
import popularData from '../../../commons/js/lib/popularData';
|
||||
import * as echarts from '../../../ecCanvas/components/ec-canvas/echarts';
|
||||
const app = getApp()
|
||||
|
||||
let BarChartData;
|
||||
let Pie1ChartData;
|
||||
let Pie2ChartData;
|
||||
function BarChart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = BarChartData
|
||||
chart.setOption(option);
|
||||
chart.on('click',function(e){
|
||||
console.log(e)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
function Pie1Chart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = Pie1ChartData
|
||||
chart.setOption(option);
|
||||
chart.on('click',function(e){
|
||||
console.log(e)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
function Pie2Chart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = Pie2ChartData
|
||||
chart.setOption(option);
|
||||
chart.on('click',function(e){
|
||||
_.eventBus.emit("pinpai",e.name)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
|
||||
Page({
|
||||
data: {
|
||||
imgUrl: _.config.imgUrl,//静态图片路径
|
||||
showPie1Chart:false,//是否显示Pie1图表
|
||||
ecPie1:{},
|
||||
showPie2Chart:false,//是否显示Pie2图表
|
||||
ecPie2:{},
|
||||
showBarChart:false,//是否显示Bar图表
|
||||
ecBar:{},
|
||||
},
|
||||
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
popularData.getDateLater(0,0).then(res => {
|
||||
this.setData({
|
||||
s_date:res[0],
|
||||
e_date:res[1],
|
||||
current_date:res[1],
|
||||
})
|
||||
})
|
||||
|
||||
this.getAppBizStats_order()
|
||||
|
||||
//消息通讯 是否显示授权用户信息按钮
|
||||
_.eventBus.on("pinpai", this, function(res){
|
||||
this.setData({
|
||||
showPie2Chart:false,
|
||||
})
|
||||
|
||||
Pie2ChartData = {
|
||||
tooltip: {
|
||||
fontSize:10,
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 10
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['45%', '65%'],
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: []
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
Pie2ChartData.series[0].data = this.data.pie2.series_data
|
||||
if(res == '成交数'){
|
||||
Pie2ChartData.series[1].data = this.data.pie2.series_data_1
|
||||
}
|
||||
else if(res == '退定数'){
|
||||
Pie2ChartData.series[1].data = this.data.pie2.series_data_2
|
||||
}
|
||||
|
||||
this.setData({
|
||||
showPie2Chart:true,
|
||||
['ecPie2.onInit']:Pie2Chart,
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
//生命周期函数--监听页面卸载
|
||||
onUnload: function () {
|
||||
//卸载消息通讯 是否显示授权用户信息
|
||||
_.eventBus.remove('pinpai',this);
|
||||
},
|
||||
|
||||
|
||||
//选择日期
|
||||
changeDate(e){
|
||||
if(e.currentTarget.dataset.type=="s_date"){
|
||||
let begin = new Date(e.detail.value).getTime();
|
||||
let end = new Date(this.data.e_date).getTime();
|
||||
let day = 0
|
||||
if(end>=begin){
|
||||
day = (end - begin)/(24*60*60*1000);
|
||||
this.setData({
|
||||
s_date: e.detail.value,
|
||||
})
|
||||
}
|
||||
else{
|
||||
day = (begin - end)/(24*60*60*1000);
|
||||
let s_date = this.data.e_date
|
||||
let e_date = e.detail.value
|
||||
this.setData({
|
||||
s_date,
|
||||
e_date,
|
||||
})
|
||||
}
|
||||
if (day > 365) {
|
||||
wx.showToast({
|
||||
title: '请选择一年时间内',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getAppBizStats_order()
|
||||
}
|
||||
}
|
||||
if(e.currentTarget.dataset.type=="e_date"){
|
||||
let begin = new Date(this.data.s_date).getTime();
|
||||
let end = new Date(e.detail.value).getTime();
|
||||
let day = 0
|
||||
if(end>=begin){
|
||||
day = (end - begin)/(24*60*60*1000);
|
||||
this.setData({
|
||||
e_date: e.detail.value,
|
||||
})
|
||||
}
|
||||
else{
|
||||
day = (begin - end)/(24*60*60*1000);
|
||||
let e_date = this.data.s_date
|
||||
let s_date = e.detail.value
|
||||
this.setData({
|
||||
s_date,
|
||||
e_date,
|
||||
})
|
||||
}
|
||||
if (day > 365) {
|
||||
wx.showToast({
|
||||
title: '请选择一年时间内',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getAppBizStats_order()
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//订单数据
|
||||
getAppBizStats_order(){
|
||||
this.setData({
|
||||
showPie1Chart:false,
|
||||
showPie2Chart:false,
|
||||
showBarChart:false,
|
||||
})
|
||||
|
||||
let params = {};
|
||||
params['s_time'] = this.data.s_date;
|
||||
params['e_time'] = this.data.e_date;
|
||||
_.apiQuery.getAppBizStats_order(params).then(res => {
|
||||
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.data.title
|
||||
})
|
||||
|
||||
// Pie1ChartData = getPie1Option()
|
||||
Pie1ChartData = {
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
bottom:'10%',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Pie1ChartData.series[0].data = res.data.pie1.series_data
|
||||
this.setData({
|
||||
Pie1title:res.data.pie1.title,
|
||||
showPie1Chart:true,
|
||||
['ecPie1.onInit']:Pie1Chart,
|
||||
})
|
||||
|
||||
// Pie2ChartData = getPie2Option()
|
||||
Pie2ChartData = {
|
||||
tooltip: {
|
||||
fontSize:10,
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 10
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: []
|
||||
},
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['45%', '65%'],
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: []
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
Pie2ChartData.series[0].data = res.data.pie2.series_data
|
||||
Pie2ChartData.series[1].data = res.data.pie2.series_data_1
|
||||
this.setData({
|
||||
Pie2title:res.data.pie2.title,
|
||||
showPie2Chart:true,
|
||||
['ecPie2.onInit']:Pie2Chart,
|
||||
pie2:res.data.pie2,
|
||||
})
|
||||
|
||||
//BarChartData = getBarOption()
|
||||
BarChartData = {
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
top: '8%',
|
||||
left: '5%',
|
||||
right: '5%',
|
||||
bottom: '5%',
|
||||
containLabel: true
|
||||
},
|
||||
calculable: true,
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: []
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value'
|
||||
}
|
||||
],
|
||||
series: []
|
||||
};
|
||||
|
||||
BarChartData.xAxis.data = res.data.bar.xAxis_data
|
||||
BarChartData.series = res.data.bar.series
|
||||
this.setData({
|
||||
Bartitle:res.data.bar.title,
|
||||
showBarChart:true,
|
||||
['ecBar.onInit']:BarChart,
|
||||
})
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//推送链接
|
||||
pushLink(e) {
|
||||
if(e.currentTarget.dataset.url){
|
||||
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh: function () {
|
||||
this.getAppBizStats_order()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
function getPie1Option() {
|
||||
return {
|
||||
// tooltip: {
|
||||
// trigger: 'item',
|
||||
// formatter: '{b}: {c} ({d}%)'
|
||||
// },
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
bottom:'10%',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{ value: 48, name: '转介绍' },
|
||||
{ value: 35, name: '网络推广' },
|
||||
{ value: 30, name: '外展外拓' },
|
||||
{ value: 21, name: '自媒体' },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
function getPie2Option() {
|
||||
return {
|
||||
tooltip: {
|
||||
fontSize:10,
|
||||
trigger: 'item',
|
||||
formatter: '{b}: {c} ({d}%)'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
selectedMode: 'single',
|
||||
radius: [0, '30%'],
|
||||
label: {
|
||||
position: 'inner',
|
||||
fontSize: 10
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 258, name:'成交数',selected:true},
|
||||
{ value: 77, name: '退定数' },
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['45%', '65%'],
|
||||
labelLine: {
|
||||
fontSize:5,
|
||||
length:10
|
||||
},
|
||||
label: {
|
||||
formatter: '{b| {b} }{abg|}\n{hr|}\n{c| {c}({d}%) }',
|
||||
backgroundColor: '#F6F8FC',
|
||||
borderColor: '#8C8D8E',
|
||||
borderWidth: 1,
|
||||
borderRadius: 4,
|
||||
rich: {
|
||||
hr: {
|
||||
borderColor: '#8C8D8E',
|
||||
width: '100%',
|
||||
borderWidth: 1,
|
||||
height: 0
|
||||
},
|
||||
b: {
|
||||
color: '#4C5058',
|
||||
fontSize:10,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
c: {
|
||||
color: '#4C5058',
|
||||
fontSize:8,
|
||||
lineHeight:20,
|
||||
align: 'center',
|
||||
},
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{ value: 48, name: '东风EV' },
|
||||
{ value: 35, name: '岚图' },
|
||||
{ value: 30, name: '哪吒' },
|
||||
{ value: 21, name: '领跑' },
|
||||
]
|
||||
},
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
function getBarOption() {
|
||||
|
||||
return{
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
top: '8%',
|
||||
left: '5%',
|
||||
right: '5%',
|
||||
bottom: '5%',
|
||||
containLabel: true
|
||||
},
|
||||
calculable: true,
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九','郑十']
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value'
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '客户数',
|
||||
type: 'bar',
|
||||
data: [
|
||||
2, 4, 7, 76, 135, 162, 6, 3
|
||||
],
|
||||
},
|
||||
{
|
||||
name: '订单数',
|
||||
type: 'bar',
|
||||
data: [
|
||||
1, 2, 5, 70, 115.6, 122, 3, 2
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "订单数据",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#ff7052",
|
||||
"backgroundColor": "#ffffff",
|
||||
"backgroundColorTop": "#ff7052",
|
||||
"usingComponents": {
|
||||
"ec-canvas": "../../../ecCanvas/components/ec-canvas/ec-canvas"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<view class="container img-top-cover" style="background-image:url({{imgUrl}}storedata/theme.png);">
|
||||
<view class="text-center pt30 pb30">
|
||||
<view class="inline-block bg-fff-op20 pt5 pb5 pl20 pr20 font-22 color-fff ulib-r750">
|
||||
<picker class="inline-block" mode="date" value="{{s_date}}" end="{{current_date}}" bindchange="changeDate" data-type="s_date">
|
||||
<view>
|
||||
<text>{{s_date}}</text>
|
||||
<i class="iconfont ml5 icon-xuanze"></i>
|
||||
</view>
|
||||
</picker>
|
||||
<text class="pl10 pr10">至</text>
|
||||
<picker class="inline-block" mode="date" value="{{e_date}}" end="{{current_date}}" bindchange="changeDate" data-type="e_date">
|
||||
<view>
|
||||
<text>{{e_date}}</text>
|
||||
<i class="iconfont ml5 icon-xuanze"></i>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{Pie1title}}</view>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-400 z-index-0">
|
||||
<view class="absolute wp100 height-400" wx:if="{{showPie1Chart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie1 }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{Pie2title}}</view>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-400 z-index-0">
|
||||
<view class="absolute wp100 height-400" wx:if="{{showPie2Chart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecPie2 }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{Bartitle}}</view>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-500 z-index-0">
|
||||
<view class="absolute wp100 height-500" wx:if="{{showBarChart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecBar }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<lcb-footer></lcb-footer>
|
||||
@@ -0,0 +1 @@
|
||||
/* pages/storeData/index.wxss */
|
||||
@@ -0,0 +1,313 @@
|
||||
import _ from '../../../commons/js/commons';
|
||||
import popularData from '../../../commons/js/lib/popularData';
|
||||
import * as echarts from '../../../ecCanvas/components/ec-canvas/echarts';
|
||||
const app = getApp()
|
||||
|
||||
let Bar1ChartData;
|
||||
let Bar2ChartData;
|
||||
function Bar1Chart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = Bar1ChartData
|
||||
chart.setOption(option);
|
||||
chart.on('click',function(e){
|
||||
console.log(e)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
function Bar2Chart(canvas, width, height, dpr) {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr // new
|
||||
});
|
||||
canvas.setChart(chart);
|
||||
let option = Bar2ChartData
|
||||
chart.setOption(option);
|
||||
chart.on('click',function(e){
|
||||
console.log(e)
|
||||
});
|
||||
return chart;
|
||||
}
|
||||
|
||||
Page({
|
||||
data: {
|
||||
imgUrl: _.config.imgUrl,//静态图片路径
|
||||
showBar1Chart:false,//是否显示Bar图表
|
||||
ecBar1:{},
|
||||
showBar2Chart:false,//是否显示Bar图表
|
||||
ecBar2:{},
|
||||
},
|
||||
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
this.setData({
|
||||
[key]: options[key]
|
||||
})
|
||||
}
|
||||
|
||||
popularData.getDateLater(0,0).then(res => {
|
||||
this.setData({
|
||||
s_date:res[0],
|
||||
e_date:res[1],
|
||||
current_date:res[1],
|
||||
})
|
||||
})
|
||||
|
||||
this.getAppBizStats_wxqy()
|
||||
|
||||
},
|
||||
|
||||
//选择日期
|
||||
changeDate(e){
|
||||
if(e.currentTarget.dataset.type=="s_date"){
|
||||
let begin = new Date(e.detail.value).getTime();
|
||||
let end = new Date(this.data.e_date).getTime();
|
||||
let day = 0
|
||||
if(end>=begin){
|
||||
day = (end - begin)/(24*60*60*1000);
|
||||
this.setData({
|
||||
s_date: e.detail.value,
|
||||
})
|
||||
}
|
||||
else{
|
||||
day = (begin - end)/(24*60*60*1000);
|
||||
let s_date = this.data.e_date
|
||||
let e_date = e.detail.value
|
||||
this.setData({
|
||||
s_date,
|
||||
e_date,
|
||||
})
|
||||
}
|
||||
if (day > 365) {
|
||||
wx.showToast({
|
||||
title: '请选择一年时间内',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getAppBizStats_wxqy()
|
||||
}
|
||||
}
|
||||
if(e.currentTarget.dataset.type=="e_date"){
|
||||
let begin = new Date(this.data.s_date).getTime();
|
||||
let end = new Date(e.detail.value).getTime();
|
||||
let day = 0
|
||||
if(end>=begin){
|
||||
day = (end - begin)/(24*60*60*1000);
|
||||
this.setData({
|
||||
e_date: e.detail.value,
|
||||
})
|
||||
}
|
||||
else{
|
||||
day = (begin - end)/(24*60*60*1000);
|
||||
let e_date = this.data.s_date
|
||||
let s_date = e.detail.value
|
||||
this.setData({
|
||||
s_date,
|
||||
e_date,
|
||||
})
|
||||
}
|
||||
if (day > 365) {
|
||||
wx.showToast({
|
||||
title: '请选择一年时间内',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.getAppBizStats_wxqy()
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//企微数据
|
||||
getAppBizStats_wxqy(){
|
||||
this.setData({
|
||||
showBar1Chart:false,
|
||||
showBar2Chart:false,
|
||||
})
|
||||
let params = {};
|
||||
params['s_time'] = this.data.s_date;
|
||||
params['e_time'] = this.data.e_date;
|
||||
_.apiQuery.getAppBizStats_wxqy(params).then(res => {
|
||||
|
||||
wx.setNavigationBarTitle({
|
||||
title: res.data.title
|
||||
})
|
||||
|
||||
//Bar1ChartData = getBar1Option()
|
||||
Bar1ChartData = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: []
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
grid: {
|
||||
top: '5%',
|
||||
left: '2%',
|
||||
right: '5%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
series: [
|
||||
|
||||
{
|
||||
data: [],
|
||||
type: 'bar',
|
||||
top: 0,
|
||||
bottom:'0',
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Bar1ChartData.xAxis.data = res.data.bar1.xAxis_data
|
||||
Bar1ChartData.series[0].data = res.data.bar1.series_data
|
||||
this.setData({
|
||||
Bar1title:res.data.bar1.title,
|
||||
showBar1Chart:true,
|
||||
['ecBar1.onInit']:Bar1Chart,
|
||||
})
|
||||
|
||||
//Bar2ChartData = getBar2Option()
|
||||
Bar2ChartData = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: []
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
grid: {
|
||||
top: '5%',
|
||||
left: '2%',
|
||||
right: '5%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
series: [
|
||||
|
||||
{
|
||||
data: [],
|
||||
type: 'bar',
|
||||
top: 0,
|
||||
bottom:'0',
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
Bar2ChartData.xAxis.data = res.data.bar2.xAxis_data
|
||||
Bar2ChartData.series[0].data = res.data.bar2.series_data
|
||||
this.setData({
|
||||
Bar2title:res.data.bar2.title,
|
||||
showBar2Chart:true,
|
||||
['ecBar2.onInit']:Bar2Chart,
|
||||
})
|
||||
|
||||
wx.stopPullDownRefresh()
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//推送链接
|
||||
pushLink(e) {
|
||||
if(e.currentTarget.dataset.url){
|
||||
_.$router.openUrlScheme(e.currentTarget.dataset.url)
|
||||
}
|
||||
},
|
||||
|
||||
//页面相关事件处理函数--监听用户下拉动作
|
||||
onPullDownRefresh: function () {
|
||||
this.getAppBizStats_wxqy()
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
|
||||
function getBar1Option() {
|
||||
|
||||
return{
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九','郑十']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
grid: {
|
||||
top: '5%',
|
||||
left: '2%',
|
||||
right: '5%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
series: [
|
||||
|
||||
{
|
||||
data: [120, 200, 150, 80, 70, 110, 130, 10],
|
||||
type: 'bar',
|
||||
top: 0,
|
||||
bottom:'0',
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
function getBar2Option() {
|
||||
|
||||
return{
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['张三', '李四', '王五', '赵六', '孙七', '周八', '吴九','郑十']
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value'
|
||||
},
|
||||
grid: {
|
||||
top: '5%',
|
||||
left: '2%',
|
||||
right: '5%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
series: [
|
||||
|
||||
{
|
||||
data: [20, 20, 10, 20, 20, 20, 25, 2],
|
||||
type: 'bar',
|
||||
top: 0,
|
||||
bottom:'0',
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#ff7052",
|
||||
"backgroundColor": "#ffffff",
|
||||
"backgroundColorTop": "#ff7052",
|
||||
"usingComponents": {
|
||||
"ec-canvas": "../../../ecCanvas/components/ec-canvas/ec-canvas"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<view class="container img-top-cover" style="background-image:url({{imgUrl}}storedata/theme.png);">
|
||||
<view class="text-center pt30 pb30">
|
||||
<view class="inline-block bg-fff-op20 pt5 pb5 pl20 pr20 font-22 color-fff ulib-r750">
|
||||
<picker class="inline-block" mode="date" value="{{s_date}}" end="{{current_date}}" bindchange="changeDate" data-type="s_date">
|
||||
<view>
|
||||
<text>{{s_date}}</text>
|
||||
<i class="iconfont ml5 icon-xuanze"></i>
|
||||
</view>
|
||||
</picker>
|
||||
<text class="pl10 pr10">至</text>
|
||||
<picker class="inline-block" mode="date" value="{{e_date}}" end="{{current_date}}" bindchange="changeDate" data-type="e_date">
|
||||
<view>
|
||||
<text>{{e_date}}</text>
|
||||
<i class="iconfont ml5 icon-xuanze"></i>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{Bar1title}}</view>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-500 z-index-0">
|
||||
<view class="absolute wp100 height-500" wx:if="{{showBar1Chart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecBar1 }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mb30 pl30 pr30">
|
||||
<view class="inner30 pt40 bg-fff box-shadow-000-10-10 ulib-r10">
|
||||
<view class="relative">
|
||||
<view class="font-36">{{Bar2title}}</view>
|
||||
</view>
|
||||
<view class="mt50 mb20 relative height-500 z-index-0">
|
||||
<view class="absolute wp100 height-500" wx:if="{{showBar2Chart}}">
|
||||
<ec-canvas class="absolute top-0 bottom-0 left-0 right-0" ec="{{ ecBar2 }}"></ec-canvas>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<lcb-footer></lcb-footer>
|
||||
@@ -0,0 +1 @@
|
||||
/* pages/storeData/index.wxss */
|
||||
Reference in New Issue
Block a user