fix: BUG修改
This commit is contained in:
parent
0b4ba8717f
commit
e3d4cfd1a1
@ -6,8 +6,9 @@
|
|||||||
<p @click="onClose">x</p>
|
<p @click="onClose">x</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="info-top">
|
<div class="info-top">
|
||||||
<div>项目负责人:{{ infoWindowData?.projectManage }}</div>
|
<div>项目造价:{{ infoWindowData?.engineering_cost ? infoWindowData?.engineering_cost : 0 }}万元</div>
|
||||||
<div class="ellipsisName">项目地址:{{ infoWindowData.projectAddress }}</div>
|
<div>项目面积:{{ infoWindowData?.engineering_area ? infoWindowData?.engineering_area : 0 }}㎡</div>
|
||||||
|
<div class="ellipsisName">项目地址:{{ infoWindowData.address }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -109,12 +110,14 @@ const addMarker = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(props.projectData, "------------------");
|
console.log(props.projectData, "------------------");
|
||||||
const createMarkerImage = (state: string) => new URL(`../../../../../../assets/images/hzImg/xm/${state}`, import.meta.url).href; // 图片引入
|
props.projectData.map((item, index) => {
|
||||||
|
const createMarkerImage = (state: string) =>
|
||||||
|
new URL(`../../../../../../assets/images/hzImg/xm/${state}`, import.meta.url).href; // 图片引入
|
||||||
let myIcon = new BMapGL.Icon(createMarkerImage("marker.png"), new BMapGL.Size(80, 80), {
|
let myIcon = new BMapGL.Icon(createMarkerImage("marker.png"), new BMapGL.Size(80, 80), {
|
||||||
imageSize: new BMapGL.Size(40, 40),
|
imageSize: new BMapGL.Size(40, 40),
|
||||||
imageOffset: new BMapGL.Size(0, 0 - 25) // 设置图片偏移
|
imageOffset: new BMapGL.Size(0, 0 - 25) // 设置图片偏移
|
||||||
});
|
});
|
||||||
let point = new BMapGL.Point(114.272994, 23.032578); // 点位设置
|
let point = new BMapGL.Point(item.longitude, item.latitude); // 点位设置
|
||||||
let marker = new BMapGL.Marker(point, { icon: myIcon }); // 标记点
|
let marker = new BMapGL.Marker(point, { icon: myIcon }); // 标记点
|
||||||
map.value.addOverlay(marker); // 添加标记点
|
map.value.addOverlay(marker); // 添加标记点
|
||||||
//鼠标点击marker弹出自定义的信息窗体
|
//鼠标点击marker弹出自定义的信息窗体
|
||||||
@ -127,10 +130,10 @@ const addMarker = () => {
|
|||||||
// console.log(curr);
|
// console.log(curr);
|
||||||
// curr.showInfo = !curr.showInfo;
|
// curr.showInfo = !curr.showInfo;
|
||||||
|
|
||||||
infoName.value = props.projectData[0].projectName;
|
infoName.value = props.projectData[index].engineering_name;
|
||||||
// const res = await getproDetail({ projectId: item.projectId });
|
// const res = await getproDetail({ projectId: item.projectId });
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
infoWindowData.value = props.projectData[0];
|
infoWindowData.value = props.projectData[index];
|
||||||
infoShow.value = true;
|
infoShow.value = true;
|
||||||
// const infowindow = new AMapRef.value.InfoWindow({
|
// const infowindow = new AMapRef.value.InfoWindow({
|
||||||
// isCustom: true, //使用自定义窗体
|
// isCustom: true, //使用自定义窗体
|
||||||
@ -163,6 +166,7 @@ const addMarker = () => {
|
|||||||
// onClose();
|
// onClose();
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
// 坐标转换回调
|
// 坐标转换回调
|
||||||
const translateCallback = (data: any) => {
|
const translateCallback = (data: any) => {
|
||||||
|
|||||||
@ -49,7 +49,7 @@ import BDmaps3D from "./components/BDmaps3D.vue";
|
|||||||
import largeScreenTwo from "../largeScreenTwo/index.vue";
|
import largeScreenTwo from "../largeScreenTwo/index.vue";
|
||||||
import { GlobalStore } from "@/stores";
|
import { GlobalStore } from "@/stores";
|
||||||
import { sendIframeMessage } from "@/utils/util";
|
import { sendIframeMessage } from "@/utils/util";
|
||||||
import { getproNamelist } from "@/api/modules/goverment";
|
import { getMapProject } from "@/api/modules/largeSreen";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
@ -66,7 +66,7 @@ const changeScreen = () => {
|
|||||||
// screenValue.value = screenValue.value == 0 ? 1 : 0;
|
// screenValue.value = screenValue.value == 0 ? 1 : 0;
|
||||||
};
|
};
|
||||||
const getProjectList = async () => {
|
const getProjectList = async () => {
|
||||||
const res = await getproNamelist({});
|
const res = await getMapProject({});
|
||||||
if (res && res.result && res.result.length > 0) {
|
if (res && res.result && res.result.length > 0) {
|
||||||
projectData.value = res.result;
|
projectData.value = res.result;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user