Browse Source

zzy ++ 业务要求修改

zhiyuan-007 7 months ago
parent
commit
9a4e1f9279

+ 1 - 1
space-share-exchange/index.html

@@ -4,7 +4,7 @@
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>上海市管理综合信息共享交换平台</title>
-    <script type="module" crossorigin src="./assets/index-944b9468.js"></script>
+    <script type="module" crossorigin src="./assets/index-56920382.js"></script>
     <link rel="stylesheet" href="./assets/index-85628e62.css">
   </head>
   <body>

+ 4 - 0
src/pinia/useStore.js

@@ -89,6 +89,7 @@ export const useMapStore = defineStore('map',{
      z:null
     }
    },
+   pipeExtent:[],
    currentLayerList: [],
    bookMarkLayerList:[],
    mapStoreLayerList:[],
@@ -101,6 +102,9 @@ export const useMapStore = defineStore('map',{
   }
  },
  actions:{
+  changePipeExtent(payload){
+   this.pipeExtent = payload
+  },
   changeReturnResArr(payload){
    this.returnResArr = payload
   },

+ 10 - 0
src/service/my-apply.js

@@ -88,6 +88,16 @@ export function getGeologyAnalysisData(params){
   }
  })
 }
+export function getGeologyAnalysisDataByPoints(params){
+ return requestInstance_proxy_token({
+  url:'/CIMAPI/api/v1/momitor/cfy/getGeologyAnalysisDataByPoints',
+  params:{
+   "modelId":1075,
+   "positions":params.positions,
+   "height":200,
+  }
+ })
+}
 
 
 export function getPileBearingCapacityData(params){

+ 18 - 0
src/unit/element-ui/tip.js

@@ -33,6 +33,24 @@ export function showConfirm(delFun,...params) {
   })
 }
 
