Explorar o código

修改企业显示

zs hai 1 ano
pai
achega
9f7e2eb8b3
Modificáronse 2 ficheiros con 232 adicións e 68 borrados
  1. 226 66
      src/views/home/index.vue
  2. 6 2
      src/views/index/index.vue

+ 226 - 66
src/views/home/index.vue

@@ -9,7 +9,7 @@
           <el-col :span="24" class="one">
             <el-col :span="24" class="one_1">
               <el-col :span="12" class="left">汇聚科技创新的创新赛道</el-col>
-              <el-col :span="12" class="right" @click="topMore">查看全部项目</el-col>
+              <el-col :span="12" class="right" @click="toMore">查看全部项目</el-col>
             </el-col>
             <el-col :span="24" class="one_2">
               <el-col :span="4" class="left">
@@ -19,6 +19,7 @@
                   v-for="(item, index) in typeList"
                   :key="index"
                   @mouseover="mouseOver(item)"
+                  :class="[active == item.type ? 'active' : '']"
                 >
                   <el-col :span="6" class="image">
                     <el-image class="image" :src="item.url" fit="fill" />
@@ -50,7 +51,7 @@
           <el-col :span="24" class="one">
             <el-col :span="24" class="one_1">
               <el-col :span="12" class="left">汇聚各种行业的专家</el-col>
-              <el-col :span="12" class="right" @click="toeMore">查看更多专家</el-col>
+              <el-col :span="12" class="right" @click="toMore">查看更多专家</el-col>
             </el-col>
             <el-col :span="24" class="one_3">
               <el-col :span="24" class="table_1">
@@ -75,7 +76,7 @@
                     class="list"
                     v-for="(item, index) in exportList"
                     :key="index"
-                    @click="toeView(item)"
+                    @click="toView(item)"
                   >
                     <el-col :span="2" class="content textOver">
                       <el-tooltip effect="dark" :content="item.name" placement="top">
@@ -110,60 +111,48 @@
           <el-col :span="24" class="one">
             <el-col :span="24" class="one_1">
               <el-col :span="12" class="left">汇聚各类优质的企业</el-col>
-              <el-col :span="12" class="right" @click="toeMore">查看更多企业</el-col>
+              <el-col :span="12" class="right" @click="toMore">查看更多企业</el-col>
             </el-col>
-            <el-col :span="24" class="one_3">
-              <el-col :span="24" class="table_1">
-                <el-col :span="2" class="title">姓名</el-col>
-                <el-col :span="3" class="title">所在地</el-col>
-                <el-col :span="3" class="title">学历/职称</el-col>
-                <el-col :span="3" class="title">技术领域</el-col>
-                <el-col :span="3" class="title">工作单位</el-col>
-                <el-col :span="6" class="title">研究方向</el-col>
-                <el-col :span="4" class="title">操作</el-col>
-              </el-col>
-              <el-col :span="24" class="table_2">
-                <vue3-seamless-scroll
-                  :list="exportList"
-                  :hover="true"
-                  :step="0.5"
-                  :wheel="true"
-                  :isWatch="true"
-                >
-                  <el-col
-                    :span="24"
-                    class="list"
-                    v-for="(item, index) in exportList"
-                    :key="index"
-                    @click="toeView(item)"
-                  >
-                    <el-col :span="2" class="content textOver">
-                      <el-tooltip effect="dark" :content="item.name" placement="top">
-                        {{ item.name || '暂无名称' }}
-                      </el-tooltip>
-                    </el-col>
-                    <el-col :span="3" class="content textOver">
-                      {{ getArea(item.area || '暂无地区') }}
-                    </el-col>
-                    <el-col :span="3" class="content textOver">
-                      {{ getDict(item.education || '学历/职称', 'maturity') }}
-                    </el-col>
-                    <el-col :span="3" class="content textOver">
-                      {{ getDict(item.field || '暂无技术领域', 'maturity') }}
-                    </el-col>
-                    <el-col :span="3" class="content textOver">
-                      {{ item.unit || '暂无工作单位' }}
+            <el-col :span="24" class="one_4">
+              <el-col
+                :span="24"
+                class="list"
+                v-for="(item, index) in companyList"
+                :key="index"
+                @click="toView(item)"
+              >
+                <el-col :span="4" class="left">
+                  <el-image class="image" :src="item.url" fit="fill" />
+                </el-col>
+                <el-col :span="20" class="right">
+                  <el-col :span="24" class="right_1">
+                    <div class="name">{{ item.name }}</div>
+                    <el-tag :type="[item.status == '0' ? 'success' : 'info']">{{
+                      getDict(item.status, 'status')
+                    }}</el-tag>
+                  </el-col>
+                  <el-col :span="24" class="right_2">
+                    <el-tag v-for="(val, indexs) in item.tags" :key="indexs" type="primary">{{
+                      val
+                    }}</el-tag>
+                  </el-col>
+                  <el-col :span="24" class="right_3">
+                    <el-col :span="4" class="info">
+                      法定代表人:<span>{{ item.representative || '暂无' }}</span>
                     </el-col>
