zs 1 anno fa
parent
commit
0c64d95c82

+ 5 - 0
src/router/index.js

@@ -94,6 +94,11 @@ const router = createRouter({
           meta: { title: '吉林省重点领域技术转移平台-详情' },
           component: () => import('@/views/innovation/detail.vue')
         },
+        {
+          path: '/project/detail',
+          meta: { title: '吉林省信息技术孵化平台-详情' },
+          component: () => import('@/views/project/detail.vue')
+        },
         {
           path: '/login',
           meta: { title: '吉林省信息技术孵化平台-用户登录' },

+ 3 - 3
src/views/home/index.vue

@@ -33,7 +33,7 @@
                   class="list"
                   v-for="(item, index) in list"
                   :key="index"
-                  @click="toView(item)"
+                  @click="toView(item, '0')"
                 >
                   <el-col :span="24" class="name textOver">{{
                     item.name || '暂无项目名称'
@@ -414,8 +414,8 @@ const getArea = (data) => {
   if (data) return data.join(',')
 }
 // 查看详情
-const toView = (item) => {
-  console.log(item)
+const toView = (item, type) => {
+  if (type == '0') router.push({ path: '/project/detail', query: { id: item.id || item._id } })
 }
 // 类型
 const mouseOver = (item) => {

+ 36 - 33
src/views/project/detail.vue

@@ -14,20 +14,23 @@
           </el-col>
           <el-col :span="24" class="two">
             <a-descriptions bordered>
-              <a-descriptions-item label="行业领域">
-                {{ getDict(info.field, 'field') }}
+              <a-descriptions-item label="行业分类">
+                {{ getDict(info.type, 'type') }}
+              </a-descriptions-item>
+              <a-descriptions-item label="成熟度">
+                {{ getDict(info.maturity, 'maturity') }}
               </a-descriptions-item>
-              <a-descriptions-item label="需求紧急度">
-                {{ getDict(info.urgent, 'urgent') }}
+              <a-descriptions-item label="技术类型">
+                {{ getDict(info.skill, 'skill') }}
               </a-descriptions-item>
-              <a-descriptions-item label="合作方式">
-                {{ getDict(info.method, 'method') }}
+              <a-descriptions-item label="领域">
+                {{ getDict(info.field, 'field') }}
               </a-descriptions-item>
-              <a-descriptions-item label="有效期">
-                {{ getTime(info.time) }}
+              <a-descriptions-item label="合作类型">
+                {{ getDict(info.cooperate, 'cooperate') }}
               </a-descriptions-item>
-              <a-descriptions-item label="需求地区">
-                {{ getArea(info.area) }}
+              <a-descriptions-item label="发布时间">
+                {{ info.time }}
               </a-descriptions-item>
             </a-descriptions>
           </el-col>
@@ -67,7 +70,7 @@
           <a-divider />
           <el-col :span="24" class="four">
             <el-col :span="24" class="four_1">
-              <p>需求详情</p>
+              <p>项目简介</p>
             </el-col>
             <el-col :span="24" class="four_2">{{ info.brief || '暂无' }}</el-col>
           </el-col>
@@ -83,9 +86,9 @@ import { MessageOutlined } from '@ant-design/icons-vue'
 import { get } from 'lodash-es'
 const $checkRes = inject('$checkRes')
 // 接口
-import { DemandStore } from '@/store/api/platform/demand'
+import { ProjectStore } from '@/store/api/platform/project'
 import { DictDataStore } from '@/store/api/system/dictData'
-const store = DemandStore()
+const store = ProjectStore()
 const dictDataStore = DictDataStore()
 import { UserStore } from '@/store/user'
 const userStore = UserStore()
@@ -97,10 +100,11 @@ const loading = ref(false)
 const info = ref({})
 const unit = ref({ name: '吉林大学', contacts: '陈老师' })
 // 字典表
-const methodList = ref([])
-const urgentList = ref([])
 const fieldList = ref([])
-const demandList = ref([])
+const typeList = ref([])
+const maturityList = ref([])
+const skillList = ref([])
+const cooperateList = ref([])
 // 请求
 onMounted(async () => {
   loading.value = true
@@ -117,33 +121,32 @@ const search = async () => {
 }
 const searchOther = async () => {
   let result
-  // 合作方式
-  result = await dictDataStore.query({ code: 'method', is_use: '0' })
-  if ($checkRes(result)) methodList.value = result.data
-  // 需求紧急
-  result = await dictDataStore.query({ code: 'urgent', is_use: '0' })
-  if ($checkRes(result)) urgentList.value = result.data
+  // 行业分类
+  result = await dictDataStore.query({ code: 'industry', is_use: '0' })
+  if ($checkRes(result)) typeList.value = result.data
+  // 成熟
+  result = await dictDataStore.query({ code: 'projectMaturity', is_use: '0' })
+  if ($checkRes(result)) maturityList.value = result.data
   // 技术领域
   result = await dictDataStore.query({ code: 'field', is_use: '0' })
   if ($checkRes(result)) fieldList.value = result.data
+  // 技术类型
+  result = await dictDataStore.query({ code: 'technology', is_use: '0' })
+  if ($checkRes(result)) skillList.value = result.data
+  // 合作类型
+  result = await dictDataStore.query({ code: 'projectType', is_use: '0' })
+  if ($checkRes(result)) cooperateList.value = result.data
 }
 // 字典数据转换
 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)
+  if (model == 'skill') res = skillList.value.find((f) => f.value == data)
+  else if (model == 'cooperate') res = cooperateList.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)
+  else if (model == 'maturity') res = maturityList.value.find((f) => f.value == data)
+  else if (model == 'type') res = typeList.value.find((f) => f.value == data)
   return get(res, 'label')
 }
-// 时间
-const getTime = (data) => {
-  if (data) return `${data[0]} 至 ${data[1]}`
-}
-// 地区
-const getArea = (data) => {
-  if (data) return data.join(',')
-}
 // 在线洽谈
 const toChat = () => {
   console.log('在线洽谈')

+ 2 - 2
src/views/project/index.vue

@@ -42,7 +42,7 @@
                   </el-col>
                   <el-col :span="24" class="bottom">
                     <div class="status">{{ getDict(item.type, 'type') }}</div>
-                    <div class="button" @click="toView">查看详情</div>
+                    <div class="button" @click="toView(item)">查看详情</div>
                   </el-col>
                 </el-col>
               </template>
@@ -164,7 +164,7 @@ const searchList = ref([
 ])
 // 查看
 const toView = (item) => {
-  router.push({ path: '/demand/detail', query: { id: item.id || item._id } })
+  router.push({ path: '/project/detail', query: { id: item.id || item._id } })
 }
 // 请求
 onMounted(async () => {