From 73e0b3791990bd60c06c2c0388aae9f9faf538a6 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期三, 25 三月 2026 09:16:50 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/show-demo' into show_demo

---
 src/views/dataAnalysis/components/DataReGasStation.vue |  170 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 166 insertions(+), 4 deletions(-)

diff --git a/src/views/dataAnalysis/components/DataReGasStation.vue b/src/views/dataAnalysis/components/DataReGasStation.vue
index 4056c6a..a76e57c 100644
--- a/src/views/dataAnalysis/components/DataReGasStation.vue
+++ b/src/views/dataAnalysis/components/DataReGasStation.vue
@@ -1,5 +1,5 @@
 <template>
-  <div style="margin-right: 30px" class="data-reMechanism">
+  <div style="margin-right: 30px" class="data-reMechanism" :class="{ 'trend-detail-open': trendDetailVisible }">
     <div style="display: flex; align-items: center">
       <div style="margin-right:12px;font-size:16px;font-weight:bold">瓒嬪娍鍒嗘瀽</div>
       <a-radio-group v-model="trendAnalysisType" @change="trendAnalysisTypeChange">
@@ -12,7 +12,7 @@
       </a-radio-group>
     </div>
     <div>
-      <div style="display: flex; align-items: flex-end; flex-direction: column">
+      <div class="trend-analysis-chart" :class="{ 'is-modal-open': trendDetailVisible }" style="display: flex; align-items: flex-end; flex-direction: column">
         <a-radio-group
           style="margin: 20px 0"
           size="small"
@@ -31,6 +31,8 @@
           :chartData="trendAnalysisData"
           style="width: 100%"
           :showpercent="trendAnalysisChartShowPercent"
+          :enablePointClick="true"
+          @chart-click="handleTrendChartClick"
         ></DataReLineChart>
       </div>
       <div id="trendAnalysisChartID"></div>
@@ -64,7 +66,7 @@
         <a-range-picker style="width: 300px; margin: 0 12px" v-if="isContrast" @change="contrastTimeChange" />
       </div>
       <div class="fueling-overview-block">
-        <div class="fueling-overview-item">
+        <div class="fueling-overview-item" id="traffic-flow-card">
           <div class="fueling-overview-name">杞︽祦閲�</div>
           <div class="fueling-overview-num">
             <span style="margin-right: 24px">{{ statisTotalObj.carCount }}</span>
@@ -78,7 +80,7 @@
             <span style="color: #16b777" v-if="isContrast">{{ contrastObj.appearCount }}</span>
           </div>
         </div>
-        <div class="fueling-overview-item">
+        <div class="fueling-overview-item" id="oil-count-card">
           <div class="fueling-overview-name">鍔犳补鏁�</div>
           <div class="fueling-overview-num">
             <span style="margin-right: 24px">{{ statisTotalObj.oilCount }}</span>
@@ -210,6 +212,33 @@
       :typeOneTotal="customerOneTotal"
       :typeTwoTotal="customerTwoTotal"
     ></TopTenCustomers>
+    <a-modal
+      centered
+      width="70%"
+      :footer="null"
+      v-model="trendDetailVisible"
+      :title="trendDetailTitle"
+      :zIndex="5000"
+      :getContainer="getModalContainer"
+      wrapClassName="trend-detail-modal-wrap"
+      @cancel="closeTrendDetail"
+    >
+      <a-table
+        size="middle"
+        bordered
+        :columns="trendDetailColumns"
+        :dataSource="trendDetailData"
+        :loading="trendDetailLoading"
+        :scroll="{ y: 420 }"
+        :pagination="{ pageSize: 10, showSizeChanger: true, pageSizeOptions: ['10', '20', '50'] }"
+        :rowKey="
+          (record, index) => {
+            return record.id || record.licenseNum || record.captureTime || record.startTime || index
+          }
+        "
+      >
+      </a-table>
+    </a-modal>
   </div>
 </template>
 
@@ -264,6 +293,11 @@
       trendAnalysisUnit: 'DAYS', //瓒嬪娍鍒嗘瀽閫夋嫨鏃堕棿
       trendAnalysisData: {}, //瓒嬪娍鍒嗘瀽鏁版嵁
       trendAnalysisChart: null, //瓒嬪娍鍒嗘瀽鍥捐〃
+      trendDetailVisible: false,
+      trendDetailTitle: '瓒嬪娍鍒嗘瀽鏄庣粏',
+      trendDetailLoading: false,
+      trendDetailData: [],
+      trendDetailColumns: [],
       beforeStartTime: '',
       beforeEndTime: '',
       afterStartTime: '',
@@ -310,6 +344,80 @@
 
   methods: {
     moment,
+    getModalContainer() {
+      return document.body
+    },
+    getTrendDetailColumnsByType() {
+      let commonIndexColumn = {
+        title: '搴忓彿',
+        dataIndex: '',
+        key: 'rowIndex',
+        width: 80,
+        align: 'center',
+        customRender: function (t, r, index) {
+          return parseInt(index) + 1
+        },
+      }
+      if (this.trendAnalysisType == 0) {
+        return [
+          commonIndexColumn,
+          { title: '鎶撴媿鏃堕棿', align: 'center', dataIndex: 'captureTime' },
+          { title: '杞︽祦閲�', align: 'center', dataIndex: 'carCount' },
+          { title: '杞﹀瀷缂栫爜', align: 'center', dataIndex: 'modelCode' },
+          { title: '璁惧缂栫爜', align: 'center', dataIndex: 'cameraCode' },
+        ]
+      }
+      if (this.trendAnalysisType == 4 || this.trendAnalysisType == 5) {
+        return [
+          commonIndexColumn,
+          { title: '鏇存柊鏃堕棿', align: 'center', dataIndex: 'updateTimeSelf' },
+          { title: '杞︾墝鍙�', align: 'center', dataIndex: 'licenseNum' },
+          { title: '瀹㈡埛绫诲瀷', align: 'center', dataIndex: 'clientName' },
+          { title: '绱鍔犳补娆℃暟', align: 'center', dataIndex: 'oilCount' },
+          { title: '绱娌瑰搧閿�閲�', align: 'center', dataIndex: 'oilSum' },
+        ]
+      }
+      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: 'spandTime' },
+      ]
+    },
+    handleTrendChartClick(params) {
+      if (!params || !params.name) {
+        return
+      }
+      if (this.$refs.trendAnalysisLineRef && this.$refs.trendAnalysisLineRef.hideTooltip) {
+        this.$refs.trendAnalysisLineRef.hideTooltip()
+      }
+      this.trendDetailVisible = true
+      this.trendDetailTitle = '瓒嬪娍鍒嗘瀽鏄庣粏 - ' + params.name
+      this.trendDetailColumns = this.getTrendDetailColumnsByType()
+      this.trendDetailLoading = true
+      postAction('/jyz/dataTable/statTrendDetail', {
+        orgCode: this.selectTreeObj.orgCode,
+        startTime: this.startTime,
+        endTime: this.endTime,
+        trendType: this.trendAnalysisType,
+        timeUnit: this.trendAnalysisUnit,
+        statTime: params.name,
+        seriesName: params.seriesName,
+      })
+        .then((res) => {
+          this.trendDetailData = res.result || []
+        })
+        .finally(() => {
+          this.trendDetailLoading = false
+        })
+    },
+    closeTrendDetail() {
+      this.trendDetailVisible = false
+      this.trendDetailData = []
+    },
     //鑾峰彇杞﹀瀷/鍔犳补浣嶆姌绾垮浘鏁版嵁
     getVehicleTypeLineData() {
       postAction('/jyz/dataTable/statisMidTable', {
@@ -539,6 +647,26 @@
   created() {
     this.initData()
   },
+  mounted() {
+    this.$nextTick(() => {
+      setTimeout(() => {
+        const scrollTarget = localStorage.getItem('scrollToTarget')
+        if (scrollTarget) {
+          const element = document.getElementById(scrollTarget)
+          if (element) {
+            element.scrollIntoView({ behavior: 'smooth', block: 'center' })
+            localStorage.removeItem('scrollToTarget')
+          }
+        }
+        const trendType = localStorage.getItem('trendAnalysisType')
+        if (trendType) {
+          this.trendAnalysisType = parseInt(trendType)
+          localStorage.removeItem('trendAnalysisType')
+          this.getTrendAnalysis()
+        }
+      }, 500)
+    })
+  },
 }
 </script>
 <style scoped lang="less">
@@ -554,7 +682,29 @@
   background: #fff;
 }
 .data-reMechanism {
+  position: relative;
+  isolation: isolate;
+  > div {
+    position: relative;
+    z-index: 2;
+  }
+  > div:nth-child(2) {
+    z-index: 1;
+  }
+  &.trend-detail-open {
+    pointer-events: none;
+  }
+  .trend-analysis-chart {
+    position: relative;
+    z-index: 1;
+    overflow: hidden;
+  }
+  .trend-analysis-chart.is-modal-open {
+    pointer-events: none;
+  }
   .table-operator {
+    position: relative;
+    z-index: 2;
     margin: 24px 0 0 0;
   }
   .block-title {
@@ -562,6 +712,8 @@
     font-size: 16px;
   }
   .fueling-overview-ct {
+    position: relative;
+    z-index: 2;
     // margin: 0 12px;
     .fueling-overview-block {
       display: flex;
@@ -578,6 +730,8 @@
     }
   }
   .oil-freq-compare-ct {
+    position: relative;
+    z-index: 2;
     margin: 8px 12px 24px 12px;
     .oil-freq-compare-operator {
       display: flex;
@@ -597,3 +751,11 @@
   }
 }
 </style>
+<style lang="less">
+.trend-detail-modal-wrap {
+  z-index: 5000 !important;
+}
+.trend-detail-modal-wrap + .ant-modal-mask {
+  z-index: 4999 !important;
+}
+</style>

--
Gitblit v1.8.0