소스 검색

修改二级菜单

zs 11 달 전
부모
커밋
363fdfeb36
2개의 변경된 파일126개의 추가작업 그리고 42개의 파일을 삭제
  1. 105 5
      src/layout/index.vue
  2. 21 37
      src/layout/site.js

+ 105 - 5
src/layout/index.vue

@@ -49,6 +49,35 @@
               <div>{{ item.title }}</div>
             </div>
           </el-col>
+          <div v-if="info && info.children" class="info">
+            <el-row v-if="info.key == '3'" style="justify-content: center; margin: 10px 0 0 0">
+              <el-col :span="11" class="list_1" v-for="(item, index) in info.children" :key="index">
+                <div class="title">{{ item.title }}</div>
+                <div class="list_1_1">
+                  <div
+                    v-for="(tag, indexs) in item.children"
+                    :key="indexs"
+                    class="title1"
+                    @click="selectMenu(tag.route)"
+                  >
+                    {{ tag.title }}
+                  </div>
+                </div>
+              </el-col>
+            </el-row>
+            <el-row v-else>
+              <el-col :span="24" class="list_2">
+                <div
+                  v-for="(item, index) in info.children"
+                  :key="index"
+                  class="title1"
+                  @click="selectMenu(item.route)"
+                >
+                  {{ item.title }}
+                </div>
+              </el-col>
+            </el-row>
+          </div>
         </el-col>
       </div>
     </div>
@@ -93,7 +122,7 @@
 
 <script setup>
 // 图片引入
-import logoUrl from '/images/logo-jilin.png'
+// import logoUrl from '/images/logo-jilin.png'
 import logoBottom from '/images/logo-jilinbai.png'
 import { siteInfo, footInfo, menuList } from '@/layout/site'
 // 接口
