Browse Source

列表关系和详情上图并跳转保留

maxiaoxiao 4 months ago
parent
commit
1d1e6b97a6
1 changed files with 7 additions and 7 deletions
  1. 7 7
      src/views/basicGeographic/index.vue

+ 7 - 7
src/views/basicGeographic/index.vue

@@ -37,7 +37,7 @@
         <graph id="first_pie" ref="graphEchart" @click="click" @rightClick="rightClick" @mouseout="mouseout"></graph>
       </div>
       <div id="myContext" class="myContextMenu" style="display: none;">
-        <div @click="fly"> 定位</div>
+        <div @click="fly(false)"> 定位</div>
         <div @click="infoto">详情</div>
       </div>
     </div>
@@ -135,7 +135,7 @@ export default {
   },
   created() { },
   mounted() {
-    // this.getGraph({ entityid: 'MA1001NE103K10350XXXXXXXXXXXXXXX2203020000', entityname: '科尔沁北路' })//MA1001NE103K103501004XXXXXXXXXXX2203040000
+    this.getGraph({ entityid: 'MA1001NE103K103501004XXXXXXXXXXX2203040000', entityname: '科尔沁北路'},true)//MA1001NE103K103501004XXXXXXXXXXX2203040000
   },
   methods: {
     showlist(data) {
@@ -155,7 +155,7 @@ export default {
       if (checked) this.getDatas(obj)
       else removeGeoJSON(`2wentity${obj.id}`)
     },
-    getGraph(obj) {
+    getGraph(obj,isl) {
       this.showInter = true
       this.graphdata = []
       this.gralinks = []
@@ -164,7 +164,7 @@ export default {
       this.oldclick = []
       this.addOld({ name: obj.entityname, id: obj.entityid, category: 0, data: obj })
       this.getRelationship(obj)
-      this.getDatas(obj,'fly')
+      this.getDatas(obj,'fly',isl)
     },
     HideGraph() {
       this.showInter = false
@@ -209,12 +209,12 @@ export default {
       this.pageObj = { query_data: '', query_links: '' }
       this.$refs.graphEchart.setOptions(this.graphdata, this.gralinks, categors);
     },
-    getDatas(obj, type) {
+    getDatas(obj, type,isl) {
       getData({ entityid: obj.id || obj.entityid }).then((res) => {
         if (res.statuscode == 200) {
           // if (type == 'infoto' || type == 'fly') {
             this.nowObj = res;
-            this[type](true);
+            this[type](isl);
           // } 
           if(type == 'infoto') {this.fly(true)}
           // else
@@ -280,7 +280,7 @@ export default {
         this.nowgeoId = 'h' + this.nowObj.data.entityid
       }
       this.nowObj.data.geom.forEach(item => {
-        loadGeoJSON(item.siweigeomewkt, "#ff0000", { isfly: true }, (data) => {
+        loadGeoJSON(item.siweigeomewkt, islist?"#ff0000":'#2DBDFF', { isfly: true }, (data) => {
           data.name = islist?'enitylist':this.nowgeoId
         });
       });