|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="xm-detal">
|
|
|
- <el-tabs type="border-card" v-model="currentTab">
|
|
|
+ <el-tabs type="border-card" v-model="currentTab" @tab-click="handleTabClick">
|
|
|
<el-tab-pane label="项目信息" name="tab1">
|
|
|
<div class="tables_grid">
|
|
|
<div class="title">项目索引</div>
|
|
@@ -180,13 +180,22 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- locationDk(index,row){
|
|
|
- if(row.pewg_id){
|
|
|
+ handleTabClick(tab) {
|
|
|
+ if (tab.name === 'tab2') {
|
|
|
+ // 切换到地图tab时,调用地块定位,使用objectid
|
|
|
+ if (this.detailData && this.detailData.objectid) {
|
|
|
+ this.locationDk(null, { objectid: this.detailData.objectid });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ locationDk(index, row) {
|
|
|
+ if (row.objectid) {
|
|
|
this.detailShow = false;
|
|
|
- let dkbhArr = row.pewg_id?row.pewg_id.split(","):'';
|
|
|
- let arr = dkbhArr.map(i=>{return "'"+i+"'";});
|
|
|
- this.$vm.$emit('locationGlobal', this.visibleLayerId[0], `xm_guid in (${arr.join()})`)
|
|
|
- //this.$message.warning("暂无图形")
|
|
|
+ let arr = [`'${row.objectid}'`];
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.$refs.baseMap.locationGlobal(this.visibleLayerId[0],`objectid in (${arr.join()})`);
|
|
|
+ },500);
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
drawShapeJsonEvent(json){
|