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