From 60e85043cf278f79c21859c0f4ac03e69d9570fc Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期三, 25 三月 2026 13:43:23 +0800
Subject: [PATCH] 销售金额柱状图与饼图

---
 src/views/dataAnalysis/components/DataReGasStation.vue |   65 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 1 deletions(-)

diff --git a/src/views/dataAnalysis/components/DataReGasStation.vue b/src/views/dataAnalysis/components/DataReGasStation.vue
index a76e57c..bcf7370 100644
--- a/src/views/dataAnalysis/components/DataReGasStation.vue
+++ b/src/views/dataAnalysis/components/DataReGasStation.vue
@@ -9,6 +9,7 @@
         <a-radio-button :value="3"> 閫氳繃鐜� </a-radio-button>
         <a-radio-button :value="4"> 瀹㈡埛 </a-radio-button>
         <a-radio-button :value="5"> 娴佸け鐜� </a-radio-button>
+        <a-radio-button :value="6"> 閿�鍞噾棰� </a-radio-button>
       </a-radio-group>
     </div>
     <div>
@@ -122,6 +123,13 @@
             <span style="color: #16b777" v-if="isContrast">{{ contrastObj.rebackRate }}%</span>
           </div>
         </div>
+        <div class="fueling-overview-item">
+          <div class="fueling-overview-name">閿�鍞噾棰�(鍏�)</div>
+          <div class="fueling-overview-num">
+            <span style="margin-right: 24px">{{ statisTotalObj.totalAmount }}</span>
+            <span style="color: #16b777" v-if="isContrast">{{ contrastObj.totalAmount }}</span>
+          </div>
+        </div>
       </div>
     </div>
     <div class="oil-freq-compare-ct">
@@ -207,6 +215,26 @@
         </div>
       </div>
     </div>
+    <div>
+      <div class="block-title">娌瑰搧绫诲瀷鍒嗘瀽</div>
+      <div style="display: flex">
+        <div style="width: 70%; display: flex; align-items: center; justify-content: center; color: #999;">
+          娌瑰搧绫诲瀷閿�鍞崰姣�
+        </div>
+        <div style="width: 30%">
+          <a-radio-group v-model="oilTypeSpecies" size="small" @change="oilTypeSpeciesChange">
+            <a-radio-button :value="5"> 娌瑰搧閿�閲� </a-radio-button>
+            <a-radio-button :value="6"> 閿�鍞噾棰� </a-radio-button>
+          </a-radio-group>
+          <DataRePieChart
+            style="width: 100%"
+            domId="oilTypePie"
+            ref="oilTypePieRef"
+            :chartData="oilTypePieData"
+          ></DataRePieChart>
+        </div>
+      </div>
+    </div>
     <TopTenCustomers
       :customerData="customerObj"
       :typeOneTotal="customerOneTotal"
@@ -274,6 +302,7 @@
       description: '鏁版嵁鎶ヨ〃锛堝姞娌圭珯锛�',
       vehicleTypeSpecies: 1,
       fuelingStationSpecies: 2,
+      oilTypeSpecies: 5,
       searchWay: '1',
       isContrast: false,
       activeTime: '',
@@ -288,6 +317,7 @@
       vehicleTypePieData: {}, //杞﹀瀷鍒嗘瀽楗煎浘鏁版嵁
       fuelLevelLineData: {}, //鍔犳补浣嶅垎鏋愭姌绾垮浘鏁版嵁
       fuelLevelPieData: {}, //鍔犳补浣嶅垎鏋愰ゼ鍥炬暟鎹�
+      oilTypePieData: {}, //娌瑰搧绫诲瀷鍒嗘瀽楗煎浘鏁版嵁
       vehicleTypeLineData: {}, //杞﹀瀷鍒嗘瀽鎶樼嚎鍥炬暟鎹�
       trendAnalysisType: 0, //瓒嬪娍鍒嗘瀽閫夋嫨绫诲瀷
       trendAnalysisUnit: 'DAYS', //瓒嬪娍鍒嗘瀽閫夋嫨鏃堕棿
@@ -375,6 +405,18 @@
           { title: '瀹㈡埛绫诲瀷', align: 'center', dataIndex: 'clientName' },
           { title: '绱鍔犳补娆℃暟', align: 'center', dataIndex: 'oilCount' },
           { title: '绱娌瑰搧閿�閲�', align: 'center', dataIndex: 'oilSum' },
+        ]
+      }
+      if (this.trendAnalysisType == 6) {
+        return [
+          commonIndexColumn,
+          { title: '杩涚珯鏃堕棿', align: 'center', dataIndex: 'startTime' },
+          { title: '杞︾墝鍙�', align: 'center', dataIndex: 'licenseNum' },
+          { title: '琛屼负绫诲瀷', align: 'center', dataIndex: 'behaviorText' },
+          { title: '鍔犳补浣�', align: 'center', dataIndex: 'oilPosition' },
+          { title: '娌瑰搧閿�閲�', align: 'center', dataIndex: 'oilVolume' },
+          { title: '閿�鍞噾棰�(鍏�)', align: 'center', dataIndex: 'totalAmount' },
+          { title: '閫氳繃鐜�(鍒�)', align: 'center', dataIndex: 'spandTime' },
         ]
       }
       return [
@@ -473,10 +515,29 @@
       this.fuelingStationSpecies = e.target.value
       this.getFuelingStationPieData()
     },
+    //鑾峰彇娌瑰搧绫诲瀷楗煎浘鏁版嵁
+    getOilTypePieData() {
+      postAction('/jyz/dataTable/statFan', {
+        orgCode: this.selectTreeObj.orgCode,
+        startTime: this.startTime,
+        endTime: this.endTime,
+        type: this.oilTypeSpecies,
+      }).then((res) => {
+        console.log(res)
+        this.oilTypePieData = res.result
+        this.$nextTick(() => {
+          this.$refs.oilTypePieRef.setChart()
+        })
+      })
+    },
+    oilTypeSpeciesChange(e) {
+      this.oilTypeSpecies = e.target.value
+      this.getOilTypePieData()
+    },
     //瓒嬪娍鍒嗘瀽绫诲瀷鍒囨崲
     trendAnalysisTypeChange(e) {
       let val = e.target.value
-      if (val == 0 || val == 2 || val == 3 || val == 5) {
+      if (val == 0 || val == 2 || val == 3 || val == 5 || val == 6) {
         this.trendAnalysisChartShowPercent = true
       } else {
         this.trendAnalysisChartShowPercent = false
@@ -630,6 +691,7 @@
       this.getVehicleTypeLineData()
       this.getVehicleStationPieData()
       this.getFuelingStationPieData()
+      this.getOilTypePieData()
       this.getTrendAnalysis()
       this.getOilFreqCompareData()
     },
@@ -640,6 +702,7 @@
       this.getVehicleTypeLineData()
       this.getVehicleStationPieData()
       this.getFuelingStationPieData()
+      this.getOilTypePieData()
       this.getTrendAnalysis()
     },
   },

--
Gitblit v1.8.0