zhaobao 2 жил өмнө
parent
commit
75296f9533

+ 1 - 1
src/components/visualize/markers.js

@@ -1,6 +1,6 @@
 import camera from './icon/camera.png'
 import sensor from './icon/cgq.png'
-import defaultpoint from './icon/4.png'
+import defaultpoint from './icon/.png'
 
 export default {
   camera, sensor, defaultpoint

+ 24 - 1
src/views/aqpt/panorama/index.vue

@@ -340,11 +340,34 @@ export default {
     // 初始化地图图层
     initMapLayers() {
       const layerList = this.mapLayerList
+      const feature = []
       if (layerList != null && layerList.length > 0) {
         layerList.forEach((item) => {
           var vectorGeoJson = JSON.parse(item.layerVector)
-          L.geoJSON(vectorGeoJson).addTo(this.map)
+          var layerMarker = JSON.parse(item.layerMarker)
+          console.log(vectorGeoJson)
+          feature.push(layerMarker)
+          feature.push(vectorGeoJson)
         })
+        L.geoJSON(feature, {
+          // pointToLayer: function(_feature, latlng) {
+          //   console.log({ _feature })
+          //   // var smallIcon = L.Icon({
+          //   //   options: {
+          //   //     iconSize: [27, 27],
+          //   //     iconAnchor: [13, 27],
+          //   //     popupAnchor: [1, -24],
+          //   //     iconUrl: 'icone/chapel-2.png'
+          //   //   }
+          //   // })
+          //   // return L.marker(latlng, { icon: smallIcon })
+          // },
+          onEachFeature: (_feature, layer) => {
+            layer.on('click', () => {
+              // alert(1)
+            })
+          }
+        }).addTo(this.map)
       }
     },
     showRiskPointDetails(data) {

+ 2 - 1
src/views/aqpt/visualEditor/index.vue

@@ -241,9 +241,10 @@ export default {
         return yx(y, x)
       }
       var bounds = [xy(-200, -200), xy(300, 185)]
-      L.imageOverlay(this.mapRasterLayer, bounds).addTo(this.map)
+      this.imageLayer = L.imageOverlay(this.mapRasterLayer, bounds).addTo(this.map)
       this.map.fitBounds(bounds)
       this.getLayers()
+      // this.imageLayer.setUrl()
     },
     getLayers() {
       getLayersApi().then((res) => {

+ 3 - 15
src/views/goaf/info/components/Goaf.vue

@@ -103,8 +103,7 @@
 </template>
 
 <script>
-import { createHazardRisk, getHazardRiskById, updateHazardRisk } from '@/api/aqpt/hazardRiskApi'
-import { strArr2NumArr } from '@/utils'
+import { createHazardRisk, updateHazardRisk } from '@/api/aqpt/hazardRiskApi'
 import Vuescroll from 'vuescroll'
 
 export default {
@@ -172,22 +171,11 @@ export default {
     },
 
     // Show Edit Dialog
-    showEditModel(hazardId, riskId) {
+    showEditModel(data) {
       this.resetFormData()
       this.actionType = 'UPDATE'
       this.dialogVisible = true
-      getHazardRiskById(hazardId, riskId).then((resp) => {
-        const { code, data, msg } = resp
-        if (code === 0) {
-          this.formData = data
-          this.formData.positionId = strArr2NumArr(data.positionIdList.split(','))
-          console.log('this.formData.positionId', this.formData.positionId.toString())
-        } else {
-          this.$message.error(msg)
-        }
-      }).catch((error) => {
-        console.log(error)
-      })
+      this.formData = data
     },
 
     // Reset Form Data

+ 61 - 14
src/views/goaf/info/components/GoafInfo.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="content-container">
+  <div class="content-container goaf">
     <el-row class="tool-bar">
       <el-col :span="12" class="left">
         <div class="content-title">
@@ -7,7 +7,7 @@
         </div>
       </el-col>
       <el-col :span="12" class="right">
-        <el-input v-model="conditions.keywords" class="search-input m-right-15" placeholder="请输入内容">
+        <el-input v-model="conditions.data.goafName" class="search-input m-right-15" placeholder="请输入采空区名称">
           <el-button slot="append" icon="el-icon-search" @click="getData()" />
         </el-input>
         <el-button type="primary" @click="handleAdd">新增</el-button>
@@ -15,11 +15,11 @@
     </el-row>
 
     <el-row class="m-top-15">
-      <el-table v-loading="listLoading" class="page-table" border fit :data="dataList" height="calc(100vh - 220px)" style="width: 100%">
-        <el-table-column type="index" label="序号" header-align="center" align="center" width="60" />
+      <el-table v-loading="listLoading" class="page-table" border fit :data="dataList" style="width: 100%;height:80vh" :span-method="arraySpanMethod">
+        <!-- <el-table-column type="index" label="序号" header-align="center" align="center" width="60" /> -->
         <el-table-column prop="goafOrebelt" label="矿带" />
-        <el-table-column prop="goafOrebody" label="矿体" />
         <el-table-column prop="goafOreheight" label="中段" />
+        <el-table-column prop="goafOrebody" label="矿体" />
         <el-table-column prop="goafName" label="采空区名称" />
         <el-table-column prop="goafAvexArea" label="水平断面均暴露面积" />
         <el-table-column prop="goafAvinWidth" label="平均倾向宽度" />
@@ -56,14 +56,14 @@
           </template>
         </el-table-column>
         <!-- <el-table-column prop="goafInfoRemak" label="备注" /> -->
-        <el-table-column label="操作" header-align="center" align="center" width="170" fixed="right">
+        <el-table-column label="操作" header-align="center" align="center" width="170">
           <template v-slot="{row}">
             <el-button size="mini" type="primary" icon="el-icon-edit" @click="handleUpdate(row)">修改</el-button>
-            <el-button size="mini" type="primary" icon="el-icon-edit" @click="handleDelete(row)">删除</el-button>
+            <el-button size="mini" type="danger" icon="el-icon-edit" @click="handleDelete(row)">删除</el-button>
           </template>
         </el-table-column>
       </el-table>
-      <div class="pagination-container">
+      <div class="pagination-container" style="float:right;margin-right:40px;">
         <pagination v-show="total>0" :total="total" :page.sync="conditions.page" :limit.sync="conditions.limit" @pagination="getData" />
       </div>
     </el-row>
@@ -85,8 +85,9 @@ export default {
       conditions: {
         page: 1,
         limit: 10,
-        keywords: '',
-        hazardId: undefined
+        data: {
+          goafName: ''
+        }
       },
       viewData: {
         'ocId': '',
@@ -114,7 +115,49 @@ export default {
       }
     }
   },
+  created() {
+    const items = []
+    const item = { 'goafId': 170,
+      'ocId': 832,
+      'goafOrebelt': 'Ⅲ',
+      'goafOrebody': 289,
+      'goafOreheight': 957,
+      'goafName': 'rocky.bechtelar',
+      'goafAvexArea': 568,
+      'goafAvinWidth': 592,
+      'goafAvexHeight': 609,
+      'goafVoidVolume': 742,
+      'goafKeyTrend': 172,
+      'goafKeyDipangle': 14,
+      'goafRoofpillarThickness': 719,
+      'goafIncoavThickness': 694,
+      'goafExpLocation': 'zdt5j3',
+      'goafRockLithology': '56emgx',
+      'goafRockStability': 'j7n0vf',
+      'goafFormationTime': '2023-04-17 12:29:24',
+      'goafCanfillVolume': 348,
+      'goafRemainVolume': 732,
+      'goafFillMethod': 142,
+      'goafIsFill': 703,
+      'goafInfoRemak': 'opiuk0' }
+    for (let i = 0; i < 10; i++) {
+      items.push(item)
+    }
+    this.dataList = items
+    this.total = 20
+    // this.conditions.page = 1
+    // this.conditions.limit = 1
+  },
   methods: {
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex < 2) {
+        if (rowIndex < 1) {
+          return [this.conditions.limit || 10, 1]
+        } else {
+          return [0, 0]
+        }
+      }
+    },
     loadData(hazardId, hazardTitle) {
       this.conditions.hazardId = hazardId
       this.viewData.hazardTitle = hazardTitle
@@ -146,8 +189,7 @@ export default {
 
     // "Edit Risk" Model
     handleUpdate(data) {
-      const { hazardId, riskId } = data
-      this.$refs['goaf'].showEditModel(hazardId, riskId)
+      this.$refs['goaf'].showEditModel(JSON.parse(JSON.stringify(data)))
     },
 
     // Delete Action
@@ -181,8 +223,8 @@ export default {
         background: #193142FF;
         margin: 10px 10px 10px 0;
         padding: 15px;
-        height: calc(100vh - 85px);
-
+        height: calc(100vh - 90px);
+        box-sizing: border-box;
         .content-title {
             font-size: 18px;
             font-weight: bold;
@@ -221,3 +263,8 @@ export default {
         }
     }
 </style>
+<style>
+.goaf .el-table__body tr.hover-row>td {
+  background-color: #306379;
+}
+</style>

+ 0 - 6
src/views/goaf/info/index.vue

@@ -10,12 +10,6 @@ export default {
   name: 'Index',
   components: {
     GoafInfo
-  },
-  methods: {
-    hazardSelChange(data) {
-      const { hazardId, hazardTitle } = data
-      this.$refs['goaf-info'].loadData(hazardId, hazardTitle)
-    }
   }
 }
 </script>