搜索半径bug修复

liujun0703-新项目开发
liujun 2024-08-12 15:10:06 +08:00
parent 872c02b0df
commit 598695df6f
4 changed files with 99 additions and 3 deletions

View File

@ -26,6 +26,7 @@
<feng-bi-ka-kou v-if="value.type === '3'" :id="value.id" :type="value.type"/> <feng-bi-ka-kou v-if="value.type === '3'" :id="value.id" :type="value.type"/>
<!-- 报警点 --> <!-- 报警点 -->
<bao-jing v-if="value.type === '13'" :id="value.id" :type="value.type"/> <bao-jing v-if="value.type === '13'" :id="value.id" :type="value.type"/>
<send-message v-if="value.type === 'sendMessage'" :id="value.id" :type="value.type"/>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -41,9 +42,10 @@ import BiNanSuo from '../dialog/biNanSuo.vue'
import PaiShuiJing from '../dialog/paiShuiJing.vue' import PaiShuiJing from '../dialog/paiShuiJing.vue'
import FengBiKaKou from '../dialog/fengBiKaKou.vue' import FengBiKaKou from '../dialog/fengBiKaKou.vue'
import BaoJing from '../dialog/baoJing.vue' import BaoJing from '../dialog/baoJing.vue'
import SendMessage from '../dialog/sendMessage.vue'
export default { export default {
components: { WuZi, BiNanSuo, PaiShuiJing, FengBiKaKou, BaoJing, videoPlayPlat, windspeedstation, weatherstation, XfPoint, XfControl }, components: { SendMessage, WuZi, BiNanSuo, PaiShuiJing, FengBiKaKou, BaoJing, videoPlayPlat, windspeedstation, weatherstation, XfPoint, XfControl },
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,

View File

@ -293,7 +293,11 @@ export default {
REPORT_ID: null, REPORT_ID: null,
FIRERESERVEPLAN_ID: null, FIRERESERVEPLAN_ID: null,
CODE: null, CODE: null,
CORPIFNO_ID: JSON.parse(sessionStorage.getItem('user')).CORPIFNO_ID CORPIFNO_ID: JSON.parse(sessionStorage.getItem('user')).CORPIFNO_ID,
firstPoint: {
x: null,
y: null
}
} }
}, },
mounted() { mounted() {
@ -322,15 +326,39 @@ export default {
methods: { methods: {
/** 地图初始化 */ /** 地图初始化 */
mapInit(e) { mapInit(e) {
this.firstPoint.x = e.x
this.firstPoint.y = e.y
mapInstance = new window.BMapGL.Map('map') // mapInstance = new window.BMapGL.Map('map') //
mapInstance.centerAndZoom(new window.BMapGL.Point(e.y, e.x), 15) // mapInstance.centerAndZoom(new window.BMapGL.Point(e.y, e.x), 15) //
mapInstance.enableScrollWheelZoom(true) // mapInstance.enableScrollWheelZoom(true) //
var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) //
mapInstance.centerAndZoom(point, 15) //
mapInstance.enableScrollWheelZoom(true)
var circle = new window.BMapGL.Circle(point, this.range, {
strokeColor: 'blue',
strokeWeight: 2,
strokeOpacity: 0.5,
fillColor: 'blue',
fillOpacity: 0.2
})
mapInstance.addOverlay(circle)
}, },
setActive(item, index) { setActive(item, index) {
// //
this.activeIndex = index this.activeIndex = index
this.range = item this.range = item
mapInstance.clearOverlays() mapInstance.clearOverlays()
var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) //
mapInstance.centerAndZoom(point, 15) //
mapInstance.enableScrollWheelZoom(true)
var circle = new window.BMapGL.Circle(point, item, { // 2000
strokeColor: 'blue',
strokeWeight: 2,
strokeOpacity: 0.5,
fillColor: 'blue',
fillOpacity: 0.2
})
mapInstance.addOverlay(circle)
this.initPoint({ code: this.CODE, reportId: this.REPORT_ID, range: this.range }) this.initPoint({ code: this.CODE, reportId: this.REPORT_ID, range: this.range })
}, },
/** 扎点方法 */ /** 扎点方法 */
@ -454,6 +482,17 @@ export default {
// //
subToggleCheck(sos, ind) { subToggleCheck(sos, ind) {
mapInstance.clearOverlays() mapInstance.clearOverlays()
var point = new window.BMapGL.Point(this.firstPoint.y, this.firstPoint.x) //
mapInstance.centerAndZoom(point, 15) //
mapInstance.enableScrollWheelZoom(true)
var circle = new window.BMapGL.Circle(point, this.range, { // 2000
strokeColor: 'blue',
strokeWeight: 2,
strokeOpacity: 0.5,
fillColor: 'blue',
fillOpacity: 0.2
})
mapInstance.addOverlay(circle)
this.initPoint(sos) this.initPoint(sos)
this.currSubControlPoint.forEach((item, idx) => { this.currSubControlPoint.forEach((item, idx) => {
if (idx === ind) { if (idx === ind) {
@ -466,6 +505,8 @@ export default {
// //
handlerOrderMessage() { handlerOrderMessage() {
this.infoDialog.visible = true this.infoDialog.visible = true
this.infoDialog.info = {}
this.infoDialog.title = '指令信息'
}, },
initInfo() { initInfo() {
const loading = this.$loading({ const loading = this.$loading({

View File

@ -36,7 +36,7 @@ export default {
}, },
methods: { methods: {
sendOrderBtn() { sendOrderBtn() {
this.$emit('orderMessage') this.$emit('orderMessage', '')
}, },
confirmReceipt(answer) { confirmReceipt(answer) {
requestFN('/bi/emergency/readInstruct', { ID: answer.ID }) requestFN('/bi/emergency/readInstruct', { ID: answer.ID })

View File

@ -0,0 +1,53 @@
<template>
<div class="app-container print-work" style="width: 100%">
<el-form>
<el-form-item label="指令类型"/>
</el-form>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
export default {
props: {
id: {
type: String,
default() {
return ''
}
},
type: {
type: String,
default() {
return ''
}
}
},
data() {
return {
config: config,
form: {
}
}
},
created() {
this.getData()
},
methods: {
getData() {
requestFN(
'/major/registration/detailLog', { Id: this.id }
).then((data) => {
if (data.result === 'success') {
this.form = data.msg
}
}).catch((e) => {
})
}
}
}
</script>
<style lang="scss" scoped>
</style>