Browse Source

Merge branch 'master' of http://git.cc-lotus.info/Information/cxyy-web2

zs 6 months ago
parent
commit
b243080550
1 changed files with 7 additions and 4 deletions
  1. 7 4
      src/views/twelve/index.vue

+ 7 - 4
src/views/twelve/index.vue

@@ -204,6 +204,7 @@ const loading = ref(true)
 // 路由
 const router = useRouter()
 const keyword = ref('')
+const keywordId = ref()
 
 // 类型
 const dataType = ref('0')
@@ -262,8 +263,10 @@ const toMate = async (item) => {
   loading.value = true
   let res
   keyword.value = item.name
-  if (dataType.value == '0') res = await esStore.supply({ skip: skip, limit: limit, keyword: item.name })
-  else res = await esStore.demand({ skip: skip, limit: limit, keyword: item.name })
+  keywordId.value = item.id
+  const query = { skip: skip, limit: limit, keyword: item.name, id: item.id }
+  if (dataType.value != '0') res = await esStore.supply(query)
+  else res = await esStore.demand(query)
   if (res.errcode == '0') {
     list.value = res.data
     total.value = res.total
@@ -294,9 +297,9 @@ const sizeChangetwo = (limits) => {
 const search = async (query = { skip, limit }) => {
   skip = query.skip
   limit = query.limit
-  const info = { skip: query.skip, limit: query.limit, keyword: keyword.value }
+  const info = { skip: query.skip, limit: query.limit, keyword: keyword.value, id: keywordId.value }
   let res
-  if (dataType.value == '0') res = await esStore.supply(info)
+  if (dataType.value != '0') res = await esStore.supply(info)
   else res = await esStore.demand(info)
   if (res.errcode == '0') {
     list.value = res.data