lrf 10 달 전
부모
커밋
85afbd91a0
6개의 변경된 파일176개의 추가작업 그리고 326개의 파일을 삭제
  1. 34 30
      src/views/achievement/detail.vue
  2. 22 93
      src/views/achievement/index.vue
  3. 36 31
      src/views/demand/detail.vue
  4. 22 69
      src/views/demand/index.vue
  5. 27 32
      src/views/expert/detail.vue
  6. 35 71
      src/views/expert/index.vue

+ 34 - 30
src/views/achievement/detail.vue

@@ -26,25 +26,25 @@
           <el-col :span="24" class="two">
             <a-descriptions bordered>
               <a-descriptions-item label="行业分类">
-                {{ getDict(info.field, 'field') }}
+                {{ getDict(info, 'field') }}
               </a-descriptions-item>
               <a-descriptions-item label="成果属性">
-                {{ getDict(info.attribute, 'attribute') }}
+                {{ getDict(info, 'attribute') }}
               </a-descriptions-item>
               <a-descriptions-item label="出让方式">
-                {{ getDict(info.sell, 'sell') }}
+                {{ getDict(info, 'sell') }}
               </a-descriptions-item>
               <a-descriptions-item label="成熟度">
-                {{ getDict(info.mature, 'mature') }}
+                {{ getDict(info, 'mature') }}
               </a-descriptions-item>
               <a-descriptions-item label="技术分类">
-                {{ getDict(info.technology, 'technology') }}
+                {{ getDict(info, 'technology') }}
               </a-descriptions-item>
               <a-descriptions-item label="成果地区">
                 {{ getArea(info.area) }}
               </a-descriptions-item>
               <a-descriptions-item label="发布时间">
-                {{ info.time }}
+                {{ getTime(info.time) }}
               </a-descriptions-item>
             </a-descriptions>
           </el-col>
@@ -53,9 +53,7 @@
               参考价格:<span> {{ info.money || '面议' }} </span>
             </div>
           </el-col>
-          <el-col :span="24" class="pointer" v-if="!user && !user.id">
-            提醒:您还没有登录,登录成功后再对接
-          </el-col>
+          <el-col :span="24" class="pointer" v-if="!user && !user.id"> 提醒:您还没有登录,登录成功后再对接 </el-col>
           <el-col :span="24" class="thr">
             <el-col :span="24" class="thr_1">
               <p>单位信息</p>
@@ -63,11 +61,13 @@
             <el-row :span="24" class="thr_2">
               <el-col :span="18" class="left">
                 <el-col :span="24" class="name">
-                  {{ userInfo.name || '暂无' }}
+                  <!-- {{ userInfo.name || '暂无' }} -->
+                  {{ info.source }}
                 </el-col>
                 <el-col :span="24" class="other">
                   <span>联系人</span>
-                  {{ userInfo.name || '暂无联系人' }}
+                  <!-- {{ userInfo.name || '暂无联系人' }} -->
+                  {{ info.person }} {{ info.tel }}
                 </el-col>
               </el-col>
               <el-col :span="6" class="right" v-if="info.status == '1'">
@@ -100,19 +100,13 @@
                         {{ item.name || '暂无名称' }}
                       </el-tooltip>
                     </el-col>
-                    <el-col :span="24" class="two_1">
-                      <span>技术领域:</span>{{ getDict(item.field, 'field') }}
-                    </el-col>
-                    <el-col :span="24" class="two_1">
-                      <span>成果地区:</span>{{ getArea(item.area) }}
-                    </el-col>
-                    <el-col :span="24" class="two_1">
-                      <span>单位:</span>{{ item.userName || '暂无单位' }}
-                    </el-col>
+                    <el-col :span="24" class="two_1"> <span>技术领域:</span>{{ getDict(item, 'field') }} </el-col>
+                    <el-col :span="24" class="two_1"> <span>负责人:</span>{{ getDict(item, 'person') }} </el-col>
+                    <el-col :span="24" class="two_1"> <span>来源:</span>{{ getDict(item, 'source') }} </el-col>
+                    <!-- <el-col :span="24" class="two_1"> <span>成果地区:</span>{{ getArea(item.area) }} </el-col>
+                    <el-col :span="24" class="two_1"> <span>单位:</span>{{ item.userName || '暂无单位' }} </el-col> -->
                     <el-col :span="24" class="bottom">
