|
@@ -145,13 +145,12 @@
|
|
今日订单量
|
|
今日订单量
|
|
</view>
|
|
</view>
|
|
<view class="num">
|
|
<view class="num">
|
|
- {{todayorderSun.num*100}}
|
|
|
|
|
|
+ {{ (todayorderSun.num*100).toFixed(0) }}
|
|
</view>
|
|
</view>
|
|
<view class="ratio">
|
|
<view class="ratio">
|
|
<view class="detail">
|
|
<view class="detail">
|
|
<image src="../../static/images/down.png" class="icon" v-if="todayorderSun.yesnum >=todayorderSun.todaynum">
|
|
<image src="../../static/images/down.png" class="icon" v-if="todayorderSun.yesnum >=todayorderSun.todaynum">
|
|
<image src="../../static/images/up.png" class="icon" v-if="todayorderSun.yesnum < todayorderSun.todaynum"> {{ todayorderSun.percent }}%
|
|
<image src="../../static/images/up.png" class="icon" v-if="todayorderSun.yesnum < todayorderSun.todaynum"> {{ todayorderSun.percent }}%
|
|
- <!-- <text class="compare">{{ todayorderSun.status ? '无增长' :'同比上月' }}</text> -->
|
|
|
|
<text class="compare">同比昨日</text>
|
|
<text class="compare">同比昨日</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -284,19 +283,17 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view id="testecharts"></view>
|
|
|
|
|
|
+ <view style="height:80upx"></view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <tabBar :currentIndex="typeNum"></tabBar>
|
|
|
|
</view>
|
|
</view>
|
|
- <!-- <mask :txt="masktxt" :iconShow="iconShow" v-if="isShowMask" @isSureConver="isSureConver"></mask> -->
|
|
|
|
<rf-loading v-if="loading"></rf-loading>
|
|
<rf-loading v-if="loading"></rf-loading>
|
|
|
|
+ <tabBar :currentIndex="typeNum"></tabBar>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import uCharts from '../../js_sdk/u-charts/u-charts/u-charts';
|
|
import uCharts from '../../js_sdk/u-charts/u-charts/u-charts';
|
|
import moment from '@/common/moment';
|
|
import moment from '@/common/moment';
|
|
-// import mask from '../components/mask';
|
|
|
|
|
|
|
|
let _self;
|
|
let _self;
|
|
let canvaLineA = null;
|
|
let canvaLineA = null;
|
|
@@ -306,14 +303,12 @@ let shopMoneyLine = null;
|
|
let getDataBuyTime = null;
|
|
let getDataBuyTime = null;
|
|
export default {
|
|
export default {
|
|
name: 'Header',
|
|
name: 'Header',
|
|
- // components: {
|
|
|
|
- // mask,
|
|
|
|
- // },
|
|
|
|
|
|
+
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
uderName: '',
|
|
uderName: '',
|
|
// tabbar
|
|
// tabbar
|
|
- typeNum: 0,
|
|
|
|
|
|
+ typeNum: null,
|
|
|
|
|
|
|
|
|
|
loadingMore1: true,
|
|
loadingMore1: true,
|
|
@@ -401,55 +396,44 @@ export default {
|
|
shopimg: '',
|
|
shopimg: '',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
-
|
|
|
|
-
|
|
|
|
- // 此处定义传入的数据
|
|
|
|
- props: {
|
|
|
|
- shoplist: {
|
|
|
|
- type: Object,
|
|
|
|
- value: null,
|
|
|
|
- },
|
|
|
|
|
|
+ onReady () {
|
|
|
|
+ this.uderName = uni.getStorageSync('scenicMessage').name
|
|
},
|
|
},
|
|
|
|
+
|
|
computed:{
|
|
computed:{
|
|
logingname: function (){
|
|
logingname: function (){
|
|
-
|
|
|
|
if ( this.uderName.indexOf('@') != -1) {
|
|
if ( this.uderName.indexOf('@') != -1) {
|
|
- console.log('子账号');
|
|
|
|
return this.uderName.slice(this.uderName.indexOf('@')+1)
|
|
return this.uderName.slice(this.uderName.indexOf('@')+1)
|
|
} else {
|
|
} else {
|
|
- console.log('景区账号');
|
|
|
|
return this.uderName
|
|
return this.uderName
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ onTabItemTap (e){
|
|
|
|
+ console.log('1');
|
|
|
|
+ },
|
|
onLoad () {
|
|
onLoad () {
|
|
- // 商家信息
|
|
|
|
- this.$http.get('/getUserInfo').then(async (res) => {
|
|
|
|
- if (res.data) {
|
|
|
|
- this.uderName = res.data.name
|
|
|
|
- this.$mStore.commit('setScenic',res.data)
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ this.typeNum = this.$mStore.state.roleIndex
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
|
|
+
|
|
this.todayforday = moment().format('YYYY-MM-DD HH:mm:ss')
|
|
this.todayforday = moment().format('YYYY-MM-DD HH:mm:ss')
|
|
_self = this;
|
|
_self = this;
|
|
this.cWidth = uni.upx2px(690); // upx2px 转换为px
|
|
this.cWidth = uni.upx2px(690); // upx2px 转换为px
|
|
this.cHeight = uni.upx2px(300);
|
|
this.cHeight = uni.upx2px(300);
|
|
|
|
+
|
|
this.bWidth = uni.upx2px(690);
|
|
this.bWidth = uni.upx2px(690);
|
|
- this.bHeight = uni.upx2px(300);
|
|
|
|
|
|
+ this.bHeight = uni.upx2px(500);
|
|
|
|
|
|
- this.getShopList();
|
|
|
|
- this.loading = false;
|
|
|
|
|
|
+ this.getShopList()
|
|
|
|
|
|
getDataBuyTime = setInterval(() => {
|
|
getDataBuyTime = setInterval(() => {
|
|
this.todayforday = moment().format('YYYY-MM-DD HH:mm:ss')
|
|
this.todayforday = moment().format('YYYY-MM-DD HH:mm:ss')
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.getShopList();
|
|
this.getShopList();
|
|
// this.$mHelper.toast(`自动更新数据${moment().format('h:mm:ss')}`);
|
|
// this.$mHelper.toast(`自动更新数据${moment().format('h:mm:ss')}`);
|
|
- }, 1000 * 60 * 5);
|
|
|
|
- },
|
|
|
|
|
|
+ }, 1011 * 60 * 5);
|
|
|
|
+ },
|
|
onHide() {
|
|
onHide() {
|
|
clearInterval(getDataBuyTime);
|
|
clearInterval(getDataBuyTime);
|
|
},
|
|
},
|
|
@@ -537,6 +521,7 @@ export default {
|
|
},
|
|
},
|
|
// 关键指数
|
|
// 关键指数
|
|
async getExponentData() {
|
|
async getExponentData() {
|
|
|
|
+ this.loading = true
|
|
if (this.shopID === 0) {
|
|
if (this.shopID === 0) {
|
|
this.shopID = '';
|
|
this.shopID = '';
|
|
}
|
|
}
|
|
@@ -555,6 +540,7 @@ export default {
|
|
this.dataDo(res.data.ddzl, this.orderSun);
|
|
this.dataDo(res.data.ddzl, this.orderSun);
|
|
// 今日订单总量
|
|
// 今日订单总量
|
|
this.dataDODO(res.data.jrdds, this.todayorderSun);
|
|
this.dataDODO(res.data.jrdds, this.todayorderSun);
|
|
|
|
+ this.loading = false
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -621,6 +607,7 @@ export default {
|
|
},
|
|
},
|
|
// 待处理事物
|
|
// 待处理事物
|
|
async getPendingData() {
|
|
async getPendingData() {
|
|
|
|
+ this.loading = true
|
|
if (this.shopID === 0) {
|
|
if (this.shopID === 0) {
|
|
this.shopID = '';
|
|
this.shopID = '';
|
|
}
|
|
}
|
|
@@ -636,6 +623,7 @@ export default {
|
|
this.pendingData.shelf = res.data.upGoods;
|
|
this.pendingData.shelf = res.data.upGoods;
|
|
this.pendingData.payorder = res.data.payNum;
|
|
this.pendingData.payorder = res.data.payNum;
|
|
this.pendingData.refund = res.data.refundNum;
|
|
this.pendingData.refund = res.data.refundNum;
|
|
|
|
+ this.loading = false
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -1011,6 +999,7 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
// 饼图
|
|
// 饼图
|
|
showPie(canvasId, chartData) {
|
|
showPie(canvasId, chartData) {
|
|
canvaPie = new uCharts({
|
|
canvaPie = new uCharts({
|
|
@@ -1021,8 +1010,8 @@ export default {
|
|
fontSize: 12,
|
|
fontSize: 12,
|
|
legend: {
|
|
legend: {
|
|
show: true,
|
|
show: true,
|
|
- position: 'left',
|
|
|
|
- float: 'center',
|
|
|
|
|
|
+ position: 'top',
|
|
|
|
+ float: 'left',
|
|
itemGap: 10,
|
|
itemGap: 10,
|
|
padding: 5,
|
|
padding: 5,
|
|
lineHeight: 20,
|
|
lineHeight: 20,
|
|
@@ -1038,18 +1027,23 @@ export default {
|
|
dataLabel: true,
|
|
dataLabel: true,
|
|
extra: {
|
|
extra: {
|
|
pie: {
|
|
pie: {
|
|
|
|
+ type:'area',
|
|
|
|
+ minRadius: 200,
|
|
|
|
+ activeOpacity:0.5,
|
|
|
|
+ offsetAngle:0,
|
|
lableWidth: 15,
|
|
lableWidth: 15,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
});
|
|
|
|
+
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
uni.canvasToTempFilePath(
|
|
uni.canvasToTempFilePath(
|
|
{
|
|
{
|
|
//将图表转成图片
|
|
//将图表转成图片
|
|
x: 0,
|
|
x: 0,
|
|
y: 0,
|
|
y: 0,
|
|
- width: _self.cWidth * _self.pixelRatio,
|
|
|
|
- height: _self.cHeight * _self.pixelRatio,
|
|
|
|
|
|
+ width: _self.bWidth * _self.pixelRatio,
|
|
|
|
+ height: _self.bHeight * _self.pixelRatio,
|
|
fileType: 'png',
|
|
fileType: 'png',
|
|
canvasId: canvasId,
|
|
canvasId: canvasId,
|
|
success: function (res) {
|
|
success: function (res) {
|
|
@@ -1079,11 +1073,14 @@ canvas {
|
|
}
|
|
}
|
|
.shopsellimg,
|
|
.shopsellimg,
|
|
.shopmoneyimg,
|
|
.shopmoneyimg,
|
|
-.futureimg,
|
|
|
|
-.shopimg {
|
|
|
|
|
|
+.futureimg {
|
|
width: 690upx;
|
|
width: 690upx;
|
|
height: 300upx;
|
|
height: 300upx;
|
|
}
|
|
}
|
|
|
|
+.shopimg {
|
|
|
|
+ width: 690upx;
|
|
|
|
+ height: 500upx;
|
|
|
|
+}
|
|
|
|
|
|
.header {
|
|
.header {
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -1533,25 +1530,25 @@ canvas {
|
|
|
|
|
|
.shop-echarts {
|
|
.shop-echarts {
|
|
position: relative;
|
|
position: relative;
|
|
- width: 690rpx;
|
|
|
|
- height: 300rpx;
|
|
|
|
|
|
+ width: 690upx;
|
|
|
|
+ height: 500upx;
|
|
.loadingMore {
|
|
.loadingMore {
|
|
position: absolute;
|
|
position: absolute;
|
|
left: 0;
|
|
left: 0;
|
|
top: 0;
|
|
top: 0;
|
|
- width: 690rpx;
|
|
|
|
- height: 300rpx;
|
|
|
|
|
|
+ width: 690upx;
|
|
|
|
+ height: 500upx;
|
|
text-align: center;
|
|
text-align: center;
|
|
- line-height: 300upx;
|
|
|
|
|
|
+ line-height: 500upx;
|
|
font-size: 28upx;
|
|
font-size: 28upx;
|
|
color: #cccece;
|
|
color: #cccece;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
.shopecharts {
|
|
.shopecharts {
|
|
- width: 690rpx;
|
|
|
|
- height: 300rpx;
|
|
|
|
|
|
+ width: 690upx;
|
|
|
|
+ height: 500upx;
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|