Browse Source

feat: input

gemercheung 10 months ago
parent
commit
0f364fca1c
1 changed files with 15 additions and 4 deletions
  1. 15 4
      src/app/map/App.vue

+ 15 - 4
src/app/map/App.vue

@@ -23,6 +23,9 @@
           hideAll
         />
       </el-form-item>
+      <el-form-item label="" class="filter">
+        <el-input v-model="keywordSearch" placeholder="输入关键字"></el-input>
+      </el-form-item>
     </div>
     <div class="right">
       <el-select
@@ -102,6 +105,7 @@ console.log("params", params.deptId);
 
 const current = ref(0);
 const currentMaptype = ref(0);
+const keywordSearch = ref("");
 const list = ref<any>([]);
 
 const state = reactive({
@@ -192,12 +196,14 @@ watch(
 );
 const initMakers = async () => {
   const data = (await getDataQuest()) as any as any[];
-  console.log("data", data);
+
   const positions: any[] = [];
-  list.value = data as any[];
-  Array.from(data).forEach((item: any) => {
+  list.value = data.filter((i) => i.latAndLong) as any[];
+  console.log("list", list.value);
+  Array.from(list.value).forEach((item: any) => {
     // console.log(item)
-    const latlng = item.latlng;
+    const latlng = item.latAndLong;
+
     const coord = latlng.split(",");
 
     console.log("coord", coord, item.caseId);
@@ -323,11 +329,16 @@ body {
   justify-content: space-between;
   padding: 0 30px;
 }
+
+.tabbar .left,
 .tabbar .right {
   display: flex;
   flex-direction: row;
   gap: 0 20px;
 }
+.tabbar .left {
+  gap: 0 10px;
+}
 .tabbar .nav {
   display: flex;
   /* background: white; */