BAI il y a 1 mois
Parent
commit
811185aa7e

+ 3 - 3
src/assets/style/home.scss

@@ -122,12 +122,12 @@ body {
         z-index: 4;
         .left-card {
           flex: 1;
-          margin-bottom: 12px;
+          margin-bottom: 6px;
           min-height: 0;
         }
         .left-card.tall-card {
           flex: 1.5;
-          margin-bottom: 12px;
+          margin-bottom: 6px;
           min-height: 0;
         }
       }
@@ -155,7 +155,7 @@ body {
           skewY(0deg);
         .right-card {
           flex: 1;
-          margin-bottom: 12px;
+          margin-bottom: 6px;
         }
       }
     }

+ 107 - 81
src/views/map/components/EconomicTrendChart.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="left-card">
-    <m-card title="机制融合量化指标" :height="400">
+    <m-card title="监测指标" :height="400">
       <div class="fusion-stats-container">
         <!-- 上部:圆形统计 -->
         <div class="upper-section">
@@ -15,17 +15,16 @@
           </div>
         </div>
         
-        <!-- 下部:阵列卡片 -->
+        <!-- 下部:监测指标 -->
         <div class="lower-section">
-          <div class="surrounding-indicators">
-            <div class="surrounding-item" v-for="(item, index) in surroundingIndicators" :key="index">
-              <div class="item-icon">
-                <img v-if="index % 2 === 0" src="@/assets/images/icon1.png" alt="图标1" />
-                <img v-else src="@/assets/images/icon2.png" alt="图标2" />
-              </div>
-              <div class="item-info">
-                <div class="item-label">{{ item.label }}</div>
-                <div class="item-value">{{ item.value }}<span class="item-unit">{{ item.unit }}</span></div>
+          <div class="water-quality-indicators">
+            <div class="indicators-scroll">
+              <div class="indicators-grid">
+                <div class="indicator-item" v-for="(item, index) in state.indicators" :key="index">
+                  <div class="icon" :style="{ backgroundColor: state.indicatorColors[index % state.indicatorColors.length] }"></div>
+                  <div class="name">{{ item.name }}</div>
+                  <div class="unit">{{ item.unit }}</div>
+                </div>
               </div>
             </div>
           </div>
@@ -40,33 +39,48 @@ import mCard from "@/components/mCard/index.vue"
 
 // 核心指标
 const coreIndicator = reactive({
-  value: "92%",
-  label: "协同工作考核优秀率"
+  value: "27",
+  label: "监测指标总数"
 })
 
-// 周围指标
-const surroundingIndicators = reactive([
-  {
-    label: "共同决策事项",
-    value: 132,
-    unit: "项"
-  },
-  {
-    label: "混编共建团队",
-    value: 4,
-    unit: "个"
-  },
-  {
-    label: "联合值班",
-    value: 365,
-    unit: "天"
-  },
-  {
-    label: "共定激励覆盖",
-    value: 156,
-    unit: "人"
-  }
-])
+// 监测指标数据
+const state = reactive({
+  indicatorColors: ["#17E6C3", "#40CFFF", "#1979FF", "#FFC472", "#FF6B6B", "#4ECDC4"],
+  indicators: [
+    // 水质指标
+    { name: "总磷", unit: "mg/L" },
+    { name: "总氮", unit: "mg/L" },
+    { name: "氨氮", unit: "mg/L" },
+    { name: "电导率", unit: "μS/cm" },
+    { name: "溶解氧", unit: "mg/L" },
+    { name: "pH值", unit: "-" },
+    { name: "化学需氧量", unit: "mg/L" },
+    { name: "生化需氧量", unit: "mg/L" },
+    { name: "悬浮物", unit: "mg/L" },
+    // 水文指标
+    { name: "水位", unit: "m" },
+    { name: "流量", unit: "m³/s" },
+    { name: "蒸发量", unit: "mm" },
+    { name: "降水量", unit: "mm" },
+    { name: "泥沙含量", unit: "kg/m³" },
+    { name: "水温", unit: "℃" },
+    // 水土保持指标
+    { name: "土壤侵蚀模数", unit: "t/km²·a" },
+    { name: "植被覆盖度", unit: "%" },
+    { name: "水土流失面积", unit: "km²" },
+    { name: "土壤含水量", unit: "%" },
+    // 环境指标
+    { name: "二氧化碳", unit: "mg/L" },
+    { name: "浊度", unit: "NTU" },
+    { name: "空气质量", unit: "AQI" },
+    { name: "噪声", unit: "dB" },
+    // 其他指标
+    { name: "叶绿素a", unit: "μg/L" },
+    { name: "重金属含量", unit: "μg/L" },
+    { name: "微生物指标", unit: "CFU/mL" },
+    { name: "有机物含量", unit: "mg/L" },
+  ],
+})
 
 </script>
 <style lang="scss" scoped>