-                      <a-button size="small" type="primary" @click="toView(item)">
-                        查看详情
-                      </a-button>
+                      <a-button size="small" type="primary" @click="toView(item)"> 查看详情 </a-button>
                     </el-col>
                   </el-col>
                 </template>
@@ -175,12 +169,15 @@ let limit = inject('limit')
 const total = ref(0)
 // 请求
 onMounted(async () => {
+  init()
+})
+const init = async () => {
   loading.value = true
   await searchOther()
   await search()
   await searchAchieve({ skip, limit })
   loading.value = false
-})
+}
 const search = async () => {
   let id = route.query.id
   if (id) {
@@ -225,12 +222,18 @@ const searchOther = async () => {
 // 字典数据转换
 const getDict = (data, model) => {
   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)
-  else if (model == 'field') res = fieldList.value.find((f) => f.value == data)
-  else if (model == 'attribute') res = attributeList.value.find((f) => f.value == data)
-  else if (model == 'technology') res = technologyList.value.find((f) => f.value == data)
-  return get(res, 'label')
+  // if (model == 'mature') res = matureList.value.find((f) => f.value == data)
+  // else if (model == 'sell') res = sellList.value.find((f) => f.value == data)
+  // else if (model == 'field') res = fieldList.value.find((f) => f.value == data)
+  // else if (model == 'attribute') res = attributeList.value.find((f) => f.value == data)
+  // else if (model == 'technology') res = technologyList.value.find((f) => f.value == data)
+  // return get(res, 'label')
+  return get(data, model)
+}
+const getTime = (time) => {
+  const r = moment(time).isValid()
+  if (!r) return ''
+  return time
 }
 // 地区
 const getArea = (data) => {
@@ -284,6 +287,7 @@ const toCollection = async (status) => {
 // 查看
 const toView = (item) => {
   router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })
+  init()
 }
 const currentPage = ref(1)
 // 分页

+ 22 - 93
src/views/achievement/index.vue

@@ -73,15 +73,7 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">行业分市场</el-col>
               <el-col :span="21" class="right">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in technologyList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'one')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in technologyList" :key="index" type="link" size="samll" @click="toSelect(item, 'one')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -89,28 +81,12 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">技术领域</el-col>
               <el-col :span="20" class="right" v-if="twoShow">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in fieldList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'two')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in fieldList" :key="index" type="link" size="samll" @click="toSelect(item, 'two')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
               <el-col :span="20" class="right" v-else>
-                <a-button
-                  class="title"
-                  v-for="(item, index) in fieldList.slice(0, 6)"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'two')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in fieldList.slice(0, 6)" :key="index" type="link" size="samll" @click="toSelect(item, 'two')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -128,15 +104,7 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">成熟度</el-col>
               <el-col :span="21" class="right">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in matureList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'thr')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in matureList" :key="index" type="link" size="samll" @click="toSelect(item, 'thr')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -144,28 +112,12 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">出让方式</el-col>
               <el-col :span="20" class="right" v-if="thrShow">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in sellList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'four')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in sellList" :key="index" type="link" size="samll" @click="toSelect(item, 'four')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
               <el-col :span="20" class="right" v-else>
