|
@@ -2,14 +2,10 @@
|
|
|
<div class="map-container">
|
|
|
<nav>
|
|
|
<map-selector :default-val="formData.mapId" @setMapInfo="handleSelectMap" />
|
|
|
- <!-- <div class="page-title">
|
|
|
- 现场分布图
|
|
|
- </div> -->
|
|
|
- <!-- <el-button size="mini" type="primary" style="margin-left:15px;" @click="submit">保存</el-button> -->
|
|
|
</nav>
|
|
|
<div class="layout-map">
|
|
|
<div class="left-side">
|
|
|
- <div class="title">采空区</div>
|
|
|
+ <div class="title">传感器信息标记</div>
|
|
|
<div v-for="(item,index) in markerItems" :key="index" :class="checkItemIndex===index?'item active':'item'" @click="checkItem(item,index)">
|
|
|
<img :src="item.icon" alt="" class="icon">
|
|
|
<div class="name">{{ item.name }}</div>
|
|
@@ -29,38 +25,11 @@
|
|
|
<div v-if="type==2||type=='drage'" class="saveForm">
|
|
|
<div class="title">{{ RtHadnTitle }}</div>
|
|
|
<div class="item">
|
|
|
- <div class="lable">矿带:</div>
|
|
|
+ <div class="lable">传感器:</div>
|
|
|
<div class="content">
|
|
|
- <el-select v-model="saveForm.goafOrebelt" class="safe-area-item" filterable placeholder="矿带" @change="changeArea(1)">
|
|
|
- <el-option value="" label="请选择矿带" disabled />
|
|
|
- <el-option v-for="(item,index) in goafOrebelts" :key="index" :value="item.goafOrebelt" :label="item.goafOrebelt" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="lable">矿体:</div>
|
|
|
- <div class="content">
|
|
|
- <el-select v-model="saveForm.goafOrebody" class="safe-area-item" filterable placeholder="矿体" @change="changeArea(2)">
|
|
|
- <el-option value="" label="请选择矿体" disabled />
|
|
|
- <el-option v-for="(item,index) in goafOrebodys" :key="index" :value="item.goafOrebody" :label="item.goafOrebody" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="lable">中段:</div>
|
|
|
- <div class="content">
|
|
|
- <el-select v-model="saveForm.goafOreheight" class="safe-area-item" filterable placeholder="中段" @change="changeArea(3)">
|
|
|
- <el-option value="" label="请选择中段" disabled />
|
|
|
- <el-option v-for="(item,index) in goafOreheights" :key="index" :value="item.goafOreheight" :label="item.goafOreheight" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="lable">采空区:</div>
|
|
|
- <div class="content">
|
|
|
- <el-select v-model="saveForm.goafName" class="safe-area-item" filterable placeholder="采空区名称" @change="changeArea(4)">
|
|
|
- <el-option value="" label="请选择采空区" disabled />
|
|
|
- <el-option v-for="item in goafNames" :key="item.goafId" :value="item.goafName" :label="item.goafName" />
|
|
|
+ <el-select v-model="saveForm.goafSensorId" class="safe-area-item" filterable placeholder="矿带">
|
|
|
+ <el-option value="" label="请选择传感器" disabled />
|
|
|
+ <el-option v-for="(item,index) in sensorList" :key="index" :value="item.goafSensorId" :label="item.goafSensorName" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -72,20 +41,8 @@
|
|
|
<div v-if="type==3" class="deleteForm">
|
|
|
<div class="title">删除标记点</div>
|
|
|
<div class="item">
|
|
|
- <div class="lable">矿带:</div>
|
|
|
- <div class="content"> {{ deleteForm.goafOrebelt }}</div>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="lable">矿体:</div>
|
|
|
- <div class="content"> {{ deleteForm.goafOrebody }}</div>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="lable">中段:</div>
|
|
|
- <div class="content"> {{ deleteForm.goafOreheight }}</div>
|
|
|
- </div>
|
|
|
- <div class="item">
|
|
|
- <div class="lable">采空区:</div>
|
|
|
- <div class="content"> {{ deleteForm.goafName }}</div>
|
|
|
+ <div class="lable">传感器名称:</div>
|
|
|
+ <div class="content"> {{ deleteForm.goafSensorName }}</div>
|
|
|
</div>
|
|
|
<div class="bt-wrap">
|
|
|
<div class="bt" @click="save">保存</div>
|
|
@@ -102,20 +59,10 @@ import * as L from 'leaflet'
|
|
|
import '@geoman-io/leaflet-geoman-free'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
import MapSelector from '@/components/MapSelector'
|
|
|
-import { getGoafBaseInfo } from '@/api/goaf/info'
|
|
|
-import { getMapLayerById, createMapLayer, delMapLayer, updateMapLayer, getMapLayer } from '@/api/goaf/layer'
|
|
|
-const markerIcon = L.icon({
|
|
|
- iconUrl: require('@/assets/images/goaf/default.png'),
|
|
|
- shadowUrl: require('@/assets/images/goaf/default.png'),
|
|
|
- iconSize: [37.2, 57.6],
|
|
|
- shadowSize: [0, 0],
|
|
|
- iconAnchor: [16, 52],
|
|
|
- popupAnchor: [1, -38]
|
|
|
-})
|
|
|
-L.Marker.prototype.options.icon = markerIcon
|
|
|
+import { getMapLayer, createMapLayer, delMapLayer, updateMapLayer, getSensorList } from '@/api/iiot/map'
|
|
|
import mixins from '@/mixin/mqtt.js'
|
|
|
-import { NumConvertLM, Uint8ArrayToString } from '@/utils'
|
|
|
-const iconSize = [110, 110]
|
|
|
+import { Uint8ArrayToString } from '@/utils'
|
|
|
+const iconSize = [50, 50]
|
|
|
export default {
|
|
|
name: 'GoafVisualEditor',
|
|
|
components: {
|
|
@@ -145,48 +92,27 @@ export default {
|
|
|
},
|
|
|
RtHadnTitle: '标记点操作',
|
|
|
saveForm: {
|
|
|
- 'goaflayerId': '',
|
|
|
'ocId': '',
|
|
|
- 'goafId': '',
|
|
|
- 'goafOrebelt': '',
|
|
|
- 'goafOrebody': '',
|
|
|
- 'goafOreheight': '',
|
|
|
- 'goafName': '',
|
|
|
'mapId': '',
|
|
|
- 'layerId': '',
|
|
|
- 'layerCatId': '',
|
|
|
- 'layerTitle': '',
|
|
|
- 'layerMarker': '',
|
|
|
- 'layerVector': '',
|
|
|
- 'layerVectorType': ''
|
|
|
+ 'goafSensorId': '',
|
|
|
+ 'goafSensorName': '',
|
|
|
+ 'sensorQywzjd': '',
|
|
|
+ 'sensorQywzwd': ''
|
|
|
},
|
|
|
deleteForm: {
|
|
|
- 'icon': '',
|
|
|
- 'name': '',
|
|
|
- 'goaflayerId': '',
|
|
|
+ 'sensorLocationId': undefined,
|
|
|
'ocId': '',
|
|
|
- 'goafId': '',
|
|
|
- 'goafOrebelt': 0,
|
|
|
- 'goafOrebody': 0,
|
|
|
- 'goafOreheight': 0,
|
|
|
- 'goafName': '',
|
|
|
'mapId': '',
|
|
|
- 'layerId': '',
|
|
|
- 'layerCatId': '1',
|
|
|
- 'layerTitle': '',
|
|
|
- 'layerMarker': '',
|
|
|
- 'layerVector': '',
|
|
|
- 'layerVectorType': ''
|
|
|
+ 'goafSensorId': '',
|
|
|
+ 'goafSensorName': '',
|
|
|
+ 'sensorQywzjd': '',
|
|
|
+ 'sensorQywzwd': ''
|
|
|
},
|
|
|
layer: null,
|
|
|
layers: [],
|
|
|
layerGroup: [],
|
|
|
imageOverlay: undefined,
|
|
|
- goaf: [],
|
|
|
- goafOrebelts: [],
|
|
|
- goafOrebodys: [],
|
|
|
- goafOreheights: [],
|
|
|
- goafNames: []
|
|
|
+ sensorList: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -199,9 +125,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- getGoafBaseInfo().then((res) => {
|
|
|
- this.goaf = res.data
|
|
|
- this.goafOrebelts = this.unique(res.data, 'goafOrebelt')
|
|
|
+ getSensorList().then((res) => {
|
|
|
+ this.sensorList = res.data
|
|
|
})
|
|
|
this.$nextTick(() => {
|
|
|
this.initMap()
|
|
@@ -210,25 +135,6 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- // 加载数据
|
|
|
- load(layerId) {
|
|
|
- this.conditions.layerId = layerId
|
|
|
- this.getData()
|
|
|
- },
|
|
|
- // 初始化
|
|
|
- getData() {
|
|
|
- getMapLayerById(this.conditions.layerId).then((resp) => {
|
|
|
- const { code, data, msg } = resp
|
|
|
- if (code === 0) {
|
|
|
- this.viewData = data
|
|
|
- this.setRasterLayer()
|
|
|
- } else {
|
|
|
- this.$message.error(msg)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
// 初始化地图
|
|
|
initMap() {
|
|
|
var yx = L.latLng
|
|
@@ -329,7 +235,7 @@ export default {
|
|
|
// 获取地图图层数据
|
|
|
getMapLayers() {
|
|
|
getMapLayer({
|
|
|
- mapId: this.formData.mapId
|
|
|
+ map: this.formData.mapId
|
|
|
}).then((resp) => {
|
|
|
const { code, data, msg } = resp
|
|
|
if (code === 0) {
|
|
@@ -348,37 +254,18 @@ export default {
|
|
|
const feature = []
|
|
|
if (layerList != null && layerList.length > 0) {
|
|
|
layerList.forEach((item) => {
|
|
|
- const layerMarker = item.layerMarker && JSON.parse(item.layerMarker)
|
|
|
- const layerVector = item.layerMarker && JSON.parse(item.layerVector)
|
|
|
- if (layerMarker && layerMarker.properties) {
|
|
|
- layerMarker.properties.layerId = item.layerId
|
|
|
- layerMarker.properties.goaflayerId = item.goaflayerId
|
|
|
- feature.push(layerMarker)
|
|
|
- }
|
|
|
- if (layerVector && layerVector.properties) {
|
|
|
- layerVector.properties.layerId = item.layerId
|
|
|
- layerMarker.properties.goaflayerId = item.goaflayerId
|
|
|
- feature.push(layerVector)
|
|
|
- }
|
|
|
+ feature.push({
|
|
|
+ 'type': 'Feature',
|
|
|
+ 'properties': item,
|
|
|
+ 'geometry': {
|
|
|
+ 'type': 'Point',
|
|
|
+ 'coordinates': [item.sensorQywzjd, item.sensorQywzwd]
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
L.geoJSON(feature, {
|
|
|
pointToLayer: function(_feature, latlng) {
|
|
|
- const goafInfo = _feature.properties.goafInfo
|
|
|
- const goafOrebelt = _feature.properties.goafOrebelt
|
|
|
- const goafOrebody = _feature.properties.goafOrebody
|
|
|
- const goafOreheight = _feature.properties.goafOreheight
|
|
|
- const goafName = _feature.properties.goafName
|
|
|
- var goafAlarmStatus = ''
|
|
|
- let Volume = 0
|
|
|
- if (goafInfo) {
|
|
|
- Volume = (goafInfo.goafCanfillVolume - goafInfo.goafRemainVolume) / goafInfo.goafCanfillVolume
|
|
|
- Volume = (Volume * 100).toFixed(2)
|
|
|
- }
|
|
|
- if (_feature.properties.goafAlarmStatus === '1') {
|
|
|
- goafAlarmStatus = 'ico-warning'
|
|
|
- }
|
|
|
- const goaf_icon_tag = `<div class="goaf-icon-tag" title="${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}">${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}</div>`
|
|
|
- const html = `<div class="goaf-icon-box ${goafAlarmStatus}" style="width:100%;height:100%;position: relative;">${goaf_icon_tag}<div class="goaf-fill-v" style="height:${Volume}%;"></div></div>`
|
|
|
+ const html = `<div class="goaf-icon-box " style="width:100%;height:100%;position: relative;"></div>`
|
|
|
var icon = L.divIcon({
|
|
|
html,
|
|
|
iconSize
|
|
@@ -425,18 +312,6 @@ export default {
|
|
|
this.resetForm()
|
|
|
this.layer = null
|
|
|
this.layers = []
|
|
|
- this.goafOrebodys = []
|
|
|
- this.goafOreheights = []
|
|
|
- this.goafNames = []
|
|
|
- },
|
|
|
- submit() {
|
|
|
- // 图层操作完,一次导出geoJSON
|
|
|
- const layers = this.map._layers
|
|
|
- console.log({
|
|
|
- layers,
|
|
|
- geoLayer: this.geoLayer,
|
|
|
- geoJson: this.createGeoJson()
|
|
|
- })
|
|
|
},
|
|
|
checkItem(item, index) {
|
|
|
if (this.state === 1) {
|
|
@@ -448,88 +323,8 @@ export default {
|
|
|
this.state = 1
|
|
|
this.saveForm.icon = item.icon
|
|
|
this.saveForm.name = item.name
|
|
|
- this.RtHadnTitle = '新增采空区'
|
|
|
- this.map.pm.enableDraw('Marker', { snappable: false, tooltips: false })// tooltips: { 'placeMarker': '点击放置标记' },
|
|
|
- },
|
|
|
- changeAreaByFilter() {
|
|
|
- let goaf = this.deeepClone(this.goaf)
|
|
|
- const list = ['goafOrebelt', 'goafOrebody', 'goafOreheight', 'goafName']
|
|
|
- const selected = []
|
|
|
- const unselected = []
|
|
|
- for (let i = 0; i < 4; i++) {
|
|
|
- if (!this.saveForm[list[i]]) {
|
|
|
- unselected.push(list[i] + 's')
|
|
|
- } else {
|
|
|
- selected.push({
|
|
|
- name: list[i],
|
|
|
- value: this.saveForm[list[i]]
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- for (let i = 0; i < selected.length; i++) {
|
|
|
- goaf = goaf.filter(item => item[selected[i].name] === selected[i].value)
|
|
|
- }
|
|
|
- for (let i = 0; i < unselected.length; i++) {
|
|
|
- this.$set(this, unselected[i], goaf)
|
|
|
- }
|
|
|
- },
|
|
|
- changeArea(type) {
|
|
|
- const goafs = this.deeepClone(this.goaf)
|
|
|
- let goafOrebodys = this.deeepClone(this.goafOrebodys)
|
|
|
- let goafOreheights = this.deeepClone(this.goafOreheights)
|
|
|
- let goafNames = this.deeepClone(this.goafNames)
|
|
|
- if (type === 1) {
|
|
|
- goafOrebodys = goafs.filter(item => item.goafOrebelt === this.saveForm.goafOrebelt)
|
|
|
- goafOrebodys = this.unique(goafOrebodys, 'goafOrebody')
|
|
|
- this.goafOrebodys = goafOrebodys
|
|
|
- this.goafOreheights = []
|
|
|
- this.goafNames = []
|
|
|
- this.saveForm.goafOrebody = ''
|
|
|
- this.saveForm.goafOreheight = ''
|
|
|
- this.saveForm.goafName = ''
|
|
|
- } else if (type === 2) {
|
|
|
- goafOreheights = goafs.filter(item => (item.goafOrebody === this.saveForm.goafOrebody) && (item.goafOrebelt === this.saveForm.goafOrebelt))
|
|
|
- goafOreheights = this.unique(goafOreheights, 'goafOreheight')
|
|
|
- this.goafOreheights = goafOreheights
|
|
|
- this.goafNames = []
|
|
|
- this.saveForm.goafOreheight = ''
|
|
|
- this.saveForm.goafName = ''
|
|
|
- } else if (type === 3) {
|
|
|
- goafNames = goafs.filter(item => (item.goafOreheight === this.saveForm.goafOreheight) && (item.goafOrebody === this.saveForm.goafOrebody) && (item.goafOrebelt === this.saveForm.goafOrebelt))
|
|
|
- // goafNames = this.unique(goafNames, 'goafName')
|
|
|
- this.goafNames = goafNames
|
|
|
- this.saveForm.goafName = ''
|
|
|
- } else {
|
|
|
- for (let i = 0; i < goafNames.length; i++) {
|
|
|
- if (this.saveForm.goafName === goafNames[i].goafName) {
|
|
|
- let layer = null
|
|
|
- if (this.type === 2) {
|
|
|
- layer = this.layer
|
|
|
- } else {
|
|
|
- layer = this.dragstartMarker.layer
|
|
|
- }
|
|
|
- let Volume = (goafNames[i].goafCanfillVolume - goafNames[i].goafRemainVolume) / goafNames[i].goafCanfillVolume
|
|
|
- Volume = (Volume * 100).toFixed(2)
|
|
|
- const goafOrebelt = goafNames[i].goafOrebelt
|
|
|
- const goafOrebody = goafNames[i].goafOrebody
|
|
|
- const goafOreheight = goafNames[i].goafOreheight
|
|
|
- const goafName = goafNames[i].goafName
|
|
|
- const goaf_icon_tag = `<div class="goaf-icon-tag" title="${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}">${NumConvertLM(goafOrebelt)}-${goafOrebody}-${goafOreheight}-${goafName}</div>`
|
|
|
- const html = `<div class="goaf-icon-box" style="width:100%;height:100%;position: relative;">${goaf_icon_tag}<div class="goaf-fill-v" style="height:${Volume}%;"></div></div>`
|
|
|
- var icon = L.divIcon({
|
|
|
- html,
|
|
|
- iconSize
|
|
|
- })
|
|
|
- layer.setIcon(icon)
|
|
|
- this.saveForm.goafId = goafNames[i].goafId
|
|
|
- this.saveForm.goafInfo = {
|
|
|
- goafCanfillVolume: goafNames[i].goafCanfillVolume,
|
|
|
- goafRemainVolume: goafNames[i].goafRemainVolume
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.$forceUpdate()
|
|
|
+ this.RtHadnTitle = '新增传感器点位信息'
|
|
|
+ this.map.pm.enableDraw('Marker', { snappable: false, tooltips: false })
|
|
|
},
|
|
|
save() {
|
|
|
const layerFeature = this.layer?.toGeoJSON()
|
|
@@ -537,34 +332,21 @@ export default {
|
|
|
layerFeature.properties = {
|
|
|
...layerFeature.properties,
|
|
|
'ocId': this.userData.ocId,
|
|
|
- 'goafId': this.saveForm.goafId,
|
|
|
- 'goafOrebelt': this.saveForm.goafOrebelt,
|
|
|
- 'goafOrebody': this.saveForm.goafOrebody,
|
|
|
- 'goafOreheight': this.saveForm.goafOreheight,
|
|
|
- 'goafName': this.saveForm.goafName,
|
|
|
- 'goafInfo': this.saveForm.goafInfo
|
|
|
+ ...this.saveForm
|
|
|
}
|
|
|
}
|
|
|
if (this.type === 3) {
|
|
|
// 删除表单里面的保存
|
|
|
this.type = 1
|
|
|
} else if (this.type === 'drage') {
|
|
|
- if (!this.saveForm.goafId) {
|
|
|
- this.$message.error('请选择采空区')
|
|
|
+ if (!this.saveForm.goafSensorId) {
|
|
|
+ this.$message.error('请选择传感器')
|
|
|
return
|
|
|
}
|
|
|
updateMapLayer({
|
|
|
- 'goaflayerId': this.saveForm.goaflayerId,
|
|
|
- 'ocId': this.userData.ocId,
|
|
|
- 'goafId': this.saveForm.goafId,
|
|
|
- 'goafName': this.saveForm.goafName,
|
|
|
- 'mapId': this.formData.mapId,
|
|
|
- 'layerId': this.saveForm.layerId,
|
|
|
- 'layerCatId': '',
|
|
|
- 'layerTitle': '',
|
|
|
- 'layerMarker': layerFeature,
|
|
|
- 'layerVector': '',
|
|
|
- 'layerVectorType': ''
|
|
|
+ ...this.saveForm,
|
|
|
+ 'sensorQywzjd': layerFeature.geometry.coordinates[0],
|
|
|
+ 'sensorQywzwd': layerFeature.geometry.coordinates[1]
|
|
|
}).then(() => {
|
|
|
this.type = 1
|
|
|
this.checkItemIndex = -1
|
|
@@ -578,26 +360,18 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
// 新增
|
|
|
- if (!this.saveForm.goafId) {
|
|
|
- this.$message.error('请选择采空区')
|
|
|
+ if (!this.saveForm.goafSensorId) {
|
|
|
+ this.$message.error('请选择传感器')
|
|
|
return
|
|
|
}
|
|
|
+ const sensor = this.sensorList.filter(item => item.goafSensorId === this.saveForm.goafSensorId)[0]
|
|
|
createMapLayer({
|
|
|
- // 'goaflayerId': '',
|
|
|
'ocId': this.userData.ocId,
|
|
|
- 'goafId': this.saveForm.goafId,
|
|
|
- 'goafOrebelt': this.saveForm.goafOrebelt,
|
|
|
- 'goafOrebody': this.saveForm.goafOrebody,
|
|
|
- 'goafOreheight': this.saveForm.goafOreheight,
|
|
|
- 'goafName': this.saveForm.goafName,
|
|
|
- 'goafAlarmStatus': '0',
|
|
|
'mapId': this.formData.mapId,
|
|
|
- 'layerId': '',
|
|
|
- 'layerCatId': '',
|
|
|
- 'layerTitle': '',
|
|
|
- 'layerMarker': layerFeature,
|
|
|
- 'layerVector': '',
|
|
|
- 'layerVectorType': ''
|
|
|
+ 'goafSensorId': sensor.goafSensorId,
|
|
|
+ 'goafSensorName': sensor.goafSensorName,
|
|
|
+ 'sensorQywzjd': layerFeature.geometry.coordinates[0],
|
|
|
+ 'sensorQywzwd': layerFeature.geometry.coordinates[1]
|
|
|
}).then(() => {
|
|
|
this.type = 1
|
|
|
this.checkItemIndex = -1
|
|
@@ -626,8 +400,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
delMarker() {
|
|
|
- // goaflayerId, mapId, layerId
|
|
|
- delMapLayer(this.deleteForm.goaflayerId, this.formData.mapId, this.deleteForm.layerId).then(() => {
|
|
|
+ delMapLayer(this.deleteForm.sensorLocationId).then(() => {
|
|
|
this.type = 1
|
|
|
this.state = 2
|
|
|
this.checkItemIndex = -1
|
|
@@ -642,19 +415,13 @@ export default {
|
|
|
},
|
|
|
resetForm() {
|
|
|
const data = {
|
|
|
- 'icon': '',
|
|
|
- 'name': '',
|
|
|
- 'goaflayerId': '',
|
|
|
+ 'sensorLocationId': undefined,
|
|
|
'ocId': '',
|
|
|
- 'goafId': '',
|
|
|
- 'goafName': '',
|
|
|
'mapId': '',
|
|
|
- 'layerId': '',
|
|
|
- 'layerCatId': '',
|
|
|
- 'layerTitle': '',
|
|
|
- 'layerMarker': '',
|
|
|
- 'layerVector': '',
|
|
|
- 'layerVectorType': ''
|
|
|
+ 'goafSensorId': '',
|
|
|
+ 'goafSensorName': '',
|
|
|
+ 'sensorQywzjd': '',
|
|
|
+ 'sensorQywzwd': ''
|
|
|
}
|
|
|
this.saveForm = JSON.parse(JSON.stringify(data))
|
|
|
this.deleteForm = JSON.parse(JSON.stringify(data))
|
|
@@ -687,27 +454,6 @@ export default {
|
|
|
}
|
|
|
return layer
|
|
|
},
|
|
|
- createGeoJson() {
|
|
|
- var layerArray = []
|
|
|
- this.map.eachLayer(function(layer) {
|
|
|
- if (layer.pm !== 'undefined' && layer.pm != null && layer.pm !== '') {
|
|
|
- if (layer.pm._enabled === false && layer.pm.options.draggable === true) {
|
|
|
- layerArray.push(layer)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- var geojson = L.layerGroup(layerArray).toGeoJSON()
|
|
|
- for (var n = 0; n < geojson.features.length; n++) {
|
|
|
- var nowJson = JSON.stringify(geojson.features[n])
|
|
|
- for (var m = n + 1; m < geojson.features.length; m++) {
|
|
|
- var nextJson = JSON.stringify(geojson.features[m])
|
|
|
- if (nowJson === nextJson) {
|
|
|
- geojson.features.splice(n, 1)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return geojson
|
|
|
- },
|
|
|
mqttResponse(message) {
|
|
|
const data = message ? Uint8ArrayToString(message) : ''
|
|
|
this.$nextTick(() => {
|
|
@@ -824,21 +570,21 @@ export default {
|
|
|
align-items: center;
|
|
|
font-size: 14px;
|
|
|
border-bottom:2px solid rgba(45, 140, 240, 0.16);
|
|
|
- .lable{
|
|
|
- width: 80px;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
- .content{
|
|
|
- display: flex;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- .icon{
|
|
|
- width: 17.5px;
|
|
|
- display: block;
|
|
|
- margin-right:8px;
|
|
|
- }
|
|
|
+ .lable{
|
|
|
+ width: 100px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .content{
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ .icon{
|
|
|
+ width: 17.5px;
|
|
|
+ display: block;
|
|
|
+ margin-right:8px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -876,6 +622,14 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
+ .goaf-icon-box,.leaflet-marker-icon{
|
|
|
+ background-color: transparent;
|
|
|
+ }
|
|
|
+ .leaflet-marker-icon{
|
|
|
+ border: 1px solid red;
|
|
|
+ border-radius: 50%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
.goaf-fill-v{
|
|
|
width:100%;
|
|
|
position: absolute;
|
|
@@ -901,30 +655,30 @@ export default {
|
|
|
position: absolute;
|
|
|
top: -18px;
|
|
|
}
|
|
|
- /*动画*/
|
|
|
-.ico-warning {
|
|
|
- position: relative;
|
|
|
- &::after{
|
|
|
- display: block;
|
|
|
- content: "";
|
|
|
- height: 60%;
|
|
|
- width: 60%;
|
|
|
- background-image: radial-gradient(yellow,red);
|
|
|
- border-radius: 50% 50% 10% 10%;
|
|
|
- animation: twinkle 0.5s infinite alternate;
|
|
|
- position: absolute;
|
|
|
- transform: translate(-50%,-50%);
|
|
|
- left: 50%;
|
|
|
- top: 50%;
|
|
|
- box-shadow: 0 0 20px red;
|
|
|
- z-index: 9999;
|
|
|
+ /*动画*/
|
|
|
+ .ico-warning {
|
|
|
+ position: relative;
|
|
|
+ &::after{
|
|
|
+ display: block;
|
|
|
+ content: "";
|
|
|
+ height: 60%;
|
|
|
+ width: 60%;
|
|
|
+ background-image: radial-gradient(yellow,red);
|
|
|
+ border-radius: 50% 50% 10% 10%;
|
|
|
+ animation: twinkle 0.5s infinite alternate;
|
|
|
+ position: absolute;
|
|
|
+ transform: translate(-50%,-50%);
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ box-shadow: 0 0 20px red;
|
|
|
+ z-index: 9999;
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
-@keyframes twinkle {
|
|
|
- 0% {opacity: 0.9;}
|
|
|
- 50% {opacity: 0.5;}
|
|
|
- 100% {opacity: 0;}
|
|
|
-}
|
|
|
+ @keyframes twinkle {
|
|
|
+ 0% {opacity: 0.9;}
|
|
|
+ 50% {opacity: 0.5;}
|
|
|
+ 100% {opacity: 0;}
|
|
|
+ }
|
|
|
</style>
|
|
|
|