完成三种点位图层的加点

main
许宏杰 3 weeks ago
parent 09bb199ec2
commit 96c391e780

@ -179,12 +179,8 @@
<div class="row-value value-list"> <div class="row-value value-list">
<div v-for="(item, index) in businessInfo.formList" :key="item.id"> <div v-for="(item, index) in businessInfo.formList" :key="item.id">
<div class="value-list-title">{{ item.name }}</div> <div class="value-list-title">{{ item.name }}</div>
<div <div class="value-list-subTitle" @click="lookIamge(index)">
class="value-list-subTitle"
@click="lookIamge(index)"
>
参考样本 参考样本
</div> </div>
</div> </div>
</div> </div>
@ -301,9 +297,9 @@ let popupShow = ref(false);
let dictList = reactive([]); let dictList = reactive([]);
let info = reactive({}); let info = reactive({});
let businessInfo = reactive({}); let businessInfo = reactive({});
const showPreview = ref(false) const showPreview = ref(false);
let srcList = reactive([]) let srcList = reactive([]);
let initialIndex = ref(0) let initialIndex = ref(0);
const dialogVisible = ref(false); const dialogVisible = ref(false);
const innerVisible = ref(false); const innerVisible = ref(false);
@ -335,11 +331,8 @@ onUnmounted(() => {
* *
*/ */
const lookIamge = (index) => { const lookIamge = (index) => {
initialIndex.value = index; //
initialIndex.value = index // showPreview.value = true;
showPreview.value = true
// if (!exampleFile) return; // if (!exampleFile) return;
// const imageItem = document.getElementById(`businessImage` + index); // const imageItem = document.getElementById(`businessImage` + index);
@ -356,11 +349,11 @@ const handleInfoByyewu = async (id) => {
id, id,
parent: info.parent, parent: info.parent,
}); });
res.data.srcList = [] res.data.srcList = [];
if (res.data.formList.length > 0) { if (res.data.formList.length > 0) {
res.data.srcList= res.data.formList.map(item=>{ res.data.srcList = res.data.formList.map((item) => {
return `${baseUrl}/api/yzt-data/file/otherImage?name=${item.exampleFile}&imgname=${item.name}` return `${baseUrl}/api/yzt-data/file/otherImage?name=${item.exampleFile}&imgname=${item.name}`;
}) });
} }
businessInfo = res.data; businessInfo = res.data;
@ -509,8 +502,23 @@ const handleOutsideClick = (event) => {
const handlePointLayer = (index, value) => { const handlePointLayer = (index, value) => {
if (currentIndex.value != index) { if (currentIndex.value != index) {
currentIndex.value = index; currentIndex.value = index;
getMarkerType(value);
} }
}; };
const getMarkerType = async (type) => {
const res = await getPointListByType({ type });
mapLayer.markerLayer.clear();
res.data.map((item, index) => {
if (index == 0) {
map.flyToPoint(item.lonLat.split(","), {
radius: 30738,
duration: 1,
});
}
initMarker(item);
});
};
/** /**
* 点位选择 * 点位选择
*/ */

Loading…
Cancel
Save