-                <a-button
-                  class="title"
-                  v-for="(item, index) in sellList.slice(0, 6)"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'four')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in sellList.slice(0, 6)" :key="index" type="link" size="samll" @click="toSelect(item, 'four')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -183,15 +135,7 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">交易价格</el-col>
               <el-col :span="21" class="right">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in moneyList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'five')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in moneyList" :key="index" type="link" size="samll" @click="toSelect(item, 'five')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -199,28 +143,12 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">成果地区</el-col>
               <el-col :span="20" class="right" v-if="oneShow">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in cityList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'thr')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in cityList" :key="index" type="link" size="samll" @click="toSelect(item, 'thr')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
               <el-col :span="20" class="right" v-else>
-                <a-button
-                  class="title"
-                  v-for="(item, index) in cityList.slice(0, 9)"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'six')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in cityList.slice(0, 9)" :key="index" type="link" size="samll" @click="toSelect(item, 'six')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -237,13 +165,7 @@
             </el-row>
           </el-col>
           <el-col :span="24" class="two">
-            <el-col
-              :span="24"
-              class="list"
-              v-for="(item, index) in list"
-              :key="index"
-              @click="toView(item)"
-            >
+            <el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click="toView(item)">
               <el-col :span="24" class="name">
                 <el-tooltip effect="dark" :content="item.name" placement="top">
                   {{ item.name || '暂无成果名称' }}
@@ -252,16 +174,24 @@
               <el-row class="other">
                 <el-col :span="8" class="other_1">
                   <span>技术领域:</span>
-                  {{ getDict(item.field || '暂无技术领域', 'field') }}
+                  {{ item.field }}
                 </el-col>
-                <el-col :span="8" class="other_1">
+                <!-- <el-col :span="8" class="other_1">
                   <span>成果地区:</span>
                   {{ getArea(item.area) }}
+                </el-col> -->
+                <el-col :span="8" class="other_1">
+                  <span>负责人:</span>
+                  {{ item.person }}
                 </el-col>
                 <el-col :span="8" class="other_1">
+                  <span>来源:</span>
+                  {{ item.source || '暂无单位' }}
+                </el-col>
+                <!-- <el-col :span="8" class="other_1">
                   <span>单位:</span>
                   {{ item.user || '暂无单位' }}
-                </el-col>
+                </el-col> -->
               </el-row>
               <el-col :span="24" class="brief textOver">
                 {{ item.brief || '没有更多成果简介' }}