-                    <el-col :span="6" class="content textOver">
-                      {{ item.direction || '暂无研究方向' }}
+                    <el-col :span="4" class="info">
+                      成立日期:{{ item.create_time || '暂无' }}
                     </el-col>
-                    <el-col :span="4" class="content textOver">
-                      <el-button @click="toChat(item)" type="primary" size="small">
-                        联络专家
-                      </el-button>
+                    <el-col :span="8" class="info">
+                      统一社会信用代码:{{ item.code || '暂无' }}
                     </el-col>
                   </el-col>
-                </vue3-seamless-scroll>
+                  <el-col :span="24" class="right_3">
+                    <el-col :span="8" class="info">电话:{{ item.phone || '暂无' }}</el-col>
+                    <el-col :span="8" class="info">邮箱:{{ item.email || '暂无' }}</el-col>
+                  </el-col>
+                  <el-col :span="24" class="right_3"> 地址:{{ item.address || '暂无' }} </el-col>
+                </el-col>
               </el-col>
             </el-col>
           </el-col>
@@ -196,6 +185,7 @@ import science_8 from '@/assets/science_8.png'
 import science_9 from '@/assets/science_9.png'
 // 加载中
 const loading = ref(false)
+const active = ref('0')
 const typeList = ref([
   { url: science_1, title: '生物技术', type: '0' },
   { url: science_2, title: '信息技术', type: '1' },
@@ -208,9 +198,12 @@ const typeList = ref([
   { url: science_9, title: '其他', type: '8' }
 ])
 const list = ref([])
+// 字典表
 const projectList = ref([])
 const maturityList = ref([])
 const industryList = ref([])
+const statusList = ref([])
+
 // 专家
 const exportList = ref([
   {
@@ -270,11 +263,112 @@ const exportList = ref([
     direction: '半导体新材料制备与应用技术'
   }
 ])
+// 企业
+const companyList = ref([
+  {
+    name: '努比亚技术有限公司 ',
+    url: science,
+    tags: ['战略投资', '国家高新技术企业', '创新型中小企业', '国家级专利奖'],
+    code: ' 914403007320587423',
+    phone: '075************',
+    type: '0',
+    representative: '倪飞',
+    email: 'xie.giang@nubia.com',
+    person: '1万人以上',
+    address: '深圳市南山区桃源街道福光社区留仙大道3370号南山智园崇文园区2号楼1801',
+    create_time: '2001-09-12',
+    status: '0'
+  },
+  {
+    name: '努比亚技术有限公司 ',
+    url: science,
+    tags: ['战略投资', '国家高新技术企业', '创新型中小企业', '国家级专利奖'],
+    code: ' 914403007320587423',
+    phone: '075************',
+    type: '0',
+    representative: '倪飞',
+    email: 'xie.giang@nubia.com',
+    person: '1万人以上',
+    address: '深圳市南山区桃源街道福光社区留仙大道3370号南山智园崇文园区2号楼1801',
+    create_time: '2001-09-12',
+    status: '0'
+  },
+  {
+    name: '努比亚技术有限公司 ',
+    url: science,
+    tags: ['战略投资', '国家高新技术企业', '创新型中小企业', '国家级专利奖'],
+    code: ' 914403007320587423',
+    phone: '075************',
+    type: '0',
+    representative: '倪飞',
+    email: 'xie.giang@nubia.com',
+    person: '1万人以上',
+    address: '深圳市南山区桃源街道福光社区留仙大道3370号南山智园崇文园区2号楼1801',
+    create_time: '2001-09-12',
+    status: '0'
+  },
+  {
+    name: '努比亚技术有限公司 ',
+    url: science,
+    tags: ['战略投资', '国家高新技术企业', '创新型中小企业', '国家级专利奖'],
+    code: ' 914403007320587423',
+    phone: '075************',
+    type: '0',
+    representative: '倪飞',
+    email: 'xie.giang@nubia.com',
+    person: '1万人以上',
+    address: '深圳市南山区桃源街道福光社区留仙大道3370号南山智园崇文园区2号楼1801',
+    create_time: '2001-09-12',
+    status: '0'
+  },
+  {
+    name: '努比亚技术有限公司 ',
+    url: science,
+    tags: ['战略投资', '国家高新技术企业', '创新型中小企业', '国家级专利奖'],
+    code: ' 914403007320587423',
+    phone: '075************',
+    type: '0',
+    representative: '倪飞',
+    email: 'xie.giang@nubia.com',
+    person: '1万人以上',
+    address: '深圳市南山区桃源街道福光社区留仙大道3370号南山智园崇文园区2号楼1801',
+    create_time: '2001-09-12',
+    status: '0'
+  },
+  {
+    name: '努比亚技术有限公司 ',
+    url: science,
+    tags: ['战略投资', '国家高新技术企业', '创新型中小企业', '国家级专利奖'],
+    code: ' 914403007320587423',
+    phone: '075************',
+    type: '0',
+    representative: '倪飞',
+    email: 'xie.giang@nubia.com',
+    person: '1万人以上',
+    address: '深圳市南山区桃源街道福光社区留仙大道3370号南山智园崇文园区2号楼1801',
+    create_time: '2001-09-12',
+    status: '0'
+  },
+  {
+    name: '努比亚技术有限公司 ',
+    url: science,
+    tags: ['战略投资', '国家高新技术企业', '创新型中小企业', '国家级专利奖'],
+    code: ' 914403007320587423',
+    phone: '075************',
+    type: '0',
+    representative: '倪飞',
+    email: 'xie.giang@nubia.com',
+    person: '1万人以上',
+    address: '深圳市南山区桃源街道福光社区留仙大道3370号南山智园崇文园区2号楼1801',
+    create_time: '2001-09-12',
+    status: '0'
+  }
+])
 // 请求
 onMounted(async () => {
   loading.value = true
   await searchOther()
-  await search()
+  await search(active.value)
   loading.value = false
 })
 const searchOther = async () => {
@@ -288,15 +382,18 @@ const searchOther = async () => {
   // 行业分类
   result = await dictDataStore.query({ code: 'industry', is_use: '0' })
   if ($checkRes(result)) industryList.value = result.data
+  // 企业状态
+  result = await dictDataStore.query({ code: 'companyStatus', is_use: '0' })
+  if ($checkRes(result)) statusList.value = result.data
 }
-const search = async (data) => {
+const search = async (active) => {
   const info = {
     skip: 0,
     limit: 9,
     is_use: '0',
     status: '1'
   }
-  if (data?.type) info.type = data.type
+  if (active) info.type = active
   const res = await store.query(info)
   if (res.errcode == '0') list.value = res.data
 }
@@ -306,6 +403,7 @@ const getDict = (data, model) => {
   if (model == 'cooperate') res = projectList.value.find((f) => f.value == data)
   else if (model == 'maturity') res = maturityList.value.find((f) => f.value == data)
   else if (model == 'type') res = industryList.value.find((f) => f.value == data)
+  else if (model == 'status') res = statusList.value.find((f) => f.value == data)
   return get(res, 'label')
 }
 // 地区显示
@@ -316,22 +414,17 @@ const getArea = (data) => {
 const toView = (item) => {
   console.log(item)
 }
-// 查询
+// 查看更多
+const toMore = () => {}
+// 类型
 const mouseOver = (item) => {
-  search({ type: item.type })
+  active.value = item.type
+  search(item.type)
 }
 // 联络专家
 const toChat = (item) => {
   console.log(item)
 }
-// 查看专家详情
-const toeView = (item) => {
-  console.log(item)
-}
-// 查看更多项目
-const topMore = () => {}
-// 查看更多专家
-const toeMore = () => {}
 </script>
 <style scoped lang="scss">
 .main {
@@ -400,6 +493,13 @@ const toeMore = () => {}
             color: #ffffff;
           }
         }
+        .active {
+          border-radius: 8px;
+          background-color: #2280ff;
+          .title {
+            color: #ffffff;
+          }
+        }
       }
       .right {
         display: flex;
@@ -412,6 +512,8 @@ const toeMore = () => {}
           margin: 0 0 10px 0;
 
           .name {
+            display: flex;
+            align-items: center;
             font-size: 16px;
             font-family:
               PingFangSC-Medium,
@@ -420,7 +522,6 @@ const toeMore = () => {}
             color: #111;
             line-height: 16px;
             display: block;
-            width: 100%;
             margin: 12px 0;
           }
           .brief {
@@ -513,6 +614,65 @@ const toeMore = () => {}
         }
       }
     }
+    .one_4 {
+      .list {
+        display: flex;
+        margin: 5px 0 0 0;
+        padding: 5px;
+        border-radius: 8px;
+        border: 1px solid #f4f4f4;
+        .left {
+          text-align: center;
+          .image {
+            width: 150px;
+            height: 150px;
+            border-radius: 10px;
+          }
+        }
+        .right {
+          padding: 5px;
+          .right_1 {
+            display: flex;
+            align-content: center;
+            .name {
+              word-break: break-all;
+              font-size: 18px;
+              font-family:
+                PingFangSC-Regular,
+                PingFang SC;
+              font-weight: 500;
+              line-height: 24px;
+              width: 175px;
+              overflow: hidden;
+              text-overflow: ellipsis;
+              display: -webkit-box;
+              -webkit-line-clamp: 2;
+              -webkit-box-orient: vertical;
+            }
+          }
+          .right_2 {
+            grid-gap: 0.5rem;
+            gap: 0.5rem;
+            display: flex;
+            margin: 10px 0;
+          }
+          .right_3 {
+            display: flex;
+            margin: 10px 0;
+            font-size: 14px;
+            font-family:
+              PingFangSC-Regular,
+              PingFang SC;
+            color: #666;
+            .info {
+              span {
+                color: #2171f6;
+              }
+            }
+          }
+        }
+      }
+    }
   }
 }
 </style>

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

@@ -102,7 +102,8 @@ const onSearch = (data) => {
   console.log('or use this.value', searchValue.value)
 }
 const toCommon = (type) => {
-  if (type === 1) router.push({ path: '/login' })
+  if (type === 0) router.push({ path: '/help' })
+  else if (type === 1) router.push({ path: '/login' })
   else router.push({ path: '/register' })
 }
 // 点击指定模块
@@ -156,6 +157,7 @@ const toLogout = () => {
         .image {
           height: 45px;
           width: 45px;
+          margin: 0 10px 0 0;
         }
 
         .left_1 {
@@ -245,7 +247,9 @@ const toLogout = () => {
     }
 
     .thr {
-      margin: 30px 0 0 0;
+      width: 100%;
+      position: absolute;
+      bottom: 20px;
       text-align: center;
       font-size: 12px;
       color: #fff;