Browse Source

修改搜索

zs 1 year ago
parent
commit
9aee2a64cb

BIN
src/assets/search.jpeg


+ 7 - 2
src/layout/index.vue

@@ -31,7 +31,7 @@
         <el-col :span="4">
           <el-row :gutter="20">
             <el-col :span="6" class="top_2">
-              <el-button :icon="Search" size="small">搜索</el-button>
+              <el-button :icon="Search" size="small" @click="toCommon(0)">搜索</el-button>
             </el-col>
             <el-col :span="6" class="top_2">
               <el-dropdown>
@@ -46,7 +46,7 @@
               </el-dropdown>
             </el-col>
             <el-col :span="6" class="top_2" v-if="user && user._id">
-              <el-button :icon="Bell" size="small" @click="toChat">消息</el-button>
+              <el-button :icon="Bell" size="small" @click="toCommon(1)">消息</el-button>
             </el-col>
             <el-col :span="6" v-if="user && user._id" class="top_3">
               <el-dropdown>
@@ -158,6 +158,11 @@ const toCenter = () => {
   router.push('/center')
 }
 // 聊天记录
+const toCommon = (type) => {
+  if (type == '0') router.push('/search')
+  else router.push('/chat')
+}
+// 聊天记录
 const toChat = () => {
   router.push('/chat')
 }

+ 10 - 0
src/router/index.js

@@ -104,6 +104,16 @@ const router = createRouter({
           meta: { title: '吉林省信息技术孵化平台-专家' },
           component: () => import('@/views/expert/detail.vue')
         },
+        {
+          path: '/company/detail',
+          meta: { title: '吉林省信息技术孵化平台-企业' },
+          component: () => import('@/views/company/detail.vue')
+        },
+        {
+          path: '/search',
+          meta: { title: '吉林省信息技术孵化平台-搜索' },
+          component: () => import('@/views/search/index.vue')
+        },
         {
           path: '/chat',
           meta: { title: '吉林省信息技术孵化平台-聊天记录' },

+ 1 - 1
src/utils/variable.js

@@ -1,5 +1,5 @@
 const variable = {
-  limit: 10
+  limit: 12
 }
 
 export const InitVariable = (app) => {

+ 1 - 69
src/views/company/detail.vue

@@ -3,74 +3,7 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
         <div class="w_1200">
-          <el-col :span="24" class="one">
-            <el-row :span="24" class="one_1">
-              <el-col :span="20" class="title">{{ info.name || '暂无标题' }}</el-col>
-              <el-col :span="4" class="file" @click="toCollection">
-                <el-icon><Star /></el-icon>
-                收藏
-              </el-col>
-            </el-row>
-          </el-col>
-          <el-col :span="24" class="two">
-            <a-descriptions bordered>
-              <a-descriptions-item label="行业领域">
-                {{ getDict(info.field, 'field') }}
-              </a-descriptions-item>
-              <a-descriptions-item label="需求紧急度">
-                {{ getDict(info.urgent, 'urgent') }}
-              </a-descriptions-item>
-              <a-descriptions-item label="合作方式">
-                {{ getDict(info.method, 'method') }}
-              </a-descriptions-item>
-              <a-descriptions-item label="有效期">
-                {{ getTime(info.time) }}
-              </a-descriptions-item>
-              <a-descriptions-item label="需求地区">
-                {{ getArea(info.area) }}
-              </a-descriptions-item>
-            </a-descriptions>
-          </el-col>
-          <el-col :span="24" class="pointer">
-            <div class="money">
-              价格:<span> {{ info.money || '面议' }} </span>
-            </div>
-            <a-button 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>
-            </el-col>
-            <el-row :span="24" class="thr_2">
-              <el-col :span="17" class="left">
-                <el-col :span="24" class="name">
-                  {{ unit.name || '暂无' }}
-                </el-col>
-                <el-col :span="24" class="other">
-                  <span>联系人</span>
-                  {{ unit.contacts || '暂无' }}
-                </el-col>
-              </el-col>
-              <el-col :span="4" class="right">
-                <a-button type="primary" @click="toChat">
-                  <template #icon>
-                    <MessageOutlined />
-                  </template>
-                  点击在线洽谈
-                </a-button>
-              </el-col>
-            </el-row>
-          </el-col>
-          <a-divider />
-          <el-col :span="24" class="four">
-            <el-col :span="24" class="four_1">
-              <p>需求详情</p>
-            </el-col>
-            <el-col :span="24" class="four_2">{{ info.brief || '暂无' }}</el-col>
-          </el-col>
+          <el-col :span="24" class="one"> 企业详情 </el-col>
         </div>
       </el-col>
     </el-row>
@@ -79,7 +12,6 @@
 
 <script setup>
 // 基础
-import { MessageOutlined } from '@ant-design/icons-vue'
 import { get } from 'lodash-es'
 const $checkRes = inject('$checkRes')
 // 接口

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

@@ -289,7 +289,7 @@ const searchList = ref([
 ])
 // 查看
 const toView = (item) => {
-  router.push({ path: '/demand/detail', query: { id: item.id || item._id } })
+  router.push({ path: '/company/detail', query: { id: item.id || item._id } })
 }
 // 请求
 onMounted(async () => {

File diff suppressed because it is too large
+ 253 - 163
src/views/expert/detail.vue


+ 2 - 0
src/views/home/index.vue

@@ -536,6 +536,8 @@ const getArea = (data) => {
 // 查看详情
 const toView = (item, type) => {
   if (type == '0') router.push({ path: '/project/detail', query: { id: item.id || item._id } })
+  else if (type == '1') router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
+  else if (type == '2') router.push({ path: '/company/detail', query: { id: item.id || item._id } })
   else if (type == '3') router.push({ path: '/news/detail', query: { id: item.id || item._id } })
 }
 // 类型

+ 0 - 1
src/views/project/index.vue

@@ -184,7 +184,6 @@ const searchOther = async () => {
   // 行业分类
   result = await dictDataStore.query({ code: 'industry', is_use: '0' })
   if ($checkRes(result)) industryList.value = result.data
-  // 企业状态
 }
 const search = async (query = { skip: 0, limit }) => {
   const info = {

+ 106 - 0
src/views/search/index.vue

@@ -0,0 +1,106 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
+        <el-col :span="24" class="search">
+          <el-image class="image" :src="searchOne" fit="fill" />
+          <div class="input">
+            <a-input v-model:value="searchValue" placeholder="请输入想要搜索的内容">
+              <template #suffix>
+                <SearchOutlined :style="{ fontSize: '30px', color: '#ffffff' }" />
+              </template>
+            </a-input>
+          </div>
+        </el-col>
+        <el-col :span="24" class="one">
+          <a-tabs v-model:activeKey="activeKey" centered>
+            <a-tab-pane key="1" tab="成果(0)">成果</a-tab-pane>
+            <a-tab-pane key="2" tab="需求(0)">需求</a-tab-pane>
+            <a-tab-pane key="3" tab="项目(0)">项目</a-tab-pane>
+            <a-tab-pane key="4" tab="赛事(0)">赛事</a-tab-pane>
+            <a-tab-pane key="5" tab="资讯(0)">资讯</a-tab-pane>
+            <a-tab-pane key="6" tab="单位(0)">单位</a-tab-pane>
+            <a-tab-pane key="7" tab="企业(0)">企业</a-tab-pane>
+            <a-tab-pane key="8" tab="专家(0)">专家</a-tab-pane>
+          </a-tabs>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script setup>
+// 基础
+import { get } from 'lodash-es'
+const $checkRes = inject('$checkRes')
+import { SearchOutlined } from '@ant-design/icons-vue'
+// 接口
+import { DemandStore } from '@/store/api/platform/demand'
+import { DictDataStore } from '@/store/api/system/dictData'
+const store = DemandStore()
+const dictDataStore = DictDataStore()
+// 图片引入
+import searchOne from '@/assets/search.jpeg'
+// 路由
+const route = useRoute()
+// 加载中
+const loading = ref(false)
+const activeKey = ref('1')
+// 请求
+onMounted(async () => {
+  loading.value = true
+  await searchOther()
+  await search()
+  loading.value = false
+})
+const search = async () => {
+  let id = route.query.id
+  if (id) {
+    // let res = await store.fetch(id)
+    // if (res.errcode == '0') info.value = res.data
+  }
+}
+const searchOther = async () => {}
+</script>
+<style scoped lang="scss">
+.main {
+  .search {
+    position: relative;
+
+    .image {
+      width: 100%;
+      height: 200px;
+    }
+
+    .input {
+      width: 900px;
+      position: absolute;
+      left: 30%;
+      bottom: 40%;
+
+      :deep(.ant-input-affix-wrapper) {
+        background-color: transparent;
+        border: 3px solid #fff !important;
+      }
+
+      :deep(.ant-input) {
+        height: 45px;
+        line-height: 45px;
+        font-family: PingFangSC-Regular;
+        font-size: 16px;
+        padding-right: 24px;
+
+        border: none !important;
+        outline: none !important;
+        box-shadow: 0 0 0 0 !important;
+        text-shadow: 0 0 0 0 !important;
+        background-color: transparent !important;
+
+        &::placeholder {
+          color: #ffffff !important;
+        }
+      }
+    }
+  }
+}
+</style>