@@ -660,8 +590,7 @@ const sizeChange = (limits) => {
         padding: 5px 0;
 
         .other_1 {
-          font-family: 'PingFangSC-Light', 'Microsoft YaHei', 'WenQuanYi Micro Hei', arial,
-            sans-serif;
+          font-family: 'PingFangSC-Light', 'Microsoft YaHei', 'WenQuanYi Micro Hei', arial, sans-serif;
           font-size: $global-font-size-18;
           font-weight: normal;
         }

+ 36 - 31
src/views/demand/detail.vue

@@ -5,7 +5,7 @@
         <div class="w_1200">
           <el-col :span="24" class="one">
             <el-row :span="24" class="one_1">
-              <el-col :span="22" class="title">{{ info.name || '暂无标题' }}</el-col>
+              <el-col :span="22" class="title">{{ info.company || '暂无标题' }}</el-col>
               <el-col :span="2" class="file" @click="toCollection(0)" v-if="info.is_collection">
                 <el-icon :size="16"><StarFilled /></el-icon>
                 <span>已收藏</span>
@@ -18,14 +18,23 @@
           </el-col>
           <el-col :span="24" class="two">
             <a-descriptions bordered>
+              <a-descriptions-item label="发布年份">
+                {{ getDict(info, 'year') }}
+              </a-descriptions-item>
               <a-descriptions-item label="行业领域">
-                {{ getDict(info.field, 'field') }}
+                {{ getDict(info, 'field') }}
+              </a-descriptions-item>
+              <a-descriptions-item label="联系人">
+                {{ getDict(info, 'contacts') }}
+              </a-descriptions-item>
+              <a-descriptions-item label="联系电话">
+                {{ getDict(info, 'tel') }}
               </a-descriptions-item>
               <a-descriptions-item label="需求紧急度">
-                {{ getDict(info.urgent, 'urgent') }}
+                {{ getDict(info, 'urgent') }}
               </a-descriptions-item>
               <a-descriptions-item label="合作方式">
-                {{ getDict(info.method, 'method') }}
+                {{ getDict(info, 'method') }}
               </a-descriptions-item>
               <a-descriptions-item label="有效期">
                 {{ getTime(info.time) }}
@@ -39,13 +48,9 @@
             <div class="money">
               价格:<span> {{ info.money || '面议' }} </span>
             </div>
-            <a-button v-if="info.status == '1'" type="primary" @click="toDocking">
-              我要对接
-            </a-button>
-          </el-col>
-          <el-col :span="24" class="pointer" v-if="!user && !user.id">
-            提醒:您还没有登录,登录成功后再对接
+            <a-button v-if="info.status == '1'" type="primary" @click="toDocking"> 我要对接 </a-button>
           </el-col>
+          <el-col :span="24" class="pointer" v-if="!user && !user.id"> 提醒:您还没有登录,登录成功后再对接 </el-col>
           <el-col :span="24" class="thr">
             <el-col :span="24" class="thr_1">
               <p>单位信息</p>
@@ -53,11 +58,12 @@
             <el-row :span="24" class="thr_2">
               <el-col :span="17" class="left">
                 <el-col :span="24" class="name">
-                  {{ formatName(userInfo.name) || '暂无单位' }}
+                  {{ info.company || '暂无单位' }}
                 </el-col>
                 <el-col :span="24" class="other">
                   <span>联系人</span>
-                  {{ formatName(userInfo.name) || '暂无联系人' }}
+                  {{ info.contacts }} {{ info.tel }}
+                  <!-- {{ formatName(userInfo.name) || '暂无联系人' }} -->
                 </el-col>
               </el-col>
               <el-col :span="4" class="right" v-if="info.status == '1'">
@@ -87,22 +93,15 @@
                   <el-col :span="24" class="list">
                     <el-col :span="24" class="name textOver">
                       <el-tooltip effect="dark" :content="item.name" placement="top">
-                        {{ item.name || '暂无名称' }}
+                        {{ item.company || '暂无名称' }}
                       </el-tooltip>
                     </el-col>
-                    <el-col :span="24" class="two_1">
-                      <span>行业领域:</span>{{ getDict(item.field, 'field') }}
-                    </el-col>
-                    <el-col :span="24" class="two_1">
-                      <span>需求地区:</span>{{ getArea(item.area) }}
-                    </el-col>
-                    <el-col :span="24" class="two_1">
-                      <span>单位:</span> {{ formatName(item.userName) || '暂无单位' }}
-                    </el-col>
+                    <el-col :span="24" class="two_1"> <span>行业领域:</span>{{ getDict(item, 'field') }} </el-col>
+                    <el-col :span="24" class="two_1"> <span>需求地区:</span>{{ getArea(item.area) }} </el-col>
+                    <!-- <el-col :span="24" class="two_1"> <span>单位:</span> {{ formatName(item.userName) || '暂无单位' }} </el-col> -->
+                    <el-col :span="24" class="two_1"> <span>发布年份:</span> {{ item.year }} </el-col>
                     <el-col :span="24" class="bottom">
-                      <a-button size="small" type="primary" @click="toView(item)">
-                        查看详情
-                      </a-button>
+                      <a-button size="small" type="primary" @click="toView(item)"> 查看详情 </a-button>
                     </el-col>
                   </el-col>
                 </template>
@@ -143,6 +142,7 @@ const dictDataStore = DictDataStore()
 const collectionStore = CollectionStore()
 
 import { UserStore } from '@/store/user'
+import { watch } from 'vue'
 const userStore = UserStore()
 const user = computed(() => userStore.user)
 // 路由
@@ -164,12 +164,15 @@ let limit = inject('limit')
 const total = ref(0)
 // 请求
 onMounted(async () => {
+  init()
+})
+const init = async () => {
   loading.value = true
   await searchOther()
   await search()
   await searchAchieve({ skip, limit })
   loading.value = false
-})
+}
 const search = async () => {
   let id = route.query.id
   if (id) {
@@ -208,11 +211,12 @@ const searchOther = async () => {
 // 字典数据转换
 const getDict = (data, model) => {
   let res
-  if (model == 'method') res = methodList.value.find((f) => f.value == data)
-  else if (model == 'urgent') res = urgentList.value.find((f) => f.value == data)
-  else if (model == 'field') res = fieldList.value.find((f) => f.value == data)
-  else if (model == 'demand') res = demandList.value.find((f) => f.value == data)
-  return get(res, 'label')
+  // if (model == 'method') res = methodList.value.find((f) => f.value == data)
+  // else if (model == 'urgent') res = urgentList.value.find((f) => f.value == data)
+  // else if (model == 'field') res = fieldList.value.find((f) => f.value == data)
+  // else if (model == 'demand') res = demandList.value.find((f) => f.value == data)
+  // return get(res, 'label')
+  return get(data, model)
 }
 // 时间
 const getTime = (data) => {
@@ -266,6 +270,7 @@ const toCollection = async (status) => {
 // 查看
 const toView = (item) => {
   router.push({ path: '/demand/detail', query: { id: item.id || item._id } })
+  init()
 }
 const formatName = (str) => {
   if (str) return str.substr(0, 1) + new Array(str.length).join('*')

+ 22 - 69
src/views/demand/index.vue

@@ -53,28 +53,12 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">技术领域</el-col>
               <el-col :span="20" class="right" v-if="oneShow">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in fieldList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'one')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in fieldList" :key="index" type="link" size="samll" @click="toSelect(item, 'one')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
               <el-col :span="20" class="right" v-else>
-                <a-button
-                  class="title"
-                  v-for="(item, index) in fieldList.slice(0, 6)"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'one')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in fieldList.slice(0, 6)" :key="index" type="link" size="samll" @click="toSelect(item, 'one')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -92,15 +76,7 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">合作方式</el-col>
               <el-col :span="21" class="right">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in methodList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'two')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in methodList" :key="index" type="link" size="samll" @click="toSelect(item, 'two')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -108,28 +84,12 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">需求地区</el-col>
               <el-col :span="20" class="right" v-if="twoShow">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in cityList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'thr')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in cityList" :key="index" type="link" size="samll" @click="toSelect(item, 'thr')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
               <el-col :span="20" class="right" v-else>
-                <a-button
-                  class="title"
-                  v-for="(item, index) in cityList.slice(0, 9)"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'thr')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in cityList.slice(0, 9)" :key="index" type="link" size="samll" @click="toSelect(item, 'thr')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -147,46 +107,37 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">需求状态</el-col>
               <el-col :span="21" class="right">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in statusList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'four')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in statusList" :key="index" type="link" size="samll" @click="toSelect(item, 'four')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
             </el-row>
           </el-col>
           <el-col :span="24" class="two">