@@ -149,68 +163,80 @@ const surroundingIndicators = reactive([
 }
 
 .lower-section {
-  flex: 1;
+  flex: 2;
   display: flex;
   justify-content: center;
 }
 
-.surrounding-indicators {
+.water-quality-indicators {
+  height: 100%;
   width: 100%;
-  max-width: 300px;
-  display: grid;
-  grid-template-columns: repeat(2, 1fr);
-  grid-template-rows: repeat(2, 1fr);
-  grid-gap: 12px;
+  padding: 0 10px;
   box-sizing: border-box;
 }
 
-.surrounding-item {
+.indicators-scroll {
+  height: 160px;
+  overflow-y: auto;
+  overflow-x: hidden;
+  padding-right: 5px;
+}
+
+.indicators-grid {
+  display: grid;
+  grid-template-columns: repeat(3, 1fr);
+  gap: 6px;
+}
+
+.indicator-item {
   display: flex;
-  align-items: flex-start;
-  padding: 14px;
-  min-height: 60px;
+  align-items: center;
+  padding: 6px;
+  background-color: rgba(10, 40, 60, 0.3);
+  border-radius: 4px;
+  border: 1px solid rgba(63, 91, 115, 0.3);
   
-  .item-icon {
-    width: 36px;
-    height: 36px;
-    margin-right: 12px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    flex-shrink: 0;
-    
-    img {
-      width: 100%;
-      height: 100%;
-      object-fit: contain;
-    }
+  .icon {
+    width: 6px;
+    height: 6px;
+    border-radius: 50%;
+    margin-right: 6px;
   }
   
-  .item-info {
-    flex: 1;
-    display: flex;
-    flex-direction: column;
-  }
-  
-  .item-label {
-    font-size: 12px;
+  .name {
+    font-size: 11px;
     color: #D3F8F2;
-    opacity: 0.9;
-    margin-bottom: 4px;
+    flex: 1;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
   }
   
-  .item-value {
-    font-size: 16px;
-    font-weight: bold;
+  .unit {
+    font-size: 9px;
     color: #30DCFF;
+    margin-left: 4px;
+    white-space: nowrap;
   }
-  
-  .item-unit {
-    font-size: 12px;
-    font-weight: normal;
-    color: #D3F8F2;
-    margin-left: 2px;
-  }
+}
+
+/* 滚动条样式 */
+.indicators-scroll::-webkit-scrollbar {
+  width: 6px;
+}
+
+.indicators-scroll::-webkit-scrollbar-track {
+  background: rgba(10, 40, 60, 0.3);
+  border-radius: 3px;
+}
+
+.indicators-scroll::-webkit-scrollbar-thumb {
+  background: rgba(48, 220, 255, 0.5);
+  border-radius: 3px;
+}
+
+.indicators-scroll::-webkit-scrollbar-thumb:hover {
+  background: rgba(48, 220, 255, 0.8);
 }
 
 

+ 1 - 1
src/views/map/components/ElectricityUsage.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="right-card">
-    <m-card title="测站名录" :height="400">
+    <m-card title="测站名录" :height="500">
       <div class="station-list">
         <div class="station-list-header">
           <div class="header-item">名称</div>

+ 12 - 8
src/views/map/components/ProportionPopulationConsumption.vue

@@ -60,37 +60,41 @@ const state = reactive({
 .indicators-scroll {
   height: 100%;
   overflow-y: auto;
+  overflow-x: hidden;
   padding-right: 5px;
 }
 
 .indicators-grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
-  gap: 10px;
+  gap: 6px;
 }
 
 .indicator-item {
   display: flex;
   align-items: center;
-  padding: 8px;
+  padding: 6px;
   background-color: rgba(10, 40, 60, 0.3);
   border-radius: 4px;
   border: 1px solid rgba(63, 91, 115, 0.3);
   .icon {
-    width: 8px;
-    height: 8px;
+    width: 6px;
+    height: 6px;
     border-radius: 50%;
-    margin-right: 8px;
+    margin-right: 6px;
   }
   .name {
-    font-size: 12px;
+    font-size: 11px;
     color: #D3F8F2;
     flex: 1;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
   }
   .unit {
-    font-size: 10px;
+    font-size: 9px;
     color: #30DCFF;
-    margin-left: 5px;
+    margin-left: 4px;
     white-space: nowrap;
   }
 }

+ 174 - 157
src/views/map/components/PurposeSpecialFunds.vue

@@ -1,201 +1,218 @@
 <template>
   <div class="right-card">
-    <m-card title="测站统计" :height="200">
-      <v-chart ref="vChart" :option="option" :autoresize="true" />
+    <m-card title="水系分布" :height="400">
+      <div class="water-distribution-container">
+        <!-- 上部:横向柱状图 -->
+        <div class="chart-section">
+          <v-chart ref="vChart" :option="chartOption" :autoresize="true" />
+        </div>
+        
+        <!-- 下部:表格 -->
+        <div class="table-section">
+          <div class="table-header">
+            <div class="header-item">名称</div>
+            <div class="header-item">类型</div>
+            <div class="header-item">河长/面积</div>
+          </div>
+          <div class="table-body">
+            <div class="table-row" v-for="(item, index) in waterSystemTableData" :key="index">
+              <div class="row-item">{{ item.name }}</div>
+              <div class="row-item">{{ item.type }}</div>
+              <div class="row-item">{{ item.lengthOrArea }}</div>
+            </div>
+          </div>
+        </div>
+      </div>
     </m-card>
   </div>
 </template>
 <script setup>
-import { ref, onMounted, onBeforeUnmount, nextTick } from "vue"
-import * as echarts from "echarts"
+import { ref, reactive } from "vue"
 import mCard from "@/components/mCard/index.vue"
+import * as echarts from "echarts"
 import VChart from "vue-echarts"
 
-const option = ref({
+// 柱状图数据
+const chartOption = ref({
   grid: {
     left: "5%",
     top: "10%",
-    width: "90%",
-    height: "86%",
-  },
-  legend: {
-    top: "8%",
-    icon: "circle",
-    itemWidth: 8,
-    itemHeight: 8,
-    textStyle: {
-      color: "#90979c",
-      fontSize: 12,
-      lineHeight: 20,
-    },
+    right: "5%",
+    bottom: "10%",
+    containLabel: true
   },
-
   tooltip: {
     trigger: "axis",
     axisPointer: {
-      type: "shadow",
-      shadowStyle: { opacity: 0.2 },
+      type: "shadow"
     },
-    backgroundColor: "rgba(0,0,0,1)",
-    borderWidth: 1,
-    borderColor: "#999999",
+    backgroundColor: "rgba(0,0,0,0.8)",
+    borderColor: "#3F5B73",
     textStyle: {
-      color: "#ffffff",
-      fontSize: 10,
-      lineHeight: 156,
-    },
+      color: "#FFFFFF"
+    }
   },
-  color: ["#6BC7F6", "#44E6A2"],
-  xAxis: [
-    {
-      type: "value",
-      interval: 0,
-
-      axisLine: {
-        show: false,
-        lineStyle: {
-          color: "#407A80",
-        },
-      },
-      axisTick: {
-        show: false,
-      },
-      splitLine: {
-        show: false,
-      },
-      axisLabel: {
-        color: "#CFDAE6",
-        fontSize: 10,
-        interval: 0,
-      },
+  xAxis: {
+    type: "category",
+    data: ["河道干流", "河道支流", "湖泊"],
+    axisLine: {
+      lineStyle: {
+        color: "#3F5B73"
+      }
     },
-  ],
-
-  yAxis: [
-    {
-      type: "category",
-      inverse: true,
-      axisLabel: {
-        color: "#CFDAE6",
-        fontSize: 10,
-        interval: 0,
-        show: false,
-        verticalAlign: "top",
-      },
-      axisLine: {
-        show: false,
-      },
-      axisTick: {
-        show: false,
-      },
-      splitLine: {
-        show: false,
-      },
-      data: ["扶贫资金", "医疗卫生", "渔业资金", "社区改造"],
+    axisLabel: {
+      color: "#D3F8F2",
+      fontSize: 12
+    }
+  },
+  yAxis: {
+    type: "value",
+    axisLine: {
+      lineStyle: {
+        color: "#3F5B73"
+      }
     },
-    {
-      inverse: true,
-      axisLine: {
-        show: false,
-        lineStyle: {
-          color: "rgba(0,0,0,0)",
-        },
-      },
-      data: [],
+    axisLabel: {
+      color: "#D3F8F2",
+      fontSize: 12
     },
-  ],
-  color: ["rgba(115,208,255,1)", "rgba(77, 255, 181, 1)", "rgba(230, 230, 230, 1)", "rgba(255, 200, 89, 1)"],
+    splitLine: {
+      lineStyle: {
+        color: "rgba(63, 91, 115, 0.3)"
+      }
+    }
+  },
   series: [
     {
       data: [
         {
-          value: 100,
+          value: 15,
           itemStyle: {
-            color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
+            color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
               { offset: 0, color: "rgba(3,65,128,1)" },
-              { offset: 1, color: "rgba(115,208,255,1)" },
-            ]),
-          },
+              { offset: 1, color: "rgba(115,208,255,1)" }
+            ])
+          }
         },
         {
-          value: 80,
+          value: 110,
           itemStyle: {
-            color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
+            color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
               { offset: 0, color: "rgba(11, 77, 44, 1)" },
-              { offset: 1, color: "rgba(77, 255, 181, 1)" },
-            ]),
-          },
-        },
-        {
-          value: 60,
-          itemStyle: {
-            color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
-              { offset: 0, color: "rgba(117, 117, 117, 1)" },
-              { offset: 1, color: "rgba(230, 230, 230, 1)" },
-            ]),
-          },
+              { offset: 1, color: "rgba(77, 255, 181, 1)" }
+            ])
+          }
         },
         {
-          value: 50,
+          value: 38,
           itemStyle: {
-            color: new echarts.graphic.LinearGradient(0, 0, 1, 1, [
+            color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
               { offset: 0, color: "rgba(153, 105, 38, 1)" },
-              { offset: 1, color: "rgba(255, 200, 89, 1)" },
-            ]),
-          },
-        },
+              { offset: 1, color: "rgba(255, 200, 89, 1)" }
+            ])
+          }
+        }
       ],
       type: "bar",