@@ -163,7 +192,7 @@ const handleMouseOver = (index) => {
 }
 const handleMouseLeave = (index) => {
   data.value[index].hover = false
-  info.value = {}
+  // info.value = {}
   const arr = data.value.every((i) => i.hover === false)
   if (arr) {
     for (const val of data.value) {
@@ -177,9 +206,9 @@ const toLogout = () => {
   userStore.logOut()
   router.push('/login')
 }
-const toLink = (item) => {
-  window.open(item.href, '_blank') // 在新标签页中打开URL
-}
+// const toLink = (item) => {
+//   window.open(item.href, '_blank') // 在新标签页中打开URL
+// }
 watch(
   route,
   (newVal) => {
@@ -282,6 +311,77 @@ provide('selectMenu', selectMenu)
           cursor: pointer; /* 改变鼠标样式为手形 */
         }
       }
+      .info {
+        .list_1 {
+          margin: 0 10px 0 0;
+          border: #e4e4e4 1px dashed;
+          .title {
+            margin: 5px 0;
+            font-size: $global-font-size-18;
+            font-weight: 600;
+            text-align: center;
+            color: #252f49;
+          }
+          .title::before {
+            content: '';
+            position: absolute;
+            transform: translateY(-50%);
+            top: 15px;
+            margin-left: -70px;
+            width: 40px;
+            height: 1px;
+            border-bottom: 1px #252f49 solid;
+          }
+          .title::after {
+            content: '';
+            position: absolute;
+            transform: translateY(-50%);
+            top: 15px;
+            margin-left: 30px;
+            width: 40px;
+            height: 1px;
+            border-bottom: 1px #252f49 solid;
+          }
+          .list_1_1 {
+            display: flex;
+            flex-wrap: wrap;
+            justify-content: center;
+            margin: 5px 0;
+            .title1 {
+              width: 110px;
+              margin: 8px;
+              padding: 5px;
+              text-align: center;
+              border: 1px #fff solid;
+              background-image: linear-gradient(to bottom, #f8f3ff 0%, #e0e8fe 100%);
+              border-radius: 4px;
+            }
+            .title1:hover {
+              background: #2280ff;
+              color: #ffffff;
+            }
+          }
+        }
+        .list_2 {
+          display: flex;
+          flex-wrap: wrap;
+          justify-content: center;
+          margin: 5px 0;
+          .title1 {
+            width: 110px;
+            margin: 8px;
+            padding: 5px;
+            text-align: center;
+            border: 1px #fff solid;
+            background-image: linear-gradient(to bottom, #f8f3ff 0%, #e0e8fe 100%);
+            border-radius: 4px;
+          }
+          .title1:hover {
+            background: #2280ff;
+            color: #ffffff;
+          }
+        }
+      }
     }
   }
   .center {

+ 21 - 37
src/layout/site.js

@@ -42,44 +42,38 @@ export const menuList = [
     children: [
       {
         key: '3-1',
-        title: '全部',
-        label: '全部',
-        route: 'thr'
-      },
-      {
-        key: '3-2',
         title: '需求中心',
         label: '需求中心',
         children: [
-          { key: '3-2-1', route: 'demand', title: '技术需求', label: '技术需求', value: '0' },
-          { key: '3-2-2', route: 'demand', title: '人才需求', label: '人才需求', value: '1' },
-          { key: '3-2-3', route: 'demand', title: '资金需求', label: '资金需求', value: '2' },
-          { key: '3-2-4', route: 'demand', title: '合作伙伴', label: '合作伙伴', value: '3' },
-          { key: '3-2-5', route: 'demand', title: '知识产权', label: '知识产权', value: '4' },
-          { key: '3-2-6', route: 'demand', title: '市场需求', label: '市场需求', value: '5' },
-          { key: '3-2-7', route: 'demand', title: '政策支持', label: '政策支持', value: '6' },
-          { key: '3-2-8', route: 'demand', title: '其他', label: '其他', value: '7' }
+          { key: '3-1-1', route: 'demand', title: '技术需求', label: '技术需求', value: '0' },
+          { key: '3-1-2', route: 'demand', title: '人才需求', label: '人才需求', value: '1' },
+          { key: '3-1-3', route: 'demand', title: '资金需求', label: '资金需求', value: '2' },
+          { key: '3-1-4', route: 'demand', title: '合作伙伴', label: '合作伙伴', value: '3' },
+          { key: '3-1-5', route: 'demand', title: '知识产权', label: '知识产权', value: '4' },
+          { key: '3-1-6', route: 'demand', title: '市场需求', label: '市场需求', value: '5' },
+          { key: '3-1-7', route: 'demand', title: '政策支持', label: '政策支持', value: '6' },
+          { key: '3-1-8', route: 'demand', title: '其他', label: '其他', value: '7' }
         ]
       },
       {
-        key: '3-3',
+        key: '3-2',
         title: '供方中心',
         label: '供方中心',
         children: [
-          { key: '3-3-1', route: 'supply', title: '技术支持', label: '技术支持', value: '0' },
-          { key: '3-3-2', route: 'supply', title: '培训教育', label: '培训教育', value: '1' },
-          { key: '3-3-3', route: 'supply', title: '资金支持', label: '资金支持', value: '2' },
-          { key: '3-3-4', route: 'supply', title: '合作机会', label: '合作机会', value: '3' },
+          { key: '3-2-1', route: 'supply', title: '技术支持', label: '技术支持', value: '0' },
+          { key: '3-2-1', route: 'supply', title: '培训教育', label: '培训教育', value: '1' },
+          { key: '3-2-3', route: 'supply', title: '资金支持', label: '资金支持', value: '2' },
+          { key: '3-2-4', route: 'supply', title: '合作机会', label: '合作机会', value: '3' },
           {
-            key: '3-3-5',
+            key: '3-2-5',
             route: 'supply',
             title: '知识产权管理',
             label: '知识产权管理',
             value: '4'
           },
-          { key: '3-3-6', route: 'supply', title: '市场推广', label: '市场推广', value: '5' },
-          { key: '3-3-7', route: 'supply', title: '政策支持', label: '政策支持', value: '6' },
-          { key: '3-3-8', route: 'supply', title: '其他', label: '其他', value: '7' }
+          { key: '3-2-6', route: 'supply', title: '市场推广', label: '市场推广', value: '5' },
+          { key: '3-2-7', route: 'supply', title: '政策支持', label: '政策支持', value: '6' },
+          { key: '3-2-8', route: 'supply', title: '其他', label: '其他', value: '7' }
         ]
       }
     ]
@@ -115,20 +109,10 @@ export const menuList = [
     English: 'Innovation Competition',
     label: '信息库',
     children: [
-      { key: '10-3-1', route: 'supply', title: '技术支持', label: '技术支持', value: '0' },
-      { key: '3-3-2', route: 'supply', title: '培训教育', label: '培训教育', value: '1' },
-      { key: '3-3-3', route: 'supply', title: '资金支持', label: '资金支持', value: '2' },
-      { key: '3-3-4', route: 'supply', title: '合作机会', label: '合作机会', value: '3' },
-      {
-        key: '3-3-5',
-        route: 'supply',
-        title: '知识产权管理',
-        label: '知识产权管理',
-        value: '4'
-      },
-      { key: '3-3-6', route: 'supply', title: '市场推广', label: '市场推广', value: '5' },
-      { key: '3-3-7', route: 'supply', title: '政策支持', label: '政策支持', value: '6' },
-      { key: '3-3-8', route: 'supply', title: '其他', label: '其他', value: '7' }
+      { key: '10-1', route: 'expert', title: '专家库', label: '专家库', value: '0' },
+      { key: '10-2', route: 'demand', title: '供需库', label: '供需库', value: '1' },
+      { key: '10-3', route: 'company', title: '企业库', label: '企业库', value: '2' },
+      { key: '10-4', route: 'project', title: '项目库', label: '项目库', value: '3' }
     ]
   },
   { key: '11', title: '孵化器', route: 'eleven', English: 'Achievement Display', label: '孵化器' },