星油云站更新
This commit is contained in:
@@ -56,6 +56,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this.chartData)
|
||||
_self = this;
|
||||
//#ifdef MP-ALIPAY
|
||||
uni.getSystemInfo({
|
||||
@@ -76,6 +77,7 @@ export default {
|
||||
chartData: {
|
||||
handler(newVal, oldVal) {
|
||||
console.log('深度监听', newVal, oldVal)
|
||||
console.log(newVal)
|
||||
this.chartData = newVal
|
||||
this.getServerData()
|
||||
},
|
||||
@@ -126,7 +128,12 @@ export default {
|
||||
dashLength: 8,
|
||||
boundaryGap: 'justify',
|
||||
splitNumber: 5,
|
||||
scrollShow:true,//新增是否显示滚动条,默认false
|
||||
scrollAlign:'left',//滚动条初始位置
|
||||
scrollBackgroundColor:'#F7F7FF',//默认为 #EFEBEF
|
||||
scrollColor:'#DEE7F7',//默认为 #A6A6A6
|
||||
format: (val) => {
|
||||
console.log('xAxis', val)
|
||||
// console.log('----', val, '-----')
|
||||
// console.log('----', this.formatDateTime(val, 'str'), '-----')
|
||||
return this.formatDateTime(val) }
|
||||
@@ -136,7 +143,9 @@ export default {
|
||||
gridColor: '#CCCCCC',
|
||||
dashLength: 8,
|
||||
splitNumber: 5,
|
||||
format: (val) => { return val + '单' }
|
||||
format: (val) => {
|
||||
console.log('yAxis', val)
|
||||
return val + '单' }
|
||||
},
|
||||
width: _self.cWidth * _self.pixelRatio,
|
||||
height: _self.cHeight * _self.pixelRatio,
|
||||
@@ -151,6 +160,7 @@ export default {
|
||||
|
||||
},
|
||||
touchLineA(e) {
|
||||
console.log( 'istouchLineA ',e)
|
||||
var that = this
|
||||
canvaLineA.showToolTip(e, {
|
||||
format: function (item, category) {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<analysis-card @showModal="showModal" :basicData="basicData" />
|
||||
</view>
|
||||
<view class="margin bg-white radius">
|
||||
<view class="margin">
|
||||
<view class="margin">
|
||||
<area-time :chartData="detailData" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -54,6 +54,7 @@
|
||||
import areaTime from '../../area-time.vue'
|
||||
import analysisCard from '../../analysis-card.vue'
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
import oliSiteApi from '@/api/oli-site.js'
|
||||
export default {
|
||||
components: {
|
||||
areaTime,
|
||||
@@ -93,7 +94,8 @@
|
||||
totalAccount: 0,
|
||||
totalAmout: 0,
|
||||
totalCount: 0
|
||||
}
|
||||
},
|
||||
channelId:uni.getStorageSync('channelId')
|
||||
}
|
||||
},
|
||||
|
||||
@@ -108,11 +110,26 @@
|
||||
},
|
||||
methods: {
|
||||
getDaily() {
|
||||
cloudSiteApi.getAnyDay(this.selDate).then(res => {
|
||||
let timeObj = {
|
||||
day : this.selDate ,
|
||||
channelId : this.channelId
|
||||
}
|
||||
oliSiteApi.getOrderInfoByDay(timeObj).then(res => {
|
||||
console.log(res)
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.code === 20000) {
|
||||
this.basicData = res.data.basicData
|
||||
this.detailData = res.data.detailData
|
||||
this.basicData = res.data.info
|
||||
let obj = {
|
||||
customerCountList: res.data.piecewise.customerCountList.map(Number),
|
||||
dateList: res.data.piecewise.dateList.map(Number),
|
||||
totalCountList: res.data.piecewise.totalCountList.map(Number),
|
||||
totalMoneyList: res.data.piecewise.totalMoneyList.map(Number),
|
||||
totalVolumeList: res.data.piecewise.totalVolumeList.map(Number),
|
||||
}
|
||||
console.log(obj)
|
||||
this.detailData = res.data.piecewise.totalMoneyList.map(Number)
|
||||
// console.log(totalList )
|
||||
// console.log(totalList.map(Number))
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
import areaMonth from '../../area-month.vue'
|
||||
import analysisCard from '../../analysis-card.vue'
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
import oliSiteApi from '@/api/oli-site.js'
|
||||
export default {
|
||||
components: {
|
||||
areaMonth,
|
||||
@@ -109,17 +110,24 @@
|
||||
},
|
||||
methods: {
|
||||
getMonthly() {
|
||||
cloudSiteApi.getAnyMonth(this.selDate+'-5').then(res => {
|
||||
let obj ={
|
||||
month :this.selDate ,
|
||||
channelId:uni.getStorageSync('channelId')
|
||||
}
|
||||
oliSiteApi.getOrderInfoByMonth(obj).then(res => {
|
||||
console.log(res)
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.code === 20000) {
|
||||
this.basicData = res.data.basicData
|
||||
res.data.detailData.forEach(item => {
|
||||
var date = item[0]
|
||||
date = date.substring(0, 19);
|
||||
date = date.replace(/-/g, '/');
|
||||
item[0] = new Date(date).getTime();
|
||||
})
|
||||
this.detailData = res.data.detailData
|
||||
this.basicData = res.data.info
|
||||
// this.basicData = res.data.basicData
|
||||
// res.data.detailData.forEach(item => {
|
||||
// var date = item[0]
|
||||
// date = date.substring(0, 19);
|
||||
// date = date.replace(/-/g, '/');
|
||||
// item[0] = new Date(date).getTime();
|
||||
// })
|
||||
this.detailData = res.data.piecewise.totalMoneyList.map(Number)
|
||||
// this.detailData = res.data.detailData
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<view class="txet-xxs">
|
||||
<text class="text-white">昨日交易金额(元)</text>
|
||||
</view>
|
||||
<view class=" text-sl padding padding-top-xs"><text class="text-white">¥{{basicData.totalAmout|numberFilter}}</text></view>
|
||||
<view class=" text-sl padding padding-top-xs"><text class="text-white">¥{{basicData.totalMoney|numberFilter}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -33,7 +33,7 @@
|
||||
<view class="padding text-center flex-sub">
|
||||
<text>顾客数</text>
|
||||
<view class="padding-sm">
|
||||
<text class="oil-main-color">{{basicData.totalAccount}}</text>
|
||||
<text class="oil-main-color">{{basicData.customerCount}}</text>
|
||||
</view>
|
||||
<!-- <button class="cu-btn bg-main-oil text-white text-sm ">
|
||||
查看明细
|
||||
@@ -77,6 +77,7 @@
|
||||
<script>
|
||||
import staffApi from '@/packageStaff/api/staff.js'
|
||||
import cloudSiteApi from '@/api/cloud-site.js'
|
||||
import oliSiteApi from '@/api/oli-site.js'
|
||||
export default {
|
||||
data() {
|
||||
|
||||
@@ -91,7 +92,8 @@
|
||||
userMenu: uni.getStorageSync('userMenu'),
|
||||
loginUser: uni.getStorageSync('loginUser'),
|
||||
title: 'Hello',
|
||||
cuIconList: []
|
||||
cuIconList: [],
|
||||
channelId:uni.getStorageSync('channelId')
|
||||
};
|
||||
},
|
||||
|
||||
@@ -102,7 +104,6 @@
|
||||
this.getYesterday()
|
||||
},
|
||||
filters: {
|
||||
|
||||
numberFilter(value) {
|
||||
if (value) {
|
||||
value = value - 1 + 1
|
||||
@@ -127,10 +128,10 @@
|
||||
})
|
||||
},
|
||||
getYesterday() {
|
||||
cloudSiteApi.getYesterday().then(res => {
|
||||
oliSiteApi.getYesterdayOrderInfo(this.channelId).then(res => {
|
||||
uni.stopPullDownRefresh()
|
||||
if (res.code === 20000) {
|
||||
this.basicData = res.data
|
||||
this.basicData = res.data.info
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user