update
This commit is contained in:
parent
3da9305716
commit
626b4bc998
@ -17,7 +17,7 @@
|
|||||||
<!-- 月份的轮播框 -->
|
<!-- 月份的轮播框 -->
|
||||||
<view class="monthListBox" :style="{ marginTop: menu.bottom + 8 + 'px' }">
|
<view class="monthListBox" :style="{ marginTop: menu.bottom + 8 + 'px' }">
|
||||||
<swiper class="swiperBox" previous-margin="40rpx" next-margin="40rpx" :current="selectIndex"
|
<swiper class="swiperBox" previous-margin="40rpx" next-margin="40rpx" :current="selectIndex"
|
||||||
@change="handleChangeSwiper">
|
@animationfinish="handleChangeSwiper">
|
||||||
<swiper-item class="swiperItem" v-for="(item, index) in monthList" :key="index">
|
<swiper-item class="swiperItem" v-for="(item, index) in monthList" :key="index">
|
||||||
<view class="swiperItemContent"
|
<view class="swiperItemContent"
|
||||||
:class="{ 'is-first': index === 0, 'is-last': index === monthList.length - 1 }">
|
:class="{ 'is-first': index === 0, 'is-last': index === monthList.length - 1 }">
|
||||||
@ -51,23 +51,21 @@
|
|||||||
|
|
||||||
<view class="monthRevenueBox" v-if="selectIndex === index">
|
<view class="monthRevenueBox" v-if="selectIndex === index">
|
||||||
<view class="leftBox" @click="handleShowYDModal">
|
<view class="leftBox" @click="handleShowYDModal">
|
||||||
<view class="rateChartsBox">
|
<view class="rateChartsBox" v-if="moneyRateList && moneyRateList.length > 0">
|
||||||
<rateCharts :success="moneyRateList"
|
<rateCharts :success="moneyRateList"
|
||||||
:colorList="['#1677FE', '#456497', '#97A9C6']"
|
:colorList="['#1677FE', '#456497', '#97A9C6']"
|
||||||
:name="`${selectIndex}rate`" />
|
:name="`${selectIndex}rate`" />
|
||||||
</view>
|
</view>
|
||||||
<view class="haveNoticeBox" v-if="ydModal" @click.stop="handleShowYDModal">
|
<view class="haveNoticeBox"
|
||||||
|
v-if="ydModal && modalRateList && modalRateList.length > 0"
|
||||||
|
@click.stop="handleShowYDModal">
|
||||||
<view class="field">
|
<view class="field">
|
||||||
<view class="label">便利店:</view>
|
<view class="label">自营:</view>
|
||||||
<view class="value">{{ ydRate }}%</view>
|
<view class="value">{{ modalRateList[0] }}%</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="field">
|
<view class="field">
|
||||||
<view class="label">餐饮客房:</view>
|
<view class="label">外包:</view>
|
||||||
<view class="value">{{ shopRate }}%</view>
|
<view class="value">{{ modalRateList[1] }}%</view>
|
||||||
</view>
|
|
||||||
<view class="field">
|
|
||||||
<view class="label">商铺租赁:</view>
|
|
||||||
<view class="value">{{ shopOutRate }}%</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -138,12 +136,13 @@
|
|||||||
: topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAddNumber < 0
|
: topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAddNumber < 0
|
||||||
? '#0E9976'
|
? '#0E9976'
|
||||||
: '',
|
: '',
|
||||||
}"><span class="revenueAddNotice">{{
|
}">
|
||||||
topShowData && topShowData.MonthRevenueModel &&
|
<span class="revenueAddNotice">{{
|
||||||
topShowData.MonthRevenueModel.YearRevenueAddNumber > 0
|
topShowData && topShowData.MonthRevenueModel &&
|
||||||
? "增长"
|
topShowData.MonthRevenueModel.YearRevenueAddNumber > 0
|
||||||
: topShowData && topShowData.MonthRevenueModel &&
|
? "增长"
|
||||||
topShowData.MonthRevenueModel.YearRevenueAddNumber < 0 ? "下降" : "" }}</span>
|
: topShowData && topShowData.MonthRevenueModel &&
|
||||||
|
topShowData.MonthRevenueModel.YearRevenueAddNumber < 0 ? "下降" : "" }}</span>
|
||||||
{{
|
{{
|
||||||
topShowData && topShowData.MonthRevenueModel &&
|
topShowData && topShowData.MonthRevenueModel &&
|
||||||
topShowData.MonthRevenueModel.YearRevenueAddNumber
|
topShowData.MonthRevenueModel.YearRevenueAddNumber
|
||||||
@ -153,9 +152,10 @@
|
|||||||
100000000
|
100000000
|
||||||
)
|
)
|
||||||
: ""
|
: ""
|
||||||
}}</span>
|
}}
|
||||||
|
</span>
|
||||||
|
|
||||||
<span class="revenueAdd" :style="{
|
<span class="revenueAdd" v-if="selectIndex === index" :style="{
|
||||||
color:
|
color:
|
||||||
topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAdd > 0
|
topShowData && topShowData.MonthRevenueModel && topShowData.MonthRevenueModel.YearRevenueAdd > 0
|
||||||
? '#E83944'
|
? '#E83944'
|
||||||
@ -313,7 +313,9 @@ export default {
|
|||||||
currentMoney: "",// 实时营收
|
currentMoney: "",// 实时营收
|
||||||
page: "/pages/index/index",
|
page: "/pages/index/index",
|
||||||
otherRealData: [],// 其他的实时数据
|
otherRealData: [],// 其他的实时数据
|
||||||
single: ""
|
single: "",
|
||||||
|
ydModal: false, // 显示驿达百分比的具体值
|
||||||
|
modalRateList: [],// 点击圆环图出现的白色悬浮框的数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -352,12 +354,16 @@ export default {
|
|||||||
// 云南的实时内容 油品、加水、尿素、充电
|
// 云南的实时内容 油品、加水、尿素、充电
|
||||||
this.handleGetYNRealData()
|
this.handleGetYNRealData()
|
||||||
|
|
||||||
|
uni.setStorageSync("lastDay", this.lastDay);
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
// 隐藏掉小程序本身自带的 tabbar 让自定义的tabbar出现
|
||||||
uni.hideTabBar();
|
uni.hideTabBar();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleShowYDModal() {
|
||||||
|
this.ydModal = !this.ydModal;
|
||||||
|
},
|
||||||
goToRobot() {
|
goToRobot() {
|
||||||
this.$util.toNextRoute("navigateTo", `/pages/robot/index`);
|
this.$util.toNextRoute("navigateTo", `/pages/robot/index`);
|
||||||
// this.$util.toNextRoute("navigateTo", `/pages/testPage/index`);
|
// this.$util.toNextRoute("navigateTo", `/pages/testPage/index`);
|
||||||
@ -426,8 +432,12 @@ export default {
|
|||||||
// 切换轮播框的方法
|
// 切换轮播框的方法
|
||||||
async handleChangeSwiper(e) {
|
async handleChangeSwiper(e) {
|
||||||
console.log('e', e);
|
console.log('e', e);
|
||||||
await this.handleGetTopData(e.target.current)
|
|
||||||
this.selectIndex = e.target.current
|
this.selectIndex = e.target.current
|
||||||
|
this.topShowData = null
|
||||||
|
this.moneyRateList = []
|
||||||
|
this.profitSharingList = []
|
||||||
|
this.modalRateList = []
|
||||||
|
await this.handleGetTopData(e.target.current)
|
||||||
},
|
},
|
||||||
// 实时营收
|
// 实时营收
|
||||||
async handleRealRevenue() {
|
async handleRealRevenue() {
|
||||||
@ -437,7 +447,6 @@ export default {
|
|||||||
};
|
};
|
||||||
const res = await request.$webGet("CommercialApi/Revenue/GetCurRevenue", req)
|
const res = await request.$webGet("CommercialApi/Revenue/GetCurRevenue", req)
|
||||||
this.currentMoney = res.Result_Data.CurRevenueAmount.toFixed(2);
|
this.currentMoney = res.Result_Data.CurRevenueAmount.toFixed(2);
|
||||||
console.log('this.currentMoneythis.currentMoneythis.currentMoney', this.currentMoney);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 拿到顶部轮播框的数据
|
// 拿到顶部轮播框的数据
|
||||||
@ -468,6 +477,8 @@ export default {
|
|||||||
|
|
||||||
// 顶部的 自营、外包 的数据
|
// 顶部的 自营、外包 的数据
|
||||||
let shareList = [{}, {}];
|
let shareList = [{}, {}];
|
||||||
|
// 自营、外包 的数据合计
|
||||||
|
let sum = 0
|
||||||
resObj.BusinessTypeList.forEach((item) => {
|
resObj.BusinessTypeList.forEach((item) => {
|
||||||
// 同比
|
// 同比
|
||||||
if (item.data) {
|
if (item.data) {
|
||||||
@ -494,10 +505,26 @@ export default {
|
|||||||
// 分润占比
|
// 分润占比
|
||||||
if (item.name === "自营") {
|
if (item.name === "自营") {
|
||||||
shareList[0] = item;
|
shareList[0] = item;
|
||||||
|
sum += Number(item.value)
|
||||||
} else if (item.name === "外包") {
|
} else if (item.name === "外包") {
|
||||||
shareList[1] = item;
|
shareList[1] = item;
|
||||||
|
sum += Number(item.value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('sum', sum);
|
||||||
|
console.log('shareListshareListshareList', shareList);
|
||||||
|
|
||||||
|
|
||||||
|
let modalListRate = []
|
||||||
|
if (shareList && shareList.length > 0) {
|
||||||
|
shareList.forEach((item) => {
|
||||||
|
modalListRate.push((Number(item.value) / sum * 100).toFixed(2))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.modalRateList = modalListRate
|
||||||
|
|
||||||
|
|
||||||
this.moneyRateList = [
|
this.moneyRateList = [
|
||||||
Number(shareList[0].value),
|
Number(shareList[0].value),
|
||||||
Number(shareList[1].value)
|
Number(shareList[1].value)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user