|
@@ -48,7 +48,7 @@
|
|
|
},
|
|
|
setup(props, context){
|
|
|
console.log("ChartMap setup" , props, context);
|
|
|
- let iframeSrc = ref<string>("http://192.168.0.68:8077/a4gis/index.html");
|
|
|
+ let iframeSrc = ref<string>("http://10.73.178.206:8077/a4gis/index.html");
|
|
|
let iframeRef = ref<any>(); // 和iframe标签的ref绑定
|
|
|
|
|
|
const wellId = computed(() => {
|
|
@@ -66,7 +66,7 @@
|
|
|
window.addEventListener("message", this.handleMessage, false);
|
|
|
this.iframeWindow = this.iframeRef.contentWindow;
|
|
|
//加载数据
|
|
|
- this.options = this.getDatas();
|
|
|
+ //this.options = this.getDatas();
|
|
|
console.log("mounted options", this.options);
|
|
|
},
|
|
|
methods:{
|
|
@@ -74,12 +74,23 @@
|
|
|
//数据查询逻辑,如果不查询,改此方法返回数据即可
|
|
|
if(this.datas==null){
|
|
|
this.datas = [];
|
|
|
- const result = await get('/wellInfo/getMapList',{ page: 1, rows:1000,well_id: this.wellId});
|
|
|
- this.datas = result.list.map((item, index) => {
|
|
|
- item.value = item.well_id;
|
|
|
- item.index = index;
|
|
|
+ const result = await get('/wellInfo/getMapList',{ page: 1, rows:10000});
|
|
|
+ this.datas = result.list.map((item) => {
|
|
|
+ item.value = item.well_common_name;
|
|
|
return item;
|
|
|
});
|
|
|
+
|
|
|
+ /*
|
|
|
+ for(let i=0;i<10000;i++){
|
|
|
+ this.datas?.push({
|
|
|
+ value:'华李1-26-'+i,
|
|
|
+ geo_description:'内蒙古锡林浩特市阿尔善宝力格达莱因29'+i,
|
|
|
+ well_common_name:'华李1-26-'+i,
|
|
|
+ well_id:'华李1-26-'+i,
|
|
|
+ x : result.list[i % result.list.length].x,
|
|
|
+ y : result.list[i % result.list.length].y
|
|
|
+ });
|
|
|
+ }*/
|
|
|
}
|
|
|
console.log("getDatas", this.datas);
|
|
|
return this.datas;
|
|
@@ -102,10 +113,11 @@
|
|
|
},'*');
|
|
|
},
|
|
|
handleMessage:async function (event){
|
|
|
- console.log("parent handle Message", event.data);
|
|
|
//(document.getElementById('iframeMap') as any).contentWindow.postMessage({message:'父页面传过来的数据'},'*');
|
|
|
//显示坐标点
|
|
|
let datas = await this.getDatas();
|
|
|
+ console.log("parent handle Message", event.data, datas);
|
|
|
+
|
|
|
(document.getElementById('iframeMap') as any).contentWindow.postMessage({
|
|
|
action:'setSymbols',
|
|
|
datas : JSON.stringify(datas)
|