自定义任务包
This commit is contained in:
@ -68,9 +68,7 @@ const props = defineProps({
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
const emits = defineEmits(["update:modelValue", "ok"]);
|
||||
|
||||
const dialogFormVisible = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
@ -80,14 +78,11 @@ const dialogFormVisible = computed({
|
||||
// 获取经纬度
|
||||
setTimeout(() => {
|
||||
emitter.emit("getMapClickCoordinates");
|
||||
|
||||
// 更新地图标注位置
|
||||
emitter.on("mapClickCoordinates", async (res) => {
|
||||
emitter.emit("deletePointArea");
|
||||
|
||||
form.value.jd = res.lng;
|
||||
form.value.wd = res.lat;
|
||||
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd: res.lng, wd: res.lat }],
|
||||
coordinates: res?.coordinates,
|
||||
@ -100,7 +95,6 @@ const dialogFormVisible = computed({
|
||||
} else {
|
||||
emitter.off("getMapClickCoordinates");
|
||||
}
|
||||
|
||||
emits("update:modelValue", val);
|
||||
}
|
||||
});
|
||||
@ -109,7 +103,6 @@ const dialogFormVisible = computed({
|
||||
const form = ref({
|
||||
bddList: []
|
||||
});
|
||||
|
||||
//表单验证
|
||||
const rules = reactive({
|
||||
bddMc: [
|
||||
@ -214,7 +207,6 @@ const setMap = (data, type = true) => {
|
||||
];
|
||||
const text = mc;
|
||||
const obj = [{ position: position, text, id, userData: data }];
|
||||
|
||||
emitter.emit("echoPlane", {
|
||||
fontColor: "#12fdb8",
|
||||
coords: obj,
|
||||
@ -224,11 +216,9 @@ const setMap = (data, type = true) => {
|
||||
linecolor: "#1C97FF"
|
||||
});
|
||||
emitter.emit("setMapCenter", { location: centerPoint, zoomLevel: 14 });
|
||||
|
||||
// 更新地图标注位置
|
||||
if (type) return;
|
||||
emitter.emit("deletePointArea");
|
||||
|
||||
emitter.emit("addPointArea", {
|
||||
coords: [{ jd: form.value?.jd, wd: form.value?.wd }],
|
||||
coordinates: [form.value?.jd, form.value?.wd],
|
||||
|
||||
Reference in New Issue
Block a user