-      barWidth: 7,
-      yAxisIndex: 0,
-      showBackground: false,
-      z: 2,
+      barWidth: "40%",
       label: {
         show: true,
-        position: "middle",
-        padding: [-18, 0, 0, 0],
-        color: "#16C1A6",
-        fontSize: 12,
-        formatter:
-          "{title|{b}}                                                                              {value|{c}}  {unit|万元}",
-        rich: {
-          title: {
-            color: "#FFFFFF",
-            fontSize: 10,
-          },
-          value: {
-            fontSize: 10,
-          },
-          unit: {
-            color: "#717477",
-            fontSize: 10,
-          },
-        },
-      },
-      itemStyle: {
-        borderRadius: 0,
-        borderWidth: 2,
-        borderColor: "rgba(26, 57, 77,1)",
-      },
-    },
-    {
-      name: "背景",
-      type: "bar",
-      yAxisIndex: 1,
-      barGap: "-100%",
-      data: [120, 120, 120, 120],
-      barWidth: 10,
-      z: 0,
-      itemStyle: {
-        color: "none",
-        borderColor: "rgba(172,191,188,0.4)",
-        borderWidth: 1,
-        borderRadius: 0,
-      },
-    },
-  ],
+        position: "top",
+        color: "#D3F8F2",
+        fontSize: 12
+      }
+    }
+  ]
 })
 
