消费报告屏蔽饭友分析,就餐时间趋势

parent 225248bc
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
</view> </view>
</view> </view>
</view> </view>
<view v-show="tabIndex==1&&isOpen" class="school-report-context-card-six"> <!-- <view v-show="tabIndex==1&&isOpen" class="school-report-context-card-six">
<view class="school-report-context-card-title"> <view class="school-report-context-card-title">
<view class="school-report-context-card-title-img"> <view class="school-report-context-card-title-img">
<text>就餐时间趋势</text> <text>就餐时间趋势</text>
...@@ -555,7 +555,7 @@ ...@@ -555,7 +555,7 @@
</view> </view>
<view id="meal-pal-bar"> <view id="meal-pal-bar">
</view> </view>
</view> </view> -->
<!-- 出入校报告 --> <!-- 出入校报告 -->
<view v-show="tabIndex==2" class="attendance-report-context-card-two"> <view v-show="tabIndex==2" class="attendance-report-context-card-two">
<view class="school-report-context-card-title"> <view class="school-report-context-card-title">
...@@ -1199,24 +1199,24 @@ ...@@ -1199,24 +1199,24 @@
this.queryConsumerSummaryAmount(1).then(e => this.piechart()); this.queryConsumerSummaryAmount(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex)); .reportTypeIndex));
this.queryMealPalAnalyse().then(() => this.mealPalBarchart()); // this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
this.queryRepastTimeTrend().then(() => { // this.queryRepastTimeTrend().then(() => {
if (this.mealtypeArr.indexOf(1) != -1) { // if (this.mealtypeArr.indexOf(1) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, // this.breakfastTimeLinechart(this.reportTypeIndex,
'breakfast-time-line', // 'breakfast-time-line',
1); // 1);
} // }
if (this.mealtypeArr.indexOf(2) != -1) { // if (this.mealtypeArr.indexOf(2) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, // this.breakfastTimeLinechart(this.reportTypeIndex,
'lunch-time-line', // 'lunch-time-line',
2); // 2);
} // }
if (this.mealtypeArr.indexOf(3) != -1) { // if (this.mealtypeArr.indexOf(3) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, // this.breakfastTimeLinechart(this.reportTypeIndex,
'dinner-time-line', // 'dinner-time-line',
3); // 3);
} // }
}) // })
} else { } else {
this.tabIndex = 1; this.tabIndex = 1;
this.queryIsDredgeMember(1002, 1).then(() => { this.queryIsDredgeMember(1002, 1).then(() => {
...@@ -1224,25 +1224,25 @@ ...@@ -1224,25 +1224,25 @@
.piechart()); .piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex)); .reportTypeIndex));
this.queryMealPalAnalyse().then(() => this.mealPalBarchart()); // this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
this.queryRepastTimeTrend().then(() => { // this.queryRepastTimeTrend().then(() => {
if (this.mealtypeArr.indexOf(1) != -1) { // if (this.mealtypeArr.indexOf(1) != -1) {
this.breakfastTimeLinechart(this // this.breakfastTimeLinechart(this
.reportTypeIndex, // .reportTypeIndex,
'breakfast-time-line', // 'breakfast-time-line',
1); // 1);
} // }
if (this.mealtypeArr.indexOf(2) != -1) { // if (this.mealtypeArr.indexOf(2) != -1) {
this.breakfastTimeLinechart(this // this.breakfastTimeLinechart(this
.reportTypeIndex, 'lunch-time-line', // .reportTypeIndex, 'lunch-time-line',
2); // 2);
} // }
if (this.mealtypeArr.indexOf(3) != -1) { // if (this.mealtypeArr.indexOf(3) != -1) {
this.breakfastTimeLinechart(this // this.breakfastTimeLinechart(this
.reportTypeIndex, 'dinner-time-line', // .reportTypeIndex, 'dinner-time-line',
3); // 3);
} // }
}) // })
}); });
} }
}) })
...@@ -1256,29 +1256,29 @@ ...@@ -1256,29 +1256,29 @@
this.containerHeight = 4200; this.containerHeight = 4200;
this.queryConsumerSummaryAmount(1).then(e => this.piechart()); this.queryConsumerSummaryAmount(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex)); this.queryDayConsumerTrend(1).then(e => this.linechart(this.reportTypeIndex));
this.queryMealPalAnalyse().then(() => this.mealPalBarchart()); // this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
this.queryRepastTimeTrend().then(() => { // this.queryRepastTimeTrend().then(() => {
if (this.mealtypeArr.indexOf(1) != -1) { // if (this.mealtypeArr.indexOf(1) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, // this.breakfastTimeLinechart(this.reportTypeIndex,
'breakfast-time-line', // 'breakfast-time-line',
1); // 1);
} // }
if (this.mealtypeArr.indexOf(2) != -1) { // if (this.mealtypeArr.indexOf(2) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, 'lunch-time-line', // this.breakfastTimeLinechart(this.reportTypeIndex, 'lunch-time-line',
2); // 2);
} // }
if (this.mealtypeArr.indexOf(3) != -1) { // if (this.mealtypeArr.indexOf(3) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, 'dinner-time-line', // this.breakfastTimeLinechart(this.reportTypeIndex, 'dinner-time-line',
3); // 3);
} // }
}) // })
} else { } else {
this.tabIndex = 1; this.tabIndex = 1;
this.queryIsDredgeMember(1002, 1).then(() => { this.queryIsDredgeMember(1002, 1).then(() => {
this.queryConsumerSummaryAmount(); this.queryConsumerSummaryAmount();
this.queryDayConsumerTrend(); this.queryDayConsumerTrend();
this.queryMealPalAnalyse(); // this.queryMealPalAnalyse();
this.queryRepastTimeTrend(); // this.queryRepastTimeTrend();
}) })
} }
} }
...@@ -1363,29 +1363,29 @@ ...@@ -1363,29 +1363,29 @@
} }
}); });
this.queryConsumerSummaryAmount(); this.queryConsumerSummaryAmount();
this.queryIsDredgeMember(1002,1).then(() => { this.queryIsDredgeMember(1002, 1).then(() => {
if (this.isOpen) { if (this.isOpen) {
this.queryConsumerSummaryAmount(1).then(e => this.piechart()); this.queryConsumerSummaryAmount(1).then(e => this.piechart());
this.queryDayConsumerTrend(1).then(e => this.linechart(this this.queryDayConsumerTrend(1).then(e => this.linechart(this
.reportTypeIndex)); .reportTypeIndex));
this.queryMealPalAnalyse().then(() => this.mealPalBarchart()); // this.queryMealPalAnalyse().then(() => this.mealPalBarchart());
this.queryRepastTimeTrend().then(() => { // this.queryRepastTimeTrend().then(() => {
if (this.mealtypeArr.indexOf(1) != -1) { // if (this.mealtypeArr.indexOf(1) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, // this.breakfastTimeLinechart(this.reportTypeIndex,
'breakfast-time-line', // 'breakfast-time-line',
1); // 1);
} // }
if (this.mealtypeArr.indexOf(2) != -1) { // if (this.mealtypeArr.indexOf(2) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, // this.breakfastTimeLinechart(this.reportTypeIndex,
'lunch-time-line', // 'lunch-time-line',
2); // 2);
} // }
if (this.mealtypeArr.indexOf(3) != -1) { // if (this.mealtypeArr.indexOf(3) != -1) {
this.breakfastTimeLinechart(this.reportTypeIndex, // this.breakfastTimeLinechart(this.reportTypeIndex,
'dinner-time-line', // 'dinner-time-line',
3); // 3);
} // }
}) // })
} else { } else {
this.queryConsumerSummaryAmount(); this.queryConsumerSummaryAmount();
this.queryDayConsumerTrend(); this.queryDayConsumerTrend();
...@@ -2620,9 +2620,9 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -2620,9 +2620,9 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
return return
} }
this.mealPalData = data.obj || []; this.mealPalData = data.obj || [];
this.mealPalArr = this.mealPalData.length?this.mealPalData.map(v => v.mealpalname.slice(0, 1) + this.mealPalArr = this.mealPalData.length ? this.mealPalData.map(v => v.mealpalname.slice(0, 1) +
'**'):[]; '**') : [];
this.mealPalStr = this.mealPalArr.length?this.mealPalArr.join(''):''; this.mealPalStr = this.mealPalArr.length ? this.mealPalArr.join('') : '';
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); console.log(e);
...@@ -2680,12 +2680,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -2680,12 +2680,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
1)[0].cateringList) { 1)[0].cateringList) {
this.mealtypeArr.push(1) this.mealtypeArr.push(1)
} }
if (data.obj && data.obj.filter(e => e.mealtype == 2).length && data.obj.filter(e => e.mealtype == 2)[0] if (data.obj && data.obj.filter(e => e.mealtype == 2).length && data.obj.filter(e => e.mealtype ==
.cateringList) { 2)[0]
.cateringList) {
this.mealtypeArr.push(2) this.mealtypeArr.push(2)
} }
if (data.obj && data.obj.filter(e => e.mealtype == 3).length && data.obj.filter(e => e.mealtype == 3)[0] if (data.obj && data.obj.filter(e => e.mealtype == 3).length && data.obj.filter(e => e.mealtype ==
.cateringList) { 3)[0]
.cateringList) {
this.mealtypeArr.push(3) this.mealtypeArr.push(3)
} }
} catch (e) { } catch (e) {
......
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