From a5159633752f459746cae8cbfe240649e18a5ebf Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Fri, 26 May 2023 18:57:33 +0800 Subject: [PATCH] optimzie --- public/pages/report/dataReport/dataReport.js | 67 ++++++-------------- 1 file changed, 20 insertions(+), 47 deletions(-) diff --git a/public/pages/report/dataReport/dataReport.js b/public/pages/report/dataReport/dataReport.js index ad6b8ccb2..147f54cff 100644 --- a/public/pages/report/dataReport/dataReport.js +++ b/public/pages/report/dataReport/dataReport.js @@ -5,55 +5,10 @@ vc.extends({ data: { dataReportInfo: { - curDay: 'today', + curDay: 'thirty', _currentTab: 'dataReportEarnedStatistics', fees: [], - orders: [{ - name: '投诉单', - value: '3元', - }, { - name: '未完成投诉单', - value: '1000元', - }, { - name: '完成投诉单', - value: '3元', - }, { - name: '报修单', - value: '3元', - }, { - name: '未完成报修单', - value: '3元', - }, { - name: '完成报修单', - value: '1000元', - }, { - name: '巡检', - value: '3元', - }, { - name: '未完成巡检', - value: '3元', - }, { - name: '完成巡检', - value: '3元', - }, { - name: '保养', - value: '1000元', - }, { - name: '未完成保养', - value: '3元', - }, { - name: '完成保养', - value: '3元', - }, { - name: '业主反馈', - value: '3元', - }, { - name: '充电订单', - value: '3元', - }, { - name: '月卡金额', - value: '3元', - }, ], + orders: [], inouts: [{ name: '进场车辆数', value: '1000元', @@ -157,6 +112,8 @@ $that._initDate(); $that.changeTab($that.dataReportInfo._currentTab); $that._loadDataReportFee(); + $that._loadDataReportOrder(); + }, _initEvent: function() { vc.on('dataReport', 'listOwnerData', function(_info) { @@ -224,6 +181,22 @@ } ); }, + _loadDataReportOrder: function() { + let param = { + params: $that.dataReportInfo.conditions + } + //发送get请求 + vc.http.apiGet('/dataReport.queryOrderDataReport', + param, + function(json, res) { + let _json = JSON.parse(json); + $that.dataReportInfo.orders = _json.data + }, + function(errInfo, error) { + console.log('请求失败处理'); + } + ); + }, changeTab: function(_tab) { $that.dataReportInfo._currentTab = _tab; vc.emit(_tab, 'switch', {