Przeglądaj źródła

对接后端接口,添加接口传参,界面加载

tianyabing 2 lat temu
rodzic
commit
5308747e41
100 zmienionych plików z 640 dodań i 451 usunięć
  1. 5 0
      src/api/carbon/apiCarbonOverview.js
  2. 12 1
      src/api/life/apiLifePark.js
  3. 8 1
      src/api/life/apiLifeRestaurant.js
  4. 4 0
      src/api/life/apiLifeSupermarket.js
  5. 5 0
      src/api/operation/apiOperationMoney.js
  6. 2 2
      src/components/business/analysis/all/businessEnergyChart.vue
  7. 11 2
      src/components/business/analysis/all/businessEnergyDetail.vue
  8. 3 2
      src/components/business/analysis/all/businessEnergyDistributeChart.vue
  9. 19 15
      src/components/business/analysis/analysis.vue
  10. 3 2
      src/components/business/analysis/cold/BusinessColdChart.vue
  11. 4 1
      src/components/business/analysis/cold/BusinessColdDetail.vue
  12. 3 2
      src/components/business/analysis/electric/BusinessElectricChart.vue
  13. 22 6
      src/components/business/analysis/electric/BusinessElectricDetail.vue
  14. 2 1
      src/components/business/analysis/electric/BusinessElectricDistributeChart.vue
  15. 3 2
      src/components/business/analysis/hot/BusinessHotChart.vue
  16. 11 2
      src/components/business/analysis/hot/BusinessHotDetail.vue
  17. 2 1
      src/components/business/analysis/hot/BusinessHotDistributeChart.vue
  18. 3 2
      src/components/business/analysis/pv/BusinessPvChart.vue
  19. 11 2
      src/components/business/analysis/pv/BusinessPvDetail.vue
  20. 2 2
      src/components/business/analysis/pv/BusinessPvMoneyChart.vue
  21. 3 2
      src/components/business/analysis/water/BusinessWaterChart.vue
  22. 11 2
      src/components/business/analysis/water/BusinessWaterDetail.vue
  23. 2 1
      src/components/business/analysis/water/BusinessWaterDistributeChart.vue
  24. 15 6
      src/components/business/asset/asset.vue
  25. 3 2
      src/components/business/asset/charts/assetMoneyRepairChart.vue
  26. 46 19
      src/components/business/asset/charts/assetRankChart.vue
  27. 2 2
      src/components/business/business.vue
  28. 2 1
      src/components/business/space/charts/spaceCostChart.vue
  29. 9 4
      src/components/business/space/space.vue
  30. 9 1
      src/components/common/query.vue
  31. 5 3
      src/components/dashboard/message/dashboardMessageCard.vue
  32. 0 28
      src/components/dashboard/message/dashboardMsgList.vue
  33. 1 1
      src/components/dashboard/more/carbonOverviewChart.vue
  34. 1 1
      src/components/dashboard/more/floorOverview.vue
  35. 2 1
      src/components/dashboard/more/pv/pvPowerProfitChart.vue
  36. 2 1
      src/components/dashboard/more/pv/pvPowerSummaryChart.vue
  37. 2 1
      src/components/dashboard/portrait/cold/coldTrendChart.vue
  38. 2 1
      src/components/dashboard/portrait/electricity/electricityDistributionChart.vue
  39. 2 1
      src/components/dashboard/portrait/electricity/electricityUseChart.vue
  40. 2 1
      src/components/dashboard/portrait/hot/hotTrendChart.vue
  41. 3 2
      src/components/dashboard/portrait/money/investDistributeChart.vue
  42. 3 2
      src/components/dashboard/portrait/money/investYearChart.vue
  43. 1 1
      src/components/dashboard/portrait/person/personTrendChart.vue
  44. 1 1
      src/components/dashboard/portrait/restaurant/restaurantTrendChart.vue
  45. 1 1
      src/components/dashboard/portrait/supermarket/supermarketTrendChart.vue
  46. 2 1
      src/components/dashboard/portrait/water/waterDistributionChart.vue
  47. 2 1
      src/components/dashboard/portrait/water/waterUseChart.vue
  48. 2 1
      src/components/doubleCarbon/PV/charts/carbonPvEmissionChart.vue
  49. 3 2
      src/components/doubleCarbon/PV/charts/carbonPvQuotaChart.vue
  50. 9 6
      src/components/doubleCarbon/PV/doubleCarbonPv.vue
  51. 2 1
      src/components/doubleCarbon/car/charts/carbonCarEmissionChart.vue
  52. 3 2
      src/components/doubleCarbon/car/charts/carbonCarQuotaChart.vue
  53. 9 6
      src/components/doubleCarbon/car/doubleCarbonCar.vue
  54. 2 2
      src/components/doubleCarbon/doubleCarbon.vue
  55. 2 1
      src/components/doubleCarbon/overview/charts/carbonEmissionChart.vue
  56. 25 21
      src/components/doubleCarbon/overview/charts/carbonOverviewPercent.vue
  57. 3 2
      src/components/doubleCarbon/overview/charts/carbonQuotaChart.vue
  58. 11 6
      src/components/doubleCarbon/overview/doubleCarbonOverview.vue
  59. 2 1
      src/components/doubleCarbon/print/charts/carbonPrintEmissionChart.vue
  60. 3 2
      src/components/doubleCarbon/print/charts/carbonPrintQuotaChart.vue
  61. 9 5
      src/components/doubleCarbon/print/doubleCarbonPrint.vue
  62. 3 2
      src/components/life/healthyHome/components/lifeHealthyHomeChart.vue
  63. 7 4
      src/components/life/healthyHome/lifeHealthyHome.vue
  64. 3 3
      src/components/life/life.vue
  65. 3 2
      src/components/life/parking/components/lifeParkConsumeChart.vue
  66. 10 24
      src/components/life/parking/components/lifeParkDetailTable.vue
  67. 11 36
      src/components/life/parking/components/lifeParkTopTable.vue
  68. 3 2
      src/components/life/parking/components/lifeParkTrendChart.vue
  69. 3 2
      src/components/life/parking/components/lifeParkUnNormalChart.vue
  70. 38 9
      src/components/life/parking/lifeParking.vue
  71. 4 3
      src/components/life/restaurant/components/LifeRestPayChart.vue
  72. 4 3
      src/components/life/restaurant/components/LifeRestProfitChart.vue
  73. 4 3
      src/components/life/restaurant/components/lifeRestConsumeChart.vue
  74. 22 32
      src/components/life/restaurant/components/lifeRestDailyMenu.vue
  75. 4 3
      src/components/life/restaurant/components/lifeRestEatChart.vue
  76. 13 34
      src/components/life/restaurant/components/lifeRestTopMenu.vue
  77. 44 13
      src/components/life/restaurant/lifeRestaurant.vue
  78. 3 2
      src/components/life/supermarket/components/lifeSupermarketAnalysisChart.vue
  79. 10 40
      src/components/life/supermarket/components/lifeSupermarketTopTable.vue
  80. 24 5
      src/components/life/supermarket/lifeSupermarket.vue
  81. 2 2
      src/components/report/report.vue
  82. 2 1
      src/components/scene/meeting/chart/meetingNumCharts.vue
  83. 2 1
      src/components/scene/meeting/chart/meetingPersonCharts.vue
  84. 2 1
      src/components/scene/meeting/chart/meetingPersonDistributeChart.vue
  85. 2 1
      src/components/scene/meeting/chart/meetingTimeCharts.vue
  86. 2 1
      src/components/scene/meeting/chart/meetingTimeDistributeChart.vue
  87. 2 2
      src/components/scene/scene.vue
  88. 3 2
      src/components/security/alarm/manage/securityAlarmManageCategory.vue
  89. 2 1
      src/components/security/alarm/manage/securityAlarmManageDistribute.vue
  90. 2 1
      src/components/security/alarm/manage/securityAlarmManageOnlineTrend.vue
  91. 2 1
      src/components/security/alarm/manage/securityAlarmManageTrend.vue
  92. 13 7
      src/components/security/alarm/securityAlarmManage.vue
  93. 5 1
      src/components/security/person/components/securityPersonExistChart.vue
  94. 6 2
      src/components/security/person/components/securityPersonGuestChart.vue
  95. 5 2
      src/components/security/person/securityPerson.vue
  96. 2 2
      src/components/security/security.vue
  97. 3 2
      src/components/work/bus/component/workBusChart.vue
  98. 2 1
      src/components/work/bus/component/workBusTrend.vue
  99. 9 5
      src/components/work/bus/workBus.vue
  100. 5 1
      src/components/work/meeting/component/workMeetingCostTrend.vue

+ 5 - 0
src/api/carbon/apiCarbonOverview.js

@@ -13,8 +13,13 @@ const getCarbonQuotaComposition = (timeRange) => {
     return Request.post('/carbon/getCarbonQuotaComposition', timeRange)
 }
 
+const getCarbonProportion = (timeRange) => {
+    return Request.post('/carbon/getCarbonProportion', timeRange)
+}
+
 export default {
     getCoreData,
     getCarbonInfo,
     getCarbonQuotaComposition,
+    getCarbonProportion,
 }

+ 12 - 1
src/api/life/apiLifePark.js

@@ -17,9 +17,20 @@ const getOccupationOfParkingSpace = (param) => {
     return Request.post('/parking/getOccupationOfParkingSpace', param)
 }
 
+const getVacantParkingSpace = (param) => {
+    return Request.post('/parking/getVacantParkingSpace', param)
+}
+
+const getParkingSpaceDetails = (param) => {
+    return Request.post('/parking/getParkingSpaceDetails', param)
+}
+
+
 export default {
     getCoreData,
     getTrafficflowSituation,
     getStopViolation,
-    getOccupationOfParkingSpace
+    getOccupationOfParkingSpace,
+    getVacantParkingSpace,
+    getParkingSpaceDetails,
 }

+ 8 - 1
src/api/life/apiLifeRestaurant.js

