zs 6 maanden geleden
bovenliggende
commit
0a902abbe0

+ 31 - 3
src/views/detail/achievementDetail.vue

@@ -41,11 +41,11 @@
             </div> -->
             <div class="value">
               <el-image class="image" :src="icon7" fit="fill" />
-              <span class="span">专利情况:{{ info.patent || '暂无' }}</span>
+              <span class="span">成熟度:{{ getDict(info.mature, 'mature') || '暂无' }}</span>
             </div>
             <div class="value">
               <el-image class="image" :src="icon8" fit="fill" />
-              <span class="span">技术标签:{{ info.label || '暂无' }}</span>
+              <span class="span">出让方式:{{ getDict(info.sell, 'sell') || '暂无' }}</span>
             </div>
             <div class="infoButton">
               <div class="button" @click="toChat">预约对接</div>
@@ -101,6 +101,7 @@
 </template>
 
 <script setup>
+import { get } from 'lodash-es'
 import bg_1 from '/images/achievement/tec_bg_1.png'
 import bg_2 from '/images/achievement/tec_bg_2.png'
 import bg_3 from '/images/achievement/tec_bg_3.png'
@@ -119,10 +120,15 @@ import icon8 from '/images/achievement/cg-detail-icon8.png'
 import icon9 from '/images/achievement/cg-detail-icon9.png'
 // 接口
 import { AchievementStore } from '@/store/api/platform/achievement'
+import { ContactApplyStore } from '@/store/api/user/contactApply'
+const contactApplyStore = ContactApplyStore()
 const store = AchievementStore()
+const $checkRes = inject('$checkRes')
 // 收藏
 import moment from 'moment'
 import { CollectionStore } from '@/store/api/platform/collection'
+import { DictDataStore } from '@/store/api/system/dictData'
+const dictDataStore = DictDataStore()
 const collectionStore = CollectionStore()
 
 import { UserStore } from '@/store/user'
@@ -139,10 +145,23 @@ const list = ref([])
 // 请求
 onMounted(async () => {
   loading.value = true
+  await searchOther()
   await search()
   await searchAchieve()
   loading.value = false
 })
+// 字典表
+const matureList = ref([])
+const sellList = ref([])
+const searchOther = async () => {
+  let result
+  // 成熟度
+  result = await dictDataStore.query({ code: 'mature', is_use: '0' })
+  if ($checkRes(result)) matureList.value = result.data
+  // 出让方式
+  result = await dictDataStore.query({ code: 'sell', is_use: '0' })
+  if ($checkRes(result)) sellList.value = result.data
+}
 const search = async () => {
   let id = route.query.id
   if (id) {
@@ -168,6 +187,15 @@ const toView = async (item) => {
     location.reload()
   })
 }
+// 字典数据转换
+const getDict = (data, model) => {
+  if (data) {
+    let res
+    if (model == 'mature') res = matureList.value.find((f) => f.value == data)
+    else if (model == 'sell') res = sellList.value.find((f) => f.value == data)
+    return get(res, 'label')
+  }
+}
 const toCollect = async () => {
   if (user.value.id) {
     info.value.is_collection = !info.value.is_collection
@@ -199,7 +227,7 @@ const toChat = () => {
         const obj = {
           source_id: route.query.id,
           source: 'achievement',
-          apply_user: user.value.id,
+          apply_user: user.value.id
         }
         const res = await contactApplyStore.create(obj)
         $checkRes(res, `预约对接成功等待消息通知`, res.errmsg)

+ 1 - 1
src/views/detail/baseDetail.vue

@@ -210,7 +210,7 @@ const toChat = () => {
         let apply_user = user.value.id
         const obj = { source_id, source, apply_user }
         const res = await contactApplyStore.create(obj)
-        $checkRes(res,`预约对接成功等待消息通知`,res.errmsg)
+        $checkRes(res, `预约对接成功等待消息通知`, res.errmsg)
       })
       .catch(() => {})
   } else ElMessage({ message: '未登录!', type: 'error' })

+ 1 - 1
src/views/four/index.vue

@@ -7,7 +7,7 @@
           <a-tab-pane :key="item.key" :tab="item.tab" v-for="item in menuList"> </a-tab-pane>
         </a-tabs>
         <div class="input_1">
-          <el-select size="large" clearable v-model="searchValue" filterable remote reserve-keyword placeholder="请输入想要搜索的内容" :remote-method="remoteMethod" :loading="searchLoading">
+          <el-select size="large" clearable v-model="searchValue" allow-create filterable remote reserve-keyword placeholder="请输入想要搜索的内容" :remote-method="remoteMethod" :loading="searchLoading">
             <el-option v-for="item in tagsList" :key="item.id" :label="item.title" :value="item.title" />
           </el-select>
           <el-button size="large" @click="onSearch" type="primary">搜索</el-button>

+ 1 - 1
src/views/search/index.vue

@@ -12,7 +12,7 @@
           <a-tab-pane key="6" tab="成果"> </a-tab-pane>
         </a-tabs>
         <div class="input_1">
-          <el-select size="large" clearable v-model="searchValue" filterable remote reserve-keyword placeholder="请输入想要搜索的内容" :remote-method="remoteMethod" :loading="searchLoading">
+          <el-select size="large" clearable v-model="searchValue" allow-create filterable remote reserve-keyword placeholder="请输入想要搜索的内容" :remote-method="remoteMethod" :loading="searchLoading">
             <el-option v-for="item in tagsList" :key="item.id" :label="item.title" :value="item.title" />
           </el-select>
           <el-button size="large" @click="onSearch" type="primary">搜索</el-button>

+ 1 - 1
src/views/search/parts/demand.vue

@@ -12,7 +12,7 @@
             {{ item.name || '暂无供给名称' }}
           </div>
           <div class="other_1 textOne" v-if="user && user.id">
-            <span>需求企业</span>
+            <span>需求企业</span>
             <span>{{ item.company || '暂无需求企业' }}</span>
           </div>
           <div class="other_1 textOne" v-if="user && user.id">