瀏覽代碼

调整运营分析加载状态

yangzj 2 年之前
父節點
當前提交
b8be34b866

+ 1 - 1
pages/dataOverview/operationalAnalysis/operationalAnalysis.vue

@@ -109,7 +109,7 @@ export default {
       ],
       parkMenuList: [
         {
-          icon: '/static/icons/operationalAnalysisIcons/section-analysis-icon.svg',
+          icon: '/static/icons/operationalAnalysisIcons/parking-lot-analysis-icon.svg',
           name: '停车场分析',
           url: 'pages/operationalAnalysis/parkModel/index',
           params: {

+ 1 - 1
pages/operationalAnalysis/parkModel/components/arrearsAnalysis.vue

@@ -71,13 +71,13 @@ export default {
       this.hasData = false;
       this.chartData.categories = [];
       this.chartData.series = [];
-      this.loading = true;
       this.getParkingData({
         reportType,
         queryDate
       });
     },
     getParkingData({ reportType, queryDate }) {
+      this.loading = true;
       uni.$u.api.operationalAnalysisApi
         .getParkingArrearsDataApi({
           reportType,

+ 4 - 3
pages/operationalAnalysis/parkModel/components/incomeAnalysis.vue

@@ -27,8 +27,8 @@
       :columns="dictList"
       @confirm="incomeTypeConfirm"
       @cancel="incomeTypePicker = false"
-    ></u-picker>
-    <u-loading-page :loading="loading" loading-text="loading..."></u-loading-page>
+    />
+    <u-loading-page :loading="loading" loading-text="loading..." />
   </view>
 </template>
 
@@ -103,10 +103,10 @@ export default {
     getData({ reportType, queryDate }) {
       this.reportType = reportType;
       this.queryDate = queryDate;
-      this.loading = true;
       this.getDict();
     },
     getDict() {
+      this.loading = true;
       uni.$u.api.getDictApi({ type: 'income_type' }).then((res) => {
         if (res.code === 200) {
           let list = res.data.map((item) => {
@@ -124,6 +124,7 @@ export default {
       });
     },
     getIncomeData() {
+      this.loading = true;
       this.chartData.categories = [];
       this.chartData.series[0].data = [];
       this.chartData.series[0].name = this.searchContent.text;

+ 2 - 1
pages/operationalAnalysis/parkModel/components/parkingLotAnalysis.vue

@@ -134,11 +134,11 @@ export default {
     getData({ reportType, queryDate }) {
       this.reportType = reportType;
       this.queryDate = queryDate;
-      this.loading = true;
       this.getRevenueTrendsData();
       this.getRoadTrafficFlowData();
     },
     getRevenueTrendsData() {
+      this.loading = true;
       uni.$u.api.operationalAnalysisApi
         .getParkingLotRevenueAmountApi({
           reportType: this.reportType,
@@ -166,6 +166,7 @@ export default {
         });
     },
     getRoadTrafficFlowData() {
+      this.loading = true;
       uni.$u.api.operationalAnalysisApi
         .getParkingLotTrafficVolumeApi({
           reportType: this.reportType,

+ 1 - 1
pages/operationalAnalysis/parkModel/components/paymentMethod.vue

@@ -43,7 +43,6 @@
 			getData({ reportType, queryDate }) {
 				this.reportType = reportType
 				this.queryDate = queryDate
-				this.loading = true
 				this.getPaymentWaysData()
 			},
 			getDict() {
@@ -54,6 +53,7 @@
 				})
 			},
 			getPaymentWaysData() {
+				this.loading = true
 				uni.$u.api.operationalAnalysisApi.getParkingPaymentWaysDataApi({
 					reportType: this.reportType,
 					queryDate: this.queryDate

+ 5 - 0
pages/operationalAnalysis/parkModel/components/sectionAnalysis.vue

@@ -20,6 +20,7 @@
 				</view>
 			</view>
 		</view>
+		<u-loading-page :loading="loading" loading-text="loading..."></u-loading-page>
 	</view>
 </template>
 
@@ -37,6 +38,7 @@
 		},
 		data() {
 			return {
+				loading: false,
 				opts1: {
 					enableScroll: true,
 					xAxis: {
@@ -110,6 +112,7 @@
 			getData({ reportType, queryDate }) {
 				this.reportType = reportType
 				this.queryDate = queryDate
+				this.loading = true
 				this.getRevenueTrendsData()
 				this.getRoadTrafficFlowData()
 			},
@@ -131,6 +134,7 @@
 							this.revenueTrendsData.series[0].data = []
 						}
 					}
+					this.loading = false
 				})
 			},
 			getRoadTrafficFlowData() {
@@ -151,6 +155,7 @@
 							this.trafficFlowData.series[0].data = []
 						}
 					}
+					this.loading = false
 				})
 			}
 		}

+ 4 - 0
pages/operationalAnalysis/roadModel/components/arrearsAnalysis.vue

@@ -7,6 +7,7 @@
 				<u-empty></u-empty>
 			</view>
 		</view>
+		<u-loading-page :loading="loading" loading-text="loading..."></u-loading-page>
 	</view>
 </template>
 
@@ -55,6 +56,7 @@
 		},
 		data() {
 			return {
+				loading: false,
 				chartData: {
 					categories: [],
 					series: []
@@ -79,6 +81,7 @@
 				reportType,
 				queryDate
 			}) {
+				this.loading = true
 				uni.$u.api.operationalAnalysisApi.getArrearsDataApi({
 					reportType,
 					queryDate
@@ -102,6 +105,7 @@
 							this.hasData = false
 						}
 					}
+					this.loading = false
 				})
 			}
 		}

+ 9 - 10
pages/operationalAnalysis/roadModel/components/incomeAnalysis.vue

@@ -8,10 +8,7 @@
           v-model="searchContent.text"
           suffixIcon="arrow-down"
           :readonly="true"
-        ></u--input>
-      </view>
-      <view class="revenue-search-item">
-        <!-- <u-button text="搜索" type="primary" class="revenue-search-item-btn" @click="searchClick"></u-button> -->
+        />
       </view>
     </view>
     <view class="revenue-line">
@@ -30,7 +27,8 @@
       :columns="dictList"
       @confirm="incomeTypeConfirm"
       @cancel="incomeTypePicker = false"
-    ></u-picker>
+    />
+    <u-loading-page :loading="loading" loading-text="loading..." />
   </view>
 </template>
 
@@ -97,7 +95,8 @@ export default {
       dictList: [[]],
       incomeTypePicker: false,
       reportType: '',
-      queryDate: ''
+      queryDate: '',
+      loading: false
     };
   },
   methods: {
@@ -107,6 +106,7 @@ export default {
       this.getDict();
     },
     getDict() {
+      this.loading = true;
       uni.$u.api.getDictApi({ type: 'income_type' }).then((res) => {
         if (res.code === 200) {
           let list = res.data.map((item) => {
@@ -124,9 +124,10 @@ export default {
       });
     },
     getIncomeData() {
+      this.loading = true;
       this.chartData.categories = [];
       this.chartData.series[0].data = [];
-      this.chartData.series[0].name = this.searchContent.text
+      this.chartData.series[0].name = this.searchContent.text;
       uni.$u.api.operationalAnalysisApi
         .getIncomeDataApi({
           reportType: this.reportType,
@@ -144,15 +145,13 @@ export default {
               });
             }
           }
+          this.loading = false;
         });
     },
     incomeTypeConfirm(e) {
       this.searchContent = e.value[0];
       this.getIncomeData();
       this.incomeTypePicker = false;
-    },
-    searchClick() {
-      // this.getIncomeData()
     }
   }
 };

+ 4 - 0
pages/operationalAnalysis/roadModel/components/paymentMethod.vue

@@ -7,6 +7,7 @@
 				<u-empty></u-empty>
 			</view>
 		</view>
+		<u-loading-page :loading="loading" loading-text="loading..."></u-loading-page>
 	</view>
 </template>
 
@@ -26,6 +27,7 @@
 			return {
 				reportType: '',
 				queryDate: '',
+				loading: false,
 				paySourceList: [],
 				chartData: {
 					series: [{
@@ -51,6 +53,7 @@
 				})
 			},
 			getPaymentWaysData() {
+				this.loading = true
 				uni.$u.api.operationalAnalysisApi.getPaymentWaysDataApi({
 					reportType: this.reportType,
 					queryDate: this.queryDate
@@ -67,6 +70,7 @@
 						} else {
 							this.chartData.series[0].data = []
 						}
+						this.loading = false
 					}
 				})
 			},

+ 4 - 0
pages/operationalAnalysis/roadModel/components/revenueAnalysis.vue

@@ -19,6 +19,7 @@
 				</view>
 			</view>
 		</template>
+		<u-loading-page :loading="loading" loading-text="loading..."></u-loading-page>
 	</view>
 </template>
 
@@ -51,6 +52,7 @@
 					series: []
 				},
 				hasData: false,
+				loading: false,
 				opts: {
 					enableScroll: true,
 					tooltip: {
@@ -99,6 +101,7 @@
 			 * 路段数据
 			 */
 			getRoadData({ reportType, queryDate }) {
+				this.loading = true
 				uni.$u.api.operationalAnalysisApi.getRevenueDataApi({
 					reportType,
 					queryDate
@@ -121,6 +124,7 @@
 						} else {
 							this.hasData = false
 						}
+						this.loading = false
 					}
 				})
 			}

+ 5 - 0
pages/operationalAnalysis/roadModel/components/sectionAnalysis.vue

@@ -20,6 +20,7 @@
 				</view>
 			</view>
 		</view>
+		<u-loading-page :loading="loading" loading-text="loading..."></u-loading-page>
 	</view>
 </template>
 
@@ -37,6 +38,7 @@
 		},
 		data() {
 			return {
+				loading: false,
 				opts1: {
 					enableScroll: true,
 					xAxis: {
@@ -110,6 +112,7 @@
 			getData({ reportType, queryDate }) {
 				this.reportType = reportType
 				this.queryDate = queryDate
+				this.loading = true
 				this.getRevenueTrendsData()
 				this.getRoadTrafficFlowData()
 			},
@@ -131,6 +134,7 @@
 							this.revenueTrendsData.series[0].data = []
 						}
 					}
+					this.loading = false
 				})
 			},
 			getRoadTrafficFlowData() {
@@ -151,6 +155,7 @@
 							this.trafficFlowData.series[0].data = []
 						}
 					}
+					this.loading = false
 				})
 			}
 		}

File diff suppressed because it is too large
+ 14 - 0
static/icons/operationalAnalysisIcons/parking-lot-analysis-icon.svg


Some files were not shown because too many files changed in this diff