-            <el-col
-              :span="24"
-              class="list"
-              v-for="(item, index) in list"
-              :key="index"
-              @click="toView(item)"
-            >
+            <el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click="toView(item)">
               <el-col :span="24" class="name">
-                <el-tooltip effect="dark" :content="item.name" placement="top">
-                  {{ item.name || '暂无需求名称' }}
+                <el-tooltip effect="dark" :content="item.company" placement="top">
+                  {{ item.company || '' }}
+                  <!-- {{ item.name || '暂无需求名称' }} -->
                 </el-tooltip>
               </el-col>
               <el-row class="other">
                 <el-col :span="8" class="other_1">
                   <span>技术领域:</span>
-                  {{ getDict(item.field, 'field') }}
+                  {{ getDict(item, 'field') }}
                 </el-col>
                 <el-col :span="8" class="other_1">
                   <span>需求地区:</span>
                   {{ getArea(item.area) }}
                 </el-col>
                 <el-col :span="8" class="other_1">
-                  <span>单位:</span>
-                  {{ formatName(item.userName) || '暂无单位' }}
+                  <span>发布年份:</span>
+                  {{ item.year }}
                 </el-col>
+                <!-- <el-col :span="8" class="other_1">
+                  <span>单位:</span>
+                  {{ formatName(item.company) || '暂无单位' }}
+                </el-col> -->
               </el-row>
               <el-col :span="24" class="brief textOver">
                 {{ item.brief || '没有更多需求简介' }}
