liuqiao 1 рік тому
батько
коміт
dacb90804f

+ 15 - 0
src/js/lindex.js

@@ -9,3 +9,18 @@ export function timestampToTime(timestamp) {
         let formattedTime = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
         return formattedTime;
      }
+     export function timescount(timestamp) {
+      var date = new Date(timestamp*1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+      console.log(date);
+       let year = date.getFullYear();
+       let month = ("0" + (date.getMonth() + 1)).slice(-2);
+       let day = ("0" + date.getDate()).slice(-2);
+       let hour = ("0" + date.getHours()).slice(-2);
+       let minute = ("0" + date.getMinutes()).slice(-2);
+       let second = ("0" + date.getSeconds()).slice(-2);
+       let dTime = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
+        return dTime;
+    }
+//     timestampToTime(1403058804);
+//     console.log(timestampToTime(1403058804));//2014-06-18 10:33:24
+//      }

+ 8 - 3
src/view/InfoDialoges.vue

@@ -34,7 +34,7 @@
         </el-dialog>
         <!--火灾 事故列表 -->
         <el-dialog v-model="dialog.dialogVisible_fire" width="600" :modal="false" :close-on-click-modal="false"
-            draggable class="dialog_class bgcolor tablefocus">
+            draggable class="dialog_class bgcolor tablefocus shigutable">
 
             <template #header="{ titleId, titleClass }">
                 <div class="my-header">
@@ -663,7 +663,7 @@ const sgadd = () => {
 }
 // 事故列表的选择
 const getRadioRow = (val) => {
-    currentrow.value=true;
+    // currentrow.value=true;
     sgdata.value = (val);
     console.log(tableobj.value)
     formull.value.name = val.name;
@@ -1876,7 +1876,9 @@ ol {
     padding: 0;
     margin: 0;
 }
-
+.tuiy{
+    z-index: 888;
+}
 .tuiy .asideg .el-input__inner {
     font-size: 14px !important;
 }
@@ -1886,4 +1888,7 @@ ol {
 .tablebk .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
     background-color: rgba(255, 255, 25, 0.5) !important;
 }
+.shigutable  .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{
+    background-color: rgba(255, 255, 25, 0) !important;
+}
 </style>

+ 4 - 2
src/view/appmian.vue

@@ -180,8 +180,10 @@ const leftsimulation = (res,data) => {
   }
     
 //TODO 获取物理量
-resultbidui.value.zdtime=res.acctime;
-resultbidui.value.endtime= Number(res.totaltime)/Number(res.reportstep);s
+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.clickflat=true;
     }

+ 0 - 1
src/view/components/InfoAnimation.vue

@@ -148,7 +148,6 @@ import t1 from "@/assets/img/t1.png";
 import t2 from "@/assets/img/t2.png";
 import t3 from "@/assets/img/t3.png";
 import t4 from "@/assets/img/t4.png";
-
 import { vtkmodel } from "@/control/vtkModel.js";
 import { createFireControl } from "@/control/fireControl.js";
 import vtkDataArray from "@kitware/vtk.js/Common/Core/DataArray.js";

+ 257 - 39
src/view/components/InfoDisaster.vue

@@ -31,7 +31,7 @@
                             <el-button
                               size="small"
                               type="success"
-                              @click.stop="handledetection(scope.$index, scope.row)"
+                              @click="handledetection(scope.$index, scope.row)"
                               >查看</el-button
                             >
                           </template>
@@ -255,7 +255,7 @@
     <!-- 瓦斯爆炸 -->
      <!--火灾左侧栏-->
      <div class="common-layout" style="margin: 0" v-show="sour.Gass">
-      <el-aside width="354px" class="L_aside L_aside1 asideg asidegbg leftbgimg1">
+      <el-aside width="465px" class="L_aside L_aside1 asideg asidegbg leftbgimg1">
         <div class="demo-collapse">
           <el-collapse v-model="coolactiveName1" accordion>
             <el-collapse-item name="1">
@@ -267,29 +267,61 @@
                 <div class="jc_content tablecolor">
                   <div class="jc_padding">
                     <div class="xian btncolor tablefocus">
-                      <div class=dialog_header>
-                      <span class="text-color">文件上传:</span>
-                    </div>
-                   
-                  <el-form>
-                      <vue-uploader
-                      ref="bdf"
-                      :projectId="'81'"
-                      :solverType="'fem'"
-                      :accept="'.nml'"
-                      :name="'Load BDF File'"
-                     
-                    ></vue-uploader>
-                  </el-form>
-                  <!--  @handfiles="handfiles"
-                      @upoK='upDisOk'
-                      style="margin: 20px 0 0 0"
-                      @runstatezt1="runstatezt($event)" -->
+                      <el-table
+                        :data="tableDatawat"
+                        style="width: 100%"
+                        :row-class-name="tableRowClassName"
+                        :header-cell-style="{ background: 'rgba(13, 22, 57, 0.96) ' }"
+                        @row-click="handleDelete($event)"
+                        max-height="350px"
+                        :highlight-current-row="currentrow" 
+                      >
+                        <el-table-column prop="pname" label="编号"  />
+                        <el-table-column prop="site" label="网格文件"  />
+                        <el-table-column prop="site" label="边界文件"  />
+                        <el-table-column label="操作" >
+                          <template #default="scope">
+                            <el-button
+                              size="small"
+                              type="success"
+                              @click.stop="handledetection2(scope.$index, scope.row)"
+                              >查看</el-button
+                            >
+                          </template>
+                        </el-table-column>
+                      </el-table>
+                      <div class="asdis_btn">
+                        <div
+                          class="flex_a"
+                          @click="
+                            newtable();
+                            Gassdialog.wsaddflie= true;
+                          "
+                        >
+                          <div class="btns"><span class="spantext">添加</span></div>
+                        </div>
+                        <div class="flex_a" @click="xiugaitable()">
+                          <div class="btns"><span class="spantext">修改</span></div>
+                        </div>
+                        <div
+                          class="flex_a"
+                          @click="
+                            shanchu('1');
+                        
+                          "
+                        >
+                          <div class="btns"><span class="spantext">删除</span></div>
+                        </div>
+                        <div class="flex_a">
+                          <div class="btns"><span class="spantext">确定</span></div>
+                        </div>
+                      </div>
                     </div>
+                 
                <!-- 瓦斯爆炸区域 -->
                <div
-                      class="xian tablefocus"
-                      style="margin-top: 20px"
+                      class="xian tablefocus wstable"
+                     
                     >
                       <div class="header_l header_z">
                         <el-image :src="icon" fit="contain"></el-image>
@@ -300,7 +332,7 @@
                       </div>
                       <el-table
                         :data="gtableData"
-                        style="width: 100%"
+                        style="width:100%"
                         :max-height="tableHeight"
                         :row-class-name="tableRowClassName"
                         :header-cell-style="{ background: 'rgba(13, 22, 57, 0.96) ' }"
@@ -312,35 +344,36 @@
                         <el-table-column prop="seti" label="结束位置" />>
                       </el-table>
                       <div class="asdis_btn">
+                        <div class="btnpading">
                         <div
-                          class="flex_a"
+                          class="flex_as"
                           @click="
-                            firinit();
-                            sdialog.adddwater = true;
+                            wsadd();
+                            Gassdialog.wsaddarea= true;
                           "
                         >
                           <div class="btns"><span class="spantext">添加</span></div>
                         </div>
-                        <div class="flex_a" @click="zaiyuxiugai()">
+                        <div class="flex_as" @click="wsxiugai()">
                           <div class="btns"><span class="spantext"> 修改</span></div>
                         </div>
                         <div
-                          class="flex_a"
+                          class="flex_as"
                           @click="
                             shanchu('2');
                           "
                         >
                           <div class="btns"><span class="spantext">删除</span></div>
                         </div>
-                        <div class="flex_a" @click="sdialog.disDisasterwter = false">
+                        <div class="flex_as" @click="sdialog.disDisasterwter = false">
                           <div class="btns"><span class="spantext">确定</span></div>
                         </div>
                       </div>
+                      </div>
                     </div>
-                  <!-- 瓦斯爆炸区域 -->
+                  <!-- 积聚区 -->
                <div
-                      class="xian tablefocus"
-                      style="margin-top: 20px"
+                      class="xian tablefocus wstable"
                     >
                       <div class="header_l header_z">
                         <el-image :src="icon" fit="contain"></el-image>
@@ -363,8 +396,9 @@
                         <el-table-column prop="seti" label="瓦斯浓度" />>
                       </el-table>
                       <div class="asdis_btn">
+                        <div class="btnpading">
                         <div
-                          class="flex_a"
+                          class="flex_as"
                           @click="
                             firinit();
                             sdialog.adddwater = true;
@@ -372,21 +406,22 @@
                         >
                           <div class="btns"><span class="spantext">添加</span></div>
                         </div>
-                        <div class="flex_a" @click="zaiyuxiugai()">
+                        <div class="flex_as" @click="zaiyuxiugai()">
                           <div class="btns"><span class="spantext"> 修改</span></div>
                         </div>
                         <div
-                          class="flex_a"
+                          class="flex_as"
                           @click="
                             shanchu('2');
                           "
                         >
                           <div class="btns"><span class="spantext">删除</span></div>
                         </div>
-                        <div class="flex_a" @click="sdialog.disDisasterwter = false">
+                        <div class="flex_as" @click="sdialog.disDisasterwter = false">
                           <div class="btns"><span class="spantext">确定</span></div>
                         </div>
                       </div>
+                      </div>
                     </div>
                   </div>
 
@@ -398,6 +433,166 @@
         </div>
       </el-aside>
     </div>
+    <!--瓦斯的 文件上传 -->
+    <el-dialog
+      v-model="Gassdialog.wsaddflie"
+      width="400"
+      align-center
+      :modal="false"
+      :close-on-click-modal="false"
+      draggable
+      :fullscreen="false"
+      :modal-append-to-body="false"
+      modal-class="summary-dlg"
+      class="dialog_class bgcolor tianjia"
+    >
+      <template #header="{ titleId, titleClass }">
+        <div class="my-header">
+          <el-image :src="icon" fit="contain"></el-image>
+          <h4 :id="titleId" :class="titleClass">文件上传</h4>
+        </div>
+      </template>
+         <div class=" btncolor tablefocus">
+                      <vue-uploader
+                      ref="bdf"
+                      :projectId="'81'"
+                      :solverType="'fem'"
+                      :accept="'.nml'"
+                      :upId="'1'"
+                      :name="'网格文件上传'"
+                      @handfiles="handfiles"
+                      style="margin: 20px 0 0 0"
+                    >
+
+                  </vue-uploader>
+                  <vue-uploader
+                      ref="fem"
+                      :projectId="'5'"
+                      :solverType="'fem'"
+                      :accept="'.ugrid'"
+                      :name="'边界文件'"
+                      :upId="'2'"
+                      @handfiles="handfiles"
+                      style="margin: 20px 0 0 0"
+                    >
+                  </vue-uploader>
+                  <!--  @handfiles="handfiles"
+                      @upoK='upDisOk'
+                      style="margin: 20px 0 0 0"
+                      @runstatezt1="runstatezt($event)" -->
+                    </div>
+      <div class="dialog-footer footer_div l_btn">
+        <div class="footerbtn flex1">
+          <div class="borderimg">
+            <el-button @click="Gassdialog.wsaddflie= false">取消</el-button>
+          </div>
+        </div>
+        <div class="footerbtn flex1">
+          <div class="borderimg">
+            <el-button
+              @click="
+                handleEditfire();
+                Gassdialog.wsaddflie= false;
+              "
+            >
+              确定
+            </el-button>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+    <!-- 瓦斯爆炸区域的添加 -->
+    <el-dialog
+      v-model="Gassdialog.wsaddarea"
+      width="400"
+      align-center
+      :modal="false"
+      :close-on-click-modal="false"
+      draggable
+      :fullscreen="false"
+      :modal-append-to-body="false"
+      modal-class="summary-dlg"
+      class="dialog_class bgcolor tianjia"
+    >
+      <template #header="{ titleId, titleClass }">
+        <div class="my-header">
+          <el-image :src="icon" fit="contain"></el-image>
+          <h4 :id="titleId" :class="titleClass">{{zhtext}} </h4>
+        </div>
+      </template>
+         <!-- <div class=" btncolor tablefocus">
+                
+               
+        </div> -->
+        <div class="demo-input-suffix firsttitle magintop">
+        <el-form-item label="巷道名称" :label-width="formLabelWidth5">
+          <el-input
+            v-model="selectstr"
+            disabled
+            class="w-50 m-2"
+            placeholder="巷道名称"
+          />
+        </el-form-item>
+        <div class="btn2">
+          <el-button
+            type="primary"
+            @click="
+              fireclick();
+              sdialog.dialogVisiblenode = true;
+            "
+            >选择巷道</el-button
+          >
+        </div>
+        <div class="btn2" style="padding-left: 10px">
+          <el-button type="primary" @click="Dclick()">3D巷道选择</el-button>
+        </div>
+      </div>
+      <div class="input">
+        <el-form-item label="开始位置" :label-width="formLabelWidth5">
+          <el-input-number
+            v-model="source.site"
+            :min="0"
+            :max="1"
+            :precision="2"
+            :step="0.1"
+            controls-position="right"
+            class="w-50 m-2"
+            placeholder="位置"
+          />
+        </el-form-item>
+        <el-form-item label="结束位置" :label-width="formLabelWidth5">
+          <el-input-number
+            v-model="source.site"
+            :min="0"
+            :max="1"
+            :precision="2"
+            :step="0.1"
+            controls-position="right"
+            class="w-50 m-2"
+            placeholder="位置"
+          />
+        </el-form-item>
+      </div>
+      <div class="dialog-footer footer_div l_btn">
+        <div class="footerbtn flex1">
+          <div class="borderimg">
+            <el-button @click="Gassdialog.wsaddarea= false">取消</el-button>
+          </div>
+        </div>
+        <div class="footerbtn flex1">
+          <div class="borderimg">
+            <el-button
+              @click="
+                handleEditfire();
+                Gassdialog.wsaddarea= false;
+              "
+            >
+              确定
+            </el-button>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
     <!-- 灾害点源数据的添加-->
     <el-dialog
       v-model="sdialog.dianadddialog"
@@ -784,6 +979,10 @@ let zaihai = ref({
 });
 let dialogtrue = ref();
 let zhtext = ref("");
+const Gassdialog=ref({
+  wsaddflie:false,
+  wsaddarea:false,
+})
 const sdialog = ref({
   adddialog: false,
   dialogsgdelect: false,
@@ -1161,6 +1360,15 @@ const firinit = () => {
   Disastersource.value.val4 = "";
   zhtext.value = "添加";
 };
+// 瓦斯爆炸
+const wsadd = () => {
+  zhtext.value = "添加";
+};
+//瓦斯的修改
+const wsxiugai=()=>{
+  Gassdialog.value.wsaddarea= true;
+  zhtext.value = "修改";
+}
 // 灾害源检测的修改
 const zaiyuxiugai = () => {
   zaihai.value.addEied = "x";
@@ -1249,9 +1457,7 @@ const handfiles = (file) => {
     const runstatezt=(res)=>{
       //  this.disabledok=res;
     }
-      const upDisOk=()=>{
-      // this.disOK=false;
-    }
+
      //load状态回调
      const fileLoadeState=(files)=> {
       console.log(files);
@@ -1708,4 +1914,16 @@ defineExpose({ sour, accident3, handledisaster,changeModel });
 .text-color{
   color: #fff;
 }
+.flex_as{
+
+padding: 0 13px 0 0;
+}
+.btnpading{
+  display: flex;
+  padding: 0 0 0 10px;
+}
+.wstable{
+ margin-top: 20px;
+ width:350px;
+}
 </style>

+ 28 - 12
src/view/result.vue

@@ -84,7 +84,7 @@ import { request, uploadFile } from "@/utils/request";
 import { ElMessage, ElButton, ElDialog, ElSelect } from "element-plus";
 import resultLeft from "./result/resultLeft.vue";
 import resultRight from "./result/resultRight.vue";
-import { timestampToTime } from "@/js/lindex.js";
+import { timestampToTime,timescount } from "@/js/lindex.js";
 import { vtkmodel } from "@/control/vtkModel.js";
 import t1 from "@/assets/img/t1.png";
 import t2 from "@/assets/img/t2.png";
@@ -105,9 +105,11 @@ let timing = ref(null);
 let starttime = ref(1);
 let endtime = ref(60);
 let timenum = ref(2);
+let time=ref();
 const isstop = ref(false);
 let aid = ref(Number);
-let timeline = ref("2024-03-03 14:00");
+let oldtime=ref();
+let timeline = ref("2024-03-22 09:42:06");
 let setleftAid = ref();
 let setrightAid = ref();
 let clickflat = ref(false);
@@ -129,12 +131,7 @@ const accident6 = (key, id) => {
     resultyem.value = false;
   }
 };
-const newtime = () => {
-  timing.value = setInterval(() => {
-    const timestamp = new Date().getTime();
-    timeline.value = timestampToTime(timestamp);
-  }, 1000);
-};
+
 // 时间选择
 
 function zdtimechange() {
@@ -147,13 +144,30 @@ function zdtimechange() {
 
 //滑块
 function sliderchange(val) {
-  // fcon.step = count.value;
-  console.log(val);
+  //fcon.step = count.value;
+//  console.log(val);
+  newtime();
 }
+// 时间计算
+const newtime = () => {
+  time.value=null;
+  console.log(formInline.value.count);
+  time.value=(new Date(oldtime.value).getTime())/1000;
+  if(formInline.value.count==2){
+     let time2=(formInline.value.count-1)*60+time.value;
+    timeline.value=timescount(time2);
+  }else{
+    let time2=(formInline.value.count)*60+time.value;
+    timeline.value=timescount(time2);
+  }
+
+
+};
 //回到上一页
 function Prev() {
   isstop.value = false;
   formInline.value.count--;
+     newtime();
 }
 //播放
 function play(time) {
@@ -170,6 +184,7 @@ function play(time) {
         // fcon.step = formInline.value.count ;
         // vtkScalarRead();
         // getMonitor();
+        newtime();
       }
     }
   };
@@ -186,6 +201,7 @@ function increment() {
     return;
   }
   formInline.value.count++;
+  newtime();
   console.log(formInline.value.count);
   // vtkScalarRead();
   // getMonitor();
@@ -261,7 +277,6 @@ async function getMonitor(leftAid, rightAid) {
     .catch((err) => { });
 }
 onMounted(() => {
-  newtime();
 });
 // 卸载时的操作
 onUnmounted(() => {
@@ -270,7 +285,7 @@ onUnmounted(() => {
     clearInterval(timing.value);
   }
 });
-defineExpose({ accident6, initAid, mntext1, mntext2, clickflat, endtime,zdtime });
+defineExpose({ accident6, initAid, mntext1, mntext2, clickflat, endtime,zdtime,timeline,oldtime });
 </script>
 <style scoped lang="scss">
 .heigjie {
@@ -381,6 +396,7 @@ display: flex;
   text-align: center;
   font-style: normal;
   text-transform: none;
+  width: 189px;
 }
 </style>
 <style>