更新
This commit is contained in:
parent
b21d4266d1
commit
6f4cbcc24a
@ -48,7 +48,7 @@ const initMap = async () => {
|
|||||||
|
|
||||||
map.value.on("click", (e: any) => {
|
map.value.on("click", (e: any) => {
|
||||||
// console.log("点击", e.lnglat);
|
// console.log("点击", e.lnglat);
|
||||||
if (m_index >= 3) return;
|
if (m_index >= 1) return;
|
||||||
// 调用函数并传入经纬度
|
// 调用函数并传入经纬度
|
||||||
getDistrictName(e.lnglat.lng, e.lnglat.lat, e);
|
getDistrictName(e.lnglat.lng, e.lnglat.lat, e);
|
||||||
|
|
||||||
@ -76,18 +76,18 @@ const initMap = async () => {
|
|||||||
m_index++;
|
m_index++;
|
||||||
|
|
||||||
// 添加标记点击事件监听器
|
// 添加标记点击事件监听器
|
||||||
// marker.on("click", (event: any) => {
|
marker.on("click", (event: any) => {
|
||||||
// console.log("删除", event);
|
console.log("删除", event);
|
||||||
// markerList = markerList.filter((item: any) => {
|
markerList = markerList.filter((item: any) => {
|
||||||
// item[0] == marker._position.pos[0] &&
|
item[0] == marker._position.pos[0] &&
|
||||||
// item[0] == marker._position.pos[0];
|
item[0] == marker._position.pos[0];
|
||||||
// });
|
});
|
||||||
// emits("changeMaps", markerList);
|
emits("changeMaps", markerList);
|
||||||
// // 在这里可以进行其他自定义逻辑操作
|
// 在这里可以进行其他自定义逻辑操作
|
||||||
// map.value.remove(marker);
|
map.value.remove(marker);
|
||||||
// m_index--;
|
m_index--;
|
||||||
// marker = null;
|
marker = null;
|
||||||
// });
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@
|
|||||||
placeholder="没有任务描述"
|
placeholder="没有任务描述"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="mode == 'show'" label="">
|
<!-- <el-form-item v-if="mode == 'show'" label="">
|
||||||
<el-button type="primary" @click="clickUpdate"> 修改 </el-button>
|
<el-button type="primary" @click="clickUpdate"> 修改 </el-button>
|
||||||
<el-button type="danger" @click="clickDelete"> 删除 </el-button>
|
<el-button type="danger" @click="clickDelete"> 删除 </el-button>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
<el-dialog v-model="isShow" title="选择任务模板" width="60%">
|
<el-dialog v-model="isShow" title="选择任务模板" width="60%">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-card class="!border-none" v-loading="loading" shadow="never">
|
<el-card class="!border-none" v-loading="loading" shadow="never">
|
||||||
<div style="display: flex; justify-content: space-between">
|
<!-- <div style="display: flex; justify-content: space-between">
|
||||||
<el-button
|
<el-button
|
||||||
v-perms="['task.taskCalendar/add']"
|
v-perms="['task.taskCalendar/add']"
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -12,11 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <div class="btn">
|
|
||||||
<div :class="{ active: nowType == 0 }" @click="nowType = 0">日历</div>
|
|
||||||
<div :class="{ active: nowType == 1 }" @click="nowType = 1">列表</div>
|
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
|
||||||
<calendar
|
<calendar
|
||||||
:list="taskList"
|
:list="taskList"
|
||||||
@clickItem="clickTask"
|
@clickItem="clickTask"
|
||||||
|
@ -22,6 +22,14 @@
|
|||||||
<el-form-item label-width="80px" label="地图">
|
<el-form-item label-width="80px" label="地图">
|
||||||
<MapContainer ref="mapRef" @changeMaps="changeMaps"></MapContainer>
|
<MapContainer ref="mapRef" @changeMaps="changeMaps"></MapContainer>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label-width="80px" label="已选地点">
|
||||||
|
<el-input
|
||||||
|
style="width: 350px; margin-right: 16px"
|
||||||
|
placeholder="请点击上方地图选择地点"
|
||||||
|
readonly
|
||||||
|
:value="address[0]?.address"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<!-- <el-form-item label-width="80px" label="起点">
|
<!-- <el-form-item label-width="80px" label="起点">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 350px; margin-right: 16px"
|
style="width: 350px; margin-right: 16px"
|
||||||
@ -115,7 +123,7 @@ const changeMaps = (e: any) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (address.value.length < 3) return ElMessage.error("请先选择三个地点");
|
// if (address.value.length < 3) return ElMessage.error("请先选择三个地点");
|
||||||
popupRef.value?.close();
|
popupRef.value?.close();
|
||||||
emit("success", address.value);
|
emit("success", address.value);
|
||||||
};
|
};
|
||||||
@ -124,6 +132,7 @@ const handleSubmit = async () => {
|
|||||||
const open = (type = "地点") => {
|
const open = (type = "地点") => {
|
||||||
title.value = "选择" + type;
|
title.value = "选择" + type;
|
||||||
popupRef.value?.open();
|
popupRef.value?.open();
|
||||||
|
resetMap();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 关闭回调
|
// 关闭回调
|
||||||
|
Loading…
x
Reference in New Issue
Block a user