@@ -307,7 +258,10 @@ const search = async (query = { skip: 0, limit }) => {
 // 字典数据转换
 const getDict = (data, model) => {
   let res
-  if (model == 'field') res = fieldList.value.find((f) => f.value == data)
+  if (model == 'field') {
+    // res = fieldList.value.find((f) => f.value == data)
+    return get(data, model)
+  }
   return get(res, 'label')
 }
 // 地区显示
@@ -533,8 +487,7 @@ const sizeChange = (limits) => {
         padding: 5px 0;
 
         .other_1 {
-          font-family: 'PingFangSC-Light', 'Microsoft YaHei', 'WenQuanYi Micro Hei', arial,
-            sans-serif;
+          font-family: 'PingFangSC-Light', 'Microsoft YaHei', 'WenQuanYi Micro Hei', arial, sans-serif;
           font-size: $global-font-size-18;
           font-weight: normal;
         }

+ 27 - 32
src/views/expert/detail.vue

@@ -6,12 +6,7 @@
           <el-col :span="24" class="one">
             <el-col :span="24" class="oneText">
               <el-col :span="4" class="one_1">
-                <el-image
-                  class="image"
-                  v-if="info && info.icon && info.icon.length > 0"
-                  :src="info.icon[0].url"
-                  fit="fill"
-                />
+                <el-image class="image" v-if="info && info.icon && info.icon.length > 0" :src="info.icon[0].url" fit="fill" />
                 <el-image class="image" v-else :src="zj" fit="fill" />
               </el-col>
               <el-col :span="14" class="one_2">
@@ -20,18 +15,16 @@
                     {{ info.name || '暂无姓名' }}
                   </el-tooltip>
                   <div class="tags">
-                    <el-tag type="primary" v-if="info.title">{{
-                      getDict(info.title || '暂无', 'title')
-                    }}</el-tag>
-                    <el-tag type="success" v-if="info.education">{{
-                      getDict(info.education || '暂无', 'education')
-                    }}</el-tag>
+                    <el-tag type="primary" v-if="info.title">{{ getDict(info, 'title') }}</el-tag>
+                    <el-tag type="success" v-if="info.education">{{ getDict(info, 'education') }}</el-tag>
                   </div>
                 </el-col>
-                <div class="other"><span> 出生年月:</span>{{ info.birth || '暂无' }}</div>
+                <div class="other"><span> 出生年月:</span>{{ getDate(info.birth) || '暂无' }}</div>
                 <div class="other"><span> 所在地区:</span>{{ getArea(info.area) }}</div>
-                <div class="other"><span> 技术领域:</span>{{ getDict(info.field, 'field') }}</div>
+                <div class="other"><span> 产业类型:</span>{{ getDict(info, 'industry_type') }}</div>
+                <div class="other"><span> 技术领域:</span>{{ getDict(info, 'industry') }}</div>
                 <div class="other"><span> 研究方向:</span>{{ info.direction || '暂无' }}</div>
+                <div class="other"><span> 单位类型:</span>{{ info.work_type || '暂无' }}</div>
                 <div class="other"><span> 工作单位:</span>{{ info.work || '暂无' }}</div>
               </el-col>
               <el-col :span="6" class="one_3">
@@ -68,19 +61,11 @@
                           {{ item.name || '暂无名称' }}
                         </el-tooltip>
                       </el-col>
-                      <el-col :span="24" class="two_1">
-                        <span>技术领域:</span>{{ getDict(item.field, 'field') }}
-                      </el-col>
-                      <el-col :span="24" class="two_1">
-                        <span>成果地区:</span>{{ getArea(item.area) }}
-                      </el-col>
-                      <el-col :span="24" class="two_1">
-                        <span>单位:</span>{{ item.userName || '暂无单位' }}
-                      </el-col>
+                      <el-col :span="24" class="two_1"> <span>技术领域:</span>{{ item.field }} </el-col>
+                      <el-col :span="24" class="two_1"> <span>负责人:</span>{{ item.person }} </el-col>
+                      <el-col :span="24" class="two_1"> <span>来源:</span>{{ item.source }} </el-col>
                       <el-col :span="24" class="bottom">
-                        <a-button size="small" type="primary" @click="toView(item)">
-                          查看详情
-                        </a-button>
+                        <a-button size="small" type="primary" @click="toView(item)"> 查看详情 </a-button>
                       </el-col>
                     </el-col>
                   </template>
@@ -144,12 +129,15 @@ let limit = inject('limit')
 const total = ref(0)
 // 请求
 onMounted(async () => {
+  init()
+})
+const init = async () => {
   loading.value = true
   await searchOther()
   await search()
   await searchAchieve({ skip, limit })
   loading.value = false
-})
+}
 const search = async () => {
   let id = route.query.id
   if (id) {
@@ -184,11 +172,17 @@ const searchOther = async () => {
 }
 // 字典数据转换
 const getDict = (data, model) => {
-  let res
-  if (model == 'education') res = educationList.value.find((f) => f.value == data)
-  if (model == 'field') res = fieldList.value.find((f) => f.value == data)
-  if (model == 'title') res = titleList.value.find((f) => f.value == data)
-  return get(res, 'label')
+  // let res
+  // if (model == 'education') res = educationList.value.find((f) => f.value == data)
+  // if (model == 'field') res = fieldList.value.find((f) => f.value == data)
+  // if (model == 'title') res = titleList.value.find((f) => f.value == data)
+  // return get(res, 'label')
+  return get(data, model)
+}
+const getDate = (time) => {
+  const r = moment(time).isValid()
+  if (!r) return ''
+  return time
 }
 // 地区
 const getArea = (data) => {
@@ -234,6 +228,7 @@ const toCollection = async (status) => {
 // 查看
 const toView = (item) => {
   router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })
+  init()
 }
 const currentPage = ref(1)
 // 分页

+ 35 - 71
src/views/expert/index.vue

@@ -53,28 +53,12 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">技术领域</el-col>
               <el-col :span="20" class="right" v-if="oneShow">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in fieldList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'one')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in fieldList" :key="index" type="link" size="samll" @click="toSelect(item, 'one')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
               <el-col :span="20" class="right" v-else>
-                <a-button
-                  class="title"
-                  v-for="(item, index) in fieldList.slice(0, 6)"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'one')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in fieldList.slice(0, 6)" :key="index" type="link" size="samll" @click="toSelect(item, 'one')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -92,15 +76,7 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">职称</el-col>
               <el-col :span="21" class="right">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in titleList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'two')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in titleList" :key="index" type="link" size="samll" @click="toSelect(item, 'two')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -108,28 +84,12 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">所在地区</el-col>
               <el-col :span="20" class="right" v-if="twoShow">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in cityList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'thr')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in cityList" :key="index" type="link" size="samll" @click="toSelect(item, 'thr')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
               <el-col :span="20" class="right" v-else>
