Browse Source

报表参数修改

1004749546@qq.com 4 years ago
parent
commit
8741bd6497
1 changed files with 31 additions and 31 deletions
  1. 31 31
      src/views/cleanManage/statisticalReport.vue

+ 31 - 31
src/views/cleanManage/statisticalReport.vue

@@ -56,9 +56,9 @@
       <a-card class="panel " title="各回收物类型清运数据">
         <a-row :gutter="24">
           <a-col :md="24" :lg="24">
-            <div style="display: flex;align-items: center;flex-wrap: wrap;">
+            <div style="display: flex;align-items: center;">
               <div v-for="(item, index) in qyTotalPieData" :key="index" class="module-list" :style="{ background: washTypePieColor[index] }">
-                <div>{{ item.name }}</div>
+                <p>{{ item.name }}</p>
                 <span>{{ item.value }} kg</span>
               </div>
             </div>
@@ -79,7 +79,8 @@
               yUnit="kg"
               :xAxisData="XdaysData1"
               :seriesData="hswTypeBarData"
-              :color="washTypePieColor" />
+              :color="washTypePieColor"
+            />
             <span v-if="isNoData1" class="noData">暂无数据</span>
           </a-col>
           <!-- 变化趋势 -->
@@ -91,7 +92,8 @@
               :xAxisRotate="resize"
               :xAxisData="XdaysData1"
               :seriesData="hswTypeLineData"
-              :color="washTypePieColor" />
+              :color="washTypePieColor"
+            />
             <span v-if="isNoData1" class="noData">暂无数据</span>
           </a-col>
         </a-row>
@@ -187,12 +189,11 @@ export default {
     qyTotalPieData () {
       const list = this.totalGroupRubbiData ? this.totalGroupRubbiData.cleanReportData : []
       const temp = []
-      if (list.length) {
-        this.rubbishType.map(item => {
-          const has = list.find(obj => obj.rubbishType == item.code)
+      if (list) {
+        list.map(item => {
           temp.push({
-            name: item.dispName,
-            value: has ? Number(has.cleanWeight / 1000).toFixed(2) : 0
+            name: item.rubbishTypeDictValue,
+            value: Number(item.cleanWeight / 1000).toFixed(2)
           })
         })
       }
@@ -262,7 +263,7 @@ export default {
       XdaysData: [], // 图表X轴时间集合
       XdaysData1: [],
       // 各类型占比
-      washTypePieColor: ['#ffaa00', '#aaaa00', '#00aaff', '#ff55ff', '#1dc5d4', '#8465c7', '#ff5500', '#00aa00'],
+      washTypePieColor: ['#ffaa00', '#00aa00', '#00aaff', '#ff55ff', '#1dc5d4', '#8465c7', '#ff5500', '#527aff'],
       couponColor: ['#ffaa00', '#ff5500', '#00aaff', '#ff55ff', '#1dc5d4', '#8465c7', '#55aa00', '#527aff'],
       // 清运量趋势
       clearnChartData: [
@@ -278,8 +279,7 @@ export default {
         }
       ],
       hswTypeBarData: [],
-      hswTypeLineData: [],
-      rubbishType: []
+      hswTypeLineData: []
     }
   },
   methods: {
@@ -304,7 +304,6 @@ export default {
         lookupCode: 'RUBBISH_TYPE'
       }).then(res => {
         const list = res.data.list
-        _this.rubbishType = list
         list.map(item => {
           // 柱状图
           _this.hswTypeBarData.push({
@@ -323,7 +322,7 @@ export default {
         })
         setTimeout(() => {
           _this.getGroupDateAndRubbishType(params)
-        }, 100)
+        }, 500)
       })
     },
     // 查询网点列表
@@ -394,20 +393,20 @@ export default {
       this.XdaysData1 = [] // x轴置空
       // 各回收物类型占比
       this.totalGroupRubbiData = {
-        cleanWeight: 0,
-        cleanReportData: []
+		  cleanWeight: 0,
+		  cleanReportData: []
       }
       // 各清运司机占比
       this.totalGroupUserData = {
-        cleanWeight: 0,
-        cleanReportData: []
+		  cleanWeight: 0,
+		  cleanReportData: []
       }
-      // 重置清运量趋势图表数据
+	  // 重置清运量趋势图表数据
       this.clearnChartData[0].data = []
       this.clearnChartData[1].data = []
       // 重置各回收物类型清运数据
-      this.hswTypeBarData.map(item => (item.data = []))
-      this.hswTypeLineData.map(item => (item.data = []))
+      this.hswTypeBarData.map(item => item.data = [])
+      this.hswTypeLineData.map(item => item.data = [])
     },
     // 根据查询条件获取所有数据
     getPageData () {
@@ -415,7 +414,7 @@ export default {
       const params = {
         beginDate: this.beginDate + ' 00:00:00',
         endDate: this.endDate + ' 00:00:00',
-        storeIdList: this.searchForm.storeIdList
+        stationNoList: this.searchForm.storeIdList
       }
       // 各回收物类型占比
       findTotalGroupRubbi(params).then(res => {
@@ -435,8 +434,8 @@ export default {
       findTotalGroupDate(params).then(res => {
         console.log(res, '清运量趋势')
         if (res.status == 200) {
-          const a = res.data.deliveryReportData
-          const b = res.data.cleanReportData
+          const a = res.data.cleanReportData
+          const b = res.data.deliveryReportData
           for (const key in a) {
             const val = Number(a[key] / 1000).toFixed(2)
             this.clearnChartData[0].data.push(val)
@@ -542,10 +541,10 @@ export default {
       border: none;
     }
   }
-  .search-panel /deep/ .ant-select-selection {
-    max-height: 150px;
-    overflow: auto;
-  }
+.search-panel /deep/ .ant-select-selection {
+     max-height: 150px;
+     overflow: auto;
+    }
   .panel {
     margin-top: 10px;
     background-color: #ffffff;
@@ -571,12 +570,13 @@ export default {
 
     .tab-card {
       float: right;
-      margin: 30px 0;
+
       .tab-card-item {
         padding: 5px 10px;
         border: 1px solid #eee;
         cursor: pointer;
       }
+
       .checked-item {
         border-color: #2d8cf0;
         color: #2d8cf0;
@@ -586,13 +586,13 @@ export default {
 
   .module-list {
     color: #ffffff;
+    height: 100px;
     padding: 10px;
-    border-radius: 10px;
+    border-radius: 15px;
     display: flex;
     align-items: center;
     flex-direction: column;
     margin: 5px;
-    min-width: 150px;
     span {
       font-weight: 600;
       font-size: 20px;