tangjunhao пре 1 месец
родитељ
комит
2babedd2da

+ 34 - 4
src/view/InfoDialoges.vue

@@ -1391,7 +1391,7 @@ const getmoun=()=>{
          classradio.value=sgdata.value.stype;
         classclick(classradio.value);
         idobj.value.name=sgdata.value.name;
-           console.log( idobj.value.name); 
+           console.log( idobj.value.name);
            accident();
             if( sgdata.value.stype=="Water"){
                 emitter.emit('handleSelect4', '1');
@@ -1412,6 +1412,31 @@ const getmoun=()=>{
 }
 onMounted(() => {
     //const paramValue =window.location.href;//.paramNamehttp://localhost:5173/#/
+      // if( window.location.href.indexOf("aid")>0){
+      //   const paramValue =window.location.href;
+      //   // const paramValue ='http://localhost:5173/#/aid=7';
+      //       const parts = paramValue.split('=');
+      //       console.log(parts);
+      //       aid.value=parts[1].replace("#/","");
+      //       if( aid.value==null||aid.value==''){
+                
+      //       }else{
+      //           getmoun();
+                        
+      //       // emitter.on('accident',(data)=>{
+      //       //     getmoun();
+        
+      //       // });
+      //   }
+      // }
+
+      emitter.on('AccessProjectByAid', acessAidInit);
+});
+
+
+// 初始化aid直接进入项目的情况
+const acessAidInit = () => {
+  //const paramValue =window.location.href;//.paramNamehttp://localhost:5173/#/
       if( window.location.href.indexOf("aid")>0){
         const paramValue =window.location.href;
         // const paramValue ='http://localhost:5173/#/aid=7';
@@ -1429,14 +1454,19 @@ onMounted(() => {
             // });
         }
       }
-});
+}
+
+
+
+
 const change2=(val)=>{
     formull.value.name.forceUpdate();
 }
 onUnmounted(() =>{
 
-emitter.off('accident');
-emitter.off('handleSelect')
+  emitter.off('AccessProjectByAid', acessAidInit);
+  emitter.off('accident');
+  emitter.off('handleSelect')
 })
 defineExpose({ monitor, accident2, leftcoll, classradio, aid, dialogVisible ,changeModel,classclick,state,dialog});
 </script>

+ 1 - 1
src/view/components/InfoDisaster.vue

@@ -3313,7 +3313,7 @@ const yiweiget=(aidval)=>{
 
       if(res.row!=[]){
        // vtkmodel.delSoures();
-       console.log( res.row)
+       console.log( '一维瓦斯灾源查询:',res.row)
         res.row.forEach((item,index)=>{
         vtkmodel.addSoures(item.pid,item.ssite)
         vtkmodel.addSoures(item.pid,item.esite)

+ 3 - 0
src/view/components/InfoVtkmodel.vue

@@ -151,7 +151,10 @@ function lineShow() {
   // vtkmodel.selectByNodeId(178);
   // vtkmodel.selectPipes();
   // vtkmodel.selectByPipeId(253);
+  
 
+  // 用于用aid直接访问项目的特殊情况
+  emitter.emit('AccessProjectByAid');
 }
 </script>
 <style scoped>