liuqiao vor 1 Jahr
Ursprung
Commit
8333a1e918

+ 0 - 1
src/js/lindex.js

@@ -7,6 +7,5 @@ export function timestampToTime(timestamp) {
         let minute = ("0" + date.getMinutes()).slice(-2);
         let second = ("0" + date.getSeconds()).slice(-2);
         let formattedTime = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
-        console.log(formattedTime)
         return formattedTime;
      }

+ 1 - 1
src/main.js

@@ -1,6 +1,6 @@
 import { VueElement, createApp,Vue } from 'vue'
 import App from './App.vue'
-import router from './router/index.js'
+import router from './router'
 import * as echarts from 'echarts'
 import $ from 'jquery'
 //import Vuex from 'vuex' // 引入vuex

+ 20 - 0
src/router/globalRoutes.js

@@ -0,0 +1,20 @@
+/*
+ * @Author: your name
+ * @Date: 2021-01-13 17:37:21
+ * @LastEditTime: 2021-01-18 09:45:13
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \vue3-element-admin\src\router\globalRoutes.js
+ */
+export default [
+    {
+        path: "/login",
+        name: "Login",
+        component: () => import("@/views/Login.vue"),
+    },
+    {
+        path: "/404",
+        name: "404",
+        component: () => import("@/views/404.vue"),
+    },
+];

+ 27 - 18
src/router/index.js

@@ -13,24 +13,33 @@
 // })
 
 // export default router
-import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";
-const router = createRouter({
-    history: createWebHashHistory(),
-    routes: [
-       
-        {
-            path: '/myHome',
-           // name:'zhuye',
-            component: () => import('@/components/myHome.vue') // 这是路由的籁加载,也可以其他方式
-        },
-        {
-           path: '/myDemo',
-           name:'MyDemo',
-            component: () => import('@/view/myDemo.vue') // 这是路由的籁加载,也可以其他方式
-        },
+// import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";
+// import configurator from "@/view/configurator.vue"
+// const router = createRouter({
+//     history: createWebHashHistory(),
+//     routes: [
+//         {
+//             path: '/myHome',
+//             component: () => import('@/components/myHome.vue') // 这是路由的籁加载,也可以其他方式
+//         },
+//         {
+//            path: '/configurator',
+//            component:configurator// 这是路由的籁加载,也可以其他方式
+//         },
                   
    
-    ]
-})
+//     ]
+// })
+
+// export default router;
+import { createRouter, createWebHashHistory } from "vue-router";
+import globalRoutes from "./globalRoutes";
+import mainRoutes from "./mainRoutes";
 
-export default router;
+const router = createRouter({
+    history: createWebHashHistory(),
+    scrollBehavior: () => ({ y: 0 }),
+    isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
+    routes: globalRoutes.concat(mainRoutes),
+});
+export default router;

+ 5 - 10
src/router/index.ts

@@ -1,18 +1,13 @@
 import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";
+import configurator from "@/view/configurator.vue"
 const router = createRouter({
     history: createWebHashHistory(),
     routes: [
-       
         {
-            path: '/myHome',
-           // name:'zhuye',
-            component: () => import('@/components/myHome.vue') // 这是路由的籁加载,也可以其他方式
-        },
-        {
-           path: '/myDemo',
-           name:'MyDemo',
-            component: () => import('@/view/myDemo.vue') // 这是路由的籁加载,也可以其他方式
-        },
+            path: '/configurator',
+            name:'configurator',
+             component:configurator // 这是路由的籁加载,也可以其他方式
+         },
                   
    
     ]

+ 16 - 0
src/router/mainRoutes.js

@@ -0,0 +1,16 @@
+/*
+ * @Author: your name
+ * @Date: 2021-01-13 17:39:02
+ * @LastEditTime: 2021-01-18 15:48:29
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \vue3-element-admin\src\router\mainRoutes.js
+ */
+export default [
+    {
+        path: "/configurator",
+        name: "Configurator",
+        component: () => import("@/view/configurator.vue"),
+    },
+  
+];

+ 14 - 9
src/view/InfoDialoges.vue

@@ -86,9 +86,9 @@
   </div>
       <div class="dialog-footer footer_div l_btn">
         <div class="footerbtn flex1"><div class="borderimg"><el-button @click="addsg('1');">添加</el-button></div></div>
-        <!-- <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="addsg('2')">
+        <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="addsg('2')">
        修改
-        </el-button></div></div> -->
+        </el-button></div></div>
         <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="dialog.dialogsgdelect=true">
        删除
         </el-button></div></div>
@@ -102,7 +102,7 @@
    <div class="ddd" v-show="dialog.dialogForm">
       <div class="header_l">
         <el-image :src="icon" fit="contain" ></el-image>
-        <h4  class="tianjia"> 事故添加</h4>
+        <h4  class="tianjia"> {{shigtext}}</h4>
         <div class="closeimg"  @click="dialog.dialogForm=false"><el-image :src="closeimg" fit="contain"  style="margin-top: -10px;" ></el-image></div> 
       <div class="ddd_div" style="display: flex;">
         <div class="demo-input-suffix firsttitle magintop">
@@ -347,6 +347,7 @@ const props= defineProps({
     }
 
  });
