MSI\liwei 3 жил өмнө
parent
commit
63b6201da1

+ 38 - 6
ruoyi-ui/src/components/map/index.vue

@@ -319,6 +319,30 @@
         <el-radio v-for="item in addrlist" :key="item.name" :label="item.name"></el-radio>
       </el-radio-group>
     </div>
+
+     <div class="shipDiv" v-show="deviceTableShow">
+            <div class="shipTitle">
+                <span style="float:left">{{ pointDevice.name }}</span>
+                <i class="el-icon-close" style="font-size:9rem;margin-top:2rem;float:right" @click="deviceTableShow=false"></i>
+            </div>
+            <div style="padding—left:10rem" class="shipContent">
+                        <el-table :header-cell-style="{ background: '#e4eafc'}" ref="singleTable" :data="pointDevice.list" height="200px" highlight-current-row style="width: 100%;" class="tableSc">
+                            <el-table-column type="index" label="序号" width="50">
+                            </el-table-column>
+                            <el-table-column property="monitorName" label="设备位置" width="100">
+                            </el-table-column>
+                            <el-table-column property="name" label="设备名称" width="100">
+                            </el-table-column>
+                            <el-table-column property="deviceType" label="设备类型" width="100">
+                            </el-table-column>
+                            <el-table-column property="status" label="设备状态">
+                            </el-table-column>
+                             <el-table-column property="orgName" label="管辖机构">
+                            </el-table-column>
+                        </el-table>
+            </div>
+        </div>
+
   </div>
 </template>
 
@@ -342,7 +366,7 @@ import { Feature } from "ol";
 import { LineString, Point } from "ol/geom";
 import { Icon, Stroke, Style } from "ol/style";
 import { Vector as LayerVec } from "ol/layer";
-import { queryShipByDeviceId, queryDatabymmsi } from "@/api/data/deviceData";
+import { queryShipByDeviceId, queryDatabymmsi,getdeviceList } from "@/api/data/deviceData";
 
 let ispro = process.env.NODE_ENV === "production";
 let that = null;
@@ -368,7 +392,13 @@ export default {
             normalCount: 1,
             activeName: 'first',
             tabledatas: [],
-
+            deviceTableShow:false,
+            pointDevice:{
+                name:'',
+                list:[],
+            },
+            // deviceList:[],
+           
             d_activeName: 'd_first',
             tableData: { minor: [], main: [] },
             addrlist: [{ name: "南京四桥", location: [1, 1] }],
@@ -377,6 +407,7 @@ export default {
             shipdata: {},
         };
     },
+    props:['deviceList'],
     mounted() {
         that = this;
         if (ispro) {
@@ -450,16 +481,17 @@ export default {
 
         },
         clickcg: (value) => {
-            //
+            console.log(that.deviceList);
+            that.pointDevice.list = that.deviceList[value];
+            console.log(that.pointDevice);
+            that.deviceTableShow = true;
+            that.pointDevice.name = value;
             that.addrlist.forEach(element => {
                 if (element.name == value) {
-
                     var lo = that.transpoints(element.location, 0)[0];
                     console.log(lo)
                     mapv.getView().setCenter(lo);
-
                 }
-
             });
 
         },

+ 3 - 1
ruoyi-ui/src/views/components/table/homeTable.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="width:100%;height:100%;background-color:rgb(0, 9, 40)">
-    <mapdiv ref="mapv"></mapdiv>
+    <mapdiv ref="mapv" :deviceList='deviceList'></mapdiv>
 
     <div class="shipInCount">
       <img src="@/assets/picture/img_wgcb.png" style="margin-top:5rem;margin-left:5rem"/>
@@ -145,6 +145,7 @@ export default {
       beginTime: '',
       so2TimeData: {},
       endTime: '',
+      deviceList:[],
       deviceTotal: 0,
       queryParams: {
         pageNum: 1,
@@ -261,6 +262,7 @@ export default {
       getdeviceList().then(data => {
         console.log(data);
         var deviceList = [];
+        this.deviceList = data.data;
         for (var key in data.data) {
           if (data.data[key] != undefined && data.data[key].length > 0) {
             dlist.push({name: key, location: JSON.parse("[[" + data.data[key][0].latilongti + "]]")});