qinhouyu hai 8 meses
pai
achega
1b63d307fd
Modificáronse 1 ficheiros con 13 adicións e 7 borrados
  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 => {