liuqiao před 1 rokem
rodič
revize
4712809690

+ 2 - 1
src/view/appmian.vue

@@ -40,7 +40,7 @@
                 <source-disaster ref="sourcedis" :classradio="classradio" :aid="aid" />
                 <info-boundary ref="boundary" :classradio="classradio" :aid="aid" />
                 <info-animation ref="tanimation" :classradio="classradio" :aid="aid" />
-
+                <InfoVtkmodel ref="vtkmodel" />
             </el-main>
         </el-container>
     </div>
@@ -56,6 +56,7 @@ import logo from "@/assets/logo.png";
 import SourceDisaster from "./components/InfoDisaster.vue"
 import InfoBoundary from "./components/InfoBoundary.vue"
 import InfoAnimation from "./components/InfoAnimation.vue"
+import InfoVtkmodel from "./components/InfoVtkmodel.vue"
 import Vector from "@/assets/img/Vector.png";
 import { timestampToTime } from '@/js/lindex.js'
 import mitts from "@/utils/Bus"

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

@@ -0,0 +1,26 @@
+<template>
+    <div class="vtk"> 
+          <div class="left_container">
+          <h2 > 我是路由</h2>
+         </div>
+       </div>
+     </template>
+   <script setup>
+   import { ref, onMounted, reactive, } from "vue";
+    import {RouterView,RouterLink } from "vue-router"
+     import { request, uploadFile } from "@/utils/request";
+    onMounted(()=>{
+     //  projectlist()
+
+
+})
+    
+   </script>
+   <style scoped>
+.vtk{
+  position: absolute;
+  z-index: 150;
+  top:70px;
+
+}
+   </style>

+ 93 - 12
src/view/components/MenuSensor.vue

@@ -20,8 +20,7 @@
                                     :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  type="index" label="编号" />
                                     <el-table-column prop="type" label="类型" />
                                     <el-table-column prop="seid" label="所在巷道" />
                                     <el-table-column prop="site" label="位置" />
@@ -66,19 +65,28 @@
                 </div>
             </template>
             <el-form class="demo-form-inline" :inline="true" :model="senobj">
-                <el-form-item label="编号" :label-width="formLabelWidth6">
-                    <el-input v-model="senobj.pid" class="w-50 m-2" placeholder="请输入" />
-                </el-form-item>
                 <el-form-item label="类型" :label-width="formLabelWidth6">
                     <el-input v-model="senobj.type" class="w-50 m-2" placeholder="请输入" />
                 </el-form-item>
-                <el-form-item label="所在巷道" :label-width="formLabelWidth6">
-                    <el-input v-model="senobj.type" 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>
+                <div class="demo-input-suffix firsttitle magintop guand_1">
+       <el-form-item label="巷道名称" :label-width="formLabelWidth6">
+          <el-input  v-model="source.selectstr"
+              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>
+          <div class="input">
+          <el-form-item label="位置" :label-width="formLabelWidth6">
+              <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>
             </el-form>
             <div class="dialog-footer footer_div l_btn">
                 <div class="footerbtn flex1">
@@ -128,6 +136,7 @@ let addVisible = ref(false);
 let dialogsgdelect = ref(false)
 let classradio1 = ref('Fire');
 const formLabelWidth6 = ref(100);
+
 let add = ref("")
 const resultactiveName = ref("first");
 let tableHeight = ref(570);
@@ -140,6 +149,14 @@ let senobj = ref({
     site: 0,
     type: "温度传感器"
 })
+let total = ref(1);
+let searchtaggd = ref("");
+const currentPage4 = ref(1);
+const pageSize4 = ref(5)
+let source=ref({
+    selectstr:'',
+    site:''
+})
 const tableRowClassName = ({ row, rowIndex }) => {
     if (rowIndex % 2 != 0) {
         return 'evenRow';
@@ -230,6 +247,70 @@ const amend = () => {
         addVisible.value = true;
     }
 }
+// 巷道方法
+// 选择巷道
+const fireclick = () => {
+    pipelinedata('');
+}
+// 节点搜索
+function searchgd() {
+    pipelinedata(searchtaggd.value);
+}
+// 节点分页查询
+const handleCurrentChange = (val) => {
+    pipelinedata(searchtaggd.value)
+}
+//节点数据查询
+const pipelinedata = (searchtag) => {
+    const params = {
+        transCode: 'D00001',
+        count: pageSize4.value,
+        page: currentPage4.value,
+        searchtag: searchtag,
+    }
+    request(params)
+        .then((res) => {
+            tableData2.value = res.rows;
+            total.value = res.total;
+        })
+        .catch((err) => {
+            ElMessage.error(err.returnMsg)
+        })
+}
+//选中项
+const projectsSelectionSelect=(selection, row)=>{
+       if(selection.length>1){
+        multipleTableRef.value.clearSelection();
+        multipleTableRef.value.toggleRowSelection(row,true);
+        multipleSelection.value=selection[1];
+        return;
+       }
+        if(selection.length==1){
+          multipleSelection.value=selection;
+        
+       }else if(selection.length==0){
+      
+       }
+     }
+     const  selectfun=()=>{
+        source.value.selectstr='';
+     currentPage4.value=1;
+     console.log()
+       if(multipleSelection.value.length!=0){
+      firepid.value=multipleSelection.value[0].id;
+      source.value.selectstr=multipleSelection.value[0].name;
+      console.log(multipleSelection.value[0])
+       }else{
+        // selectstr.value='';
+        
+       }
+  
+     }
+    //  确定
+     const  queding=()=>{
+       selectfun();
+     
+     }
 defineExpose({ sendialogVisible, });
 </script>