fix: BUG修改

This commit is contained in:
kun 2023-11-28 15:07:43 +08:00
parent 5b814bc9df
commit 54b454b6b8
2 changed files with 60 additions and 55 deletions

View File

@ -5,8 +5,8 @@ NODE_ENV = "production"
# VITE_API_URL = "http://139.9.66.234:6688"
# VITE_API_URL = "http://jxjzw.zhgdyun.com:6688"
# VITE_API_URL = 'http://192.168.34.155:6688'
VITE_API_URL = 'http://10.75.253.12:6090'
# VITE_API_URL = "http://jxjzw.zhgdyun.com:9013"
# VITE_API_URL = 'http://10.75.253.12:6090'
VITE_API_URL = "http://jxjzw.zhgdyun.com:9013"
VITE_WPAPI_URL = "http://jxjzw.zhgdyun.com:8081"
# VITE_API_URL = "http://101.43.164.214:6688"
# VITE_API_URL = "https://wx.antjg.com:6081/"

View File

@ -6,8 +6,9 @@
<p @click="onClose">x</p>
</div>
<div class="info-top">
<div>项目负责人{{ infoWindowData?.projectManage }}</div>
<div class="ellipsisName">项目地址{{ infoWindowData.projectAddress }}</div>
<div>项目造价{{ infoWindowData?.engineering_cost ? infoWindowData?.engineering_cost : 0 }}万元</div>
<div>项目面积{{ infoWindowData?.engineering_area ? infoWindowData?.engineering_area : 0 }}</div>
<div class="ellipsisName">项目地址{{ infoWindowData.address }}</div>
</div>
</div>
</template>
@ -109,12 +110,15 @@ const addMarker = () => {
if (!props.projectData.length > 0) {
return;
}
const createMarkerImage = (state: string) => new URL(`../../../../../../assets/images/hzImg/xm/${state}`, import.meta.url).href; //
console.log(props.projectData, "------------------");
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), {
imageSize: new BMapGL.Size(40, 40),
imageOffset: new BMapGL.Size(0, 0 - 25) //
});
let point = new BMapGL.Point(114.316196, 23.011847); //
let point = new BMapGL.Point(item.longitude, item.latitude); //
let marker = new BMapGL.Marker(point, { icon: myIcon }); //
map.value.addOverlay(marker); //
//marker
@ -127,10 +131,10 @@ const addMarker = () => {
// console.log(curr);
// curr.showInfo = !curr.showInfo;
infoName.value = props.projectData[0].projectName;
infoName.value = props.projectData[index].engineering_name;
// const res = await getproDetail({ projectId: item.projectId });
// @ts-expect-error
infoWindowData.value = props.projectData[0];
infoWindowData.value = props.projectData[index];
infoShow.value = true;
// const infowindow = new AMapRef.value.InfoWindow({
// isCustom: true, //使
@ -163,6 +167,7 @@ const addMarker = () => {
// onClose();
// }
});
});
};
//
const translateCallback = (data: any) => {