+ let shigtext=ref('');
  let websock=ref(null);
  let times=ref({
       lockReconnect: false, //是否真正建立连接
@@ -434,6 +435,7 @@ let tuiyanobj3=ref({
     cocodes:'CO2'
 
 })
+let tableobj=ref({});
 let coolactiveName=ref(["1","2"]);
 let newlog=ref("");
 let rizhi=ref({
@@ -486,13 +488,12 @@ const tableData2 = [
 
 ]
 const handleCurrentChange= ({row, rowIndex}) =>{
-  console.log(row);
+ // console.log(row);
 }
 // aid获取
 
 // 类型选择
 const classclick= () =>{
-
   dialogVisible.value = false; 
   dialog.value.dialogVisible_fire = true;
   classradio.value=classradio1.value;
@@ -537,7 +538,7 @@ const sgadd=()=>{
           .then((res) => { 
             dialog.value.dialogForm=false;
             getdata();
-         
+         scoperadio.value=null;
           })
           .catch((err) => {
             ElMessage.error(err.returnMsg)
@@ -546,7 +547,9 @@ const sgadd=()=>{
 // 事故列表的选择
 const getRadioRow=(val)=>{
 
-    sgdata.value=(val)
+ sgdata.value=(val);
+console.log(tableobj.value)
+formull.value.name=val.name;
 aid.value=val.aid;
 idobj.value.name=val.name;
 idobj.value.time=val.time;
@@ -559,12 +562,14 @@ function handleCurrentChange2(val){
 const addsg=(val)=>{
     console.log(val);
     if(val=='1'){
+    shigtext.value='事故添加';   
     aid.value=0;
    formull.value.name='';
     }else if(val=='2'){
+        shigtext.value='事故修改'; 
         formull.value.name=idobj.value.name
     }
-dialog.value.dialogForm=true;
+    dialog.value.dialogForm=true;
 }
 // 事故删除
 const sgdelect=()=>{
@@ -749,7 +754,7 @@ function initWebSocket() {
     // Websoket接收消息事件
     const websocketonmessage = (res) => {
      // console.log("数据", res);
-     console.log(res.data);
+   //  console.log(res.data);
      getthislog(res.data);
       
       reset();

+ 9 - 1
src/view/appmian.vue

@@ -40,13 +40,15 @@
                         <span class="l_huoqing">{{headerobj.name}}</span>
                         <span class="l_time">{{headerobj.time}}</span>
                     </div>
-                    <div class="ve_timeioc">
+                    <!-- <router-link to="/configurator"> -->
+                    <div class="ve_timeioc" @click="tiaozhuan()">
                         <el-image
                             :src="Vector"
                             fit="contain"
                         ></el-image>
                         <span>模型库</span>
                     </div>
+                <!-- </router-link> -->
                 </div>
         </div>
             </el-header>
@@ -64,6 +66,7 @@
   
   <script setup>
 import { ref, onMounted, reactive,nextTick } from "vue";
+    import {RouterView,RouterLink,useRouter } from "vue-router"
 // import NavigateBar from "@/components/layout/NavigateBar.vue";
 import Dialoges  from "./InfoDialoges.vue"
 import logo from "@/assets/logo.png";
@@ -87,10 +90,15 @@ let headerobj=ref({
     time:'火灾事故2023.02.26',
     name:"2024-03-20 11:30:20",
 })
+let router=useRouter();
 let sgdata=ref({});
 let aid=ref();
   onMounted(() => {
   });
+// 跳转页面
+const tiaozhuan=()=>{
+    router.push("/configurator",{ aid:aid.value});
+}
 // 
 const addselect=()=>{
     classradio.value=lliudialog.value.classradio;

+ 13 - 3
src/view/components/InfoAnimation.vue

@@ -107,7 +107,7 @@
 </template>
 
 <script setup>
-import { computed, ref, onMounted, reactive, toRef } from "vue";
+import { computed, ref, onMounted,onBeforeUnmount, reactive, toRef } from "vue";
 import { request, uploadFile } from "@/utils/request";
 import { ElMessage, ElButton, ElDialog, ElSelect } from "element-plus";
 import icon from "@/assets/img/icon.png";
@@ -196,6 +196,7 @@ let starttime = ref(1);
 let endtime = ref(60);
 let timenum = ref(2);
 let aid = ref();
+let timing=ref(null)
 const percentage = ref(20);
 const customColor = ref("#409eff");
 const tableRowClassName = ({ row, rowIndex }) => {
@@ -448,8 +449,8 @@ async function readJob() {
 //当前时间=开始时间+输出步长*输出次数
 function reddate(date) {
   //当前时间
-  const timestamp = date.getTime();
-  newtime.value = timestampToTime(timestamp);
+  // const timestamp = date.getTime();
+  // newtime.value = timestampToTime(timestamp);
   const accstamp = Date.parse(job.value.acctime);
   var timeDifference = parseInt((timestamp - accstamp) / 1000);
   fcon.stepsum = parseInt(job.value.totaltime) / parseInt(job.value.reportstep);
@@ -546,6 +547,15 @@ function generateTicks(numberOfTicks) {
 const handleClick=()=>{
 
 }
+onBeforeUnmount(() => {
+    clearInterval( timing.value );
+  });
+onMounted(() => {
+  timing.value=setInterval(() => {
+   const timestamp =new Date().getTime();
+ newtime.value = timestampToTime(timestamp);
+}, 1000);
+    });
 defineExpose({ monitor, accident5 });
 </script>
 <style lang="scss" scoped>

+ 57 - 11
src/view/components/InfoBoundary.vue

@@ -26,6 +26,14 @@
                                                 :header-cell-style="{ 'background': 'rgba(13, 22, 57, 0.96) ' }">
                                                 <el-table-column prop="nid" label="节点选择" />
                                                 <el-table-column prop="type" label="边界类型" />
+                                                <!-- <el-table-column label="边界类型" prop="type" align="center" width="80px">
+                                                        <template #default="scope">
+                                                        {{ scope.row.type == massflow ? '流量边界' : scope.row.type ==	Pressure ?'压力边界' }} 
+                                                        </template>
+                                                    </el-table-column> -->
+                                                    <!-- <el-table-column  width="50">
+                                                        <template #default="scope">{{scope.row.type == massflow ? '流量边界' : scope.row.type ==	Pressure?'压力边界' }} </template>
+                                                    </el-table-column> -->
                                                 <el-table-column prop="flow" label="流量(m³/s)" width="80" />
                                                 <el-table-column prop="pressure" label="压强(pa)" width="70" />
                                                 <el-table-column prop="temperature" label="温度(℃)" />
@@ -38,11 +46,12 @@
                                                         <span class="spantext">添加</span></div>
                                                 </div>
                                                 <div class="flex_a">
-                                                    <div class="btns"  @click="sdialog.dialogsgdelect=true"><span class="spantext">删除</span></div>
+                                                    <div class="btns" @click="xiugai();" ><span class="spantext">修改</span></div>
                                                 </div>
                                                 <div class="flex_a">
-                                                    <div class="btns"><span class="spantext">确认</span></div>
+                                                    <div class="btns"  @click="sdialog.dialogsgdelect=true"><span class="spantext">删除</span></div>
                                                 </div>
+                                               
                                             </div>
                                         </div>
                                     </div>
@@ -87,11 +96,14 @@
                                             </el-table>
                                         </div>
                                     </div>
-                                    <div class="asdis_btn">
+                                    <div class="asdis_btn padingcla">
                                                 <div class="flex_a">
                                                     <div class="btns" @click="bounadd();dialog.dialogVisible = true;">
                                                         <span class="spantext">添加</span></div>
                                                 </div>
+                                                <div class="flex_a">
+                                                    <div class="btns" @click="xiugai();" ><span class="spantext">修改</span></div>
+                                                </div>
                                                 <div class="flex_a">
                                                     <div class="btns"  @click="sdialog.dialogsgdelect=true"><span class="spantext">删除</span></div>
                                                 </div>
@@ -116,7 +128,7 @@
             <template #header="{ titleId, titleClass }">
                 <div class="my-header">
                     <el-image :src="icon" fit="contain"></el-image>
-                    <h4 :id="titleId" :class="titleClass">添加</h4>
+                    <h4 :id="titleId" :class="titleClass">{{ buntext }}</h4>
 
                 </div>
             </template>
@@ -280,11 +292,13 @@ let sdialog = ref({
     dialogVisiblenode: false,
     dialogsgdelect:false,
 })
+let buntext=ref("")
 const strResultFormatlist = reactive(
 
     { id: 0, name: "灾情演化", value: ".vtk" },
     { id: 1, name: "演化过程", value: ".mesh" }
 );
+let xiugaiobj=ref({});
 let zqname=ref('');
 let tableHeight=ref(400)
 const multipleTableRef = ref()
@@ -323,18 +337,17 @@ let bformInline = ref({
     options: [
         {
             value: 'massflow',
-            label: '流量入口',
+            label: '流量边界',
         },
         {
             value: 'Pressure',
-            label: ' 压力入口',
+            label: ' 压力边界',
         },
     ],
-    region: '压力出口',
+    region: '边界出口',
     options2: [
         {
-            value: '压力出口',
-            label: ' 压力出口',
+            value: '边界出口',
         },
     ]
 
@@ -411,6 +424,7 @@ const projectsSelectionSelect = (selection, row) => {
 }
 //边界添加前清空
 const  bounadd=()=>{
+    bid.value='';
     bformInline.value.nname='';
     bformInline.value.type='Pressure',
     bformInline.value.flow='';
@@ -418,6 +432,7 @@ const  bounadd=()=>{
     bformInline.value.temperature='';
     bformInline.value.polcon1='';
     bformInline.value.polcon2='';
+    buntext.value='添加';
     if (props.classradio == "Fire") {
         bformInline.value.type='Pressure'
         } else if (props.classradio == "Water") {
@@ -427,10 +442,38 @@ const  bounadd=()=>{
         }
 
 }
+//修改
+const  xiugai=()=>{
+    buntext.value='修改';
+    if(JSON. stringify(xiugaiobj.value) == '{}'){
+      ElMessage.error("你还没有选中修改的项目")
+    }else{
+        if (props.classradio == "Fire") {
+        bformInline.value.type='Pressure'
+        } else if (props.classradio == "Water") {
+            bformInline.value.type='边界出口'
+        }else{
+        
+        }
+        console.log(xiugaiobj.value);
+        bid.value=xiugaiobj.value.bid;
+        nid.value=xiugaiobj.value.nid;
+        aid.value=xiugaiobj.value.aid;
+        dialog.value.dialogVisible = true;
+       bformInline.value.nname=xiugaiobj.value.nname
+       bformInline.value.type=xiugaiobj.value.type
+       bformInline.value.flow=xiugaiobj.value.flow
+       bformInline.value.pressure=xiugaiobj.value.pressure
+       bformInline.value.temperature=xiugaiobj.value.temperature
+       bformInline.value.polcon1=xiugaiobj.value.polcon1
+       bformInline.value.polcon2=xiugaiobj.value.polcon2
+    }
+}
 //边界的添加
 const  accidentboun=()=>{
     const params = {
         transCode: 'D10008',
+        bid:bid.value,
         nid:nid.value,
         nname:bformInline.value.nname,
         type:bformInline.value.type,
@@ -470,6 +513,7 @@ const addboundary = (valaid) => {
  //火灾边界条件删除
  const handleDelete=(val)=>{
       console.log(val);
+      xiugaiobj.value=val;
       bid.value=val.bid;
       zqname.value=val.nname;
   
@@ -542,9 +586,11 @@ defineExpose({ boun, accident4,addboundary });
 
  .flex_a {
      flex: 1;
-     padding: 0 19px;
+     padding: 0 19px ;
+ }
+ .padingcla .flex_a{
+    padding: 0 2px !important;
  }
-
  .btns {
      width: 72px;
      height: 30px;

+ 119 - 20
src/view/components/InfoDisaster.vue

@@ -17,8 +17,7 @@
            
           <div class="jc_padding">
               <div class="xian btncolor tablefocus" >
-           
-                      <el-table
+            <el-table
               :data="tableDatay"
               style="width: 100%"
               @row-click="handleDelete($event)"
@@ -43,8 +42,9 @@
       </el-table>
       <div class="asdis_btn">
       <div class="flex_a" @click="newtable();sdialog.dianadddialog=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');sdialog.dialogsgdelect=true"><div class="btns"><span class="spantext">删除</span></div></div>
-      <div class="flex_a"><div class="btns"><span class="spantext">确定</span></div></div>
+      <!-- <div class="flex_a"><div class="btns"><span class="spantext">确定</span></div></div> -->
   </div>
       </div>
               <!--  -->
@@ -70,6 +70,7 @@
       </el-table>
     <div class="asdis_btn">
       <div class="flex_a" @click="firinit();sdialog.adddialog=true"><div class="btns"><span class="spantext">添加</span></div></div>
+      <div class="flex_a" @click="zaiyuxiugai();"><div class="btns"><span class="spantext"> 修改</span></div></div>
       <div class="flex_a" @click="shanchu('2');sdialog.dialogsgdelect=true"><div class="btns"><span class="spantext">删除</span></div></div>
       <div class="flex_a"><div class="btns"  @click="sdialog.isDisasterfire=false"><span class="spantext">确定</span></div></div>
   </div>
@@ -129,6 +130,7 @@
       </el-table>
       <div class="asdis_btn">
       <div class="flex_a" @click="newtable();sdialog.dianadddialog=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');sdialog.dialogsgdelect=true"><div class="btns"><span class="spantext">删除</span></div></div>
       <div class="flex_a"><div class="btns"><span class="spantext">确定</span></div></div>
   </div>
@@ -154,6 +156,7 @@
       </el-table>
       <div class="asdis_btn">
       <div class="flex_a" @click="firinit();sdialog.adddwater=true"><div class="btns"><span class="spantext">添加</span></div></div>
+      <div class="flex_a" @click="zaiyuxiugai();"><div class="btns"><span class="spantext"> 修改</span></div></div>
       <div class="flex_a" @click="shanchu('2');sdialog.dialogsgdelect=true"><div class="btns"><span class="spantext">删除</span></div></div>
       <div class="flex_a"  @click="sdialog.disDisasterwter=false"><div class="btns"><span class="spantext">确定</span></div></div>
   </div>
@@ -175,7 +178,7 @@
           <template #header="{titleId, titleClass }">
           <div class="my-header ">
               <el-image :src="icon" fit="contain" ></el-image>
-              <h4 :id="titleId" :class="titleClass">添加</h4>
+              <h4 :id="titleId" :class="titleClass">{{zhtext}}</h4>
 
           </div>
           </template>
@@ -285,7 +288,7 @@
           <template #header="{titleId, titleClass }">
           <div class="my-header ">
               <el-image :src="icon" fit="contain" ></el-image>
-              <h4 :id="titleId" :class="titleClass">添加</h4>
+              <h4 :id="titleId" :class="titleClass">{{zhtext}}</h4>
 
           </div>
           </template>
@@ -376,6 +379,10 @@
   
   
    });
+let zaihai=ref({
+  addEied:'',
+})
+let zhtext=ref("");
    const sdialog=ref({
       adddialog:false,
       dialogsgdelect:false,
@@ -395,6 +402,7 @@
       collfire:false,
       collwater:false,
   });
+  let jiancobj=ref({});
   let firepid=ref("");
   let svid=ref("");
   let firesid=ref("");
@@ -416,7 +424,7 @@
       val3:'',
       val4:'',
        })
-
+let tableobj=ref({});
    const tableData2= ref([])
   let aid=ref();
   let biaoid= ref();
@@ -482,34 +490,26 @@
               ElMessage.error(err.returnMsg)
             })
   }
-  //灾情源添加清空
-    const  firinit=()=>{
-   Disastersource.value.timeline=''
-   Disastersource.value.val1=''
-   Disastersource.value.val2=''
-   Disastersource.value.val3=''
-    Disastersource.value.val4=''
-
-  }
   //添加保存
    const  handleEditfire=()=>{
       if(gdadd.value=='1'){
         fireadd()
         sdialog.value.dianadddialog=false; 
-      //   waaddshow.value=false;  
      }else if(gdadd.value=='2'){ 
       if(props.classradio=='Fire'){
           sdialog.value.dianadddialog=false; 
-      }else {
-      //   waaddshow.value=false; 
       }
-  
+    }else if(gdadd.value='3'){
+        xiugaiapi();
+      //   waaddshow.value=false; 
+      }else{
      }
      handledisaster(aid.value);
     }
   //灾情源删除
   const handleDelete=(val)=>{
       console.log(val);
+      tableobj.value=val;
       firesid.value=val.sid;
       zqname.value=val.pname;
   
@@ -559,7 +559,42 @@
          source.site=0;
          newtable.value='1';
          gdadd.value='1';
+         zhtext.value='添加';
    }
+  //  修改
+  const xiugaitable=()=>{
+    gdadd.value='3';
+    zhtext.value='修改'
+    if(JSON. stringify(tableobj.value) == '{}'){
+      ElMessage.error("你还没有选中修改的项目")
+    }else{
+      sdialog.value.dianadddialog=true;
+      aid.value=tableobj.value.aid;
+      firepid.value=tableobj.value.pid;
+      source.site=tableobj.value.site;
+      selectstr.value=tableobj.value.pname;
+    }
+ 
+  }
+  // 修改接口
+  const xiugaiapi=()=>{
+    const params = {
+          transCode: 'D000010',
+          pid:firepid.value,
+          site:source.site,
+          sid:tableobj.value.sid,
+          }
+
+          request(params)
+            .then((res) => { 
+              ElMessage({
+              message: res.returnMsg,
+              type: 'success',
+            })
+            })
+            .catch((err) => {
+            })
+  }
   // 选择
       const  fireclick=()=>{
       pipelinedata('');
@@ -576,9 +611,10 @@
       firepid.value=multipleSelection.value[0].id;
       selectstr.value=multipleSelection.value[0].name;
        }else{
-         selectstr.value='';
+        // selectstr.value='';
         
        }
+  
      }
       const projectsSelectionSelect=(selection, row)=>{
        if(selection.length>1){
@@ -652,6 +688,7 @@
   //   }
   // 灾源火灾检测添加
   const addjiancf=()=>{
+    if(zaihai.value.addEied=='a'){
       const params = {
           transCode: 'D00006',
           sid:firesid.value,
@@ -673,17 +710,79 @@
             .catch((err) => {
               ElMessage.error(err.returnMsg)
             })
+
+    }else{
+      zaiyuxiugaiapi();
+    }
+    
+  }
+    //灾情源添加清空
+    const  firinit=()=>{
+      zaihai.value.addEied='a';
+      Disastersource.value.timeline='';
+      Disastersource.value.val1='';
+      Disastersource.value.val2='';
+      Disastersource.value.val3='';
+       Disastersource.value.val4='';
+       zhtext.value='添加';
+   
+     }
+  // 灾害源检测的修改
+  const  zaiyuxiugai=()=>{
+    zaihai.value.addEied='x';
+    zhtext.value='修改';
+    if(JSON. stringify(jiancobj.value) == '{}'){
+      ElMessage.error("你还没有选中修改的项目")
+    }else{
+      if(props.classradio=="Fire"){
+        sdialog.value.adddialog=true;
+      }else{
+        sdialog.value.adddwater=true;
+      }
+
+    Disastersource.value.timeline=jiancobj.value.timeline;
+    Disastersource.value.val1=jiancobj.value.val1;
+    Disastersource.value.val2=jiancobj.value.val2;
+    Disastersource.value.val3= jiancobj.value.val3;
+    Disastersource.value.val4=jiancobj.value.val4;
+    }
+  }
+  // 灾害源的检测表修改接口
+  const  zaiyuxiugaiapi=()=>{
+    const params = {
+          transCode: 'D000012',
+          svid:jiancobj.value.svid,
+          timeline:Disastersource.value.timeline,
+          val1:Disastersource.value.val1,
+          val2:Disastersource.value.val2,
+          val3:Disastersource.value.val3,
+          val4:Disastersource.value.val4,
+          }
+
+          request(params)
+            .then((res) => { 
+              ElMessage({
+              message: res.returnMsg,
+              type: 'success',
+            })
+            getinquire();
+            })
+            .catch((err) => {
+              ElMessage.error(err.returnMsg)
+            })
   }
   // 灾源突水检测添加
   //灾情检测删除
   const handleDelete2=(val)=>{
       console.log(val);
+      jiancobj.value=val;
       firesid.value=val.sid;
       zqname.value="检测表的一条信息";
       svid.value=val.svid
   }
   const handleDelete3=(val)=>{
       console.log(val);
+      jiancobj.value=val;
       firesid.value=val.sid;
       zqname.value="检测表的一条信息";
       svid.value=val.svid

+ 68 - 17
src/view/components/MenuMine.vue

@@ -7,7 +7,7 @@
         :modal="false"
         :close-on-click-modal="false"
         draggable
-    class="dialog_class bgcolor"
+    class="dialog_class bgcolor zhucentent"
     >
     <template #header="{titleId, titleClass }">
         <div class="my-header xinxi_header">
@@ -24,7 +24,53 @@
           @tab-click="handleClick"
         >
           <el-tab-pane label="节点信息" name="first">
-          
+            <div class="asides_content">
+                                <div class="jc_content tablecolor jc_content">
+
+                                    <div class="font12 my_content1">
+                                        <div class="xian btncolor tablefocus bmar">
+
+                                            <el-table :data="ftableData" style="width:468px"
+                                               :max-height="tableHeight"
+                                                :highlight-current-row="true"
+                                                 :row-class-name="tableRowClassName"
+                                                 @row-click="handleDelete($event)"
+                                                :header-cell-style="{ 'background': 'rgba(13, 22, 57, 0.9) ' }">
+                                                <el-table-column prop="nid" label="节点编号" />
+                                                <el-table-column prop="type" label="X" />
+                                                <el-table-column prop="nid" label="Y" />
+                                                <el-table-column prop="type" label="Z" />
+                                            </el-table>
+                                        </div>
+                                    </div>
+                                    <div class="dialog-footer footer_div l_btn">
+                                    <div class="footerbtn flex1"><div class="borderimg"><el-button @click="addsg('1');">添加</el-button></div></div>
+                                    <!-- <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="addsg('2')">
+                                修改
+                                    </el-button></div></div> -->
+                                    <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="dialog.dialogsgdelect=true">
+                                删除
+                                    </el-button></div></div>
+                                    <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="accident()">
+                               修改
+                                    </el-button></div></div>
+                                </div>
+                                    <!-- <div class="asdis_btn padingcla">
+                                                <div class="flex_a">
+                                                    <div class="btns" @click="bounadd();dialog.dialogVisible = true;">
+                                                        <span class="spantext">添加</span></div>
+                                                </div>
+                                                <div class="flex_a">
+                                                    <div class="btns" @click="xiugai();" ><span class="spantext">修改</span></div>
+                                                </div>
+                                                <div class="flex_a">
+                                                    <div class="btns"  @click="sdialog.dialogsgdelect=true"><span class="spantext">删除</span></div>
+                                                </div>
+                                            </div> -->
+
+                                </div>
+
+                            </div>
           </el-tab-pane>
           <el-tab-pane label="巷道信息" name="second">
             </el-tab-pane>
@@ -36,18 +82,6 @@
         </el-tab-pane>
         </el-tabs>
       </div>
-       <div class="dialog-footer footer_div l_btn">
-        <div class="footerbtn flex1"><div class="borderimg"><el-button @click="addsg('1');">添加</el-button></div></div>
-        <!-- <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="addsg('2')">
-       修改
-        </el-button></div></div> -->
-        <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="dialog.dialogsgdelect=true">
-       删除
-        </el-button></div></div>
-        <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="accident()">
-       确定
-        </el-button></div></div>
-      </div>
  
     </el-dialog>
       </div>
@@ -58,8 +92,17 @@ import { request, uploadFile } from "@/utils/request";
 import { ElMessage,ElButton, ElDialog,ElSelect } from 'element-plus'
 import icon from "@/assets/img/icon.png";
 import {timestampToTime} from '@/js/lindex.js'
-let dialogVisible=ref(true);
+let dialogVisible=ref(false);
 let classradio1= ref('Fire');
+const resultactiveName = ref("first");
+let tableHeight=ref(570);
+const tableRowClassName = ({row, rowIndex}) =>{
+      if (rowIndex%2 != 0) {
+          return 'evenRow';
+      }
+      return 'oddRow';
+    
+  }
 </script>
 <style lang="scss" scoped>
 .jc_padding{
@@ -657,8 +700,11 @@ border: 1px solid rgba(31, 107, 255, 1);
 .el-tabs--card>.el-tabs__header,.el-tabs--card>.el-tabs__header,.el-tabs--card>.el-tabs__header .el-tabs__nav{
     border: none !important;
 }
-.el-tabs{
-    --el-tabs-header-height: 70px  !important;
+.classtab  .el-tabs{
+    --el-tabs-header-height: 48px  !important;
+}
+.classtab .el-tabs__header{
+margin: 0 !important;
 }
 
 .classtab .is-active{
@@ -701,5 +747,10 @@ ul, ol {
 }
 .xinxi_header{
     border-bottom: none !important;
+}
+.classtab .el-tabs__nav{
+    width: 468px;
+}
+.zhucentent{
 }
  </style>

+ 462 - 0
src/view/components/MenuSensor.vue

@@ -0,0 +1,462 @@
+<template>
+    <div class="l_Dialog">
+      <el-dialog
+      v-model="sendialogVisible"
+      width="470"
+      align-center
+      :modal="false"
+      :close-on-click-modal="false"
+      draggable
+  class="dialog_class bgcolor zhucentent"
+  >
+  <template #header="{titleId, titleClass }">
+      <div class="my-header xinxi_header">
+          <el-image :src="icon" fit="contain" ></el-image>
+          <h4 :id="titleId" :class="titleClass">传感器信息</h4>
+      
+      </div>
+      </template>
+      <div class="classtab">
+          <div class="asides_content">
+                              <div class="jc_content tablecolor jc_content">
+
+                                  <div class="font12 my_content1">
+                                      <div class="xian btncolor tablefocus bmar">
+
+                                          <el-table :data="tableData" style="width:468px"
+                                             :max-height="tableHeight"
+                                              :highlight-current-row="true"
+                                               :row-class-name="tableRowClassName"
+                                               @row-click="handleDelete($event)"
+                                              :header-cell-style="{ 'background': 'rgba(13, 22, 57, 0.9) ' }">
+                                              <el-table-column type="index" width="50" />
+                                              <el-table-column prop="pid" label="编号" />
+                                              <el-table-column prop="stype" label="类型" />
+                                              <el-table-column prop="seid" label="所在巷道" />
+                                              <el-table-column prop="site" label="位置" />
+                                          </el-table>
+                                      </div>
+                                  </div>
+                                  <div class="dialog-footer footer_div l_btn">
+                                  <div class="footerbtn flex1"><div class="borderimg"><el-button @click="addsg();">添加</el-button></div></div>
+                                  <!-- <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="addsg('2')">
+                              修改
+                                  </el-button></div></div> -->
+                                  <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="dialog.dialogsgdelect=true">
+                              删除
+                                  </el-button></div></div>
+                                  <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="accident()">
+                             修改
+                                  </el-button></div></div>
+                              </div>
+                              </div>
+
+                          </div>
+       
+    </div>
+<!-- 添加 -->
+    <el-dialog v-model="addVisible" width="400"   class="dialog_class bgcolor tianjia  foter_l tianjia">
+          <template #header="{titleId, titleClass }">
+          <div class="my-header ">
+              <el-image :src="icon" fit="contain" ></el-image>
+              <h4 :id="titleId" :class="titleClass">{{add}}</h4>
+
+          </div>
+          </template>
+          <div>
+    <el-form>
+            <el-form-item label="时间" :label-width="formLabelWidth6">
+            <el-input  v-model="senobj.site" class="w-50 m-2"  placeholder="请输入"  />
+            </el-form-item>
+            <el-form-item label="突水量"  :label-width="formLabelWidth6">
+            <el-input  v-model="senobj.site" class="w-50 m-2"  placeholder="请输入"  />
+            </el-form-item>
+            <el-form-item label="所在巷道" :label-width="formLabelWidth6">
+            <el-input  v-model="senobj.site" class="w-50 m-2"  placeholder="请输入"  />
+            </el-form-item>
+            <el-form-item label="位置"  :label-width="formLabelWidth6">
+            <el-input  v-model="senobj.site" class="w-50 m-2"  placeholder="请输入"  />
+            </el-form-item>
+            </el-form>
+  </div>
+          <div class="dialog-footer footer_div l_btn">
+              <div class="footerbtn flex1"><div class="borderimg"><el-button @click="addVisible=false">取消</el-button></div></div>
+              <div class="footerbtn flex1"><div class="borderimg"><el-button  @click="addjiancf();addVisible=false">
+          确定
+              </el-button></div></div>
+          </div>
+      </el-dialog>
+  </el-dialog>
+    </div>
+</template>
+<script setup>
+import { computed,ref,onMounted,reactive, toRef } from "vue";
+import { request, uploadFile } from "@/utils/request";
+import { ElMessage,ElButton, ElDialog,ElSelect } from 'element-plus'
+import icon from "@/assets/img/icon.png";
+import {timestampToTime} from '@/js/lindex.js'
+let sendialogVisible=ref(false);
+let addVisible=ref(false);
+let classradio1= ref('Fire');
+const formLabelWidth6=ref(100);
+let add=ref("")
+const resultactiveName = ref("first");
+let tableHeight=ref(570);
+let tableData=ref([]);
+let senobj={
+    pid: 34,
+    seid: 2,
+    site: 0,
+    type: "温度传感器"
+}
+const tableRowClassName = ({row, rowIndex}) =>{
+    if (rowIndex%2 != 0) {
+        return 'evenRow';
+    }
+    return 'oddRow';
+  
+}
+onMounted(() => {
+    getsensor();
+  });
+// 查询
+const getsensor=()=>{
+
+      const params = {
+          transCode: 'D10010',
+          type:'Fire'
+          }
+          request(params)
+            .then((res) => { 
+                tableData.value=res.rows;
+
+            })
+            .catch((err) => {
+              ElMessage.error(err.returnMsg)
+            })
+}
+//添加
+const addsg=()=>{
+    add.value="添加";
+    addVisible.value=true;
+}
+defineExpose({sendialogVisible,});
+</script>
+<style lang="scss" scoped> 
+.jc_padding .el-table tr{
+    height: 30px !important;
+    background: rgba(104,173,255,0.3);
+    box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+    border-radius: 0px 0px 0px 0px;
+    border: 1px solid;
+    border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+}
+.flex_a{
+flex: 1;
+padding: 0 19px; 
+}
+.btns{
+width: 72px;
+height: 30px;
+background-image: url(../../assets/img/Rectangle399.png);
+background-repeat: no-repeat;
+line-height: 30px; 
+overflow: hidden;  
+margin: 10px 0;
+.spantext{
+font-weight: bold;
+font-size: 12px;
+color: #FFFFFF;
+text-align: left;
+font-style: normal;
+text-transform: none;
+}
+}
+.header_z{
+box-shadow:none !important;
+padding: 10px 20px !important;  
+}
+.header_l{
+        line-height: 10px;
+        // height: 40px;
+        text-align: left;
+        padding: 0 20px;
+        // border-bottom: 1px solid;
+        border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+        box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+        border-radius: 0px 0px 0px 0px;
+        .el-image{
+            padding: 10px 10px 0 0;
+        }
+        h4{
+            font-weight: bold;
+            font-size: 12px;
+            color: #68ADFF;
+            line-height: 14px;
+            text-align: left;
+            font-style: normal;
+            text-transform: none;
+        }
+    
+    }
+.tianjia{
+display: inline-block;
+}
+.jc_padding{
+    padding: 18px 10px;
+}
+.line{
+border-bottom: 1px solid rgba(255, 255, 255, 0.20);  
+box-sizing: border-box;
+}
+.L_aside{
+.iconimg{
+    width: 37px;
+    height: 36px;
+    margin:0 7px 0 24px;
+}
+}
+.ddd{
+    margin-top: 20px;
+    .ddd_div{
+        padding: 20px 0;
+        position: relative;
+    }
+    .class_btn{
+        position: absolute;
+    right: 0;
+    top: 21px;
+    }
+    .header_l{
+            line-height: 10px;
+            // height: 40px;
+            text-align: left;
+            padding: 0 20px;
+            // border-bottom: 1px solid;
+            border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+            box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+            border-radius: 0px 0px 0px 0px;
+            .el-image{
+                padding: 10px 10px 0 0;
+            }
+            h4{
+                font-weight: bold;
+                font-size: 12px;
+                color: #68ADFF;
+                line-height: 14px;
+                text-align: left;
+                font-style: normal;
+                text-transform: none;
+            }
+        }
+}
+.tianjia{
+    display: inline-block;
+}
+.el-dialog__title{
+    display: inline-block;
+}  
+.bgcolor{
+    // width: 482px;
+    box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+    border-radius: 0px 0px 0px 0px;
+    border: 1px solid;
+    border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+}
+.dialog_class{
+        .my-header{
+            line-height: 10px;
+            height: 40px;
+            text-align: left;
+            padding: 0 20px;
+            border-bottom: 1px solid;
+            border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+            box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+            border-radius: 0px 0px 0px 0px;
+            .el-image{
+                padding: 10px 10px 0 0;
+            }
+            h4{
+                font-weight: bold;
+                font-size: 12px;
+                color: #68ADFF;
+                line-height: 14px;
+                text-align: left;
+                font-style: normal;
+                text-transform: none;
+            }
+        }
+        .my_content{
+            width: 100%;
+            height: 90px;
+            box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+            border-radius: 0px 0px 0px 0px;
+            position: relative;
+           
+            .radio-group{
+                display: flex;
+                justify-content: center;
+                .el-radio{
+                    flex: 1;
+                    justify-content: center;
+                    font-weight: bold;
+                        font-size: 12px;
+                        color: #FFFFFF;
+                        line-height: 14px;
+                  
+                }
+              
+            }
+        }
+        .el-dialog__footer{
+            position: absolute;
+            bottom: 17px;
+            display: flex;
+            .footerbtn{
+                flex: 1;
+                text-align: center;
+            }
+        }
+    }
+    .my_content1{
+        .el-table .cell{
+            font-weight: 400;
+            font-size: 12px;
+            color: #FFFFFF !important;
+            line-height: 14px;
+            text-align: left;
+            font-style: normal;
+            text-transform: none;
+        }
+
+    }
+    .l_btn .borderimg {
+    width: 109px;
+height: 30px;
+background: rgba(104,173,255,0.3);
+box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+/* border: 1px solid rgba(31, 107, 255, 1); */
+ border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1; 
+
+border-radius: 4px;
+display: flex;
+display: inline-block;
+box-sizing: border-box;
+}
+.borderimg{
+    width: 109px;
+    height: 30px;
+    background: rgba(104,173,255,0.3);
+    box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+    /* border: 1px solid rgba(31, 107, 255, 1); */
+    -o-border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+    border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+    border-radius: 4px;
+    display: flex;
+    display: inline-block;
+    box-sizing: border-box
+}
+.el-table,.el-table thead th {
+    background-color: rgba(13, 22, 57, 0.96) !important;
+}
+.L_aside{
+    height: calc(100vh - 70px);
+    position: absolute;
+    top: 70px;
+    overflow: hidden;
+}
+.el-form-item__label{
+    color: #FFFFFF !important;
+}
+
+.jiancedian{
+    width:380px;
+    position: absolute;
+    right: 0;
+    top: 70px;
+ box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+border-radius: 4px 4px 4px 4px;
+border: 1px solid;
+border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1; 
+}
+</style>
+<style>
+.el-collapse-item__header{
+  border: 1px solid;
+-o-border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+border-radius: 0px 0px 0px 0px;
+background-color: rgba(13, 22, 57, 0.4);
+}
+.xian{
+border: 1px solid;
+-o-border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+border-radius: 0px 0px 0px 0px;
+background-color: rgba(13, 22, 57, 0.4);
+}
+.header_l{
+position: relative;
+}
+.header_l .closeimg{
+
+position: absolute;
+top: 10px;
+right: 0;
+
+}
+.leftbgimg1 .el-table tr{
+    height: 30px !important;
+    background: rgba(104,173,255,0.3);
+    box-shadow: inset 0px 0px 17px 5px rgba(12,97,197,0.2);
+    border-radius: 0px 0px 0px 0px;
+    border: 1px solid;
+    border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1 1;
+
+
+}
+.btncolor .el-button{
+background-color: rgba(104,173,255,0);
+font-weight: 400;
+font-size: 12px;
+color: #FFF500;
+line-height: 14px;
+text-align: left;
+font-style: normal;
+text-transform: none;
+border: none;
+}
+.btncolor .el-button:focus, .el-button:hover{
+background-color: none;
+background-color: rgba(104,173,255,0);
+}
+.magintop{
+display: flex;
+}
+.magintop .el-form-item{
+margin-right: 20px;
+}
+.guand_1{
+display: flex;
+}
+
+.el-table .cell{
+color: #fff;
+font-size: 12px;
+}
+.spanclad{
+color: #FFF500;
+}
+.tablefocus .el-table__body tr.current-row>td.el-table__cell {
+background-color: rgba(255,255,25,0.5);
+}
+.bbb .el-collapse-item__content{
+background: rgba(13, 22, 57, 0);
+}
+.guand_1 .asdis_btn{
+margin-top: -9px;
+}
+
+</style>

+ 5 - 3
src/view/configurator.vue

@@ -50,7 +50,7 @@
             <el-main>
              
             <Menu-Mine></Menu-Mine>
-              
+            <Menu-Sensor ref="menusen"></Menu-Sensor>
             </el-main>
         </el-container>
     </div>
@@ -58,22 +58,24 @@
   
   <script setup>
 import { ref, onMounted, reactive,nextTick } from "vue";
+import {RouterView,RouterLink } from "vue-router"
 import Vector from "@/assets/img/Vector.png";
 import icon from "@/assets/img/icon.png";
 import logo from "@/assets/logo.png";
 import MenuMine  from "./components/MenuMine.vue"
+import MenuSensor  from "./components/MenuSensor.vue"
 const title = "灾情推演软件";
 const activeIndex = ref('1')
   onMounted(() => {
   });
-
+let menusen=ref();
 
 const handleSelect = (key,keyPath) => {
     switch (key) {
     case '1':
         break;
     case '2':
-
+    menusen.value.sendialogVisible=true;
     break;
     case '3':
  

+ 1 - 1
src/view/evolutionView.vue

@@ -424,7 +424,7 @@ const tableDatafir= ref([])
 const activeName = ref('Fire');
 const gdxiugai=ref({});
 const currentPage4 = ref(1);
-
+  const pageSize4 = ref(5)
 let logs=ref("");
 let gdadd=ref("0");
 let jcadd=ref();