-                <a-button
-                  class="title"
-                  v-for="(item, index) in cityList.slice(0, 9)"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'thr')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in cityList.slice(0, 9)" :key="index" type="link" size="samll" @click="toSelect(item, 'thr')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -147,15 +107,7 @@
             <el-row class="one_1">
               <el-col :span="3" class="left">学历</el-col>
               <el-col :span="21" class="right">
-                <a-button
-                  class="title"
-                  v-for="(item, index) in educationList"
-                  :key="index"
-                  type="link"
-                  size="samll"
-                  @click="toSelect(item, 'four')"
-                  :class="[item.is_active ? 'show' : '']"
-                >
+                <a-button class="title" v-for="(item, index) in educationList" :key="index" type="link" size="samll" @click="toSelect(item, 'four')" :class="[item.is_active ? 'show' : '']">
                   {{ item.label }}
                 </a-button>
               </el-col>
@@ -169,22 +121,35 @@
                     <el-tooltip effect="dark" :content="item.name" placement="top">
                       {{ item.name || '暂无姓名' }}
                     </el-tooltip>
-                    <div class="tags">
-                      <el-tag type="primary" v-if="item.title">{{
-                        getDict(item.title, 'title')
-                      }}</el-tag>
-                      <el-tag type="success" v-if="item.education">{{
-                        getDict(item.education, 'education')
-                      }}</el-tag>
+                    <div class="tags" v-if="item.title && item.education">
+                      <el-tag type="primary" v-if="item.title">{{ getDict(item, 'title') }}</el-tag>
+                      <el-tag type="success" v-if="item.education">{{ getDict(item, 'education') }}</el-tag>
                     </div>
                   </el-col>
