瀏覽代碼

定位拾取

qinhouyu 8 月之前
父節點
當前提交
1b63d307fd
共有 1 個文件被更改,包括 13 次插入7 次删除
  1. 13 7
      screen-demo/src/views/templateInstance.vue

+ 13 - 7
screen-demo/src/views/templateInstance.vue

@@ -69,7 +69,7 @@
           filterable
       ></el-cascader>
       <div class="input-container">
-        <el-input placeholder="请输入内容" v-model="input3" class="input-with-select" @focus="open=true">
+        <el-input placeholder="请输入内容" v-model="input3" class="input-with-select" @focus="focus1">
           <el-button slot="append" icon="el-icon-search" @click="setValue" ></el-button>
         </el-input>
       </div>
@@ -340,11 +340,12 @@ export default {
       //   this.start = this.input3
       // }
     },
-    loadFind(){
-      let option = {
-        width: '8',
-        color: '#f40'
-      };
+    focus1(){
+      this.open=true
+      this.setpoint()
+    },
+    setpoint(){
+      console.log(123)
       const location = new CTMapOl.extend.ToolLocation(this.map.map, {
         onPick: coords => {
           console.log('coords',coords)
@@ -361,7 +362,12 @@ export default {
         console.log(evt.coordinate)
       })
       CTMapOl.Observable.unByKey(onClickMap)
-
+    },
+    loadFind(){
+      let option = {
+        width: '8',
+        color: '#f40'
+      };
       if (this.start.length===2 && this.end.length===2) {
         let toolRoute = new CTMapOl.extend.ToolRoute(this.map.map, option);
         toolRoute.route(this.start, this.end).then(data => {