|
@@ -48,7 +48,7 @@
|
|
},
|
|
},
|
|
setup(props, context){
|
|
setup(props, context){
|
|
console.log("ChartMap 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绑定
|
|
let iframeRef = ref<any>(); // 和iframe标签的ref绑定
|
|
|
|
|
|
const wellId = computed(() => {
|
|
const wellId = computed(() => {
|
|
@@ -66,7 +66,7 @@
|
|
window.addEventListener("message", this.handleMessage, false);
|
|
window.addEventListener("message", this.handleMessage, false);
|
|
this.iframeWindow = this.iframeRef.contentWindow;
|
|
this.iframeWindow = this.iframeRef.contentWindow;
|
|
//加载数据
|
|
//加载数据
|
|
- this.options = this.getDatas();
|
|
|
|
|
|
+ //this.options = this.getDatas();
|
|
console.log("mounted options", this.options);
|
|
console.log("mounted options", this.options);
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
@@ -74,12 +74,23 @@
|
|
//数据查询逻辑,如果不查询,改此方法返回数据即可
|
|
//数据查询逻辑,如果不查询,改此方法返回数据即可
|
|
if(this.datas==null){
|
|
if(this.datas==null){
|
|
this.datas = [];
|
|
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;
|
|
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);
|
|
console.log("getDatas", this.datas);
|
|
return this.datas;
|
|
return this.datas;
|
|
@@ -102,10 +113,11 @@
|
|
},'*');
|
|
},'*');
|
|
},
|
|
},
|
|
handleMessage:async function (event){
|
|
handleMessage:async function (event){
|
|
- console.log("parent handle Message", event.data);
|
|
|
|
//(document.getElementById('iframeMap') as any).contentWindow.postMessage({message:'父页面传过来的数据'},'*');
|
|
//(document.getElementById('iframeMap') as any).contentWindow.postMessage({message:'父页面传过来的数据'},'*');
|
|
//显示坐标点
|
|
//显示坐标点
|
|
let datas = await this.getDatas();
|
|
let datas = await this.getDatas();
|
|
|
|
+ console.log("parent handle Message", event.data, datas);
|
|
|
|
+
|
|
(document.getElementById('iframeMap') as any).contentWindow.postMessage({
|
|
(document.getElementById('iframeMap') as any).contentWindow.postMessage({
|
|
action:'setSymbols',
|
|
action:'setSymbols',
|
|
datas : JSON.stringify(datas)
|
|
datas : JSON.stringify(datas)
|