فهرست منبع

修改查询条件

zs 8 ماه پیش
والد
کامیت
2f8e141f6b

+ 1 - 1
src/utils/file.js

@@ -16,7 +16,7 @@ export async function uploadFileApi(file) {
   if (token) axios.defaults.headers.common['token'] = token
   if (apiToken) axios.defaults.headers.common['api-token'] = apiToken
   return await axios.request({
-    url: '/web/template_wangEditor/upload',
+    url: '/web/cxyy_wangEditor/upload',
     method: 'post',
     data: formData,
     headers: {

+ 7 - 2
src/views/detail/company.vue

@@ -53,7 +53,7 @@
           <a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
           <a-input class="input" size="large" v-model:value="searchForm.direction" placeholder="研究方向" />
           <a-input class="input" size="large" v-model:value="searchForm.scale" placeholder="公司规模" />
-          <a-button class="button" size="large" type="primary">检索</a-button>
+          <a-button class="button" size="large" type="primary" @click="toSearchInfo">检索</a-button>
         </div>
       </el-col>
       <div class="thr">
@@ -156,7 +156,8 @@ const search = async (query = { skip, limit }) => {
   limit = query.limit
   const info = {
     skip: query.skip,
-    limit: query.limit
+    limit: query.limit,
+    ...searchForm.value
   }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -178,6 +179,10 @@ const getDict = (data, model) => {
   else if (model == 'scale') res = scaleList.value.find((f) => f.value == data)
   return get(res, 'label')
 }
+// 搜索
+const toSearchInfo = async () => {
+  await search({ skip, limit })
+}
 // 查看
 const toView = (item) => {
   router.push({ path: `/company/detail`, query: { id: item.id || item._id } })

+ 7 - 2
src/views/detail/expert.vue

@@ -67,7 +67,7 @@
         <a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
         <a-input class="input" size="large" v-model:value="searchForm.direction" placeholder="研究方向" />
         <a-input class="input" size="large" v-model:value="searchForm.industry" placeholder="所属产业" />
-        <a-button class="button" size="large" type="primary">检索</a-button>
+        <a-button class="button" size="large" type="primary" @click="toSearchInfo">检索</a-button>
       </div>
       <div class="twoTwo">
         <div class="twoTable">
@@ -159,7 +159,8 @@ const search = async (query = { skip, limit }) => {
   limit = query.limit
   const info = {
     skip: query.skip,
-    limit: query.limit
+    limit: query.limit,
+    ...searchForm.value
   }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -167,6 +168,10 @@ const search = async (query = { skip, limit }) => {
     total.value = res.total
   }
 }
+// 搜索
+const toSearchInfo = async () => {
+  await search({ skip, limit })
+}
 // 查看
 const toView = (item) => {
   router.push({ path: `/expert/detail`, query: { id: item.id || item._id } })

+ 3 - 1
src/views/detail/industryDetail.vue

@@ -54,11 +54,13 @@ const search = async () => {
       padding: 30px 0;
     }
     .info_2 {
+      text-align: center;
+      margin: 0 0 30px 0;
+      min-height: 700px;
       padding: 20px;
       background-color: #fff;
       box-shadow: 0 0 13px 0 rgba(5, 88, 219, 0.18);
       .info_name {
-        text-align: center;
         font-size: $global-font-size-22;
         font-weight: bold;
       }

+ 31 - 2
src/views/detail/matchDetail.vue

@@ -6,6 +6,7 @@
           <h3 class="name">{{ info.name || '暂无' }}</h3>
           <p class="brief">{{ info.industry || '暂无' }}</p>
           <p class="money" v-if="info.money">{{ info.money || '暂无' }}</p>
+          <p class="type" v-if="info.match_type">{{ getDict(info.match_type, 'type') || '暂无' }}</p>
           <div class="time">
             <el-image class="image" :src="time" fit="fill"></el-image>
             <span>{{ info.start_time || '暂无' }} ~ {{ info.end_time || '暂无' }}</span>
@@ -114,7 +115,7 @@
 
 <script setup>
 import moment from 'moment'
-import { cloneDeep } from 'lodash-es'
+import { get, cloneDeep } from 'lodash-es'
 const $checkRes = inject('$checkRes')
 // 组件
 import dataForm from './parts/index.vue'
@@ -136,6 +137,7 @@ const route = useRoute()
 const info = ref({})
 // 弹框
 const cardTypeList = ref([])
+const typeList = ref([])
 const ruleFormRef = ref()
 const form = ref({})
 const validatePhoneNumber = (rule, value, callback) => {
@@ -178,6 +180,9 @@ const searchOther = async () => {
   // 证件类型
   result = await dictDataStore.query({ code: 'cardType', is_use: '0' })
   if ($checkRes(result)) cardTypeList.value = result.data
+  // 赛事类型
+  result = await dictDataStore.query({ code: 'activeType', is_use: '0' })
+  if ($checkRes(result)) typeList.value = result.data
 }
 const search = async () => {
   let id = route.query.id
@@ -186,9 +191,19 @@ const search = async () => {
     if (res.errcode == '0') info.value = res.data
   }
 }
+// 字典数据转换
+const getDict = (data, model) => {
+  if (data) {
+    let res
+    if (model == 'type') res = typeList.value.find((f) => f.value == data)
+    return get(res, 'label')
+  }
+}
 // 报名参赛
 const toSign = () => {
-  dialog.value = true
+  if (info.value.match_type == '1') {
+    window.open(info.value.href, '_blank') // 在新标签页中打开URL
+  } else dialog.value = true
 }
 const toClose = () => {
   dialog.value = false
@@ -246,6 +261,20 @@ provide('submitForm', submitForm)
         margin-top: 25px;
         color: #000;
       }
+      .type {
+        font-size: $global-font-size-12;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        width: 70px;
+        height: 25px;
+        border-radius: 4px;
+        text-align: center;
+        line-height: 25px;
+        font-weight: 700;
+        color: #2a78ff;
+        background: #eaf1ff;
+      }
       .time {
         display: flex;
         margin-top: 60px !important;

+ 7 - 2
src/views/detail/project.vue

@@ -72,7 +72,7 @@
               <a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
               <a-input class="input" size="large" v-model:value="searchForm.source" placeholder="项目来源" />
               <a-input class="input" size="large" v-model:value="searchForm.industry" placeholder="所属产业" />
-              <a-button class="button" size="large" type="primary">检索</a-button>
+              <a-button class="button" size="large" type="primary" @click="toSearchInfo">检索</a-button>
             </div>
           </div>
           <div class="one_2_2">
@@ -169,7 +169,8 @@ const search = async (query = { skip, limit }) => {
   limit = query.limit
   const info = {
     skip: query.skip,
-    limit: query.limit
+    limit: query.limit,
+    ...searchForm.value
   }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -177,6 +178,10 @@ const search = async (query = { skip, limit }) => {
     total.value = res.total
   }
 }
+// 搜索
+const toSearchInfo = async () => {
+  await search({ skip, limit })
+}
 // 查看
 const toView = (item) => {
   router.push({ path: `/project/detail`, query: { id: item.id || item._id } })

+ 7 - 2
src/views/five/index.vue

@@ -68,7 +68,7 @@
           <a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
           <a-input class="input" size="large" v-model:value="searchForm.industry" placeholder="所属产业" />
           <a-input class="input" size="large" v-model:value="searchForm.work" placeholder="组织单位" />
-          <a-button class="button" size="large" type="primary">检索</a-button>
+          <a-button class="button" size="large" type="primary" @click="toSearchInfo">检索</a-button>
         </div>
         <el-col :span="24" class="two_2">
           <div class="list" v-for="(item, index) in list" :key="index">
@@ -154,7 +154,8 @@ const search = async (query = { skip, limit }) => {
     limit: query.limit,
     ...searchForm.value,
     is_use: '0',
-    status: '1'
+    status: '1',
+    ...searchForm.value
   }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -171,6 +172,10 @@ const handleClick = async (tab) => {
   await search({ skip, limit })
   loading.value = false
 }
+// 搜索
+const toSearchInfo = async () => {
+  await search({ skip, limit })
+}
 // 查看
 const toView = (item) => {
   router.push({ path: '/match/detail', query: { id: item.id || item._id } })

+ 7 - 2
src/views/nine/index.vue

@@ -96,7 +96,7 @@
           <a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
           <a-input class="input" size="large" v-model:value="searchForm.source" placeholder="项目来源" />
           <a-input class="input" size="large" v-model:value="searchForm.industry" placeholder="所属产业" />
-          <a-button class="button" size="large" type="primary">检索</a-button>
+          <a-button class="button" size="large" type="primary" @click="toSearchInfo">检索</a-button>
         </div>
       </div>
       <div class="thr">
@@ -193,7 +193,8 @@ const search = async (query = { skip, limit }) => {
   limit = query.limit
   const info = {
     skip: query.skip,
-    limit: query.limit
+    limit: query.limit,
+    ...searchForm.value
   }
   const res = await store.query(info)
   if (res.errcode == '0') {
@@ -228,6 +229,10 @@ const searchOther = async () => {
   if (result.errcode == '0') plateList.value = result.data
   plateList.value.unshift({ id: '-1', title: '不限' })
 }
+// 搜索
+const toSearchInfo = async () => {
+  await search({ skip, limit })
+}
 // 查看详情
 const toView = async (item) => {
   router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })

+ 5 - 1
src/views/seven/index.vue

@@ -66,7 +66,7 @@
         <a-input class="input" size="large" v-model:value="searchForm.name" placeholder="服务名称" />
         <a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
         <a-input class="input" size="large" v-model:value="searchForm.industry" placeholder="所属产业" />
-        <a-button class="button" size="large" type="primary">检索</a-button>
+        <a-button class="button" size="large" type="primary" @click="toSearchInfo">检索</a-button>
       </div>
       <div class="twoTwo">
         <div class="twoTable">
@@ -158,6 +158,10 @@ const search = async (query = { skip, limit }) => {
     total.value = res.total
   }
 }
+// 搜索
+const toSearchInfo = async () => {
+  await search({ skip, limit })
+}
 // 查看详情
 const toView = (item) => {
   router.push({ path: '/service/detail', query: { id: item.id || item._id } })

+ 5 - 1
src/views/six/index.vue

@@ -43,7 +43,7 @@
           <a-input class="input" size="large" v-model:value="searchForm.build" placeholder="建设主体" />
           <a-input class="input" size="large" v-model:value="searchForm.operate" placeholder="运营主体" />
           <a-input class="input" size="large" v-model:value="searchForm.field" placeholder="服务产业领域" />
-          <a-button class="button" size="large" type="primary">检索</a-button>
+          <a-button class="button" size="large" type="primary" @click="toSearchInfo">检索</a-button>
         </div>
       </div>
     </div>
@@ -146,6 +146,10 @@ const search = async (query = { skip, limit }) => {
     total.value = res.total
   }
 }
+// 搜索
+const toSearchInfo = async () => {
+  await search({ skip, limit })
+}
 // 查看
 const toView = (item) => {
   router.push({ path: '/platform/detail', query: { id: item.id || item._id } })

+ 13 - 4
src/views/thr/index.vue

@@ -57,6 +57,7 @@ const list = ref([])
 let skip = 0
 let limit = inject('limit')
 const total = ref(0)
+const searchForm = ref({})
 // 选择
 const toTab = async (status) => {
   active.value = status
@@ -89,17 +90,24 @@ const search = async (query = { skip, limit }) => {
   const info = {
     skip: query.skip,
     limit: query.limit,
-    is_use: '0',
-    status: '1'
+    // is_use: '0',
+    // status: '1',
+    ...searchForm.value
   }
   let res
-  if (active.value == '0') res = await demandStore.list(info)
-  else res = await supplyStore.list(info)
+  if (active.value == '0') res = await demandStore.query(info)
+  else res = await supplyStore.query(info)
   if (res.errcode == '0') {
     list.value = res.data
     total.value = res.total
   }
 }
+// 搜索
+const toSearchInfo = async (data, type) => {
+  active.value = type
+  searchForm.value = data
+  await search({ skip, limit })
+}
 const currentPage = ref(1)
 // 分页
 const changePage = (page = currentPage.value) => {
@@ -118,6 +126,7 @@ provide('list', list)
 provide('total', total)
 provide('sizeChange', sizeChange)
 provide('changePage', changePage)
+provide('toSearchInfo', toSearchInfo)
 </script>
 <style scoped lang="scss">
 .main {

+ 2 - 1
src/views/thr/parts/demand.vue

@@ -63,7 +63,7 @@
       <a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
       <a-input class="input" size="large" v-model:value="searchForm.industry" placeholder="所属产业" />
       <a-input class="input" size="large" v-model:value="searchForm.company" placeholder="所属企业" />
-      <a-button class="button" size="large" type="primary">检索</a-button>
+      <a-button class="button" size="large" type="primary" @click="toSearchInfo(searchForm, '0')">检索</a-button>
     </div>
     <div class="demandTwo">
       <div class="demandTable">
@@ -92,6 +92,7 @@
 const router = useRouter()
 const list = inject('list')
 const total = inject('total')
+const toSearchInfo = inject('toSearchInfo')
 const sizeChange = inject('sizeChange')
 const changePage = inject('changePage')
 const plateList = inject('plateList')

+ 2 - 1
src/views/thr/parts/supply.vue

@@ -63,7 +63,7 @@
       <a-input class="input" size="large" v-model:value="searchForm.tags" placeholder="标签名称" />
       <a-input class="input" size="large" v-model:value="searchForm.industry" placeholder="所属产业" />
       <a-input class="input" size="large" v-model:value="searchForm.source" placeholder="所属来源" />
-      <a-button class="button" size="large" type="primary">检索</a-button>
+      <a-button class="button" size="large" type="primary" @click="toSearchInfo(searchForm, '1')">检索</a-button>
     </div>
     <div class="demandTwo">
       <div class="demandTable">
@@ -92,6 +92,7 @@
 const router = useRouter()
 const list = inject('list')
 const total = inject('total')
+const toSearchInfo = inject('toSearchInfo')
 const sizeChange = inject('sizeChange')
 const changePage = inject('changePage')
 const plateList = inject('plateList')