lrf 9 mēneši atpakaļ
vecāks
revīzija
73eddd613f
1 mainītis faili ar 20 papildinājumiem un 9 dzēšanām
  1. 20 9
      src/views/search/index.vue

+ 20 - 9
src/views/search/index.vue

@@ -26,12 +26,12 @@
       </div>
     </el-col>
     <el-col :span="24" class="two">
-      <company v-if="activeKey == '1'"></company>
-      <expert v-if="activeKey == '2'"></expert>
-      <project v-if="activeKey == '3'"></project>
-      <demand v-if="activeKey == '4'"></demand>
-      <supply v-if="activeKey == '5'"></supply>
-      <achievement v-if="activeKey == '6'"></achievement>
+      <company  ref="companyRef" v-if="activeKey == '1'"></company>
+      <expert  ref="expertRef" v-if="activeKey == '2'"></expert>
+      <project  ref="projectRef" v-if="activeKey == '3'"></project>
+      <demand  ref="demandRef" v-if="activeKey == '4'"></demand>
+      <supply  ref="supplyRef" v-if="activeKey == '5'"></supply>
+      <achievement  ref="achievementRef" v-if="activeKey == '6'"></achievement>
     </el-col>
   </custom-layout>
 </template>
@@ -59,6 +59,13 @@ const searchValue = ref('')
 const searchLoading = ref(false)
 const list = ref([])
 const tagsList = ref([])
+
+const companyRef = ref(null);
+const achievementRef = ref(null);
+const supplyRef = ref(null);
+const projectRef = ref(null);
+const expertRef = ref(null);
+const demandRef = ref(null);
 // 请求
 onMounted(async () => {
   loading.value = true
@@ -72,14 +79,18 @@ const search = async () => {
   const info = {
     skip: 0,
     limit: 6,
-    is_use: '0',
-    status: '1'
+    is_use: '0'
   }
   const res = await store.query(info)
   if (res.errcode == '0') list.value = res.data
 }
 const toSelect = (item) => {
-  searchValue.value = item.name
+  searchValue.value = item.title
+}
+const onSearch = () => {
+ if (activeKey.value== '1') {
+
+ }
 }
 const remoteMethod = (query) => {
   if (query) {