liuqiao 1 год назад
Родитель
Сommit
20729f245e

+ 9 - 2
src/view/InfoDialoges.vue

@@ -628,6 +628,7 @@ const accident = () => {
 
         }else{
         // setTimeout(function(){
+    
          initWebSocket();
          rizhi.value.logs='';
          newlog.value =''; 
@@ -639,6 +640,9 @@ const accident = () => {
         fetchFileContent();
         accident2(props.activeIndex)
         rewu();
+        // if(state.value=="1"){
+        //      emit('websockfrist');
+        //     }
     // },100)
     }
     dialog.value.dialogVisible_fire = false;
@@ -798,11 +802,13 @@ const rewu=()=>{
     }
     request(params)
         .then((res) => {
-         
             emit('resulysucss',res.state);
             arrvalue.value=res.cocodes.split(',');
             tuiyanobj.value=res;
             state.value=res.state;
+              if(state.value=="1"){
+             emit('websockfrist');
+            }
            // console.log("状态"+state.value);
            // emit('resulysucss'); 
             tuiyanobj.value.pickertime=res.acctime;
@@ -966,7 +972,8 @@ const websocketonmessage = (res) => {
     getthislog(res.data);
     // console.log(res.data);
     if(res.data=="求解——————————————————成功"){
-        emit('websockfrist');
+        console.log(111111)
+     //   emit('websockfrist');
     }
     reset();
 };

+ 2 - 1
src/view/appmian.vue

@@ -235,11 +235,12 @@ const leftsimulation = (res,data) => {
   }
     
 //TODO 获取物理量
+
 resultbidui.value.timeline=res.acctime;
 resultbidui.value.oldtime=res.acctime;
 // resultbidui.value.zdtime=res.acctime;
 resultbidui.value.endtime= Number(res.totaltime)/Number(res.reportstep);
-resultbidui.value.initAid(resultleft.value.aid,resultright.value.aid);
+resultbidui.value.initAid(resultleft.value.aid,resultright.value.aid,res.codes);
 resultbidui.value.clickflat=true;
     }
 

+ 27 - 8
src/view/result.vue

@@ -57,7 +57,21 @@
         </el-collapse>
 
       </div>
-
+  <!-- 物理量 -->
+  <div class="heigjie">
+        <div class="he_pading1 color1">
+          <el-form-item label="物理量:" v-if="props.classradio == 'Fire'">
+            <el-select v-model="formInline.region" @change="regionchange($event)" placeholder="请选择">
+              <el-option v-for="item in strResultFormatlist" :key="item.id" :label="item.name"
+                :value="item.value"></el-option>
+            </el-select>
+          </el-form-item>
+          <div class="wotermn" v-else>
+            <span>物理量:</span>
+            <span>水位</span>
+          </div>
+        </div>
+      </div>
     </div>
     <div class="result_left results re_pading">
       <div class="resu_title reimg" @click="hazardtype('1')">
@@ -131,6 +145,7 @@ let suspendshow=ref(false);
 let showfalse=ref(false);
 let isdonghua=ref(true);
 let time = ref();
+let  danwei=ref();
 const isstop = ref(false);
 let aid = ref(Number);
 let oldtime = ref();
@@ -143,7 +158,7 @@ let clickflat = ref(true);
 let mntext1 = ref('灾情模拟1');
 let mntext2 = ref('灾情模拟2');
 const formInline = ref({
-  region: "shanghai",
+  region: "",
   count: 0,
 });
 const zdtime = ref("");
@@ -276,12 +291,14 @@ function regionchange(val) {
       danwei.value = key + value;
     }
   });
+
 }
 const hazardtype = (val) => {
   emit("titleclick", "模拟数据", val);
 };
 
 const initAid = (leftAid, rightAid) => {
+  console.log(1112344555)
   isdonghua.value=false;
   getMonitor(leftAid, rightAid);
   //  wdisasterref.value.getinit(leftAid);
@@ -301,7 +318,7 @@ const wdiclick=(id,selid)=>{
 //监测点数据获取
 async function getMonitor(leftAid, rightAid) {
   const params = {
-    transCode: "D10016",
+    transCode: "D10018",
     aid: leftAid,
     step: 1,
   };
@@ -309,14 +326,16 @@ async function getMonitor(leftAid, rightAid) {
     .then((res) => {
       if (res.returnCode == "000000000") {
         strResultFormatlist.value = [];
-        for (let i = 0; i < res.cocodes.length; i++) {
-          let cocode = res.cocodes[i];
+        console.log(res);
+        for (let i = 0; i < res.codes.length; i++) {
+          let cocode = res.codes[i];
           strResultFormatlist.value.push({
             id: i,
-            name: cocode.cocode,
-            value: cocode.cocode,
+            name: cocode.code,
+            value: cocode.code,
           });
         }
+        console.log( strResultFormatlist.value);
         formInline.value.region = strResultFormatlist.value[0].value;
         console.log(strResultFormatlist.value);
         setleftAid.value.leftChangAid(
@@ -359,7 +378,7 @@ defineExpose({ accident6, initAid, mntext1, mntext2, clickflat, endtime, zdtime,
   background-image: url(/src/assets/img/Group10.png) !important;
   background-repeat: no-repeat;
   background-position: center;
-
+   background-size: 100% 100%;
   .he_pading1 {
     padding: 10px 9px 0 7px;
   }

+ 4 - 3
src/view/result/Wdisaster.vue

@@ -39,8 +39,8 @@
                 </div>
                   <div class="je_right duijc">
                     <div class="">
-                    <div class="zongjili img1">{{warnin}}<span>个</span></div>
-                    <div class="zongjili img2">{{warnin2}}<span>个</span></div>
+                    <div class="zongjili img1">{{warnin2}}<span>个</span></div>
+                    <div class="zongjili img2">{{warnin}}<span>个</span></div>
                   </div>
                   </div>
                 </div>
@@ -69,6 +69,7 @@ import bt4 from "@/assets/img/Group1376.png"
 import bt1 from "@/assets/img/Group1377.png"
 import bt3 from "@/assets/img/Group1395.png"
 import bt2 from "@/assets/img/Group1396.png"
+let emit = defineEmits(['Formatlistinit'])
 const props = defineProps({
   count: {
   type: Number,
@@ -214,7 +215,7 @@ request(params)
           { prop:'v'+num, label: res.codes[i].code },
         )
       }
-    
+    emit('Formatlistinit',res.codes); 
        dynamicHeaders.value=headertable;
       let warning=[];//一级警告
       let warning2=[];//二级警告

+ 2 - 2
src/view/result/Wdisaster2.vue

@@ -39,8 +39,8 @@
                 </div>
                   <div class="je_right duijc">
                     <div class="">
-                    <div class="zongjili img1">{{warnin}}<span>个</span></div>
-                    <div class="zongjili img2">{{warnin2}}<span>个</span></div>
+                    <div class="zongjili img1">{{warnin2}}<span>个</span></div>
+                    <div class="zongjili img2">{{warnin}}<span>个</span></div>
                   </div>
                   </div>
                 </div>

+ 1 - 0
src/view/result/resultLeft.vue

@@ -211,6 +211,7 @@ const leftChangAid = (leftAid,step,region) => {
     vtkGridRead(leftAid);
   }
 };
+
 defineExpose({ leftChangAid });
 </script>
 <style scoped></style>