+export function showConfirmOrExit(delFun,exitFun,...params) {
+ ElMessageBox.confirm(...params)
+     .then(() => {
+      delFun && delFun()
+      // showMessage({
+      //   type: 'success',
+      //   message: '删除成功!'
+      //  });
+     })
+     .catch(() => {
+      exitFun && exitFun()
+      showMessage({
+       type: "info",
+       message: "已取消"
+      })
+     })
+}
+
 export function handleMes(
  res,
  successFun,

+ 37 - 15
src/unit/map/AddLayer.js

@@ -1344,6 +1344,7 @@ export function PipeProfileAnalysis(params){
 export function PipeExcavationAnalysis(params){
     invokeParams('PipeExcavationAnalysis', {
         "id": arrPipe,
+        "geometry":params.geometry,
         "shendu":params.shendu
     })
 }
@@ -1364,27 +1365,24 @@ export function ExcavationAnalysis(params){
 export function RectangleSlice(params){
     invokeParams('RectangleSlice', {
         "status":params.status,
+        "geometry":params.geometry,
         "depth":params.shendu
     })
 }
 
 
-export function PipeAgeAnalysis(){
+export function PipeAgeAnalysis(params){
     invokeParams('PipeAgeAnalysis', {
         "id": arrPipe,
+        "geometry":params.geometry
     })
 }
 
 export function CylinderEffect(params){
     invokeParams('CylinderEffect', {
         "status": params.status,
-        "center":  {
-            "type": "point",
-            "x": params.x,
-            "y": params.y,
-            "z": params.z
-        },
-        "radius": 10,
+        "positions":params.positions,
+        "radius": params.radius,
         "items": params.items
     })
 }
@@ -1396,6 +1394,14 @@ export function PrismEffect(params){
     })
 }
 
+export function PrismDifferentHeightEffect(params){
+    invokeParams('PrismDifferentHeightEffect', {
+        "status": params.status,
+        "items": params.items
+    })
+}
+
+
 
 export function PositionSlice(params){
     invokeParams('PositionSlice', {
@@ -1430,13 +1436,15 @@ export function Draw3DExtent(params){
         "height": 20,
         "color":[0,255,255],
         "ringsArr":params.rings
-        // "ringsArr":[
-        //     [[[-366.2919275749104,-950.8920962656066],[-129.02009415696403,-911.9127669284246],[-97.33640650259235,-1072.1422218110001],[-340.8572104074974,-1112.0069214570385],[-366.2919275749104,-950.8920962656066]]],
-        //     [[[418.8224204617907,-3940.6746724093027],[627.7715709241761,-3899.087496582624],[665.9868085756545,-4081.273642855682],[465.77889321949993,-4120.108514659712],[418.8224204617907,-3940.6746724093027]]]
-        // ]
     })
 }
 
+export function AddDataArea(params){
+    invokeParams('AddDataArea', {
+        "is_clear": params.status,
+        "position": params.position,
+    })
+}
 
 let lastPipeThemeVisible = null
 export async function setPipeTheme(visible) {
@@ -1454,7 +1462,7 @@ export async function setPipeTheme(visible) {
 
     invokeParams('AddSingleLayer', {
         "id": "longzhu",
-        "title": "地下管线",
+        "title": "地下管线-三维",
         "visible": visible,
         "opacity": 1,
         "renderer": getPipeRenderer(),
@@ -2500,7 +2508,21 @@ export function importantAreaPosition(x,y,z,heading,tilt,isfly=false){
         "isfly": isfly
     })
 }
-
+export function setExtent(params){
+    invokeParams('SetExtent',{
+        "extent": {
+            "spatialReference": {
+                "latestWkid": 3857,
+                "wkid": 102100
+            },
+            "xmin": params.xmin,
+            "ymin": params.ymin,
+            "xmax": params.xmax,
+            "ymax": params.ymax,
+        },
+        "isfly": true,
+    })
+}
 export function setGeometryLocation(params){
     invokeParams('SetGeometryLocation',{
         "type": params.type,
@@ -2885,7 +2907,7 @@ export function AddBaseMapLayer(){
 export function DrawMap(params){
     invokeParams('Draw', {
         "type": params.type,
-        "clear": true,
+        "clear": params.clear==undefined?true:params.clear,
         "hasZ": params.hasZ,
         "countNumber":params.countNumber!=undefined?params.countNumber:null
     })

+ 21 - 21
src/views/c-cpns/Map.vue

@@ -27,7 +27,14 @@ import {
   AddWhiteMoldLayer,
   AddCimPartWhiteMoldLayer,
   PipeSectionAnalysis,
-  PipeProfileAnalysis, PipeAgeAnalysis, PositionSlice, ExcavationAnalysis, CylinderEffect, RectangleSlice, PrismEffect
+  PipeProfileAnalysis,
+  PipeAgeAnalysis,
+  PositionSlice,
+  ExcavationAnalysis,
+  CylinderEffect,
+  RectangleSlice,
+  PrismEffect,
+  PrismDifferentHeightEffect
 } from "@/unit/map/AddLayer";
 import {closeShowLoading, showLoading} from "@/unit/element-loading/element-loader";
 import {switchTheme} from "@/unit/Theme/ThemeColor";
@@ -119,8 +126,8 @@ export default {
       nextTick(() => {
         myBridge.bridgeContent = bridge = new CityGis.Bridge({
           id: "i_map",
-          //url: 'https://cimweb.zjw.sh.cegn.cn:2007/VUE-Map-Tool-Widget/#/jk_map?theme=light&type=3D', //建科发布
-          url: 'http://localhost:8081/#/jk_map?theme=dark&type=3D',
+          url: 'https://cimweb.zjw.sh.cegn.cn:2007/VUE-Map-Tool-Widget/#/jk_map?theme=light&type=3D', //建科发布
+          //url: 'http://localhost:8081/#/jk_map?theme=dark&type=3D',
           onReady: function () {
             console.log("地图创建完成")
           }
@@ -226,35 +233,28 @@ export default {
               if(props.currentSmallTool==="pipeAgeAnalysis"){  //管龄分析
                 showLoading();
                 mapStore.changeIsPipeAgeAnalysisIsShow(true)
-                PipeAgeAnalysis();
+                PipeAgeAnalysis({
+                  geometry:arg.data.geometry,
+                });
                 RectangleSlice({
                   status:"show",
+                  geometry:arg.data.geometry,
                   depth:10
                 })
               }
-              if(props.currentSmallTool==="boreholeAnalysis"){  //地质-钻孔分析
-                showLoading();
-                getGeologyAnalysisData({ x: arg.data.geometry.x, y: arg.data.geometry.y }).then((response) => {
-                  if (response?.payload.length > 0) {
-                    let data = response.payload;
-                    closeShowLoading()
-                    CylinderEffect({
-                      status:"show",
-                      x:arg.data.geometry.x,
-                      y:arg.data.geometry.y,
-                      z:arg.data.geometry.z,
-                      items:data
-                    })
-                  }
-                });
-              }
+              // if(props.currentSmallTool==="boreholeAnalysis"){  //地质-钻孔分析
+              // }
               if(props.currentSmallTool==="customCutting"){  //地质-自定义剖切分析
                 showLoading();
                 getGeologyAnalysisData({ x: arg.data.center.x, y: arg.data.center.y }).then((response) => {
                   if (response?.payload.length > 0) {
                     let data = response.payload;
                     closeShowLoading()
-                    PrismEffect({
+                    // PrismEffect({
+                    //   status:"show",
+                    //   items:data
+                    // })
+                    PrismDifferentHeightEffect({
                       status:"show",
                       items:data
                     })

+ 135 - 22
src/views/c-views/right-tool/RightTool.vue

@@ -4,9 +4,18 @@
       <li v-for="item in toolList" :key="item">
         <template v-if="item.subLayer && item.code === currentTool">
           <div class="sub-layer my-bg" v-if="item.code !== 'baseMapChange'">
-            <div class="img-div" v-for="child in item.subLayer">
-              <img :src="subImgSrc(child)" @click="changeChildTool(child)" :title="child.name" alt="">
-            </div>
+          <template v-if="item.code === 'pipeAnalysis'">
+            <template v-if="pipeToolShow">
+              <div class="img-div" v-for="child in item.subLayer">
+                <img :src="subImgSrc(child)" @click="changeChildTool(child)" :title="child.name" alt="">
+              </div>
+            </template>
+          </template>
+            <template v-else>
+              <div class="img-div" v-for="child in item.subLayer">
+                <img :src="subImgSrc(child)" @click="changeChildTool(child)" :title="child.name" alt="">
+              </div>
+            </template>
           </div>
         </template>
         <template v-if="item.code === 'baseMapChange' " >
@@ -34,13 +43,28 @@
       </li>
     </ul>
   </div>
+  <template v-if="pipeListShow&&currentTool == 'pipeAnalysis'">
+    <div class="pipe-table my-bg">
+      <div class="pipe-table-title">
+        <span class="fly_title_name">已申请分析列表</span>
+      </div>
+      <div class="fly_content scroll">
+        <ul>
+          <li v-for="(item,index) in pipeList" class="fly_item" :key="index">
+            <span>{{index + 1}}</span>
+            <span class="fly_name" @click="goToItem(item)" :title="item.reason">{{item.reason}}</span>
+          </li>
+        </ul>
+      </div>
+    </div>
+  </template>
 </template>
 
 <script>
 import {ref} from 'vue'
 import {
   AddBaseMapLayer,
-  addBufferLayer,
+  addBufferLayer, AddDataArea, addDataLine,
   AddSingleLayer,
   AddYaoganMapLayer,
   AddZhenwuMapLayer,
@@ -57,7 +81,7 @@ import {
   LineSight,
   MapClickByType,
   setBoatGPS,
-  setBoatHeatmap,
+  setBoatHeatmap, setExtent,
   setMapCircleWatch,
   setMapCircleWatchInner,
   setMapClick,
@@ -71,6 +95,7 @@ import {getBoatRealTimePosition, getMyApplyHomeTableDataPipe} from "@/service/my
 import {all} from "axios";
 import {useMapStore, useRootStore} from "@/pinia/useStore";
 import {urlTheme} from "@/unit/Theme/Theme";
+import {showMessage} from "@/unit/element-ui/tip";
 export default {
   name: "RightTool",
   props:{
@@ -92,6 +117,9 @@ export default {
         "type": "scene"
       })
     }
+    const pipeList = ref([]);
+    const pipeListShow = ref(false);
+    const pipeToolShow = ref(false);
     const is3d = ref(true);
     const currentBaseMap = ref('air');
     const isBaseMap =  ref(false);
@@ -120,7 +148,38 @@ export default {
       },
     ])
     const mapStore = useMapStore();
-    const store = useRootStore()
+    const store = useRootStore();
+    function goToItem(item){
+      console.log("item",item);
+      let rings = JSON.parse(item.frameSelection)[0];
+      mapStore.changePipeExtent(rings);
+      pipeListShow.value = false;
+      pipeToolShow.value = true;
+      // 分别提取所有的 x 和 y 值
+      const xs = rings.map(point => point[0]);
+      const ys = rings.map(point => point[1]);
+
+      // 使用 Math.min 和 Math.max 计算最小值和最大值
+      const xmin = Math.min(...xs);
+      const xmax = Math.max(...xs);
+      const ymin = Math.min(...ys);
+      const ymax = Math.max(...ys);
+      setExtent({
+        xmin,
+        xmax,
+        ymin,
+        ymax
+      })
+      setPipeTheme(true);
+      AddDataArea({
+          is_clear:false,
+          position:[
+            {
+              rings
+            }
+          ]
+        })
+    }
     function currentTime(type) {
       let date
       if(type =="current"){
@@ -214,7 +273,14 @@ export default {
       })
     }
     function changeChildTool(item){
-      let currentCode = item.code === props.currentToolSmall?'':item.code
+      let currentCode = item.code === props.currentToolSmall?'':item.code;
+      if(props.currentTool === 'pipeAnalysis'){
+        addDataLine(true,[
+          {
+            paths:mapStore.pipeExtent
+          }
+        ])
+      }
       if (props.currentTool === 'sunAna'){
         // setMapSumAna(false);
         getDefinedLayer(true);
@@ -347,26 +413,21 @@ export default {
           user_id:store.userInfo.gxjh_usercode
         }).then(res => {
           let data = res.data.Rows;
-          console.log("rings",data)
           if(data.length >0){
-            let rings = [];
-            data.forEach((item) =>{
-              rings.push(JSON.parse(item.frameSelection));
-            })
-            setPipeTheme(true);
-            Draw3DExtent({
-              status:"show",
-              rings:rings
+            pipeListShow.value = true;
+            pipeList.value = data
+          }else{
+            pipeListShow.value = false
+            showMessage({
+              type:"warning",
+              message:"当前用户并无申请内容,请前往资源中心申请后使用"
             })
           }
         })
-
-        importantAreaPosition(-270, -1308, 266, 9, 46,true);
       }else{
+        pipeListShow.value = false;
+        pipeToolShow.value =false;
         setPipeTheme(false);
-        Draw3DExtent({
-          status:"hide"
-        })
       }
 
       if (currentCode === 'pqAna'){
@@ -931,7 +992,11 @@ export default {
       currentBaseMap,
       is3d,
       changeIs3d,
-      urlTheme
+      urlTheme,
+      pipeList,
+      goToItem,
+      pipeListShow,
+      pipeToolShow,
     }
   }
 }
@@ -1014,4 +1079,52 @@ export default {
   background: var(--theme-background-color);
   box-shadow: 0px 1px 5px 0px rgba(0, 34, 103, 0.15);
 }
+.pipe-table{
+  position: absolute;
+  top: 87px;
+  right:80px;
+  font-size: 16px;
+  min-width: 300px;
+  .pipe-table-title{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 16px 24px;
+    border-radius: 4px;
+    border-bottom: 1px solid rgba(0, 170, 255, 0.4);
+    color:var(--theme-font-common-color);
+    .fly_title_name{
+      width: 120px;
+      text-align: left;
+      color:var(--theme-font-common-color);
+    }
+  }
+  .fly_content{
+    overflow: auto;
+    width: 100%;
+    max-height: 150px;
+    >ul{
+      list-style-type: none;
+      padding: 0px;
+      margin:0px 24px;
+      .fly_item{
+        align-items: center;
+        display: flex;
+        padding: 12px 0px;
+        justify-content: flex-start;
+        color:var(--theme-font-common-color);
+        .fly_name{
+          padding-left: 10px;
+          cursor: pointer;
+          width: 200px;
+          text-align: left;
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+        }
+      }
+
+    }
+  }
+}
 </style>

+ 1 - 1
src/views/c-views/right-tool/geologyTheme/bearingCapacityAnalysis/BearingCapacityAnalysisResult.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="bearing-capacity-analysis-result">
     <div class="top-unit">
-      单位:Mpa
+      单位:kN
     </div>
     <div class="middle-content">
       <div class="left-color">

+ 110 - 24
src/views/c-views/right-tool/geologyTheme/boreholeAnalysis/BoreholeAnalysis.vue

@@ -1,6 +1,30 @@
 <template>
-  <div :style="urlTheme('114')" id="borehole-analysis">
-    <span @click="startAna" >绘制分析</span>
+<!--  <div :style="urlTheme('114')" id="borehole-analysis">-->
+<!--    <span @click="startAna" >绘制分析</span>-->
+<!--  </div>-->
+
+  <div id="borehole-analysis" class="tool-dia">
+    <common-map-tool-title  @close="close" title="钻孔分析" />
+    <div class="content scroll">
+      <common-num-title title="绘制开挖范围" num="1" />
+      <div class="row-item">
+        <div @click="drawLine()" class="my-tab-item">
+          绘制
+        </div>
+      </div>
+      <common-num-title title="钻孔半径(m)" num="2" />
+      <div class="row-item">
+        <el-input clearable v-model="form.radius"/>
+      </div>
+      <common-num-title title="钻孔深度(m)" num="3" />
+      <div class="row-item">
+        <el-input clearable v-model="form.height"/>
+      </div>
+    </div>
+    <div class="operation-btn">
+      <el-button @click="clearOp">清除</el-button>
+      <el-button @click="startAna">运行分析</el-button>
+    </div>
   </div>
 </template>
 
@@ -8,19 +32,53 @@
 import {urlTheme} from "@/unit/Theme/Theme";
 import {useMapStore} from "@/pinia/useStore";
 import {clearMapDraw, CylinderEffect, DrawMap, PositionSlice} from "@/unit/map/AddLayer";
-import {onBeforeUnmount} from "vue";
+import {onBeforeUnmount, ref, watch} from "vue";
+import {closeShowLoading, showLoading} from "@/unit/element-loading/element-loader";
+import {getGeologyAnalysisData, getGeologyAnalysisDataByPoints} from "@/service/my-apply";
 export default {
   name: "BoreholeAnalysis",
   setup(props,{emit}){
-    const mapStore = useMapStore()
-    function startAna(){
+    const mapStore = useMapStore();
+    let holePointArr = [];
+    let form = ref({
+      height:null,
+      radius:null
+    });
+    function drawLine(){
       DrawMap({
+        clear:false,
         type:'point',
         hasZ:true,
         countNumber:1
       })
     }
+    function startAna(){
+      showLoading();
+      let positions = [];
+      if(holePointArr.length > 0){
+        holePointArr.forEach((item)=>{
+          positions.push([item.x,item.y])
+        })
+      }
+      console.log(JSON.stringify(positions),'positions')
+      getGeologyAnalysisDataByPoints({ positions: JSON.stringify(positions),height:form.value.height}).then((response) => {
+        if (response?.payload.length > 0) {
+          let data = response.payload;
+          closeShowLoading()
+          CylinderEffect({
+            status:"show",
+            positions:holePointArr,
+            radius:form.value.radius,
+            items:data
+          })
+        }
+      });
+    }
+    function close(){
+      emit('update:currentToolSmall','')
+    }
     function clearOp(){
+      holePointArr =[];
       CylinderEffect({
         status:"clear"
       })
@@ -29,39 +87,67 @@ export default {
     onBeforeUnmount(()=>{
       clearOp()
     })
+    watch(()=> mapStore.currentDrawContent,(val) => {
+      holePointArr.push(mapStore.currentDrawContent)
+    })
     return{
       mapStore,
       startAna,
-      urlTheme
+      drawLine,
+      urlTheme,
+      clearOp,
+      form,
+      close
     }
   }
 }
 </script>
 
 <style scoped lang="scss">
+//#borehole-analysis{
+//  height: 40px;
+//  width: 150px;
+//  position: absolute;
+//  z-index: 1;
+//  right: 140px;
+//  top: 94px;
+//  display: flex;
+//  justify-content: center;
+//  align-items: center;
+//  span{
+//    cursor: pointer;
+//    width: 100%;
+//    font-family: YouSheBiaoTiHei;
+//    font-weight: 400;
+//    font-size: 20px;
+//    color: #fff;
+//    text-shadow: 0px 8px 1px rgba(19, 80, 143, .1);
+//    background: linear-gradient(0deg, #77baff, #e9f8ff 73%, #fff);
+//    opacity: .89;
+//    -webkit-background-clip: text;
+//    -webkit-text-fill-color: transparent;
+//    text-align: center;
+//  }
+//}
+
 #borehole-analysis{
-  height: 40px;
-  width: 150px;
+  display: flex;
+  flex-direction: column;
+  max-height: 460px;
+  width: 365px;
   position: absolute;
   z-index: 1;
   right: 140px;
-  top: 94px;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  span{
-    cursor: pointer;
-    width: 100%;
-    font-family: YouSheBiaoTiHei;
-    font-weight: 400;
-    font-size: 20px;
-    color: #fff;
-    text-shadow: 0px 8px 1px rgba(19, 80, 143, .1);
-    background: linear-gradient(0deg, #77baff, #e9f8ff 73%, #fff);
-    opacity: .89;
-    -webkit-background-clip: text;
-    -webkit-text-fill-color: transparent;
+  .content{
+    border-bottom: 1px solid var(--el-border-color);
+    padding: 0px 10px;
+    .row-item{
+      margin-bottom: 15px;
+    }
+  }
+  .operation-btn{
     text-align: center;
+    padding: 20px 0;
   }
 }
 </style>

+ 2 - 1
src/views/c-views/right-tool/geologyTheme/excavateCutting/ExcavateCutting.vue

@@ -8,7 +8,7 @@
           绘制
         </div>
       </div>
-      <common-num-title title="开挖深度" num="2" />
+      <common-num-title title="开挖深度(m)" num="2" />
       <div class="row-item">
         <el-input clearable v-model="form.startHeight"/>
       </div>
@@ -64,6 +64,7 @@ export default {
     function startAna(){
       RectangleSlice({
         status:"show",
+        geometry:mapStore.currentDrawContent,
         depth:form.value.startHeight
       })
     }

+ 3 - 3
src/views/c-views/right-tool/pipeTheme/collisionAnalysis/CollisionAnalysis.vue

@@ -8,15 +8,15 @@
           绘制
         </div>
       </div>
-      <common-num-title title="输入起点高度" num="2" />
+      <common-num-title title="输入起点埋深(m)" num="2" />
       <div class="row-item">
         <el-input clearable v-model="form.startHeight"/>
       </div>
-      <common-num-title title="输入终点高度" num="3" />
+      <common-num-title title="输入终点埋深(m)" num="3" />
       <div class="row-item">
         <el-input clearable v-model="form.endHeight"/>
       </div>
-      <common-num-title title="输入管径" num="4" />
+      <common-num-title title="输入管径(m)" num="4" />
       <div class="row-item">
         <el-input clearable v-model="form.radius"/>
       </div>

+ 34 - 7
src/views/c-views/right-tool/pipeTheme/excavationAnalysis/ExcavationAnalysis.vue

@@ -8,7 +8,7 @@
           绘制
         </div>
       </div>
-      <common-num-title title="开挖深度" num="2" />
+      <common-num-title title="开挖深度(m)" num="2" />
       <div class="row-item">
         <el-input clearable v-model="form.startHeight"/>
       </div>
@@ -29,14 +29,16 @@ import {onBeforeUnmount, ref} from "vue";
 import ExcavationAnalysisResult
   from "@/views/c-views/right-tool/pipeTheme/excavationAnalysis/ExcavationAnalysisResult.vue";
 import {
+  addDataLine,
   ChangeBaseMapOpacity,
   clearMapDraw,
   DrawMap,
-  ExcavationAnalysis,
+  ExcavationAnalysis, PipeAgeAnalysis,
   PipeExcavationAnalysis,
   RectangleSlice
 } from "@/unit/map/AddLayer";
 import {showLoading} from "@/unit/element-loading/element-loader";
+import {showConfirmOrExit} from "@/unit/element-ui/tip";
 export default {
   name: "ExcavationAnalysis",
   components: {ExcavationAnalysisResult, CommonNumTitle, CommonMapToolTitle},
@@ -50,12 +52,29 @@ export default {
       ChangeBaseMapOpacity({
         opacity:1
       })
-      DrawMap({
-        type:'rectangle',
-        hasZ:true,
-      })
+      if(mapStore.currentDrawContent?.rings){
+        addDataLine(false,[
+          {
+            paths:mapStore.currentDrawContent.rings
+          }
+        ])
+        showConfirmOrExit(() => {
+
+        },() => {
+          DrawMap({
+            type:'rectangle',
+            hasZ:true,
+          })
+        },'是否使用已存在范围继续分析?','系统提示')
+      }else{
+        DrawMap({
+          type:'rectangle',
+          hasZ:true,
+        })
+      }
     }
     function clearOp(){
+      mapStore.changeCurrentDrawContent(null);
       ChangeBaseMapOpacity({
         opacity:0.7
       })
@@ -69,9 +88,11 @@ export default {
       mapStore.changeIsExcavationAnalysisIsShow(true);
       RectangleSlice({
         status:"show",
+        geometry:mapStore.currentDrawContent,
         depth:form.value.startHeight
       })
       PipeExcavationAnalysis({
+        geometry:mapStore.currentDrawContent,
         shendu:form.value.startHeight,
       })
     }
@@ -79,7 +100,13 @@ export default {
       emit('update:currentToolSmall','')
     }
     onBeforeUnmount(()=>{
-      clearOp()
+      ChangeBaseMapOpacity({
+        opacity:0.7
+      })
+      RectangleSlice({
+        status:"hide"
+      })
+      clearMapDraw(true,true,true);
     })
     return {
       drawLine,

+ 41 - 5
src/views/c-views/right-tool/pipeTheme/pipeAgeAnalysis/PipeAgeAnalysis.vue

@@ -9,8 +9,19 @@
 import {useMapStore} from "@/pinia/useStore";
 import {urlTheme} from "@/unit/Theme/Theme";
 import PipeAgeAnalysisResult from "@/views/c-views/right-tool/pipeTheme/pipeAgeAnalysis/PipeAgeAnalysisResult.vue";
-import {ChangeBaseMapOpacity, clearMapDraw, DrawMap, ExcavationAnalysis, RectangleSlice} from "@/unit/map/AddLayer";
+import {
+  addDataLine,
+  ChangeBaseMapOpacity,
+  clearMapDraw,
+  DrawMap,
+  ExcavationAnalysis,
+  PipeAgeAnalysis,
+  RectangleSlice
+} from "@/unit/map/AddLayer";
 import {onBeforeUnmount} from "vue";
+import {handleMes, showConfirm, showConfirmOrExit} from "@/unit/element-ui/tip";
+import {delMyCollectionData} from "@/service/my-collection";
+import {showLoading} from "@/unit/element-loading/element-loader";
 export default {
   name: "PipeAgeAnalysis",
   components: {PipeAgeAnalysisResult},
@@ -20,10 +31,35 @@ export default {
       ChangeBaseMapOpacity({
         opacity:1
       })
-      DrawMap({
-        type:'rectangle',
-        hasZ:true,
-      })
+      if(mapStore.currentDrawContent?.rings){
+        addDataLine(false,[
+          {
+            paths:mapStore.currentDrawContent.rings
+          }
+        ])
+        showConfirmOrExit(() => {
+          showLoading();
+          mapStore.changeIsPipeAgeAnalysisIsShow(true)
+          PipeAgeAnalysis({
+            geometry:mapStore.currentDrawContent,
+          });
+          RectangleSlice({
+            status:"show",
+            geometry:mapStore.currentDrawContent,
+            depth:10
+          })
+        },() => {
+          DrawMap({
+            type:'rectangle',
+            hasZ:true,
+          })
+        },'是否使用已存在范围继续分析?','系统提示')
+      }else{
+        DrawMap({
+          type:'rectangle',
+          hasZ:true,
+        })
+      }
     }
     function clearOp(){
       ChangeBaseMapOpacity({

+ 1 - 1
src/views/login/Login.vue

@@ -28,7 +28,7 @@ export default {
   },
   mounted(){
     let _this = this;
-    //window.location.href='https://cimweb.zjw.sh.cegn.cn:2007/cim-home/#/login';
+    window.location.href='https://cimweb.zjw.sh.cegn.cn:2007/cim-home/#/login';
     this.timer = setInterval(()=>{
       _this.dateTime = new Date();
     },1000)

+ 2 - 2
vite.config.js

@@ -16,8 +16,8 @@ export default defineConfig({
       // 代理所有 /api 的请求,该求情将被代理到 target 中
       '/api': {
         // 代理请求之后的请求地址(你的真实接口地址)
-        //target: 'https://cimweb.zjw.sh.cegn.cn:2007/data-business-prod/',
-        target: 'http://localhost:9250/',
+        target: 'https://cimweb.zjw.sh.cegn.cn:2007/data-business-prod/',
+        //target: 'http://localhost:9250/',
         secure: false,
         ws: true,
         // 跨域