From 2b4ddd668550749813c4e02b5d5100842763e23b Mon Sep 17 00:00:00 2001
From: guonan <guonan201020@163.com>
Date: 星期四, 17 四月 2025 17:41:35 +0800
Subject: [PATCH] 划区域坡度分析

---
 src/components/tools/Tools.vue |   90 ++++++++++++++++++++++++++++++++++++---------
 1 files changed, 72 insertions(+), 18 deletions(-)

diff --git a/src/components/tools/Tools.vue b/src/components/tools/Tools.vue
index e0fdbd5..56ab6ec 100644
--- a/src/components/tools/Tools.vue
+++ b/src/components/tools/Tools.vue
@@ -4,36 +4,85 @@
     <div class="tools-title" @click="toggleCollapse">
       宸ュ叿鏍�
       <div class="popup-menu" v-if="isPopupVisible">
-        <div class="popup-item" v-for="(option, idx) in currentToolOptions" :key="idx"
-          @click="handleOptionClick(option)">
-          <img class="popup-icon" :src="require(`../../assets/img/tools/tools_second/${option.icon}.png`)
-            " :alt="option.name" />
+        <div
+          class="popup-item"
+          v-for="(option, idx) in currentToolOptions"
+          :key="idx"
+          @click="handleOptionClick(option)"
+        >
+          <img
+            class="popup-icon"
+            :src="
+              require(`../../assets/img/tools/tools_second/${option.icon}.png`)
+            "
+            :alt="option.name"
+          />
           {{ option.name }}
         </div>
       </div>
       <LayerTree class="popup-menu" v-show="showLayerTree" />
       <!-- 鍙鍩熷垎鏋� -->
-      <seeAnalyze :option="option" v-show="seeAnalyzeShow" @update:showConeLine="handleUpdateShowConeLine"
-        @update-option="onUpdateOption" @draw="onDraw" @clear="onClear" class="popup-menu-see" />
+      <seeAnalyze
+        :option="option"
+        v-show="seeAnalyzeShow"
+        @update:showConeLine="handleUpdateShowConeLine"
+        @update-option="onUpdateOption"
+        @draw="onDraw"
+        @clear="onClear"
+        class="popup-menu-see"
+      />
       <!-- 鍓栭潰鎻愬彇 -->
-      <TopographyDia @draw="handleDraw" @clear="handleClear" class="popup-menu-see" v-show="topographyShow" />
+      <TopographyDia
+        @draw="handleDraw"
+        @clear="handleClear"
+        class="popup-menu-see"
+        v-show="topographyShow"
+      />
       <!-- 鍓栭潰鎻愬彇鐨別charts -->
       <div v-show="echartsShow" id="sectionCharts" class="sectionChars">
         <div id="echartsView1" style="width: 100%; height: 100%"></div>
       </div>
       <!-- 鍧″悜鍒嗘瀽 -->
-      <Aspect v-show="showAspect" @draw="SlopeArrow" @clear="SlopeArrowClose" class="popup-menu-see" />
-      <SlopeAnalysis v-show="showSlope" class="popup-menu-see" @update-slope="onUpdateSlope" />
+      <Aspect
+        v-show="showAspect"
+        @draw="SlopeArrow"
+        @clear="SlopeArrowClose"
+        class="popup-menu-see"
+      />
+      <SlopeAnalysis
+        @draw="SlopeAnalysiss"
+        v-show="showSlope"
+        class="popup-menu-see"
+        @update-slope="onUpdateSlope"
+      />
       <!-- 闆� -->
-      <Rain v-show="showRain" class="popup-menu-see" @update-rain="onUpdateRain" />
-      <Snow v-show="showSnow" class="popup-menu-see" @update-snow="onUpdateSnow" />
+      <Rain
+        v-show="showRain"
+        class="popup-menu-see"
+        @update-rain="onUpdateRain"
+      />
+      <Snow
+        v-show="showSnow"
+        class="popup-menu-see"
+        @update-snow="onUpdateSnow"
+      />
     </div>
 
     <!-- 宸ュ叿鏍忓唴瀹� -->
     <transition name="fade">
       <div v-if="!isCollapsed" class="tools-content">
-        <div class="tools-item" v-for="(item, index) in toolList" :key="index" @click.stop="handleClick(item)">
-          <img class="icon" :src="require(`../../assets/img/tools/${item.icon}.png`)" :title="item.name" alt="" />
+        <div
+          class="tools-item"
+          v-for="(item, index) in toolList"
+          :key="index"
+          @click.stop="handleClick(item)"
+        >
+          <img
+            class="icon"
+            :src="require(`../../assets/img/tools/${item.icon}.png`)"
+            :title="item.name"
+            alt=""
+          />
         </div>
       </div>
     </transition>
@@ -189,11 +238,11 @@
     闅愯棌鍥惧眰: () => (showLayerTree.value = false),
     闆ㄥぉ妯″紡: () => {
       showRain.value = true;
-      onUpdateRain()
+      onUpdateRain();
     },
     闆ぉ妯″紡: () => {
-      showSnow.value = true
-      onUpdateSnow()
+      showSnow.value = true;
+      onUpdateSnow();
     },
     娓呴櫎澶╂皵: () => {
       if (1) {
@@ -358,18 +407,23 @@
 };
 // 鍏抽棴鍧″悜绠ご
 const SlopeArrowClose = () => {
-  mapUtils.gbpxjt();
+  mapUtils.cleanupAnalysisTools();
 };
 
 // 鍧″害鍒嗘瀽
 const formData = reactive({
   terrainRender: 0,
   contourLines: false,
-  color: "",
+  color: "red",
   spacing: 50,
   lineWidth: 5,
 });
 
+const SlopeAnalysiss = () => {
+  mapUtils.pdfx(formData);
+};
+
+
 // 鍧″害
 const onUpdateSlope = (newOption) => {
   Object.assign(formData, newOption);

--
Gitblit v1.9.3