+// 表格数据
+const waterSystemTableData = reactive([
+  { name: "娄江", type: "河道", lengthOrArea: "15.2 km" },
+  { name: "吴淞江", type: "河道", lengthOrArea: "18.7 km" },
+  { name: "淀山湖", type: "湖泊", lengthOrArea: "62 km²" },
+  { name: "阳澄湖", type: "湖泊", lengthOrArea: "120 km²" },
+  { name: "青阳港", type: "河道", lengthOrArea: "8.5 km" }
+])
+
 </script>
 
-<style lang="scss"></style>
+<style lang="scss">
+.water-distribution-container {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  padding: 10px;
+  box-sizing: border-box;
+}
+
+.chart-section {
+  flex: 1;
+  min-height: 150px;
+  margin-bottom: 15px;
+}
+
+.table-section {
+  flex: 1;
+  min-height: 120px;
+  background-color: rgba(10, 40, 60, 0.3);
+  border-radius: 4px;
+  border: 1px solid rgba(63, 91, 115, 0.3);
+  overflow: hidden;
+}
+
+.table-header {
+  display: flex;
+  background-color: rgba(10, 40, 60, 0.5);
+  padding: 10px 0;
+  color: #30DCFF;
+  font-weight: bold;
+  border-bottom: 1px solid rgba(63, 91, 115, 0.5);
+}
+
+.header-item {
+  flex: 1;
+  text-align: center;
+  font-size: 12px;
+}
+
+.table-body {
+  height: calc(100% - 40px);
+  overflow-y: auto;
+}
+
+.table-row {
+  display: flex;
+  padding: 8px 0;
+  border-bottom: 1px solid rgba(63, 91, 115, 0.2);
+  color: #D3F8F2;
+  font-size: 12px;
+  
+  &:last-child {
+    border-bottom: none;
+  }
+}
+
+.row-item {
+  flex: 1;
+  text-align: center;
+}
+
+/* 滚动条样式 */
+.table-body::-webkit-scrollbar {
+  width: 6px;
+}
+
+.table-body::-webkit-scrollbar-track {
+  background: rgba(10, 40, 60, 0.3);
+  border-radius: 3px;
+}
+
+.table-body::-webkit-scrollbar-thumb {
+  background: rgba(48, 220, 255, 0.5);
+  border-radius: 3px;
+}
+
+.table-body::-webkit-scrollbar-thumb:hover {
+  background: rgba(48, 220, 255, 0.8);
+}
+</style>

+ 0 - 2
src/views/map/index.vue

@@ -43,8 +43,6 @@
         <div class="right-wrap-3d">
           <!-- 水利设施分布 -->
           <PurposeSpecialFunds> </PurposeSpecialFunds>
-          <!-- 水质类别占比 -->
-          <ProportionPopulationConsumption></ProportionPopulationConsumption>
           <!-- 用水量分析 -->
           <ElectricityUsage></ElectricityUsage>
         </div>