@@ -20,11 +20,18 @@ const getProfitAnalysis = (param) => {
 const getPaymentAnalysis = (param) => {
     return Request.post('/restaurant/getPaymentAnalysis', param)
 }
-
+const getTodayMenu = (param) => {
+    return Request.post('/restaurant/getTodayMenu', param)
+}
+const getWelcomeDishes = (param) => {
+    return Request.post('/restaurant/getWelcomeDishes', param)
+}
 export default {
     getCoreData,
     getMealAnalysis,
     getConsumptionAnalysis,
     getProfitAnalysis,
     getPaymentAnalysis,
+    getTodayMenu,
+    getWelcomeDishes,
 }

+ 4 - 0
src/api/life/apiLifeSupermarket.js

@@ -8,8 +8,12 @@ const getCoreData = (timeRange) => {
 const getQuotientAnalysiss = (timeRange) => {
     return Request.post('/life_supermarket/getQuotientAnalysiss', timeRange)
 }
+const getProductRanking = (timeRange) => {
+    return Request.post('/life_supermarket/getProductRanking', timeRange)
+}
 
 export default {
     getCoreData,
     getQuotientAnalysiss,
+    getProductRanking,
 }

+ 5 - 0
src/api/operation/apiOperationMoney.js

@@ -9,7 +9,12 @@ const getScrapAndMaintain = (timeRange) => {
     return Request.post('/operation_asset/getScrapAndMaintain', timeRange)
 }
 
+const getAssetShareRanking = (timeRange) => {
+    return Request.post('/operation_asset/getAssetShareRanking', timeRange)
+}
+
 export default {
     getCoreData,
     getScrapAndMaintain,
+    getAssetShareRanking,
 }

+ 2 - 2
src/components/business/analysis/all/businessEnergyChart.vue

@@ -175,7 +175,7 @@ export default {
   },
   props: {
     height: Number,
-    data: Object,
+    queryData: Object,
   },
   mounted() {
     this.$nextTick(()=>{
@@ -190,7 +190,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyTrendsTotal({}).then(res=>{
+      return apiOperationAnalysis.getEnergyTrendsTotal(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['power','water','hot','cold','cpv'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 11 - 2
src/components/business/analysis/all/businessEnergyDetail.vue

@@ -5,6 +5,9 @@ import BusinessEnergySummaryTbl from "@/components/business/analysis/common/busi
 import apiOperationAnalysis from "@/api/operation/apiOperationAnalysis";
 
 export default {
+  props: {
+    queryData: Object
+  },
   components: {
     BusinessEnergyDistributeChart,
     BusinessEnergySummaryTbl
@@ -17,8 +20,14 @@ export default {
     init() {
       this.getData();
     },
+    refresh() {
+      this.$util.asyncPromise(
+          this.getData(),
+          this.$refs.BusinessEnergyDistributeChart.getData()
+      )
+    },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisTotalInfo({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisTotalInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.circleChartArrToObj(res);
         this.tableData[0].num = data['monthlyEnergySaving']
         this.tableData[1].num = data['annualEnergySaving']
@@ -54,7 +63,7 @@ export default {
       </div>
 
       <div class="businessEnergyDetail-chart">
-        <BusinessEnergyDistributeChart :height="370"></BusinessEnergyDistributeChart>
+        <BusinessEnergyDistributeChart ref="BusinessEnergyDistributeChart" :query-data="queryData" :height="370"></BusinessEnergyDistributeChart>
       </div>
     </div>
   </div>

+ 3 - 2
src/components/business/analysis/all/businessEnergyDistributeChart.vue

@@ -54,7 +54,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -68,7 +69,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisTotal({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisTotal(this.queryData).then(res=>{
         let values = []
         let indicatorList = [];
         let max = 0;

+ 19 - 15
src/components/business/analysis/analysis.vue

@@ -92,7 +92,7 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData()
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     handleTypeChange(type) {
       this.coreData = JSON.parse(JSON.stringify(this.oriCoreData));
@@ -131,10 +131,14 @@ export default {
 
     },
     search() {
-
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.anaChart.getData(),
+      )
+      this.$refs.anaDetail.refresh();
     },
     getCoreData() {
-      apiOperationAnalysis.getCoreData(this.queryData).then(res=>{
+      return apiOperationAnalysis.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -165,13 +169,13 @@ export default {
           <div class="ioc-card-content">
             <Card title="能源趋势">
               <div class="analysis-energy-body-left">
-                <BusinessElectricChart :height="450" v-if="queryData.energy=='electric'" ></BusinessElectricChart>
-                <BusinessWaterChart :height="450" v-if="queryData.energy=='water'"></BusinessWaterChart>
+                <BusinessElectricChart ref="anaChart" :query-data="queryData" :height="450" v-if="queryData.energy=='electric'" ></BusinessElectricChart>
+                <BusinessWaterChart ref="anaChart" :query-data="queryData" :height="450" v-if="queryData.energy=='water'"></BusinessWaterChart>
                 <div style="margin-top: 15px">
-                  <BusinessHotChart :height="470" v-if="queryData.energy=='hot'"></BusinessHotChart>
-                  <BusinessColdChart :height="470" v-if="queryData.energy=='cold'"></BusinessColdChart>
-                  <BusinessPvChart :height="470" v-if="queryData.energy=='pv'"></BusinessPvChart>
-                  <BusinessEnergyChart :height="470" v-if="queryData.energy=='0'"></BusinessEnergyChart>
+                  <BusinessHotChart ref="anaChart" :query-data="queryData" :height="470" v-if="queryData.energy=='hot'"></BusinessHotChart>
+                  <BusinessColdChart ref="anaChart" :query-data="queryData" :height="470" v-if="queryData.energy=='cold'"></BusinessColdChart>
+                  <BusinessPvChart ref="anaChart" :query-data="queryData" :height="470" v-if="queryData.energy=='pv'"></BusinessPvChart>
+                  <BusinessEnergyChart ref="anaChart" :query-data="queryData" :height="470" v-if="queryData.energy=='0'"></BusinessEnergyChart>
                 </div>
               </div>
             </Card>
@@ -182,13 +186,13 @@ export default {
           <div class="ioc-card-content">
             <Card title="能源分析">
               <div class="analysis-energy-body-right ">
-                <BusinessElectricDetail v-if="queryData.energy=='electric'"/>
-                <BusinessWaterDetail v-if="queryData.energy=='water'"/>
+                <BusinessElectricDetail ref="anaDetail" :query-data="queryData"  v-if="queryData.energy=='electric'"/>
+                <BusinessWaterDetail ref="anaDetail" :query-data="queryData" v-if="queryData.energy=='water'"/>
                 <div style="margin-top: 15px">
-                  <BusinessHotDetail v-if="queryData.energy=='hot'"/>
-                  <BusinessColdDetail v-if="queryData.energy=='cold'"/>
-                  <BusinessPvDetail v-if="queryData.energy=='pv'"/>
-                  <BusinessEnergyDetail v-if="queryData.energy=='0'"/>
+                  <BusinessHotDetail ref="anaDetail" :query-data="queryData" v-if="queryData.energy=='hot'"/>
+                  <BusinessColdDetail ref="anaDetail" :query-data="queryData" v-if="queryData.energy=='cold'"/>
+                  <BusinessPvDetail ref="anaDetail" :query-data="queryData" v-if="queryData.energy=='pv'"/>
+                  <BusinessEnergyDetail ref="anaDetail" :query-data="queryData" v-if="queryData.energy=='0'"/>
                 </div>
               </div>
             </Card></div>

+ 3 - 2
src/components/business/analysis/cold/BusinessColdChart.vue

@@ -92,7 +92,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -107,7 +108,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyTrendsAnalyseCold({}).then(res=>{
+      return apiOperationAnalysis.getEnergyTrendsAnalyseCold(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['energyConsumption','refrigerationCapacity'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 4 - 1
src/components/business/analysis/cold/BusinessColdDetail.vue

@@ -3,6 +3,9 @@ import {requireImg} from "@/utils/requireImg";
 import apiOperationAnalysis from "@/api/operation/apiOperationAnalysis";
 
 export default {
+  props: {
+    queryData: Object
+  },
   components: {},
   data() {
     return {
@@ -43,7 +46,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisClod({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisClod(this.queryData).then(res=>{
         let data = this.$util.dataUtil.circleChartArrToObj(res);
         this.running = data['function']
         this.total = data['whole']

+ 3 - 2
src/components/business/analysis/electric/BusinessElectricChart.vue

@@ -132,7 +132,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init();
@@ -153,7 +154,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyTrendsAnalysePower({}).then(res=>{
+      return apiOperationAnalysis.getEnergyTrendsAnalysePower(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['tip','seal','flat','valley'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 22 - 6
src/components/business/analysis/electric/BusinessElectricDetail.vue

@@ -5,6 +5,9 @@ import BusinessElectricDistributeChart
 import apiOperationAnalysis from "@/api/operation/apiOperationAnalysis";
 
 export default {
+  props: {
+    queryData: Object
+  },
   components: {
     BusinessElectricDistributeChart
   },
@@ -22,7 +25,7 @@ export default {
           title: '总用电量',
           num: 0,
           unit: '元/人'
-        },{
+        }, {
           icon: 'business/energy/electric.png',
           title: '环比节约',
           num: 0,
@@ -41,6 +44,12 @@ export default {
       this.handleTagSelect('all');
       this.getData();
     },
+    refresh() {
+      this.$util.asyncPromise(
+          this.getData(),
+          this.$refs.BusinessElectricDistributeChart.getData()
+      )
+    },
     handleTagSelect(item) {
       for (const key in this.tagCheck) {
         this.tagCheck[key] = false;
@@ -49,7 +58,7 @@ export default {
       this.tagCheck[item] = true;
     },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisPowerInfo({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisPowerInfo(this.queryData).then(res => {
         let data = this.$util.dataUtil.circleChartArrToObj(res);
         this.tableData[0].num = data['powerConsumptionTotal'];
         this.tableData[1].num = data['energyConservation'];
@@ -65,13 +74,16 @@ export default {
     <div>
 
       <div class="dashboardPortrait-select">
-        <a-checkable-tag v-model="tagCheck.all" color="white" class="dashboardPortrait-select-tag" @change="handleTagSelect('all')">
+        <a-checkable-tag v-model="tagCheck.all" color="white" class="dashboardPortrait-select-tag"
+                         @change="handleTagSelect('all')">
           <span class="dashboardPortrait-select-text">总体用电</span>
         </a-checkable-tag>
-        <a-checkable-tag v-model="tagCheck.F15" color="white" class="dashboardPortrait-select-tag" @change="handleTagSelect('F15')">
+        <a-checkable-tag v-model="tagCheck.F15" color="white" class="dashboardPortrait-select-tag"
+                         @change="handleTagSelect('F15')">
           <span class="dashboardPortrait-select-text">15F</span>
         </a-checkable-tag>
-        <a-checkable-tag v-model="tagCheck.F20" color="white" class="dashboardPortrait-select-tag" @change="handleTagSelect('F20')">
+        <a-checkable-tag v-model="tagCheck.F20" color="white" class="dashboardPortrait-select-tag"
+                         @change="handleTagSelect('F20')">
           <span class="dashboardPortrait-select-text">20F</span>
         </a-checkable-tag>
       </div>
@@ -81,7 +93,8 @@ export default {
       </div>
 
       <div class="businessEnergyDetail-chart">
-        <BusinessElectricDistributeChart :height="300"></BusinessElectricDistributeChart>
+        <BusinessElectricDistributeChart ref="BusinessElectricDistributeChart" :query-data="queryData"
+                                         :height="300"></BusinessElectricDistributeChart>
       </div>
     </div>
   </div>
@@ -91,17 +104,20 @@ export default {
 .businessEnergyDetail {
   width: 100%;
   height: 100%;
+
   .businessEnergyDetail-icon {
     display: inline-block;
     margin-right: 6px;
     vertical-align: middle;
   }
+
   .businessEnergyDetail-num {
     display: inline-block;
     padding: 0 20px;
     color: #4D4D4D;
     background-color: #f7fbff;
   }
+
   .businessEnergyDetail-chart {
     margin-top: 50px;
   }

+ 2 - 1
src/components/business/analysis/electric/BusinessElectricDistributeChart.vue

@@ -36,6 +36,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -50,7 +51,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisPower({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisPower(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option);
       })

+ 3 - 2
src/components/business/analysis/hot/BusinessHotChart.vue

@@ -75,7 +75,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init();
@@ -88,7 +89,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyTrendsAnalyseHot({}).then(res=>{
+      return apiOperationAnalysis.getEnergyTrendsAnalyseHot(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['heatConsumption'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 11 - 2
src/components/business/analysis/hot/BusinessHotDetail.vue

@@ -4,6 +4,9 @@ import BusinessHotDistributeChart from "@/components/business/analysis/hot/Busin
 import apiOperationAnalysis from "@/api/operation/apiOperationAnalysis";
 
 export default {
+  props: {
+    queryData: Object
+  },
   components: {
     BusinessHotDistributeChart
   },
@@ -33,8 +36,14 @@ export default {
     init() {
       this.getData()
     },
+    refresh() {
+      this.$util.asyncPromise(
+          this.getData(),
+          this.$refs.BusinessHotDistributeChart.getData()
+      )
+    },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisHotInfo({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisHotInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.circleChartArrToObj(res);
         this.tableData[0].num = data['heatConsumptionTotal']
         this.tableData[1].num = data['perCapitaCost']
@@ -52,7 +61,7 @@ export default {
       </div>
 
       <div class="businessEnergyDetail-chart">
-        <BusinessHotDistributeChart :height="300"></BusinessHotDistributeChart>
+        <BusinessHotDistributeChart ref="BusinessHotDistributeChart" :query-data="queryData" :height="300"></BusinessHotDistributeChart>
       </div>
     </div>
   </div>

+ 2 - 1
src/components/business/analysis/hot/BusinessHotDistributeChart.vue

@@ -37,6 +37,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -50,7 +51,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisHot({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisHot(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option)
       })

+ 3 - 2
src/components/business/analysis/pv/BusinessPvChart.vue

@@ -92,7 +92,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init();
@@ -105,7 +106,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyTrendsAnalyseCpv({}).then(res=>{
+      return apiOperationAnalysis.getEnergyTrendsAnalyseCpv(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['outputPower','powerGeneration'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 11 - 2
src/components/business/analysis/pv/BusinessPvDetail.vue

@@ -4,6 +4,9 @@ import businessPvMoneyChart from "@/components/business/analysis/pv/BusinessPvMo
 import apiOperationAnalysis from "@/api/operation/apiOperationAnalysis";
 
 export default {
+  props: {
+    queryData: Object
+  },
   components: {
     businessPvMoneyChart
   },
@@ -40,8 +43,14 @@ export default {
     init() {
       this.getData()
     },
+    refresh() {
+      this.$util.asyncPromise(
+          this.getData(),
+          this.$refs.BusinessHotDistributeChart.getData()
+      )
+    },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisCpv({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisCpv(this.queryData).then(res=>{
         let data = this.$util.dataUtil.circleChartArrToObj(res)
         this.running = data['function']
         this.total = data['whole']
@@ -85,7 +94,7 @@ export default {
       </div>
 
       <div class="businessEnergyDetail-chart">
-        <businessPvMoneyChart :height="200" />
+        <businessPvMoneyChart ref="businessPvMoneyChart" :query-data="queryData" :height="200" />
       </div>
     </div>
   </div>

+ 2 - 2
src/components/business/analysis/pv/BusinessPvMoneyChart.vue

@@ -115,7 +115,7 @@ export default {
   },
   props: {
     height: Number,
-    data: Object,
+    queryData: Object,
   },
   mounted() {
     this.$nextTick(()=>{
@@ -130,7 +130,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyTrendsAnalyseCpvInfo({}).then(res=>{
+      return apiOperationAnalysis.getEnergyTrendsAnalyseCpvInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['governmentSubsidies','save'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 3 - 2
src/components/business/analysis/water/BusinessWaterChart.vue

@@ -107,7 +107,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init();
@@ -128,7 +129,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyTrendsAnalyseWater({}).then(res=>{
+      return apiOperationAnalysis.getEnergyTrendsAnalyseWater(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['tapWater','recycledWater'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 11 - 2
src/components/business/analysis/water/BusinessWaterDetail.vue

@@ -4,6 +4,9 @@ import BusinessWaterDistributeChart from "@/components/business/analysis/water/B
 import apiOperationAnalysis from "@/api/operation/apiOperationAnalysis";
 
 export default {
+  props: {
+    queryData: Object
+  },
   components: {
     BusinessWaterDistributeChart
   },
@@ -40,6 +43,12 @@ export default {
       this.handleTagSelect('all');
       this.getData();
     },
+    refresh() {
+      this.$util.asyncPromise(
+          this.getData(),
+          this.$refs.BusinessWaterDistributeChart.getData()
+      )
+    },
     handleTagSelect(item) {
       for (const key in this.tagCheck) {
         this.tagCheck[key] = false;
@@ -48,7 +57,7 @@ export default {
       this.tagCheck[item] = true;
     },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisWaterInfo({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisWaterInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.circleChartArrToObj(res);
         this.tableData[0].num = data['waterConsumptionTotal']
         this.tableData[1].num = data['perCapitaCost']
@@ -80,7 +89,7 @@ export default {
       </div>
 
       <div class="businessEnergyDetail-chart">
-        <BusinessWaterDistributeChart :height="300"></BusinessWaterDistributeChart>
+        <BusinessWaterDistributeChart ref="BusinessWaterDistributeChart" :query-data="queryData" :height="300"></BusinessWaterDistributeChart>
       </div>
     </div>
   </div>

+ 2 - 1
src/components/business/analysis/water/BusinessWaterDistributeChart.vue

@@ -36,6 +36,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -50,7 +51,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationAnalysis.getEnergyAnalysisWater({}).then(res=>{
+      return apiOperationAnalysis.getEnergyAnalysisWater(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option)
       })

+ 15 - 6
src/components/business/asset/asset.vue

@@ -23,8 +23,8 @@
               </div>
 
               <div class="dashboardPortrait-body" style="padding-bottom: 35px">
-                <InvestDistributeChart v-if="tagCheck.invest" :height="450" />
-                <InvestYearChart v-if="tagCheck.year" :height="450" />
+                <InvestDistributeChart ref="investChart" v-if="tagCheck.invest" :height="450" />
+                <InvestYearChart ref="investChart" v-if="tagCheck.year" :height="450" />
               </div>
             </card>
           </div>
@@ -33,13 +33,13 @@
           <div class="right ioc-card-content">
             <card :title="'资产占比排名'">
               <div style="padding: 0 12px">
-                <AssetRankChart :height="250" />
+                <AssetRankChart ref="AssetRankChart" :query-data="queryData" :height="250" />
               </div>
             </card>
           </div>
           <div class="right ioc-card-content" :style="{ marginTop: '10px' }">
             <card :title="'报废与维修'">
-              <AssetMoneyRepairChart :height="220" />
+              <AssetMoneyRepairChart ref="AssetMoneyRepairChart" :query-data="queryData" :height="220" />
             </card>
           </div>
         </a-col>
@@ -135,7 +135,7 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData()
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     handleTagSelect(item) {
       for (const key in this.tagCheck) {
@@ -144,8 +144,17 @@ export default {
       this.currCheck = item;
       this.tagCheck[item] = true;
     },
+    reset() {},
+    search(data) {
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.AssetMoneyRepairChart.getData(),
+          this.$refs.investChart.getData(),
+          this.$refs.AssetRankChart.getData(),
+      )
+    },
     getCoreData() {
-      apiOperationMoney.getCoreData(this.queryData).then(res=>{
+      return apiOperationMoney.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value

+ 3 - 2
src/components/business/asset/charts/assetMoneyRepairChart.vue

@@ -50,7 +50,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.initChart()
@@ -63,7 +64,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationMoney.getScrapAndMaintain({}).then(res=>{
+      return apiOperationMoney.getScrapAndMaintain(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option)
       })

+ 46 - 19
src/components/business/asset/charts/assetRankChart.vue

@@ -7,24 +7,16 @@
 </template>
 
 <script>
+import apiOperationMoney from "@/api/operation/apiOperationMoney";
+
 export default {
   data() {
-    return {}
-  },
-  props: {
-    height: Number,
-  },
-  mounted() {
-    this.$nextTick(()=>{
-      this.init();
-    })
-  },
-  methods: {
-    init() {
-      let chart = this.$echarts.init(this.$refs.myChart);
-      let barName = ["资产1", "资产2", "资产3", "资产4", "资产5", "资产6"];
-      let barData = [90, 80, 70, 60, 60, 60];
-      let options = {
+    //let barName = []
+    //let barData = []
+    let barName = ["资产1", "资产2", "资产3", "资产4", "资产5", "资产6"];
+    let barData = [90, 80, 70, 60, 60, 60];
+    return {
+      option: {
         grid: {
           left: 70,
           right: "15%",
@@ -140,7 +132,6 @@ export default {
             zlevel: 1,
             itemStyle: {
               normal: {
-                //barBorderRadius: 10,
                 color: "#6FA8FE",
               },
             },
@@ -175,9 +166,45 @@ export default {
             },
           },
         ],
-      };
-      chart.setOption(options);
+      }
+    }
+  },
+  props: {
+    height: Number,
+    queryData: Object
+  },
+  mounted() {
+    this.$nextTick(()=>{
+      this.init();
+    })
+  },
+  methods: {
+    init() {
+      let chart = this.$echarts.init(this.$refs.myChart);
+      this.chart = chart;
+      //chart.setOption(this.option)
+      this.getData()
     },
+    getData() {
+      return apiOperationMoney.getAssetShareRanking(this.queryData).then(res=>{
+        let names = [];
+        let values = [];
+        res.forEach(item=>{
+          names.push(item.name);
+          values.push(item.value>100?100:item.value)
+        })
+        this.option.yAxis[0].data = names;
+        this.option.yAxis[1].data = values;
+        this.option.series[0].data = values;
+        this.option.series[1].data = values.map(function (item) {
+          return {
+            realValue: item,
+            value: 100,
+          };
+        })
+        this.chart.setOption(this.option);
+      })
+    }
   }
 }
 </script>

+ 2 - 2
src/components/business/business.vue

@@ -4,9 +4,9 @@
     <div class="pageContainer-body">
       <Breadcrumb></Breadcrumb>
 
-      <div class="pageContainer-content">
+      <a-spin class="pageContainer-content" size="large" tip="加载中..." :spinning="$store.loadingStore().loading">
         <router-view />
-      </div>
+      </a-spin>
     </div>
   </div>
 </template>

+ 2 - 1
src/components/business/space/charts/spaceCostChart.vue

@@ -116,6 +116,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -130,7 +131,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiOperationSpace.getSpaceInfo({}).then(res=>{
+      return apiOperationSpace.getSpaceInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['administrativeArea','leisureArea'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 9 - 4
src/components/business/space/space.vue

@@ -25,7 +25,7 @@
               <span style="color: #B2B2B2">元/m2/人</span>
             </div>
             <div style="padding: 0 15px">
-              <SpaceCostChart :height="540" />
+              <SpaceCostChart ref="SpaceCostChart" :query-data="queryData" :height="540" />
             </div>
           </card>
         </div>
@@ -110,10 +110,15 @@ export default {
   methods: {
     requireImg,
     init() {
-      this.getCoreData()
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     reset() {},
-    search() {},
+    search() {
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.SpaceCostChart.getData(),
+      )
+    },
     tabChange(index) {
       let that = this;
       setTimeout(() => {
@@ -130,7 +135,7 @@ export default {
       }, 100);
     },
     getCoreData() {
-      apiOperationSpace.getCoreData(this.queryData).then(res=>{
+      return apiOperationSpace.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value

+ 9 - 1
src/components/common/query.vue

@@ -31,7 +31,7 @@
       <slot name="extraItem"></slot>
       <a-form-item class="formItem" style="float: right;margin-right: 3%">
         <a-space size="middle">
-          <a-button type="primary" size="small" style="width: 70px;background-color: #B3B3B3;border: none;" @click="reset">重置</a-button>
+          <a-button type="primary" size="small" style="width: 70px;background-color: #B3B3B3;border: none;" @click="formReset">重置</a-button>
           <a-button type="primary" size="small" style="width: 70px;" @click="search(formData)">查询</a-button>
         </a-space>
       </a-form-item>
@@ -70,6 +70,7 @@ export default {
   },
   data() {
     return {
+      oriQueryData: {},
       visible: {
         company: false,
         floor: false,
@@ -158,8 +159,15 @@ export default {
   mounted() {
     if (this.queryData) {
       this.formData = JSON.parse(JSON.stringify(this.queryData))
+      this.oriQueryData = JSON.parse(JSON.stringify(this.queryData));
     }
   },
+  methods: {
+    formReset() {
+      this.formData = JSON.parse(JSON.stringify(this.oriQueryData));
+      this.search();
+    }
+  }
 };
 </script>
 

+ 5 - 3
src/components/dashboard/message/dashboardMessageCard.vue

@@ -3,6 +3,7 @@ import DashboardMsgList from "@/components/dashboard/message/dashboardMsgList.vu
 export default {
   data() {
     return {
+      currKey: '1',
       msgList: [
         {
           isRead: true,
@@ -30,6 +31,7 @@ export default {
   },
   methods: {
     callback(key) {
+      this.currKey = key
     },
     toMsg() {
       this.$router.push({path: '/notice'})
@@ -45,13 +47,13 @@ export default {
         <DashboardMsgList :data="msgList"></DashboardMsgList>
       </a-tab-pane>
       <a-tab-pane key="2" tab="待阅" force-render>
-        <DashboardMsgList></DashboardMsgList>
+        <DashboardMsgList ></DashboardMsgList>
       </a-tab-pane>
       <a-tab-pane key="3" tab="已阅">
-        <DashboardMsgList></DashboardMsgList>
+        <DashboardMsgList ></DashboardMsgList>
       </a-tab-pane>
     </a-tabs>
-    <div @click="toMsg" style="float: right;margin-right: 8px;margin-top: 8px;color: #C6C8CC;font-size: 12px;cursor:pointer;">
+    <div v-if="currKey == '1'"  @click="toMsg" style="float: right;margin-right: 8px;margin-top: 8px;color: #C6C8CC;font-size: 12px;cursor:pointer;">
       查看全部
       <a-icon type="right"></a-icon>
     </div>

+ 0 - 28
src/components/dashboard/message/dashboardMsgList.vue

@@ -31,35 +31,7 @@ export default {
 
           <span class="msg-content-span" >{{ item.msg }}</span>
         </div>
-
-        <!--<a-col :span="6">-->
-        <!--  <span v-if="item.isRead">【已阅】</span>-->
-        <!--  <span v-else>【待阅】</span>-->
-
-        <!--  <span v-if="item.type==1" style="color: #5495F1">①</span>-->
-        <!--  <span v-else-if="item.type==2" style="color: #3BC5B0">②</span>-->
-        <!--  <span v-else-if="item.type==3" style="color: #F1934E">③</span>-->
-        <!--</a-col>-->
-        <!--&lt;!&ndash;<a-col :span="1">&ndash;&gt;-->
-        <!--&lt;!&ndash;  <span v-if="item.type==1" style="color: #5495F1">①</span>&ndash;&gt;-->
-        <!--&lt;!&ndash;  <span v-else-if="item.type==2" style="color: #3BC5B0">②</span>&ndash;&gt;-->
-        <!--&lt;!&ndash;  <span v-else-if="item.type==3" style="color: #F1934E">③</span>&ndash;&gt;-->
-        <!--&lt;!&ndash;</a-col>&ndash;&gt;-->
-        <!--<a-col :span="17">-->
-        <!--  <div class="msg-content" :style="{width: contentWidth}">-->
-
-        <!--</div>-->
-        <!--</a-col>-->
       </a-row>
-      <!--<div class="msg-read">-->
-      <!--  -->
-      <!--</div>-->
-      <!--<div class="msg-type">-->
-      <!--  <span v-if="item.type==1" style="color: #5495F1">①</span>-->
-      <!--  <span v-else-if="item.type==2" style="color: #3BC5B0">②</span>-->
-      <!--  <span v-else-if="item.type==3" style="color: #F1934E">③</span>-->
-      <!--</div>-->
-
     </a-list-item>
   </a-list>
 </template>

+ 1 - 1
src/components/dashboard/more/carbonOverviewChart.vue

@@ -89,7 +89,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiDashboard.getCarbonOverview({}).then(res=>{
+      return apiDashboard.getCarbonOverview(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['carbonQuota','consumed'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.options, data);
       })

+ 1 - 1
src/components/dashboard/more/floorOverview.vue

@@ -18,7 +18,7 @@ export default {
   },
   methods: {
     getData() {
-      apiDashboard.getFloorOverview({}).then(res=>{
+      return apiDashboard.getFloorOverview(this.queryData).then(res=>{
         this.builtArea = res.builtArea
         this.layersInt = res.layersInt
         this.constructionPeriod = res.constructionPeriod

+ 2 - 1
src/components/dashboard/more/pv/pvPowerProfitChart.vue

@@ -38,6 +38,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -52,7 +53,7 @@ export default {
       chart.setOption(this.option)
     },
     getData() {
-      apiDashboard.getPvProfitOverview({}).then(res=>{
+      return apiDashboard.getPvProfitOverview(this.queryData).then(res=>{
         this.option.series[0].data[0].value = res.saving;
         this.option.series[0].data[1].value = res.amountSubsidy;
         this.chart.setOption(this.option);

+ 2 - 1
src/components/dashboard/more/pv/pvPowerSummaryChart.vue

@@ -94,6 +94,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -108,7 +109,7 @@ export default {
       chart.setOption(this.option)
     },
     getData() {
-      apiDashboard.getPvPowerOverview({}).then(res=>{
+      return apiDashboard.getPvPowerOverview(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, this.dataIndexes);
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 2 - 1
src/components/dashboard/portrait/cold/coldTrendChart.vue

@@ -114,6 +114,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -128,7 +129,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiDashboard.getColdTrendData({}).then(res=>{
+      return apiDashboard.getColdTrendData(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['coolingCapacity', 'temperature'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 2 - 1
src/components/dashboard/portrait/electricity/electricityDistributionChart.vue

@@ -36,6 +36,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -50,7 +51,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiDashboard.getElectricityCircleInfoList({}).then(res=>{
+      return apiDashboard.getElectricityCircleInfoList(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option)
       })

+ 2 - 1
src/components/dashboard/portrait/electricity/electricityUseChart.vue

@@ -95,6 +95,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -109,7 +110,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiDashboard.getElectricityTrendData({}).then(res=>{
+      return apiDashboard.getElectricityTrendData(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['powerConsumption'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 2 - 1
src/components/dashboard/portrait/hot/hotTrendChart.vue

@@ -114,6 +114,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -128,7 +129,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiDashboard.getHotTrendData({}).then(res=>{
+      return apiDashboard.getHotTrendData(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['heatConsumption','temperature'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 3 - 2
src/components/dashboard/portrait/money/investDistributeChart.vue

@@ -118,7 +118,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init()
@@ -131,7 +132,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiDashboard.getMoneyDistributionData({}).then(res=>{
+      return apiDashboard.getMoneyDistributionData(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['investment1','investment2','investment3','investment4','rateReturn'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 3 - 2
src/components/dashboard/portrait/money/investYearChart.vue

@@ -85,7 +85,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init()
@@ -98,7 +99,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiDashboard.getMoneyLifeData({}).then(res=>{
+      return apiDashboard.getMoneyLifeData(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['serviceLife','standardLife'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 1 - 1
src/components/dashboard/portrait/person/personTrendChart.vue

@@ -167,7 +167,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiDashboard.getPersonEnterSummary({}).then(res => {
+      return apiDashboard.getPersonEnterSummary(this.queryData).then(res => {
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['visitors','outsourcingStaff','ownEmployees'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 1 - 1
src/components/dashboard/portrait/restaurant/restaurantTrendChart.vue

@@ -158,7 +158,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiDashboard.getRestTrendData({}).then(res=>{
+      return apiDashboard.getRestTrendData(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['consumptionAmount','consumptionOrder'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 1 - 1
src/components/dashboard/portrait/supermarket/supermarketTrendChart.vue

@@ -162,7 +162,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiDashboard.getSuperMarketTrendData({}).then(res=>{
+      return apiDashboard.getSuperMarketTrendData(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['consumptionAmount','consumptionOrder'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 2 - 1
src/components/dashboard/portrait/water/waterDistributionChart.vue

@@ -35,6 +35,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -49,7 +50,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiDashboard.getWaterCircleInfoList({}).then(res=>{
+      return apiDashboard.getWaterCircleInfoList(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option);
       })

+ 2 - 1
src/components/dashboard/portrait/water/waterUseChart.vue

@@ -95,6 +95,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -109,7 +110,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiDashboard.getWaterTrendData({}).then(res=>{
+      return apiDashboard.getWaterTrendData(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['water'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 2 - 1
src/components/doubleCarbon/PV/charts/carbonPvEmissionChart.vue

@@ -177,6 +177,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -191,7 +192,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiCarbonPv.getPhotovoltaicInfo({}).then(res=>{
+      return apiCarbonPv.getPhotovoltaicInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['zhongxun','guihuayuanBJ','zhengfen','guangfen','shangfen','chengfen'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 3 - 2
src/components/doubleCarbon/PV/charts/carbonPvQuotaChart.vue

@@ -68,7 +68,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   components: {
     Card
@@ -84,7 +85,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiCarbonPv.getPhotovoltaicInfoOrder({}).then(res=>{
+      return apiCarbonPv.getPhotovoltaicInfoOrder(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['Photovoltaic'])
         this.option.yAxis.data = data.label;
         let arr = [];

+ 9 - 6
src/components/doubleCarbon/PV/doubleCarbonPv.vue

@@ -68,17 +68,20 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData()
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     reset() {
       console.log('reset')
     },
     search(data) {
-      console.log(data)
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.CarbonPvEmissionChart.getData(),
+          this.$refs.CarbonPvEmissionChart.getData(),
+      )
     },
     getCoreData() {
-      let timeRange = this.$util.dateUtil.getNearlyMonthRange()
-      apiCarbonPv.getCoreData(timeRange).then(res => {
+      return apiCarbonPv.getCoreData(this.queryData).then(res => {
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -120,7 +123,7 @@ export default {
           <div class="ioc-card-content">
             <Card title="光伏减排分析">
               <div class="doubleCarbon-pv-analyse">
-                <CarbonPvEmissionChart :height="450"/>
+                <CarbonPvEmissionChart ref="CarbonPvEmissionChart" :query-data="queryData" :height="450"/>
               </div>
             </Card>
           </div>
@@ -129,7 +132,7 @@ export default {
           <div class="ioc-card-content">
             <Card title="光伏减排排名">
               <div class="doubleCarbon-pv-quota">
-                <CarbonPvQuotaChart :height="450"/>
+                <CarbonPvQuotaChart ref="CarbonPvQuotaChart" :query-data="queryData" :height="450"/>
               </div>
             </Card>
           </div>

+ 2 - 1
src/components/doubleCarbon/car/charts/carbonCarEmissionChart.vue

@@ -176,6 +176,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -190,7 +191,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiCarbonCar.getVehicleInfo({}).then(res=>{
+      return apiCarbonCar.getVehicleInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['zhongxun','guihuayuanBJ','zhengfen','guangfen','shangfen','chengfen'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 3 - 2
src/components/doubleCarbon/car/charts/carbonCarQuotaChart.vue

@@ -67,7 +67,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   components: {
     Card
@@ -83,7 +84,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiCarbonCar.getVehicleInfoOrder({}).then(res=>{
+      return apiCarbonCar.getVehicleInfoOrder(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['Vehicle'])
         this.option.yAxis.data = data.label;
         let arr = [];

+ 9 - 6
src/components/doubleCarbon/car/doubleCarbonCar.vue

@@ -68,16 +68,19 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData()
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     reset() {
-      console.log('reset')
     },
     search(data) {
-      console.log(data)
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.CarbonCarEmissionChart.getData(),
+          this.$refs.CarbonCarQuotaChart.getData(),
+      )
     },
     getCoreData() {
-      apiCarbonCar.getCoreData(this.queryData).then(res => {
+      return apiCarbonCar.getCoreData(this.queryData).then(res => {
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -119,7 +122,7 @@ export default {
           <div class="ioc-card-content">
             <Card title="车辆排放分析">
               <div class="doubleCarbon-car-analyse">
-                <CarbonCarEmissionChart :height="450"/>
+                <CarbonCarEmissionChart ref="CarbonCarEmissionChart" :query-data="queryData" :height="450"/>
               </div>
             </Card>
           </div>
@@ -129,7 +132,7 @@ export default {
           <div class="ioc-card-content">
             <Card title="车辆排放排名">
               <div class="doubleCarbon-car-quota">
-                <CarbonCarQuotaChart :height="450"/>
+                <CarbonCarQuotaChart ref="CarbonCarQuotaChart" :query-data="queryData" :height="450"/>
               </div>
             </Card>
           </div>

+ 2 - 2
src/components/doubleCarbon/doubleCarbon.vue

@@ -4,9 +4,9 @@
     <div class="pageContainer-body">
       <Breadcrumb></Breadcrumb>
 
-      <div class="pageContainer-content" >
+      <a-spin class="pageContainer-content" size="large" tip="加载中..." :spinning="$store.loadingStore().loading">
         <router-view />
-      </div>
+      </a-spin>
     </div>
   </div>
 </template>

+ 2 - 1
src/components/doubleCarbon/overview/charts/carbonEmissionChart.vue

@@ -178,6 +178,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -192,7 +193,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiCarbonOverview.getCarbonInfo({}).then(res=>{
+      return apiCarbonOverview.getCarbonInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['zhongxun','guihuayuanBJ','zhengfen','guangfen','shangfen','chengfen'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 25 - 21
src/components/doubleCarbon/overview/charts/carbonOverviewPercent.vue

@@ -3,22 +3,12 @@
 </template>
 
 <script>
+import apiCarbonOverview from "@/api/carbon/apiCarbonOverview";
+
 export default {
   data() {
     return {
-
-    }
-  },
-  props: {
-    height: Number
-  },
-  mounted() {
-    this.initChart()
-  },
-  methods: {
-    initChart() {
-      let chart = this.$echarts.init(this.$refs.myChart)
-      let option = {
+      option: {
         color: ['#80D4FF', '#A6A6FF','#FFDF80'],
         tooltip: {
           trigger: 'item'
@@ -49,17 +39,31 @@ export default {
               show: true
             },
             data: [
-              { value: 1048, name: '汽油' },
-              { value: 735, name: '柴油' },
-              { value: 580, name: '天然气' },
-              { value: 380, name: '热力' },
-              { value: 666, name: '电力' },
-              { value: 945, name: '其他' },
             ]
           }
         ]
-      };
-      chart.setOption(option);
+      }
+    }
+  },
+  props: {
+    height: Number,
+    queryData: Object
+  },
+  mounted() {
+    this.initChart()
+  },
+  methods: {
+    initChart() {
+      let chart = this.$echarts.init(this.$refs.myChart)
+      this.chart = chart
+      chart.setOption(this.option);
+      this.getData()
+    },
+    getData() {
+      return apiCarbonOverview.getCarbonProportion(this.queryData).then(res=>{
+        this.option.series[0].data = res
+        this.chart.setOption(this.option);
+      })
     }
   }
 }

+ 3 - 2
src/components/doubleCarbon/overview/charts/carbonQuotaChart.vue

@@ -77,7 +77,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   components: {
     Card
@@ -93,7 +94,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiCarbonOverview.getCarbonQuotaComposition({}).then(res=>{
+      return apiCarbonOverview.getCarbonQuotaComposition(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['stock','consume'])
         this.option.yAxis.data = data.label;
         let arr = [];

+ 11 - 6
src/components/doubleCarbon/overview/doubleCarbonOverview.vue

@@ -79,16 +79,21 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData()
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     reset() {
       console.log('reset')
     },
     search(data) {
-      console.log(data)
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.CarbonEmissionCharts.getData(),
+          this.$refs.CarbonQuotaChart.getData(),
+          this.$refs.CarbonOverviewPercent.getData(),
+      )
     },
     getCoreData() {
-      apiCarbonOverview.getCoreData(this.queryData).then(res=>{
+      return apiCarbonOverview.getCoreData(this.queryData).then(res=>{
         this.coreData[0].content = res.list[0].value
         this.coreData[1].num = res.list[1].value
         this.coreData[1].historyNum = res.list[1].compare
@@ -131,7 +136,7 @@ export default {
           <div class="ioc-card-content">
             <Card title="碳排放分析">
               <div class="doubleCarbon-overview-analyse">
-                <CarbonEmissionCharts :height="450" />
+                <CarbonEmissionCharts ref="CarbonEmissionCharts" :query-data="queryData" :height="450" />
               </div>
             </Card>
           </div>
@@ -140,7 +145,7 @@ export default {
           <div class="ioc-card-content">
             <Card title="碳配额构成">
               <div class="doubleCarbon-overview-quota">
-                <CarbonQuotaChart :height="450" />
+                <CarbonQuotaChart ref="CarbonQuotaChart" :query-data="queryData" :height="450" />
               </div>
             </Card>
           </div>
@@ -162,7 +167,7 @@ export default {
           <div class="ioc-card-content">
             <Card title="碳排放占比">
               <div class="doubleCarbon-overview-percent">
-                <CarbonOverviewPercent :height="300" />
+                <CarbonOverviewPercent ref="CarbonOverviewPercent" :query-data="queryData" :height="300" />
               </div>
             </Card>
           </div>

+ 2 - 1
src/components/doubleCarbon/print/charts/carbonPrintEmissionChart.vue

@@ -177,6 +177,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -191,7 +192,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiCarbonPrint.getPrintInfo({}).then(res=>{
+      return apiCarbonPrint.getPrintInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['zhongxun','guihuayuanBJ','zhengfen','guangfen','shangfen','chengfen'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 3 - 2
src/components/doubleCarbon/print/charts/carbonPrintQuotaChart.vue

@@ -68,7 +68,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   components: {
   },
@@ -83,7 +84,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiCarbonPrint.getPrintInfoOrder({}).then(res=>{
+      return apiCarbonPrint.getPrintInfoOrder(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['Print'])
         this.option.yAxis.data = data.label;
         let arr = [];

+ 9 - 5
src/components/doubleCarbon/print/doubleCarbonPrint.vue

@@ -68,16 +68,20 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData()
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     reset() {
       console.log('reset')
     },
     search(data) {
-      console.log(data)
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.CarbonPrintEmissionChart.getData(),
+          this.$refs.CarbonPrintQuotaChart.getData(),
+      )
     },
     getCoreData() {
-      apiCarbonPrint.getCoreData(this.queryData).then(res=>{
+      return apiCarbonPrint.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -118,7 +122,7 @@ export default {
         <a-col :span="18">
           <div class="ioc-card-content"><Card title="文印排放分析">
             <div class="doubleCarbon-print-analyse">
-              <CarbonPrintEmissionChart :height="450" />
+              <CarbonPrintEmissionChart ref="CarbonPrintEmissionChart" :query-data="queryData" :height="450" />
             </div>
           </Card></div>
 
@@ -126,7 +130,7 @@ export default {
         <a-col :span="6">
           <div class="ioc-card-content"><Card title="文印排放排名">
             <div class="doubleCarbon-print-quota">
-              <CarbonPrintQuotaChart :height="450" />
+              <CarbonPrintQuotaChart ref="CarbonPrintQuotaChart" :query-data="queryData" :height="450" />
             </div>
           </Card></div>
 

+ 3 - 2
src/components/life/healthyHome/components/lifeHealthyHomeChart.vue

@@ -98,7 +98,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object,
   },
   mounted() {
     this.init()
@@ -111,7 +112,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiLifeHealthyHome.getHutAnalysis({}).then(res=>{
+      return apiLifeHealthyHome.getHutAnalysis(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['warehousing','physicalExamination'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 7 - 4
src/components/life/healthyHome/lifeHealthyHome.vue

@@ -63,16 +63,19 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData();
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     reset() {
       console.log('reset')
     },
     search(data) {
-      console.log(data)
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.LifeHealthyHomeChart.getData(),
+      )
     },
     getCoreData() {
-      apiLifeHealthyHome.getCoreData(this.queryData).then(res=>{
+      return apiLifeHealthyHome.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -111,7 +114,7 @@ export default {
         <div class="lifeHealthyHome-left">
           <div class="lifeHealthyHome-detail ioc-card-content">
             <Card title="小屋分析">
-              <LifeHealthyHomeChart :height="450"></LifeHealthyHomeChart>
+              <LifeHealthyHomeChart ref="LifeHealthyHomeChart" :query-data="queryData" :height="450"></LifeHealthyHomeChart>
             </Card>
           </div>
         </div>

+ 3 - 3
src/components/life/life.vue

@@ -3,9 +3,9 @@
     <ContainerAside></ContainerAside>
     <div class="pageContainer-body">
       <Breadcrumb></Breadcrumb>
-        <div class="pageContainer-content" >
-          <router-view />
-        </div>
+      <a-spin class="pageContainer-content" size="large" tip="加载中..." :spinning="$store.loadingStore().loading">
+        <router-view />
+      </a-spin>
     </div>
   </div>
 </template>

+ 3 - 2
src/components/life/parking/components/lifeParkConsumeChart.vue

@@ -41,7 +41,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init();
@@ -54,7 +55,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiLifePark.getOccupationOfParkingSpace({}).then(res=>{
+      return apiLifePark.getOccupationOfParkingSpace(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option)
       })

+ 10 - 24
src/components/life/parking/components/lifeParkDetailTable.vue

@@ -16,6 +16,9 @@
 
 <script>
 export default {
+  props: {
+    data: Array
+  },
   data() {
     return {
       columns: [
@@ -26,8 +29,9 @@ export default {
         },
         {
           title: "拥有者",
-          dataIndex: "owner",
-          key: "owner",
+          dataIndex: "people",
+          key: "people",
+          width: 80
         },
         {
           title: "单位",
@@ -36,28 +40,10 @@ export default {
         },
         {
           title: "停车时间",
-          key: "time",
-          dataIndex: "time",
-        },
-      ],
-      data: [
-        {
-          position: "B201",
-          owner: "北京规划院",
-          company: "2h",
-          time: "2min",
-        },
-        {
-          position: "B201",
-          owner: "北京规划院",
-          company: "2h",
-          time: "2min",
-        },
-        {
-          position: "B201",
-          owner: "北京规划院",
-          company: "2h",
-          time: "2min",
+          key: "prkingDuration",
+          dataIndex: "prkingDuration",
+          width: 60,
+          align: 'center'
         },
       ],
     };

+ 11 - 36
src/components/life/parking/components/lifeParkTopTable.vue

@@ -16,6 +16,9 @@
 
 <script>
 export default {
+  props: {
+    tableData: []
+  },
   data() {
     return {
       columns: [
@@ -31,45 +34,17 @@ export default {
         },
         {
           title: "占用最长时间",
-          key: "longTime",
-          dataIndex: "longTime",
+          key: "prkingDurationLong",
+          dataIndex: "prkingDurationLong",
+          width: 80,
+          align: 'center'
         },
         {
           title: "占用最短时间",
-          key: "shortTime",
-          dataIndex: "shortTime",
-        },
-      ],
-      tableData: [
-        {
-          position: "B201",
-          name: "北京规划院",
-          longTime: "2h",
-          shortTime: "2min",
-        },
-        {
-          position: "B201",
-          name: "北京规划院",
-          longTime: "2h",
-          shortTime: "2min",
-        },
-        {
-          position: "B201",
-          name: "北京规划院",
-          longTime: "2h",
-          shortTime: "2min",
-        },
-        {
-          position: "B201",
-          name: "北京规划院",
-          longTime: "2h",
-          shortTime: "2min",
-        },
-        {
-          position: "B201",
-          name: "北京规划院",
-          longTime: "2h",
-          shortTime: "2min",
+          key: "prkingDurationBreak",
+          dataIndex: "prkingDurationBreak",
+          width: 80,
+          align: 'center'
         },
       ],
     };

+ 3 - 2
src/components/life/parking/components/lifeParkTrendChart.vue

@@ -129,7 +129,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init();
@@ -142,7 +143,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiLifePark.getTrafficflowSituation({}).then(res=>{
+      return apiLifePark.getTrafficflowSituation(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['leave','getInto',])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 3 - 2
src/components/life/parking/components/lifeParkUnNormalChart.vue

@@ -46,7 +46,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init();
@@ -59,7 +60,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiLifePark.getStopViolation({}).then(res=>{
+      return apiLifePark.getStopViolation(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option)
       })

+ 38 - 9
src/components/life/parking/lifeParking.vue

@@ -50,7 +50,9 @@ export default {
           showStar: true,
           content: ''
         },
-      ]
+      ],
+      emptyParks: [],
+      parkDetails: [],
     }
   },
   components: {
@@ -70,16 +72,27 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData();
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.getEmptyPark(),
+          this.getParkDetail()
+      )
     },
     reset() {
       console.log('reset')
     },
     search(data) {
-      console.log(data)
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.getEmptyPark(),
+          this.getParkDetail(),
+          this.$refs.LifeParkConsumeChart.getData(),
+          this.$refs.LifeParkTrendChart.getData(),
+          this.$refs.LifeParkUnNormalChart.getData(),
+      )
     },
     getCoreData() {
-      apiLifePark.getCoreData(this.queryData).then(res => {
+      return apiLifePark.getCoreData(this.queryData).then(res => {
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -90,6 +103,16 @@ export default {
         this.coreData[3].historyNum = res.list[3].compare
         this.coreData[4].content = res.worthAttention
       })
+    },
+    getEmptyPark() {
+      return apiLifePark.getVacantParkingSpace(this.queryData).then(res=>{
+        this.emptyParks = res
+      })
+    },
+    getParkDetail() {
+      return apiLifePark.getParkingSpaceDetails(this.queryData).then(res=>{
+        this.parkDetails = res
+      })
     }
   }
 }
@@ -119,35 +142,39 @@ export default {
         <a-col :span="18">
           <div class="lifeParking-trend ioc-card-content">
             <Card title="车流态势">
-              <LifeParkTrendChart :height="350"></LifeParkTrendChart>
+              <LifeParkTrendChart ref="LifeParkTrendChart" :queryData="queryData" :height="350"></LifeParkTrendChart>
             </Card>
           </div>
         </a-col>
         <a-col :span="6">
           <div class="lifeParking-top ioc-card-content">
             <Card title="空置车位">
-              <LifeParkingTopChart></LifeParkingTopChart>
+              <div style="height: 340px;overflow-y: auto">
+                <LifeParkingTopChart :tableData="emptyParks"></LifeParkingTopChart>
+              </div>
             </Card>
           </div>
         </a-col>
         <a-col :span="9">
           <div class="lifeParking-unNormal  ioc-card-content">
             <Card title="违停情况">
-              <LifeParkUnNormalChart :height="390"></LifeParkUnNormalChart>
+              <LifeParkUnNormalChart ref="LifeParkUnNormalChart" :queryData="queryData" :height="390"></LifeParkUnNormalChart>
             </Card>
           </div>
         </a-col>
         <a-col :span="9">
           <div class="lifeParking-consume  ioc-card-content">
             <Card title="占用车位数量">
-              <LifeParkConsumeChart :height="390"></LifeParkConsumeChart>
+              <LifeParkConsumeChart ref="LifeParkConsumeChart" :queryData="queryData" :height="390"></LifeParkConsumeChart>
             </Card>
           </div>
         </a-col>
         <a-col :span="6">
           <div class="lifeParking-detail ioc-card-content">
             <Card title="车位详情">
-              <LifeParkDetailTable></LifeParkDetailTable>
+              <div style="height: 340px;overflow-y: auto">
+                <LifeParkDetailTable :data="parkDetails"></LifeParkDetailTable>
+              </div>
             </Card>
           </div>
         </a-col>
@@ -194,10 +221,12 @@ export default {
 
   .lifeParking-top {
     height: 390px;
+    overflow-y: hidden;
   }
 
   .lifeParking-detail {
     height: 390px;
+    overflow-y: hidden;
   }
 
 }

+ 4 - 3
src/components/life/restaurant/components/LifeRestPayChart.vue

@@ -47,7 +47,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.initChart()
@@ -57,10 +58,10 @@ export default {
       let chart = this.$echarts.init(this.$refs.myChart)
       this.chart = chart;
       chart.setOption(this.option);
-      this.getData();
+      this.$store.loadingStore().loadingWithApi(this.getData())
     },
     getData() {
-      apiLifeRestaurant.getProfitAnalysis({}).then(res=>{
+      return apiLifeRestaurant.getProfitAnalysis(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option)
       })

+ 4 - 3
src/components/life/restaurant/components/LifeRestProfitChart.vue

@@ -46,7 +46,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.initChart()
@@ -56,10 +57,10 @@ export default {
       let chart = this.$echarts.init(this.$refs.myChart)
       this.chart = chart;
       chart.setOption(this.option);
-      this.getData();
+      this.$store.loadingStore().loadingWithApi(this.getData())
     },
     getData() {
-      apiLifeRestaurant.getProfitAnalysis({}).then(res=>{
+      return apiLifeRestaurant.getProfitAnalysis(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option)
       })

+ 4 - 3
src/components/life/restaurant/components/lifeRestConsumeChart.vue

@@ -167,7 +167,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -179,10 +180,10 @@ export default {
       let chart = this.$echarts.init(this.$refs.myChart)
       this.chart = chart;
       chart.setOption(this.option)
-      this.getData()
+      this.$store.loadingStore().loadingWithApi(this.getData())
     },
     getData() {
-      apiLifeRestaurant.getConsumptionAnalysis({}).then(res=>{
+      return apiLifeRestaurant.getConsumptionAnalysis(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['breakfast','lunch','dinner','breakfastPrice','lunchPrice','dinnerPrice'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 22 - 32
src/components/life/restaurant/components/lifeRestDailyMenu.vue

@@ -1,58 +1,48 @@
 <template>
   <a-table
-    :rowKey="
-      (record, index) => {
-        return index;
-      }
-    "
+    :rowKey=" (record, index) => index"
     :columns="columns"
     :show-header="false"
     :data-source="tableData"
     :pagination="false"
     :customRow="customRow"
   >
-    <a slot="name" slot-scope="text">{{ text }}</a>
+    <template #cuisineType="text,record">
+      <span v-if="text==0">热菜</span>
+      <span v-if="text==1">主食</span>
+      <span v-if="text==2">汤</span>
+    </template>
+    <template #price="text, record">
+      <span v-for="(value,key,index) in text" :key="key" >
+        <span v-if="index!=0">/</span>
+        {{ key+''+value }}元
+
+      </span>
+    </template>
   </a-table>
 </template>
 
 <script>
 export default {
+  props: {
+    tableData: Array
+  },
   data() {
     return {
       columns: [
         {
-          dataIndex: "type",
-          key: "type",
+          dataIndex: "cuisineType",
+          key: "cuisineType",
+          scopedSlots: { customRender: 'cuisineType' },
         },
         {
-          dataIndex: "name",
-          key: "name",
+          dataIndex: "cuisineName",
+          key: "cuisineName",
         },
         {
           dataIndex: "price",
           key: "price",
-        },
-      ],
-      tableData: [
-        {
-          type: "热菜",
-          name: "铁锅蘑菇炖柴鸡",
-          price: "16大/12小",
-        },
-        {
-          type: "热菜",
-          name: "铁锅蘑菇炖柴鸡",
-          price: "16大/12小",
-        },
-        {
-          type: "热菜",
-          name: "铁锅蘑菇炖柴鸡",
-          price: "16大/12小",
-        },
-        {
-          type: "主食",
-          name: "米饭",
-          price: "3",
+          scopedSlots: { customRender: 'price' },
         },
       ],
     };

+ 4 - 3
src/components/life/restaurant/components/lifeRestEatChart.vue

@@ -138,7 +138,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object,
   },
   mounted() {
     this.$nextTick(()=>{
@@ -150,10 +151,10 @@ export default {
       let chart = this.$echarts.init(this.$refs.myChart)
       this.chart = chart;
       chart.setOption(this.option)
-      this.getData()
+      this.$store.loadingStore().loadingWithApi(this.getData())
     },
     getData() {
-      apiLifeRestaurant.getMealAnalysis({}).then(res=>{
+      return apiLifeRestaurant.getMealAnalysis(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['passengerFlow','eat','proportion'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 13 - 34
src/components/life/restaurant/components/lifeRestTopMenu.vue

@@ -7,53 +7,32 @@
     :pagination="false"
     :customRow="customRow"
   >
-    <a slot="name" slot-scope="text">{{ text }}</a>
+    <template #cuisineImg="text, record">
+      <a-avatar :size="20" :src="text" />
+    </template>
   </a-table>
 </template>
 
 <script>
 export default {
+  props: {
+    tableData: Array
+  },
   data() {
     return {
       columns: [
         {
-          dataIndex: "img",
-          key: "img",
-        },
-        {
-          dataIndex: "name",
-          key: "name",
-        },
-        {
-          dataIndex: "num",
-          key: "num",
-        },
-      ],
-      tableData: [
-        {
-          img: "",
-          name: "铁锅蘑菇炖柴鸡",
-          num: "200",
-        },
-        {
-          img: "",
-          name: "铁锅蘑菇炖柴鸡",
-          num: "200",
-        },
-        {
-          img: "",
-          name: "铁锅蘑菇炖柴鸡",
-          num: "200",
+          dataIndex: "cuisineImg",
+          key: "cuisineImg",
+          scopedSlots: { customRender: 'cuisineImg' },
         },
         {
-          img: "",
-          name: "铁锅蘑菇炖柴鸡",
-          num: "200",
+          dataIndex: "cuisineName",
+          key: "cuisineName",
         },
         {
-          img: "",
-          name: "铁锅蘑菇炖柴鸡",
-          num: "200",
+          dataIndex: "salesVolume",
+          key: "salesVolume",
         },
       ],
     };

+ 44 - 13
src/components/life/restaurant/lifeRestaurant.vue

@@ -51,7 +51,9 @@ export default {
           showStar: true,
           content: ''
         },
-      ]
+      ],
+      dailyMenu: [],
+      topMenu: [],
     }
   },
   components: {
@@ -72,20 +74,34 @@ export default {
     }
   },
   mounted() {
-    this.init();
+    this.$nextTick(()=>{
+      this.init()
+    })
   },
   methods: {
     init() {
-      this.getCoreData()
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.getDailyMenu(),
+          this.getTopMenu(),
+      )
     },
     reset() {
-      console.log('reset')
     },
     search(data) {
-      console.log(data)
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.getDailyMenu(),
+          this.getTopMenu(),
+          this.$refs.LifeRestEatChart.getData(),
+          this.$refs.LifeRestConsumeChart.getData(),
+          this.$refs.LifeRestPayChart.getData(),
+          this.$refs.LifeRestProfitChart.getData(),
+      );
+      this.$forceUpdate();
     },
     getCoreData() {
-      apiLifeRestaurant.getCoreData(this.queryData).then(res=>{
+      return apiLifeRestaurant.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -94,7 +110,17 @@ export default {
         this.coreData[2].historyNum = res.list[2].compare
         this.coreData[3].num = res.list[3].value
         this.coreData[3].historyNum = res.list[3].compare
-        this.coreData[4].content = res.worthAttention
+        this.coreData[4].content = res.worthAttention;
+      })
+    },
+    getDailyMenu() {
+      return apiLifeRestaurant.getTodayMenu(this.queryData).then(res=>{
+        this.dailyMenu = res;
+      })
+    },
+    getTopMenu() {
+      return apiLifeRestaurant.getWelcomeDishes(this.queryData).then(res=>{
+        this.topMenu = res
       })
     },
   }
@@ -124,22 +150,22 @@ export default {
         <div class="lifeRestaurant-left">
           <div class="lifeRestaurant-eat ioc-card-content">
             <Card title="用餐分析">
-              <LifeRestEatChart :height="320"></LifeRestEatChart>
+              <LifeRestEatChart ref="LifeRestEatChart" :query-data="queryData" :height="320"></LifeRestEatChart>
             </Card>
           </div>
           <div class="lifeRestaurant-consume ioc-card-content">
             <Card title="消费分析">
-              <LifeRestConsumeChart :height="320"></LifeRestConsumeChart>
+              <LifeRestConsumeChart ref="LifeRestConsumeChart" :query-data="queryData" :height="320"></LifeRestConsumeChart>
             </Card>
           </div>
           <div class="lifeRestaurant-profit ">
             <Card title="盈利分析">
-              <LifeRestProfitChart :height="300"></LifeRestProfitChart>
+              <LifeRestProfitChart ref="LifeRestProfitChart" :query-data="queryData" :height="300"></LifeRestProfitChart>
             </Card>
           </div>
           <div class="lifeRestaurant-pay ">
             <Card title="支付分析">
-              <LifeRestPayChart :height="300"></LifeRestPayChart>
+              <LifeRestPayChart ref="LifeRestPayChart" :query-data="queryData" :height="300"></LifeRestPayChart>
             </Card>
           </div>
         </div>
@@ -148,12 +174,17 @@ export default {
         <div class="lifeRestaurant-right">
           <div class="lifeRestaurant-top ioc-card-content">
             <Card title="受欢迎菜品" style="height: 350px ">
-              <LifeRestTopMenu ></LifeRestTopMenu>
+              <div style="height: 300px;overflow-y: auto">
+                <LifeRestTopMenu :table-data="topMenu" ></LifeRestTopMenu>
+              </div>
             </Card>
           </div>
           <div class="lifeRestaurant-cookbook ioc-card-content">
             <Card title="每日菜谱" style="height: 700px">
-              <LifeRestDailyMenu ></LifeRestDailyMenu>
+              <div style="height: 650px;overflow-y: auto">
+                <LifeRestDailyMenu :table-data="dailyMenu"  ></LifeRestDailyMenu>
+              </div>
+
             </Card>
           </div>
         </div>

+ 3 - 2
src/components/life/supermarket/components/lifeSupermarketAnalysisChart.vue

@@ -170,7 +170,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object,
   },
   mounted() {
     this.init()
@@ -183,7 +184,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiLifeSupermarket.getQuotientAnalysiss({}).then(res=>{
+      return apiLifeSupermarket.getQuotientAnalysiss(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['morningTotal','afternoonTotal','morningOrder','afternoonOrder','averageOrder'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 10 - 40
src/components/life/supermarket/components/lifeSupermarketTopTable.vue

@@ -1,21 +1,22 @@
 <template>
   <a-table
-    :rowKey="
-      (record, index) => {
-        return index;
-      }
-    "
+    :rowKey=" (record, index) => index"
     :columns="columns"
     :data-source="tableData"
     :pagination="false"
     :customRow="customRow"
   >
-    <a slot="name" slot-scope="text">{{ text }}</a>
+    <template #img="text,record">
+      <a-avatar :size="30" :src="text" shape="square" />
+    </template>
   </a-table>
 </template>
 
 <script>
 export default {
+  props: {
+    tableData: Array
+  },
   data() {
     return {
       columns: [
@@ -23,6 +24,7 @@ export default {
           title: "图片",
           dataIndex: "img",
           key: "img",
+          scopedSlots: { customRender: 'img' },
         },
         {
           title: "名称",
@@ -31,8 +33,8 @@ export default {
         },
         {
           title: "销量",
-          dataIndex: "num",
-          key: "num",
+          dataIndex: "salesVolume",
+          key: "salesVolume",
         },
         {
           title: "单价",
@@ -40,38 +42,6 @@ export default {
           key: "price",
         },
       ],
-      tableData: [
-        {
-          url: "",
-          name: "商品1",
-          num: "200",
-          price: "20元/个",
-        },
-        {
-          url: "",
-          name: "商品2",
-          num: "200",
-          price: "20元/个",
-        },
-        {
-          url: "",
-          name: "商品3",
-          num: "200",
-          price: "20元/个",
-        },
-        {
-          url: "",
-          name: "商品4",
-          num: "200",
-          price: "20元/个",
-        },
-        {
-          url: "",
-          name: "商品5",
-          num: "200",
-          price: "20元/个",
-        },
-      ],
     };
   },
   methods: {

+ 24 - 5
src/components/life/supermarket/lifeSupermarket.vue

@@ -15,6 +15,7 @@ export default {
         dept: '0',
         timeRange: range
       },
+      productRanks: [],
       coreData: [
         {
           type: 0,
@@ -67,16 +68,24 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData();
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.getProductRanking()
+      )
     },
     reset() {
       console.log('reset')
     },
     search(data) {
-      console.log(data)
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.LifeSupermarketAnalysisChart.getData(),
+          this.getProductRanking(),
+      )
+      this.$forceUpdate()
     },
     getCoreData() {
-      apiLifeSupermarket.getCoreData(this.queryData).then(res=>{
+      return apiLifeSupermarket.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value
@@ -87,6 +96,11 @@ export default {
         this.coreData[3].historyNum = res.list[3].compare
         this.coreData[4].content = res.worthAttention
       })
+    },
+    getProductRanking() {
+      return apiLifeSupermarket.getProductRanking(this.queryData).then(res=>{
+        this.productRanks = res
+      })
     }
   }
 }
@@ -115,7 +129,7 @@ export default {
         <div class="lifeSupermarket-left">
           <div class="lifeSupermarket-detail ioc-card-content">
             <Card title="商超分析">
-              <LifeSupermarketAnalysisChart :height="450"></LifeSupermarketAnalysisChart>
+              <LifeSupermarketAnalysisChart ref="LifeSupermarketAnalysisChart" :query-data="queryData" :height="450"></LifeSupermarketAnalysisChart>
             </Card>
           </div>
         </div>
@@ -124,7 +138,9 @@ export default {
         <div class="lifeSupermarket-right">
           <div class="lifeSupermarket-top ioc-card-content">
             <Card title="商品排行">
-              <LifeSupermarketTopTable style="padding: 0 8px;"></LifeSupermarketTopTable>
+              <div style="height: 440px;overflow-y: auto">
+                <LifeSupermarketTopTable :tableData="productRanks" style="padding: 0 8px;"></LifeSupermarketTopTable>
+              </div>
             </Card>
           </div>
         </div>
@@ -169,4 +185,7 @@ export default {
     }
   }
 }
+.lifeSupermarket-top {
+  overflow-y: hidden;
+}
 </style>

+ 2 - 2
src/components/report/report.vue

@@ -3,9 +3,9 @@
     <ContainerAside></ContainerAside>
     <div class="pageContainer-body">
       <Breadcrumb></Breadcrumb>
-        <div class="pageContainer-content" >
+      <a-spin class="pageContainer-content" size="large" tip="加载中..." :spinning="$store.loadingStore().loading">
           <router-view />
-        </div>
+        </a-spin>
     </div>
   </div>
 </template>

+ 2 - 1
src/components/scene/meeting/chart/meetingNumCharts.vue

@@ -9,7 +9,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init()

+ 2 - 1
src/components/scene/meeting/chart/meetingPersonCharts.vue

@@ -9,7 +9,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init()

+ 2 - 1
src/components/scene/meeting/chart/meetingPersonDistributeChart.vue

@@ -10,7 +10,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.initChart()

+ 2 - 1
src/components/scene/meeting/chart/meetingTimeCharts.vue

@@ -9,7 +9,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init()

+ 2 - 1
src/components/scene/meeting/chart/meetingTimeDistributeChart.vue

@@ -10,7 +10,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.initChart()

+ 2 - 2
src/components/scene/scene.vue

@@ -3,9 +3,9 @@
     <ContainerAside></ContainerAside>
     <div class="pageContainer-body">
       <Breadcrumb></Breadcrumb>
-      <div class="pageContainer-content" >
+      <a-spin class="pageContainer-content" size="large" tip="加载中..." :spinning="$store.loadingStore().loading">
         <router-view />
-      </div>
+      </a-spin>
     </div>
   </div>
 </template>

+ 3 - 2
src/components/security/alarm/manage/securityAlarmManageCategory.vue

@@ -68,7 +68,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init()
@@ -81,7 +82,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiSecurityAlarmMgr.getAlarmClassification({}).then(res=>{
+      return apiSecurityAlarmMgr.getAlarmClassification(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['alarmNumber'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 2 - 1
src/components/security/alarm/manage/securityAlarmManageDistribute.vue

@@ -35,6 +35,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -48,7 +49,7 @@ export default {
       this.getData();
     },
     getData() {
-      apiSecurityAlarmMgr.getFloorAlarmDistribution({}).then(res=>{
+      return apiSecurityAlarmMgr.getFloorAlarmDistribution(this.queryData).then(res=>{
         this.option.series[0].data = res;
         this.chart.setOption(this.option);
       })

+ 2 - 1
src/components/security/alarm/manage/securityAlarmManageOnlineTrend.vue

@@ -118,6 +118,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -132,7 +133,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiSecurityAlarmMgr.getEquipmentOnline({}).then(res=>{
+      return apiSecurityAlarmMgr.getEquipmentOnline(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['camera','waterImmersion'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 2 - 1
src/components/security/alarm/manage/securityAlarmManageTrend.vue

@@ -109,6 +109,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -123,7 +124,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiSecurityAlarmMgr.getAlarmTrend({}).then(res=>{
+      return apiSecurityAlarmMgr.getAlarmTrend(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['commonly','important','urgent'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 13 - 7
src/components/security/alarm/securityAlarmManage.vue

@@ -21,7 +21,7 @@
           <div class="securityAlarmManage-trend">
             <Card title="告警趋势">
               <div style="padding: 0 15px 8px">
-                <SecurityAlarmManageTrend :height="415"></SecurityAlarmManageTrend>
+                <SecurityAlarmManageTrend ref="SecurityAlarmManageTrend" :query-data="queryData" :height="415"></SecurityAlarmManageTrend>
               </div>
             </Card>
           </div>
@@ -29,7 +29,7 @@
         <a-col :span="8">
           <div class="securityAlarmManage-distribute">
             <Card title="楼层告警分布">
-              <SecurityAlarmManageDistribute :height="300"></SecurityAlarmManageDistribute>
+              <SecurityAlarmManageDistribute ref="SecurityAlarmManageDistribute" :query-data="queryData" :height="300"></SecurityAlarmManageDistribute>
             </Card>
           </div>
         </a-col>
@@ -37,7 +37,7 @@
           <div class="securityAlarmManage-onlineTrend">
             <Card title="设备在线趋势">
               <div style="padding: 0 15px">
-                <SecurityAlarmManageOnlineTrend :height="300"></SecurityAlarmManageOnlineTrend>
+                <SecurityAlarmManageOnlineTrend ref="SecurityAlarmManageOnlineTrend" :query-data="queryData" :height="300"></SecurityAlarmManageOnlineTrend>
               </div>
             </Card>
           </div>
@@ -45,7 +45,7 @@
         <a-col :span="8">
           <div class="securityAlarmManage-category">
             <Card title="告警分类">
-              <SecurityAlarmManageCategory :height="300"></SecurityAlarmManageCategory>
+              <SecurityAlarmManageCategory ref="SecurityAlarmManageCategory" :query-data="queryData" :height="300"></SecurityAlarmManageCategory>
             </Card>
           </div>
         </a-col>
@@ -118,16 +118,22 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData()
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     reset() {
 
     },
     search() {
-
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.SecurityAlarmManageCategory.getData(),
+          this.$refs.SecurityAlarmManageDistribute.getData(),
+          this.$refs.SecurityAlarmManageOnlineTrend.getData(),
+          this.$refs.SecurityAlarmManageTrend.getData()
+      )
     },
     getCoreData() {
-      apiSecurityAlarmMgr.getCoreData({}).then(res=>{
+      return apiSecurityAlarmMgr.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value

+ 5 - 1
src/components/security/person/components/securityPersonExistChart.vue

@@ -90,6 +90,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -104,7 +105,10 @@ export default {
       this.getData()
     },
     getData() {
-      apiSecurityPerson.getPopulationPerson({}).then(res=>{
+      let timeRange = {
+        timeRange: this.$util.dateUtil.getNearlyMonthRange()
+      }
+      return apiSecurityPerson.getPopulationPerson(timeRange).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['numberPeople'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 6 - 2
src/components/security/person/components/securityPersonGuestChart.vue

@@ -97,7 +97,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -112,7 +113,10 @@ export default {
       this.getData()
     },
     getData() {
-      apiSecurityPerson.getPassengerFlow({}).then(res=>{
+      let timeRange = {
+        timeRange: this.$util.dateUtil.getNearlyMonthRange()
+      }
+      return apiSecurityPerson.getPassengerFlow(timeRange).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['Freelance','other'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 5 - 2
src/components/security/person/securityPerson.vue

@@ -59,10 +59,13 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData();
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     getCoreData() {
-      apiSecurityPerson.getCoreData({}).then(res=>{
+      let timeRange = {
+        timeRange: this.$util.dateUtil.getNearlyMonthRange()
+      }
+      return apiSecurityPerson.getCoreData(timeRange).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value

+ 2 - 2
src/components/security/security.vue

@@ -3,9 +3,9 @@
     <ContainerAside></ContainerAside>
     <div class="pageContainer-body">
       <Breadcrumb></Breadcrumb>
-      <div class="pageContainer-content" >
+      <a-spin class="pageContainer-content" size="large" tip="加载中..." :spinning="$store.loadingStore().loading">
         <router-view />
-      </div>
+      </a-spin>
     </div>
   </div>
 </template>

+ 3 - 2
src/components/work/bus/component/workBusChart.vue

@@ -102,7 +102,8 @@ export default {
     }
   },
   props: {
-    height: Number
+    height: Number,
+    queryData: Object
   },
   mounted() {
     this.init()
@@ -115,7 +116,7 @@ export default {
       this.getData()
     },
     getData() {
-      ApiWorkBus.getBusInfo({}).then(res=>{
+      return ApiWorkBus.getBusInfo(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['averageDuration','numberTrips'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 2 - 1
src/components/work/bus/component/workBusTrend.vue

@@ -95,6 +95,7 @@ export default {
   },
   props: {
     height: Number,
+    queryData: Object
   },
   mounted() {
     this.$nextTick(()=>{
@@ -109,7 +110,7 @@ export default {
       this.getData()
     },
     getData() {
-      ApiWorkBus.getBusCostTrend({}).then(res=>{
+      return ApiWorkBus.getBusCostTrend(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['cost'])
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)
       })

+ 9 - 5
src/components/work/bus/workBus.vue

@@ -10,7 +10,7 @@
       <a-col :span="18">
         <div class="left ioc-card-content">
           <card :title="'公车管理'">
-            <WorkBusChart :height="450" />
+            <WorkBusChart ref="WorkBusChart" :query-data="queryData" :height="450" />
           </card>
         </div>
       </a-col>
@@ -18,7 +18,7 @@
         <div class="right ioc-card-content">
           <card :title="'成本趋势'">
             <div style="padding: 0 15px">
-              <WorkBusTrend :height="450" />
+              <WorkBusTrend ref="WorkBusTrend" :query-data="queryData" :height="450" />
             </div>
           </card>
         </div>
@@ -103,16 +103,20 @@ export default {
   },
   methods: {
     init() {
-      this.getCoreData();
+      this.$store.loadingStore().loadingWithApi(this.getCoreData(), 2000)
     },
     reset() {
 
     },
     search() {
-
+      this.$util.asyncPromise(
+          this.getCoreData(),
+          this.$refs.WorkBusChart.getData(),
+          this.$refs.WorkBusTrend.getData(),
+      )
     },
     getCoreData() {
-      ApiWorkBus.getCoreData(this.queryData).then(res=>{
+      return ApiWorkBus.getCoreData(this.queryData).then(res=>{
         this.coreData[0].num = res.list[0].value
         this.coreData[0].historyNum = res.list[0].compare
         this.coreData[1].num = res.list[1].value

+ 5 - 1
src/components/work/meeting/component/workMeetingCostTrend.vue

@@ -10,6 +10,10 @@
 import apiWorkMeeting from "@/api/work/apiWorkMeeting";
 
 export default {
+  props: {
+    height: Number,
+    queryData: Object
+  },
   data() {
     let that = this;
     let yData = [
@@ -238,7 +242,7 @@ export default {
       this.getData()
     },
     getData() {
-      apiWorkMeeting.getMeetingCostTrend({}).then(res=>{
+      return apiWorkMeeting.getMeetingCostTrend(this.queryData).then(res=>{
         let data = this.$util.dataUtil.covertDataToEcharts(res, ['shichang','bangong','chanpin','zhihui','yewu','qita'])
         console.log(data)
         this.$util.dataUtil.refreshEchartsData(this.chart, this.option, data)

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików