Compare commits
2 Commits
4eb893e60c
...
37acf0f629
| Author | SHA1 | Date |
|---|---|---|
|
|
37acf0f629 | |
|
|
7e930133d4 |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 8.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -4,7 +4,6 @@ export function mapFun() {
|
||||||
|
|
||||||
const ceshiClick = () => {
|
const ceshiClick = () => {
|
||||||
console.log('ceshi');
|
console.log('ceshi');
|
||||||
alert('ceshi');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 根据坐标点跳转位置
|
// 根据坐标点跳转位置
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ export const eventCommonHandler = (
|
||||||
|
|
||||||
EventBus.emit(elementList[j].elementId[k] + type, params);
|
EventBus.emit(elementList[j].elementId[k] + type, params);
|
||||||
|
|
||||||
// 分组内组件通信
|
// 分组内所有组件默认添加通信
|
||||||
componentList[i]?.groupList?.forEach((groupItem,idx)=>{
|
componentList[i]?.groupList?.forEach((groupItem,idx)=>{
|
||||||
EventBus.emit(groupItem.id +"dataupdate", params);
|
EventBus.emit(groupItem.id +"dataupdate", params);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ export function mapFun() {
|
||||||
|
|
||||||
const ceshiClick = () => {
|
const ceshiClick = () => {
|
||||||
console.log('ceshi');
|
console.log('ceshi');
|
||||||
alert('ceshi');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 根据坐标点跳转位置
|
// 根据坐标点跳转位置
|
||||||
|
|
|
||||||
|
|
@ -314,9 +314,11 @@ const vChartRef = ref<HTMLElement>()
|
||||||
|
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
handlerGetLayerTree();
|
handlerGetLayerTree();
|
||||||
|
|
||||||
EventBus.on(props.chartConfig.id + 'GraphicClick', (data) => {
|
EventBus.on(props.chartConfig.id + 'GraphicClick', (data) => {
|
||||||
console.log('data', data);
|
console.log('data', data);
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const isFirstLoad = ref(true);
|
const isFirstLoad = ref(true);
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,6 @@ const initMap = (newData: any) => {
|
||||||
|
|
||||||
window.globalMap = map;
|
window.globalMap = map;
|
||||||
|
|
||||||
|
|
||||||
// 所有绑定的点击事件
|
// 所有绑定的点击事件
|
||||||
let bindEvents = props.chartConfig.events.interactConfigEvents
|
let bindEvents = props.chartConfig.events.interactConfigEvents
|
||||||
|
|
||||||
|
|
@ -76,12 +75,8 @@ const initMap = (newData: any) => {
|
||||||
|
|
||||||
// 图层点击事件
|
// 图层点击事件
|
||||||
window.globalMap.on(mars3d.EventType.click,(event)=>{
|
window.globalMap.on(mars3d.EventType.click,(event)=>{
|
||||||
|
|
||||||
// alert("layer id:"+event.layer.id+"; graphic id:"+event.graphic.options.attr.id);
|
|
||||||
|
|
||||||
// 查找绑定的点击事件的图层
|
// 查找绑定的点击事件的图层
|
||||||
for(let i=0;i<bindEvents.length;i++){
|
for(let i=0;i<bindEvents.length;i++){
|
||||||
console.log("bindEvent",bindEvents[i])
|
|
||||||
for(let j=0;j<bindEvents[i].movementList.length;j++){
|
for(let j=0;j<bindEvents[i].movementList.length;j++){
|
||||||
console.log("bindEvent",bindEvents[i].movementList[j])
|
console.log("bindEvent",bindEvents[i].movementList[j])
|
||||||
if(event.layer.id == bindEvents[i].movementList[j].params){
|
if(event.layer.id == bindEvents[i].movementList[j].params){
|
||||||
|
|
@ -89,7 +84,6 @@ const initMap = (newData: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 初始化矢量图层
|
// 初始化矢量图层
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -96,7 +95,7 @@ const handlerLoadFirePoint = (points:[])=>{
|
||||||
style: {
|
style: {
|
||||||
image: "/public/map/fire.png",
|
image: "/public/map/fire.png",
|
||||||
clampToGround: true,
|
clampToGround: true,
|
||||||
scale: 0.4,
|
scale: 0.8,
|
||||||
label: {
|
label: {
|
||||||
text: item.title,
|
text: item.title,
|
||||||
font_size: 12,
|
font_size: 12,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ import { CreateComponentType } from '@/packages/index.d';
|
||||||
import { useChartDataFetch } from '@/hooks';
|
import { useChartDataFetch } from '@/hooks';
|
||||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
||||||
import { EventBus } from '@/utils/eventBus';
|
import { EventBus } from '@/utils/eventBus';
|
||||||
|
import { getAppEnvConfig } from '@/utils/env'
|
||||||
|
var { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||||
|
|
||||||
import { replaceSqlParams } from '@/utils/sqlHandler';
|
import { replaceSqlParams } from '@/utils/sqlHandler';
|
||||||
|
|
||||||
|
|
@ -69,13 +70,12 @@ onMounted(()=>{
|
||||||
desc:resData[0][firstLetterToLowerCase(item.en_name)]
|
desc:resData[0][firstLetterToLowerCase(item.en_name)]
|
||||||
}
|
}
|
||||||
data.push(info);
|
data.push(info);
|
||||||
|
|
||||||
})
|
})
|
||||||
|
props.chartConfig.option.dataset.imgArr = [VITE_GLOB_API_URL+"/"+resData[0].image]
|
||||||
|
console.log("0000",)
|
||||||
props.chartConfig.option.dataset.data = data;
|
props.chartConfig.option.dataset.data = data;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function firstLetterToLowerCase(str) {
|
function firstLetterToLowerCase(str) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue