update
This commit is contained in:
parent
a1dbd94d25
commit
189045fd98
@ -101,7 +101,7 @@
|
|||||||
<view class="yearAccountItem" style="margin-bottom: 24rpx">
|
<view class="yearAccountItem" style="margin-bottom: 24rpx">
|
||||||
<view class="itemTop">
|
<view class="itemTop">
|
||||||
<view class="itemName">{{ (Math.floor(index / 12) + 2024).toString().slice(2, 4)
|
<view class="itemName">{{ (Math.floor(index / 12) + 2024).toString().slice(2, 4)
|
||||||
}}年累计对客销售<span class="unit">/亿元</span></view>
|
}}年累计对客销售<span class="unit">/亿元</span></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemBottom">
|
<view class="itemBottom">
|
||||||
<span class="revenueNum" v-if="selectIndex === index && hasCurrentMonthData">{{
|
<span class="revenueNum" v-if="selectIndex === index && hasCurrentMonthData">{{
|
||||||
@ -169,22 +169,35 @@
|
|||||||
<view class="revenue-amount">{{ currentMoney }}</view>
|
<view class="revenue-amount">{{ currentMoney }}</view>
|
||||||
<view class="revenue-label">元</view>
|
<view class="revenue-label">元</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
|
||||||
|
<view class="revenue-date">{{ currentTotal }} {{ currentTotal ? '万笔' : '' }}</view>
|
||||||
<view class="revenue-date">{{ $util.handleGetMonthDay(nowDay) }}/{{ howDay }}</view>
|
<view class="revenue-date">{{ $util.handleGetMonthDay(nowDay) }}/{{ howDay }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 其他实时数据 -->
|
<!-- 其他实时数据 -->
|
||||||
<view class="data-grid" v-if="otherRealData && otherRealData.length > 0">
|
<view class="data-grid" v-if="otherRealData && otherRealData.length > 0">
|
||||||
<view class="data-item" v-for="(subItem, subIndex) in otherRealData" :key="subIndex">
|
<view class="data-item" v-for="(subItem, subIndex) in otherRealData" :key="subIndex"
|
||||||
<view class="data-icon">
|
:style="{ marginBottom: subIndex <= 1 ? '16rpx' : '' }">
|
||||||
<image class="icon" :src="subItem.icon" />
|
<view class="data-item-top">
|
||||||
</view>
|
<view class="data-icon">
|
||||||
<view class="data-info">
|
<image class="icon" :src="subItem.icon" />
|
||||||
|
</view>
|
||||||
<view class="data-label">{{ subItem.label || "" }}</view>
|
<view class="data-label">{{ subItem.label || "" }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="data-item-data">
|
||||||
<view class="data-value">
|
<view class="data-value">
|
||||||
<span class="value">{{ subItem.value || "" }}</span>
|
<span class="value">{{ subItem.value || "" }}</span>
|
||||||
<span class="unit">/{{ subItem.unit || "" }}</span>
|
<span class="unit">/{{ subItem.unit || "" }}</span>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="data-value">
|
||||||
|
<span class="total">{{ subItem.totalCount || "" }}</span>
|
||||||
|
<span class="total" style="margin-left: 4rpx;">{{
|
||||||
|
subItem.totalCountUnit ? `/${subItem.totalCountUnit}` : "" }}</span>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -252,6 +265,7 @@ export default {
|
|||||||
profitSharingList: [],// 顶部圆环图右边的数据
|
profitSharingList: [],// 顶部圆环图右边的数据
|
||||||
howDay: "", // 星期几
|
howDay: "", // 星期几
|
||||||
currentMoney: "",// 实时营收
|
currentMoney: "",// 实时营收
|
||||||
|
currentTotal: "",// 实时营收了多少笔订单
|
||||||
page: "/pages/index/index",
|
page: "/pages/index/index",
|
||||||
otherRealData: [],// 其他的实时数据
|
otherRealData: [],// 其他的实时数据
|
||||||
single: "",
|
single: "",
|
||||||
@ -572,6 +586,14 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$util.toNextRoute("navigateTo", "/pages/map/index?type=index");
|
this.$util.toNextRoute("navigateTo", "/pages/map/index?type=index");
|
||||||
},
|
},
|
||||||
|
// 处理一下数据 保留两位小数
|
||||||
|
handleProcessNumber(number) {
|
||||||
|
if (number) {
|
||||||
|
return number.toFixed(2)
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
// 拿到云南 油水电等数据
|
// 拿到云南 油水电等数据
|
||||||
async handleGetYNRealData() {
|
async handleGetYNRealData() {
|
||||||
try {
|
try {
|
||||||
@ -588,7 +610,7 @@ export default {
|
|||||||
label: '油品',
|
label: '油品',
|
||||||
icon: 'https://eshangtech.com/cyy_DIB/oilIcon.png',
|
icon: 'https://eshangtech.com/cyy_DIB/oilIcon.png',
|
||||||
valueKey: 'totalCount',
|
valueKey: 'totalCount',
|
||||||
unitKey: 'totalCountUnit'
|
unitKey: 'totalCountUnit',
|
||||||
},
|
},
|
||||||
3000: {
|
3000: {
|
||||||
label: '加水',
|
label: '加水',
|
||||||
@ -605,24 +627,88 @@ export default {
|
|||||||
5000: {
|
5000: {
|
||||||
label: '充电',
|
label: '充电',
|
||||||
icon: 'https://eshangtech.com/cyy_DIB/chargeIcon.png',
|
icon: 'https://eshangtech.com/cyy_DIB/chargeIcon.png',
|
||||||
valueKey: 'totalTicket',
|
valueKey: 'totalAmount',
|
||||||
unitKey: 'totalTicketUnit'
|
unitKey: 'totalAmountUnit',
|
||||||
|
totalKey: "totalTicket",
|
||||||
|
totalKeyUnit: "totalTicketUnit",
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
console.log('listlistlistlist', list);
|
||||||
|
// 去拿油品、加水、尿素的数据
|
||||||
|
const OilData = await request.$apiPost("CommercialApi/BigData/GetEnergyRevenueInfo", {
|
||||||
|
DataType: 2000,
|
||||||
|
StatisticsDate: this.nowDay,
|
||||||
|
ShowWY: true,
|
||||||
|
ShowLargeUnit: true,
|
||||||
|
type: "encryption"
|
||||||
|
});
|
||||||
|
if (OilData.Result_Data) {
|
||||||
|
result.push({
|
||||||
|
label: '油品',
|
||||||
|
value: this.handleProcessNumber(Number(OilData.Result_Data.value)),
|
||||||
|
unit: '万元',
|
||||||
|
icon: 'https://eshangtech.com/cyy_DIB/oilIcon.png',
|
||||||
|
totalCount: this.handleProcessNumber(Number(OilData.Result_Data.data)),
|
||||||
|
totalCountUnit: '吨',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const addWaterData = await request.$apiPost("CommercialApi/BigData/GetEnergyRevenueInfo", {
|
||||||
|
DataType: 3000,
|
||||||
|
StatisticsDate: this.nowDay,
|
||||||
|
ShowWY: true,
|
||||||
|
ShowLargeUnit: true,
|
||||||
|
type: "encryption"
|
||||||
|
});
|
||||||
|
if (addWaterData.Result_Data) {
|
||||||
|
result.push({
|
||||||
|
label: '加水',
|
||||||
|
value: this.handleProcessNumber(Number(addWaterData.Result_Data.value)),
|
||||||
|
unit: '万元',
|
||||||
|
icon: 'https://eshangtech.com/cyy_DIB/addWaterIcon.png',
|
||||||
|
totalCount: this.handleProcessNumber(Number(addWaterData.Result_Data.data)),
|
||||||
|
totalCountUnit: '吨',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const UreaData = await request.$apiPost("CommercialApi/BigData/GetEnergyRevenueInfo", {
|
||||||
|
DataType: 4000,
|
||||||
|
StatisticsDate: this.nowDay,
|
||||||
|
ShowWY: true,
|
||||||
|
ShowLargeUnit: true,
|
||||||
|
type: "encryption"
|
||||||
|
});
|
||||||
|
if (UreaData.Result_Data) {
|
||||||
|
result.push({
|
||||||
|
label: '尿素',
|
||||||
|
value: this.handleProcessNumber(Number(UreaData.Result_Data.value)),
|
||||||
|
unit: '万元',
|
||||||
|
icon: 'https://eshangtech.com/cyy_DIB/chargeIcon.png',
|
||||||
|
totalCount: this.handleProcessNumber(Number(UreaData.Result_Data.data)),
|
||||||
|
totalCountUnit: '吨',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
list.forEach((item) => {
|
list.forEach((item) => {
|
||||||
const config = dataTypeMap[item.dataType];
|
if (item.dataType === 5000) {
|
||||||
if (config) {
|
const config = dataTypeMap[item.dataType];
|
||||||
result.push({
|
if (config) {
|
||||||
label: config.label,
|
result.push({
|
||||||
value: this.$util.fmoney(item[config.valueKey]),
|
label: config.label,
|
||||||
unit: item[config.unitKey],
|
value: this.$util.fmoney(item[config.valueKey]),
|
||||||
icon: config.icon
|
unit: item[config.unitKey],
|
||||||
});
|
icon: config.icon,
|
||||||
|
totalCount: this.$util.fmoney(item[config.totalKey]),
|
||||||
|
totalCountUnit: item[config.totalKeyUnit],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (item.dataType === 1000) {
|
||||||
|
this.currentTotal = this.handleProcessNumber(Number(item.totalTicket))
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
console.log('resultresultresult', result);
|
||||||
this.otherRealData = result;
|
this.otherRealData = result;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取实时数据失败:', error);
|
console.error('获取实时数据失败:', error);
|
||||||
@ -930,6 +1016,7 @@ export default {
|
|||||||
background-image: url("https://eshangtech.com/minTestImg/pageBg.png");
|
background-image: url("https://eshangtech.com/minTestImg/pageBg.png");
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
.topBox {
|
.topBox {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -1318,62 +1405,6 @@ export default {
|
|||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(2, 1fr);
|
|
||||||
gap: 16rpx;
|
|
||||||
margin-bottom: 24rpx;
|
|
||||||
|
|
||||||
.data-item {
|
|
||||||
background: #fff;
|
|
||||||
padding: 24rpx;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
box-shadow: @shadow;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.data-icon {
|
|
||||||
width: 64rpx;
|
|
||||||
height: 64rpx;
|
|
||||||
background: linear-gradient(135deg, #DCE6FF, #EEF3FF);
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
margin-right: 16rpx;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
width: 32rpx;
|
|
||||||
height: 32rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-info {
|
|
||||||
flex: 1;
|
|
||||||
|
|
||||||
.data-label {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: @muted;
|
|
||||||
margin-bottom: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-value {
|
|
||||||
.value {
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #160002;
|
|
||||||
}
|
|
||||||
|
|
||||||
.unit {
|
|
||||||
font-size: 20rpx;
|
|
||||||
color: #A69E9F;
|
|
||||||
margin-left: 4rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.thingBox {
|
.thingBox {
|
||||||
@ -1381,46 +1412,70 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 32rpx;
|
padding: 0 32rpx;
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
|
||||||
.data-grid {
|
.data-grid {
|
||||||
display: grid;
|
// display: grid;
|
||||||
grid-template-columns: repeat(2, 1fr);
|
// grid-template-columns: repeat(2, 1fr);
|
||||||
gap: 16rpx;
|
// gap: 16rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.data-item {
|
.data-item {
|
||||||
|
width: calc(50% - 8rpx);
|
||||||
background: #fff;
|
background: #fff;
|
||||||
padding: 24rpx;
|
padding: 18rpx 18rpx 18rpx 18rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
display: flex;
|
box-sizing: border-box;
|
||||||
align-items: center;
|
// display: flex;
|
||||||
|
// align-items: center;
|
||||||
|
// align-items: flex-start;
|
||||||
|
|
||||||
.data-icon {
|
.data-item-top {
|
||||||
width: 64rpx;
|
width: 100%;
|
||||||
height: 64rpx;
|
|
||||||
background: linear-gradient(135deg, #DCE6FF, #EEF3FF);
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
|
||||||
margin-right: 16rpx;
|
|
||||||
|
|
||||||
.icon {
|
.data-icon {
|
||||||
width: 32rpx;
|
width: 50rpx;
|
||||||
height: 32rpx;
|
height: 50rpx;
|
||||||
|
background: linear-gradient(135deg, #DCE6FF, #EEF3FF);
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-right: 16rpx;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 32rpx;
|
||||||
|
height: 32rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-label {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #160002;
|
||||||
|
font-weight: 600;
|
||||||
|
// margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-info {
|
.data-item-data {
|
||||||
flex: 1;
|
margin-top: 8rpx;
|
||||||
|
// display: flex;
|
||||||
.data-label {
|
// align-items: center;
|
||||||
font-size: 24rpx;
|
// justify-content: space-between;
|
||||||
color: #666;
|
|
||||||
margin-bottom: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.data-value {
|
.data-value {
|
||||||
|
// width: 50%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.value {
|
.value {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@ -1428,9 +1483,16 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.unit {
|
.unit {
|
||||||
font-size: 20rpx;
|
font-size: 24rpx;
|
||||||
color: #A69E9F;
|
color: #160002;
|
||||||
margin-left: 4rpx;
|
margin-left: 4rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #A69E9F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1615,18 +1677,21 @@ export default {
|
|||||||
.funBox {
|
.funBox {
|
||||||
width: calc(100% - 64rpx);
|
width: calc(100% - 64rpx);
|
||||||
margin-left: 32rpx;
|
margin-left: 32rpx;
|
||||||
margin-bottom: calc(100rpx + env(safe-area-inset-bottom));
|
margin-bottom: calc(80px + env(safe-area-inset-bottom));
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 32rpx 24rpx;
|
padding: 32rpx 0;
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
// display: grid;
|
||||||
gap: 24rpx;
|
// grid-template-columns: repeat(4, 1fr);
|
||||||
|
// gap: 24rpx;
|
||||||
box-shadow: @shadow;
|
box-shadow: @shadow;
|
||||||
|
|
||||||
.funItem {
|
.funItem {
|
||||||
|
width: 25%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.funItemContent {
|
.funItemContent {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user