+                  <el-col :span="24" class="two_1 textOver">
+                    <span>职务职称:</span>
+                    {{ item.title || '暂无' }}
+                  </el-col>
                   <el-col :span="24" class="two_1">
+                    <span>产业类型:</span>
+                    {{ item.industry_type }}
+                  </el-col>
+                  <el-col :span="24" class="two_1">
+                    <span>所属行业:</span>
+                    {{ item.industry }}
+                  </el-col>
+
+                  <el-col :span="24" class="two_1 textOver">
+                    <span>单位类型:</span>
+                    {{ item.work_type || '暂无' }}
+                  </el-col>
+                  <!-- <el-col :span="24" class="two_1">
                     <span>所在地区:</span>
                     {{ getArea(item.area) }}
                   </el-col>
                   <el-col :span="24" class="two_1">
                     <span>技术领域:</span>
-                    {{ getDict(item.field, 'field') }}
+                    {{ getDict(item, 'field') }}
                   </el-col>
                   <el-col :span="24" class="two_1 textOver">
                     <span>研究方向:</span>
@@ -193,11 +158,9 @@
                   <el-col :span="24" class="two_1 textOver">
                     <span>工作单位:</span>
                     {{ item.work || '暂无' }}
-                  </el-col>
+                  </el-col> -->
                   <el-col :span="24" class="bottom">
-                    <el-button @click.stop="toChat(item)" type="primary" size="small">
-                      联络专家
-                    </el-button>
+                    <el-button @click.stop="toChat(item)" type="primary" size="small"> 联络专家 </el-button>
                   </el-col>
                 </el-col>
               </template>
@@ -316,11 +279,12 @@ const search = async (query = { skip: 0, limit }) => {
 }
 // 字典数据转换
 const getDict = (data, model) => {
-  let res
-  if (model == 'education') res = educationList.value.find((f) => f.value == data)
-  if (model == 'field') res = fieldList.value.find((f) => f.value == data)
-  if (model == 'title') res = titleList.value.find((f) => f.value == data)
-  return get(res, 'label')
+  // let res
+  // if (model == 'education') res = educationList.value.find((f) => f.value == data)
+  // if (model == 'field') res = fieldList.value.find((f) => f.value == data)
+  // if (model == 'title') res = titleList.value.find((f) => f.value == data)
+  // return get(res, 'label')
+  return get(data, model)
 }
 // 地区显示
 const getArea = (data) => {