点位初始话功能补全
parent
79772b5eda
commit
2579966357
|
@ -170,6 +170,7 @@ export default {
|
||||||
'0': [
|
'0': [
|
||||||
{
|
{
|
||||||
id: '9b3b9451cf9a86b1e8a44c9a9b0de826',
|
id: '9b3b9451cf9a86b1e8a44c9a9b0de826',
|
||||||
|
code: '0',
|
||||||
label: '资料装备库',
|
label: '资料装备库',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i1.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i1.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i1_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i1_on.png'),
|
||||||
|
@ -177,6 +178,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'f61af43a0af59c86187913f9fe084588',
|
id: 'f61af43a0af59c86187913f9fe084588',
|
||||||
|
code: '1',
|
||||||
label: '应急避难场所',
|
label: '应急避难场所',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i2.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i2.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i2_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i2_on.png'),
|
||||||
|
@ -184,6 +186,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '7a38cf58e55995c0a5ce2c8e1f5bcc79',
|
id: '7a38cf58e55995c0a5ce2c8e1f5bcc79',
|
||||||
|
code: '2',
|
||||||
label: '排水井',
|
label: '排水井',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i3.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i3.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i3_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i3_on.png'),
|
||||||
|
@ -191,6 +194,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'a0fd60946978e28dac5b8a2965e00a2b',
|
id: 'a0fd60946978e28dac5b8a2965e00a2b',
|
||||||
|
code: '3',
|
||||||
label: '封闭卡口',
|
label: '封闭卡口',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i4.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i4.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i4_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i4_on.png'),
|
||||||
|
@ -200,6 +204,7 @@ export default {
|
||||||
'1': [
|
'1': [
|
||||||
{
|
{
|
||||||
id: '1768cf2b0fb0844dedbb6db1dca3cc79',
|
id: '1768cf2b0fb0844dedbb6db1dca3cc79',
|
||||||
|
code: '4',
|
||||||
label: '消防控制室',
|
label: '消防控制室',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i5.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i5.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i5_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i5_on.png'),
|
||||||
|
@ -207,6 +212,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '18849e29cce63a9408117ca26186203b',
|
id: '18849e29cce63a9408117ca26186203b',
|
||||||
|
code: '5',
|
||||||
label: '消防泵房',
|
label: '消防泵房',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i6.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i6.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i6_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i6_on.png'),
|
||||||
|
@ -214,6 +220,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'da52ba25c3f15ad932b18fbd4d028062',
|
id: 'da52ba25c3f15ad932b18fbd4d028062',
|
||||||
|
code: '6',
|
||||||
label: '消防水源',
|
label: '消防水源',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i7.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i7.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i7_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i7_on.png'),
|
||||||
|
@ -221,6 +228,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'e241e3ef479ac7fb217c7b496816dc7e',
|
id: 'e241e3ef479ac7fb217c7b496816dc7e',
|
||||||
|
code: '7',
|
||||||
label: '消防点位',
|
label: '消防点位',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i8.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i8.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i8_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i8_on.png'),
|
||||||
|
@ -230,6 +238,7 @@ export default {
|
||||||
'2': [
|
'2': [
|
||||||
{
|
{
|
||||||
id: '93f7e01c8e4d906053916d314e1d3a2a',
|
id: '93f7e01c8e4d906053916d314e1d3a2a',
|
||||||
|
code: '8',
|
||||||
label: '人员定位',
|
label: '人员定位',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i9.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i9.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i9_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i9_on.png'),
|
||||||
|
@ -237,6 +246,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '30fcda69c3eae93adbab78dea360b6b0',
|
id: '30fcda69c3eae93adbab78dea360b6b0',
|
||||||
|
code: '9',
|
||||||
label: '人员轨迹',
|
label: '人员轨迹',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i10.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i10.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i10_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i10_on.png'),
|
||||||
|
@ -246,6 +256,7 @@ export default {
|
||||||
'3': [
|
'3': [
|
||||||
{
|
{
|
||||||
id: '6ac1fc24fde38671ee70d7aebeed5276',
|
id: '6ac1fc24fde38671ee70d7aebeed5276',
|
||||||
|
code: '10',
|
||||||
label: '摄像头',
|
label: '摄像头',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i11.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i11.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i11_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i11_on.png'),
|
||||||
|
@ -255,6 +266,7 @@ export default {
|
||||||
'4': [
|
'4': [
|
||||||
{
|
{
|
||||||
id: '3f858ab418dbf791353ba6ff87c59e85',
|
id: '3f858ab418dbf791353ba6ff87c59e85',
|
||||||
|
code: '12',
|
||||||
label: '气象站',
|
label: '气象站',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i12.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i12.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i12_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i12_on.png'),
|
||||||
|
@ -262,6 +274,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '997392774d64efd8507c7c518c23fc44',
|
id: '997392774d64efd8507c7c518c23fc44',
|
||||||
|
code: '11',
|
||||||
label: '风速站',
|
label: '风速站',
|
||||||
imgUrl: require('../../../../assets/map/emergency_rescue/i13.png'),
|
imgUrl: require('../../../../assets/map/emergency_rescue/i13.png'),
|
||||||
check_img: require('../../../../assets/map/emergency_rescue/i13_on.png'),
|
check_img: require('../../../../assets/map/emergency_rescue/i13_on.png'),
|
||||||
|
@ -316,13 +329,13 @@ export default {
|
||||||
},
|
},
|
||||||
/** 扎点方法 */
|
/** 扎点方法 */
|
||||||
addPoint(anchor) {
|
addPoint(anchor) {
|
||||||
if (!anchor.iconUrl) throw new Error('请传入图标')
|
console.log(anchor)
|
||||||
// if (!anchor.imageSize) throw new Error('请传入图片大小')
|
if (!anchor.icon) throw new Error('请传入图标')
|
||||||
if (!anchor.longitude) throw new Error('请传入经度')
|
if (!anchor.y) throw new Error('请传入经度')
|
||||||
if (!anchor.latitude) throw new Error('请传入纬度')
|
if (!anchor.x) throw new Error('请传入纬度')
|
||||||
const imageSize = new window.BMapGL.Size(23, 30)
|
const imageSize = new window.BMapGL.Size(23, 30)
|
||||||
const icon = new window.BMapGL.Icon(config.fileUrl + anchor.iconUrl, imageSize, { imageSize })
|
const icon = new window.BMapGL.Icon(config.fileUrl + anchor.icon, imageSize, { imageSize })
|
||||||
const point = new window.BMapGL.Point(anchor.longitude, anchor.latitude)
|
const point = new window.BMapGL.Point(anchor.y, anchor.x)
|
||||||
const marker = new window.BMapGL.Marker(point, { icon }) // 创建标注
|
const marker = new window.BMapGL.Marker(point, { icon }) // 创建标注
|
||||||
marker.addEventListener('click', async() => {
|
marker.addEventListener('click', async() => {
|
||||||
this.infoDialog.visible = true
|
this.infoDialog.visible = true
|
||||||
|
@ -331,13 +344,12 @@ export default {
|
||||||
},
|
},
|
||||||
/** 给地图扎点标记事件事故 */
|
/** 给地图扎点标记事件事故 */
|
||||||
addPointCallback(anchor) {
|
addPointCallback(anchor) {
|
||||||
if (!anchor.iconUrl) throw new Error('请传入图标')
|
if (!anchor.icon) throw new Error('请传入图标')
|
||||||
if (!anchor.LONGITUDE) throw new Error('请传入经度')
|
if (!anchor.y) throw new Error('请传入经度')
|
||||||
if (!anchor.LATITUDE) throw new Error('请传入纬度')
|
if (!anchor.x) throw new Error('请传入纬度')
|
||||||
const { LONGITUDE, LATITUDE } = anchor
|
|
||||||
const imageSize = new window.BMapGL.Size(33, 40)
|
const imageSize = new window.BMapGL.Size(33, 40)
|
||||||
const icon = new window.BMapGL.Icon(config.fileUrl + anchor.iconUrl, imageSize, { imageSize }) // 创建 icon 图标
|
const icon = new window.BMapGL.Icon(config.fileUrl + anchor.icon, imageSize, { imageSize }) // 创建 icon 图标
|
||||||
var point = new window.BMapGL.Point(LONGITUDE, LATITUDE)
|
var point = new window.BMapGL.Point(anchor.y, anchor.x)
|
||||||
const marker = new window.BMapGL.Marker(point, { icon }) // 创建标注
|
const marker = new window.BMapGL.Marker(point, { icon }) // 创建标注
|
||||||
mapInstance.addOverlay(marker) // 将标注添加到地图中
|
mapInstance.addOverlay(marker) // 将标注添加到地图中
|
||||||
// 处理标注事件点击行为
|
// 处理标注事件点击行为
|
||||||
|
@ -434,6 +446,8 @@ export default {
|
||||||
},
|
},
|
||||||
// 二级坐标点位点击事件
|
// 二级坐标点位点击事件
|
||||||
subToggleCheck(sos, ind) {
|
subToggleCheck(sos, ind) {
|
||||||
|
mapInstance.clearOverlays()
|
||||||
|
this.initPoint(sos)
|
||||||
this.currSubControlPoint.forEach((item, idx) => {
|
this.currSubControlPoint.forEach((item, idx) => {
|
||||||
if (idx === ind) {
|
if (idx === ind) {
|
||||||
item.check = true
|
item.check = true
|
||||||
|
@ -502,6 +516,30 @@ export default {
|
||||||
console.log('链接已断开')
|
console.log('链接已断开')
|
||||||
}
|
}
|
||||||
}, 3000)
|
}, 3000)
|
||||||
|
},
|
||||||
|
initPoint(row) {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: 'Loading',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
})
|
||||||
|
requestFN(
|
||||||
|
'/bi/emergency/getPoint',
|
||||||
|
{
|
||||||
|
code: row.code
|
||||||
|
}
|
||||||
|
).then((data) => {
|
||||||
|
if (data.result === 'success') {
|
||||||
|
for (let i = 0; i < data.list.length; i++) {
|
||||||
|
this.addPoint(data.list[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loading.close()
|
||||||
|
}).catch((e) => {
|
||||||
|
console.log(e)
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<el-form-item label="图标名称:" prop="NAME">
|
<el-form-item label="图标名称:" prop="NAME">
|
||||||
<el-input v-model="form.NAME" prop="NAME" style="width: 300px"/>
|
<el-input v-model="form.NAME" prop="NAME" style="width: 300px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型:" prop="TYPE">
|
<el-form-item v-if="false" label="类型:" prop="TYPE">
|
||||||
<el-select v-model="form.TYPE" prop="TYPE" style="width: 300px">
|
<el-select v-model="form.TYPE" prop="TYPE" style="width: 300px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in typeList"
|
v-for="item in typeList"
|
||||||
|
@ -74,8 +74,6 @@ export default {
|
||||||
this.$parent.activeName = 'list'
|
this.$parent.activeName = 'list'
|
||||||
},
|
},
|
||||||
uploadFile() {
|
uploadFile() {
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
if (this.form.file[0] && this.form.file[0].raw) {
|
if (this.form.file[0] && this.form.file[0].raw) {
|
||||||
|
@ -92,17 +90,9 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.confirm(this.form.FILE_PATH)
|
this.confirm(this.form.FILE_PATH)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
confirm(filePath) {
|
confirm(filePath) {
|
||||||
this.form.FILE_PATH = filePath
|
this.form.FILE_PATH = filePath
|
||||||
// 翻译type类型
|
|
||||||
this.form.TYPE_NAME = this.typeList.find((item) => {
|
|
||||||
return item.DICTIONARIES_ID === this.form.TYPE
|
|
||||||
}).name
|
|
||||||
requestFN(
|
requestFN(
|
||||||
'/bi/emergency/iconSaveOrUpdate', this.form
|
'/bi/emergency/iconSaveOrUpdate', this.form
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<el-table-column :reserve-selection="true" type="selection" width="55" align="center"/>
|
<el-table-column :reserve-selection="true" type="selection" width="55" align="center"/>
|
||||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||||
<el-table-column prop="NAME" label="名称"/>
|
<el-table-column prop="NAME" label="名称"/>
|
||||||
<el-table-column prop="TYPE_NAME" label="类型名称"/>
|
<el-table-column prop="EMERGENCY_ICON_ID" label="编码"/>
|
||||||
<el-table-column prop="FILE_PATH" label="图标类型">
|
<el-table-column prop="FILE_PATH" label="图标类型">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-image
|
<el-image
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="220">
|
<el-table-column label="操作" align="center" width="220">
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<el-button type="danger" icon="el-icon-delete" plain @click="handleDelete(row.EMERGENCY_ICON_ID)">删除
|
<el-button v-if="false" type="danger" icon="el-icon-delete" plain @click="handleDelete(row.EMERGENCY_ICON_ID)">删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" icon="el-icon-edit" @click="goDetail(row)">编辑</el-button>
|
<el-button type="primary" icon="el-icon-edit" @click="goDetail(row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue