Commit 45b94d04 authored by aifen@azjy1.onexmail.com's avatar aifen@azjy1.onexmail.com

Merge branch 'develop' into uat

parents a3668b22 9ba13f2c
......@@ -318,8 +318,12 @@
:key="index" class="consumer-details-sum">
<view v-for="(e,i) in item.consumerDetailsSumArr" class="consumer-details-sum-item"
:key="i" :class="i?'':'consumer-details-sum-type'">
<text :style="{color:item.calculateType=='较上月'?trendColorList[i]:''}"> {{e}} </text>
<template v-if="i ==0"><span class="type-unit">{{unitTypeList[index]}}</span></template>
<text :style="{color:item.calculateType=='较上'?trendColorList[i]:''}"> {{e}} </text>
<template v-if="item.calculateType=='较上'&&i == 0">
<span>{{['',''][reportTypeIndex]}}</span>
</template>
<template v-if="i == 0"><span
class="type-unit">{{unitTypeList[index]}}</span></template>
</view>
</view>
</view>
......@@ -1362,57 +1366,34 @@
this.memberInfo.invalidDateStr = '2022年6月30日';
this.memberInfo.differDay = dayjs('2022/06/30').diff(dayjs(), 'day') + 1;
this.containerHeight = 4200;
this.queryConsumerSummaryAmount(1).then(e => this.piechart());
this.queryLivingCostsAmount();
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
// this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
// this.queryRepastTimeTrend().then(() => {
// if (this.mealtypeArr.indexOf(1) != -1) {
// this.breakfastTimeLinechart(this.reportTypeIndex,
// 'breakfast-time-line',
// 1);
// }
// if (this.mealtypeArr.indexOf(2) != -1) {
// this.breakfastTimeLinechart(this.reportTypeIndex,
// 'lunch-time-line',
// 2);
// }
// if (this.mealtypeArr.indexOf(3) != -1) {
// this.breakfastTimeLinechart(this.reportTypeIndex,
// 'dinner-time-line',
// 3);
// }
// })
} else {
this.tabIndex = 1;
this.queryIsDredgeMember(1002, 1).then(() => {
this.queryConsumerSummaryAmount(1).then(e => this
.piechart());
this.queryLivingCostsAmount();
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
// this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
// this.queryRepastTimeTrend().then(() => {
// if (this.mealtypeArr.indexOf(1) != -1) {
// this.breakfastTimeLinechart(this
// .reportTypeIndex,
// 'breakfast-time-line',
// 1);
// }
// if (this.mealtypeArr.indexOf(2) != -1) {
// this.breakfastTimeLinechart(this
// .reportTypeIndex, 'lunch-time-line',
// 2);
// }
// if (this.mealtypeArr.indexOf(3) != -1) {
// this.breakfastTimeLinechart(this
// .reportTypeIndex, 'dinner-time-line',
// 3);
// }
// })
});
this.queryIsDredgeMember(1002, 1)
}
// this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
// this.queryRepastTimeTrend().then(() => {
// if (this.mealtypeArr.indexOf(1) != -1) {
// this.breakfastTimeLinechart(this
// .reportTypeIndex,
// 'breakfast-time-line',
// 1);
// }
// if (this.mealtypeArr.indexOf(2) != -1) {
// this.breakfastTimeLinechart(this
// .reportTypeIndex, 'lunch-time-line',
// 2);
// }
// if (this.mealtypeArr.indexOf(3) != -1) {
// this.breakfastTimeLinechart(this
// .reportTypeIndex, 'dinner-time-line',
// 3);
// }
// })
this.queryConsumerSummaryAmount(1).then(e => this
.piechart());
this.queryLivingCostsAmount();
this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex));
this.queryNotRepastDetails(this.dataRangeArr[this.dataRangeIndex].startDate,
this.dataRangeArr[this
.dataRangeIndex].endDate).then(() => {
......@@ -1458,7 +1439,6 @@
this.tabIndex = 1;
this.queryIsDredgeMember(1002, 1).then(() => {
this.queryConsumerSummaryAmount();
this.queryLivingCostsAmount();
this.queryDayConsumerTrend();
// this.queryMealPalAnalyse();
// this.queryRepastTimeTrend();
......@@ -2582,7 +2562,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
userId: getQueryParams('userId'),
startDate,
endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
timeType: this.reportTypeIndex == 0 ? 2 : 1
})
if (data.code == 200) {
if (data.obj && data.obj.campusConsumerDetailList && Array.isArray(data.obj
......@@ -2599,11 +2579,11 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
.sortCalculateType);
let tmpColorList = [''];
this.campusConsumerDetailObj.campusConsumerDetailCalculateList.forEach((e, index) => {
e.calculateType = ['就餐', '未就餐', '均值', '较上', '总计'][e
e.calculateType = ['就餐', '未就餐', '均值', '较上', '总计'][e
.calculateType -
1
];
if (e.calculateType == '较上') {
if (e.calculateType == '较上') {
for (let item in e) {
if (item != 'calculateType') {
if (e[item] > 0) {
......@@ -2616,7 +2596,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
e[item] = e[item] > 0 ? e[item] +
'%↑' : (e[item] < 0 ? e[item].toString().slice(1) + '%↓' :
0);
'-');
}
}
}
......@@ -2660,17 +2640,29 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
this.campusConsumerDetailObj.campusConsumerDetailList = JSON.parse(JSON.stringify(
tmpDetailList));
let tmpCalculatList = [];
let calculateTypeList = ['就餐', '未就餐', '均值', '较上', '总计'];
let calculateTypeList = ['就餐', '未就餐', '均值', '较上', '总计'];
calculateTypeList.forEach(e => {
tmpCalculatList.push({
"calculateType": e,
"breakfastAmount": 0,
"lunchAmount": 0,
"supperAmount": 0,
"otherAmount": 0,
"totalAmount": 0,
"consumerDetailsSumArr": [e, 0, 0, 0, 0, 0]
})
if (e == '较上') {
tmpCalculatList.push({
"calculateType": e,
"breakfastAmount": '-',
"lunchAmount": '-',
"supperAmount": '-',
"otherAmount": '-',
"totalAmount": '-',
"consumerDetailsSumArr": [e, '-', '-', '-', '-', '-']
})
} else {
tmpCalculatList.push({
"calculateType": e,
"breakfastAmount": 0,
"lunchAmount": 0,
"supperAmount": 0,
"otherAmount": 0,
"totalAmount": 0,
"consumerDetailsSumArr": [e, 0, 0, 0, 0, 0]
})
}
});
this.campusConsumerDetailObj.campusConsumerDetailCalculateList = JSON.parse(JSON.stringify(
tmpCalculatList));
......@@ -2710,7 +2702,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
userId: getQueryParams('userId'),
startDate,
endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
timeType: this.reportTypeIndex == 0 ? 2 : 1
})
if (data.code != 200) {
uni.showToast({
......@@ -2801,7 +2793,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
userId: getQueryParams('userId'),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
timeType: this.reportTypeIndex == 0 ? 2 : 1
})
if (data.code != 200) {
uni.showToast({
......@@ -2884,7 +2876,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
userId: getQueryParams('userId'),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
timeType: this.reportTypeIndex == 0 ? 2 : 1
})
if (data.code != 200) {
uni.showToast({
......@@ -2961,7 +2953,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
startDate: this.dataRangeArr[this.dataRangeIndex]
.startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
timeType: this.reportTypeIndex == 0 ? 2 : 1
})
if (data.code != 200) {
uni.showToast({
......@@ -3013,7 +3005,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
studentId: getQueryParams('userId'),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
timeType: this.reportTypeIndex == 0 ? 2 : 1
})
if (data.code != 200) {
uni.showToast({
......@@ -3072,7 +3064,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
userId: getQueryParams('userId'),
startDate: this.dataRangeArr[this.dataRangeIndex].startDate,
endDate: this.dataRangeArr[this.dataRangeIndex].endDate,
timeType: this.dataRangeIndex == 0 ? 2 : 1
timeType: this.reportTypeIndex == 0 ? 2 : 1
})
if (data.code != 200) {
uni.showToast({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment