选点样式

pull/1/head
LiuJiaNan 2024-02-26 16:15:58 +08:00
parent da2dfa5f67
commit 28e6e12999
8 changed files with 68 additions and 30 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,16 +1,29 @@
<template> <template>
<div id="bi_container"> <div id="bi_container">
<div id="map" class="map_bg"></div> <div id="map" class="map_bg"></div>
<el-button v-show="type === 1" type="primary" @click="confrim" <div class="options">
>完成绘制</el-button <template v-if="type === 1">
> <div class="option" @click="confrim">
<el-button v-show="type === 1" type="primary" @click="clear" <div>
>清除绘制</el-button <img src="/src/assets/images/map_tools/icon1.png" alt="" />
> </div>
<el-button v-show="type === 1" type="primary" @click="reduction" <div class="label">完成绘制</div>
>还原建筑</el-button </div>
> <div class="option" @click="clear">
<span>当前选中楼层id:{{ model_id }}</span> <div>
<img src="/src/assets/images/map_tools/icon2.png" alt="" />
</div>
<div class="label">清除绘制</div>
</div>
<div class="option" @click="reduction">
<div>
<img src="/src/assets/images/map_tools/icon3.png" alt="" />
</div>
<div class="label">还原建筑</div>
</div>
</template>
<div class="id">当前选中楼层id{{ model_id }}</div>
</div>
</div> </div>
</template> </template>
@ -32,22 +45,18 @@ import { getEnterpriseInfo } from "@/request/enterprise_management.js";
const props = defineProps({ const props = defineProps({
type: { type: {
type: Number, type: Number,
required: true,
default: 1, default: 1,
}, },
positions: { positions: {
type: Array, type: Array,
required: true,
default: () => [], default: () => [],
}, },
position: { position: {
type: Array, type: Array,
required: true,
default: () => [], default: () => [],
}, },
modUuid: { modUuid: {
type: String, type: String,
required: true,
default: "", default: "",
}, },
}); });
@ -88,17 +97,48 @@ onBeforeUnmount(() => {
window.$carmer = null; window.$carmer = null;
}); });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
#bi_container { #bi_container {
width: 100%; width: 100%;
height: 500px; height: 600px;
color: #ffffff; color: #ffffff;
position: relative; position: relative;
font-size: 14px; font-size: 14px;
.map_bg { .map_bg {
width: 100%; width: 100%;
height: 100%; height: 540px;
}
.options {
margin-top: 10px;
display: flex;
align-items: center;
padding: 10px;
.option {
margin-right: 20px;
cursor: pointer;
text-align: center;
img {
width: 46px;
height: 46px;
}
.label {
margin-top: 10px;
font-size: 12px;
}
}
.id {
background-color: #1b284a;
padding: 10px;
border-radius: 4px;
height: 37px;
}
} }
} }
</style> </style>

View File

@ -111,7 +111,6 @@ import { nextTick, reactive } from "vue";
const props = defineProps({ const props = defineProps({
isGatheringAlarm: { isGatheringAlarm: {
type: String, type: String,
required: true,
default: "0", default: "0",
}, },
}); });

View File

@ -1,6 +1,6 @@
<template> <template>
<el-dialog v-model="visible" title="选点" :on-close="fnClose"> <el-dialog v-model="visible" title="选点" :on-close="fnClose">
<map-tools v-if="visible" ref="mapToolsRef" v-model:positions="positions" /> <map-tools v-if="visible" v-model:positions="positions" />
<template #footer> <template #footer>
<el-button @click="fnClose"></el-button> <el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"></el-button> <el-button type="primary" @click="fnSubmit"></el-button>
@ -23,9 +23,9 @@ const props = defineProps({
default: false, default: false,
}, },
id: { id: {
type: Number, type: String,
required: true, required: true,
default: 0, default: "",
}, },
}); });
const emits = defineEmits(["update:visible", "get-data"]); const emits = defineEmits(["update:visible", "get-data"]);

View File

@ -129,7 +129,6 @@ import SelectingPoints from "./components/selecting_points.vue";
const props = defineProps({ const props = defineProps({
type: { type: {
type: String, type: String,
required: true,
default: "1", default: "1",
}, },
}); });

View File

@ -1,11 +1,6 @@
<template> <template>
<el-dialog v-model="visible" title="选点" :on-close="fnClose"> <el-dialog v-model="visible" title="选点" :on-close="fnClose">
<map-tools <map-tools v-if="visible" v-model:position="position" :type="2" />
v-if="visible"
ref="mapToolsRef"
v-model:position="position"
:type="2"
/>
<template #footer> <template #footer>
<el-button @click="fnClose"></el-button> <el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"></el-button> <el-button type="primary" @click="fnSubmit"></el-button>
@ -28,9 +23,9 @@ const props = defineProps({
default: false, default: false,
}, },
id: { id: {
type: Number, type: String,
required: true, required: true,
default: 0, default: "",
}, },
}); });
const emits = defineEmits(["update:visible", "get-data"]); const emits = defineEmits(["update:visible", "get-data"]);
@ -46,7 +41,12 @@ const fnSubmit = debounce(
ElMessage.warning("请选择坐标点"); ElMessage.warning("请选择坐标点");
return; return;
} }
await setPositioning({ camId: props.id, lon: position.value[0], lat: position.value[1], alt: position.value[2] }); await setPositioning({
camId: props.id,
lon: position.value[0],
lat: position.value[1],
alt: position.value[2],
});
ElMessage.success("保存成功"); ElMessage.success("保存成功");
fnClose(); fnClose();
emits("get-data"); emits("get-data");