zs 8 ヶ月 前
コミット
b4bc5f3793

BIN
public/images/top-left.png


BIN
public/images/top-right.png


+ 345 - 0
src/components/custom/custom-layout copy 2.vue

@@ -0,0 +1,345 @@
+<template>
+  <div id="c-layout">
+    <div class="header">
+      <el-col :span="24" class="header_1">
+        <div class="left">
+          <el-image class="image" v-if="configInfo && configInfo.logoUrl && configInfo.logoUrl.length > 0" :src="getUrl(configInfo.logoUrl)" fit="fill" />
+          <el-image class="image" v-else :src="siteInfo.logoUrl" fit="fill" />
+          <div class="content">
+            <text class="title">{{ configInfo.zhTitle || siteInfo.zhTitle }}</text>
+          </div>
+        </div>
+        <div class="right">
+          <div class="right_1" v-if="user && user.id">
+            <el-dropdown>
+              <span class="el-dropdown-link">
+                {{ user.nick_name || '暂无昵称' }}
+                <el-icon class="el-icon--right">
+                  <arrow-down />
+                </el-icon>
+              </span>
+              <template #dropdown>
+                <el-dropdown-menu>
+                  <el-dropdown-item @click="toCenter"> 个人中心 </el-dropdown-item>
+                  <el-dropdown-item @click="toOut"> 退出登录 </el-dropdown-item>
+                </el-dropdown-menu>
+              </template>
+            </el-dropdown>
+          </div>
+          <div class="right_1" v-else>
+            <span @click="toLogin('0')">注册</span>
+            <span>|</span>
+            <span @click="toLogin('1')">登录</span>
+          </div>
+          <div class="right_2" @click="toChat">
+            <el-icon><Bell /></el-icon>
+            <span>消息</span>
+          </div>
+        </div>
+      </el-col>
+      <div class="header_3" v-if="is_carousel">
+        <el-carousel height="300px">
+          <el-carousel-item v-for="(item, index) in carouselList" :key="index">
+            <el-image class="image" :src="getUrlFile(item)" fit="fill" />
+          </el-carousel-item>
+        </el-carousel>
+      </div>
+      <el-col :span="24" class="header_2">
+        <div class="list_1300">
+          <el-col :span="24" class="list">
+            <div class="text" v-for="(item, index) in data" @click="selectMenu(item.route)" :class="[item.hover == '1' ? 'menuTrue' : '']" :style="{ padding: isIncubator ? '0 37px' : hasbrain ? '0 37px' : '0 52px' }" :key="index" @mouseover="handleMouseOver(index)" @mouseout="handleMousOut(index)">
+              {{ item.title }}
+            </div>
+          </el-col>
+        </div>
+      </el-col>
+    </div>
+    <div class="main">
+      <slot></slot>
+    </div>
+    <div class="footer" v-if="is_foot">
+      <div class="footer_1">
+        <div class="left">
+          <el-image class="image" v-if="footInfos && footInfos.Logo && footInfos.Logo.length > 0" :src="getUrl(footInfos.Logo)" fit="fill" />
+          <el-image class="image" v-else :src="footInfo.Logo" fit="fill" />
+          <div class="title">电话:{{ footInfos.Phone || footInfo.Phone }}</div>
+          <div class="title">邮箱:{{ footInfos.Email || footInfo.Email }}</div>
+          <div class="title">地址:{{ footInfos.Address || footInfo.Address }}</div>
+        </div>
+        <div class="right">
+          <el-image class="image" v-if="footInfos && footInfos.Code && footInfos.Code.length > 0" :src="getUrl(footInfos.Code)" fit="fill" />
+          <el-image class="image" v-else :src="footInfo.Code" fit="fill" />
+          <div class="title" @click="toHelp">关于我们</div>
+        </div>
+      </div>
+      <div class="footer_2">
+        {{ footInfo.Copyright }}
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ArrowDown } from '@element-plus/icons-vue'
+import { cloneDeep, get } from 'lodash-es'
+import { siteInfo, footInfo, menuList2 } from '@/layout/site'
+// 接口
+import { DesignStore } from '@/store/api/platform/design'
+const designStore = DesignStore()
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
+
+const router = useRouter()
+const route = useRoute()
+const $checkRes = inject('$checkRes')
+const props = defineProps({
+  is_foot: { type: Boolean, default: () => true },
+  is_carousel: { type: Boolean, default: () => false },
+  carouselList: { type: Array, default: () => [] }
+})
+const configInfo = ref({})
+const footInfos = ref({})
+const data = ref([])
+const info = ref({})
+const isIncubator = ref(false)
+const hasbrain = ref(false)
+// 请求
+onMounted(async () => {
+  search()
+})
+const search = async () => {
+  for (const val of menuList2) {
+    if (route.name === val.route) val.hover = true
+    else val.hover = false
+  }
+  let menus = cloneDeep(menuList2)
+  // 判断, 如果没有孵化基地角色, 则不显示孵化基地菜单
+  if (user.value) {
+    const hasIncubator = get(user.value, 'role', []).find((f) => f === 'Incubator')
+    if (hasIncubator) isIncubator.value = true
+  }
+  if (!isIncubator.value) menus = menus.filter((f) => f.key !== '11')
+
+  // 特定用户查看产业大脑
+  if (user.value && user.value.id == 17) hasbrain.value = true
+  else hasbrain.value = false
+  if (!hasbrain.value) menus = menus.filter((f) => f.key !== '12')
+
+  data.value = menus
+
+  // 基础设置
+  const result = await designStore.query({})
+  if ($checkRes(result)) {
+    configInfo.value = result.data[0] || {}
+    footInfo.value = result.data[0].footInfo || {}
+  }
+}
+// 登录|注册
+const toLogin = (status) => {
+  router.push({ path: '/login', query: { status } })
+}
+const selectMenu = (item, query) => {
+  for (const val of data.value) {
+    if (route.name === val.route) val.hover = true
+    else val.hover = false
+  }
+  if (item == 'brain') window.open(`/cxyyWeb/brain`)
+  else router.push({ path: `/${item}`, query })
+}
+// 关于我们
+const toHelp = () => {
+  router.push({ path: `/help` })
+}
+// 个人中心
+const toCenter = () => {
+  const role = user.value.role.find((i) => i === 'Admin')
+  if (role) window.open(`/cxyyAdmin`)
+  else router.push({ path: `/center/basic` })
+}
+// 消息
+const toChat = () => {
+  if (user.value && user.value.id) {
+    router.push({ path: `/chat` })
+  } else {
+    router.push({ path: '/login', query: { status: '1' } })
+  }
+}
+const handleMouseOver = (index) => {
+  data.value[index].hover = true
+  info.value = data.value[index]
+}
+const handleMousOut = (index) => {
+  data.value[index].hover = false
+  const arr = data.value.every((i) => i.hover === false)
+  if (arr) {
+    for (const val of data.value) {
+      if (route.name === val.route) val.hover = true
+      else val.hover = false
+    }
+  }
+}
+const getUrl = (item) => {
+  if (item && item.length > 0) return `${import.meta.env.VITE_APP_HOST}${item[0].uri}`
+}
+const getUrlFile = (item) => {
+  if (item) return `${import.meta.env.VITE_APP_HOST}${item.uri}`
+}
+// 退出登录
+const toOut = () => {
+  userStore.logOut()
+  router.push({ path: '/login', query: { status: '1' } })
+}
+</script>
+
+<style lang="scss" scoped>
+#c-layout {
+  .header {
+    padding: 5px 0 0 0;
+    background: $global-color-fff;
+    .header_1 {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      height: 94px;
+      .left {
+        display: flex;
+        .image {
+          height: 60px;
+          width: 240px;
+          margin: 0 5px 0 0;
+        }
+        .content {
+          padding: 10px 0 0 0;
+          font-size: $global-font-size-34;
+          font-family: 'Comic Sans MS', cursive;
+        }
+      }
+      .right {
+        display: flex;
+        font-size: $global-font-size-18;
+        cursor: pointer; /* 改变鼠标样式为手形 */
+        .right_1 {
+          display: flex;
+          align-items: center;
+          color: $global-color-107;
+          margin: 0 10px 0 0;
+          span {
+            margin: 0 5px;
+          }
+          .el-dropdown-link {
+            font-size: $global-font-size-18;
+            cursor: pointer;
+            color: #409eff;
+            display: flex;
+            align-items: center;
+          }
+        }
+        .right_2 {
+          display: flex;
+          align-items: center;
+          margin: 0 5px;
+          span {
+            margin: 0 0 0 5px;
+          }
+        }
+      }
+    }
+    .header_2 {
+      height: 74px;
+      background: linear-gradient(90deg, #1e79ef, #4585ed);
+      .list_1300 {
+        position: relative;
+        width: 1300px;
+        margin: 0 auto;
+        .list {
+          position: absolute;
+          width: 100%;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          height: 74px;
+          background: linear-gradient(90deg, #1e79ef, #4585ed);
+          .text {
+            text-align: center;
+            font-family: Microsoft YaHei;
+            font-size: $global-font-size-22;
+            color: #ffffff;
+            cursor: pointer; /* 改变鼠标样式为手形 */
+          }
+          .menuTrue {
+            background: #0165e7;
+            height: 80px;
+            line-height: 80px;
+            border-radius: 3px;
+            margin-top: -3px;
+            z-index: 100;
+          }
+        }
+      }
+    }
+    .header_3 {
+      .image {
+        width: 100%;
+        height: 100%;
+      }
+    }
+  }
+  .header:hover {
+    .header_2 {
+      .info {
+        display: block !important;
+      }
+    }
+  }
+  .main {
+    min-height: 62vh;
+  }
+  .footer {
+    padding: 0 5px 10px 5px;
+    background-color: $global-color-2D2;
+    color: $global-color-fff;
+    font-size: $global-font-size-18;
+    .footer_1 {
+      padding: 10px 0;
+      display: flex;
+      justify-content: space-between;
+      border-bottom: 1px solid $global-color-bbb;
+      .left {
+        .image {
+          width: 393px;
+          height: 70px;
+        }
+        .title {
+          margin: 5px 0 0 0;
+        }
+      }
+      .right {
+        text-align: center;
+        .image {
+          width: 130px;
+          height: 130px;
+        }
+        .title {
+          margin: 5px 0 0 0;
+        }
+      }
+    }
+    .footer_2 {
+      padding: 10px 0 0 0;
+    }
+  }
+}
+@media screen and (max-width: 1280px) {
+  #c-layout {
+    min-width: 1920px;
+    margin: 0 auto;
+  }
+}
+@media screen and (min-width: 1921px) {
+  #c-layout {
+    max-width: 1920px;
+    margin: 0 auto;
+  }
+}
+</style>

+ 29 - 8
src/views/center/achievement.vue

@@ -3,7 +3,12 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
         <el-col :span="24" class="one">
-          <div class="one_left" @click="toAdd">发布成果</div>
+          <div class="one_left">
+            <div class="button" @click="toAdd">发布成果</div>
+            <div class="button" @click="toTemplate">下载导出模板</div>
+            <div class="button" @click="toUExcel">上传Excel</div>
+            <div class="button" @click="toDownload">下载Excel</div>
+          </div>
           <div class="one_right">
             <el-input v-model="searchForm.name" style="width: 250px" size="large" placeholder="搜索" @change="search" :suffix-icon="Search" />
           </div>
@@ -268,6 +273,18 @@ const toExam = async (row) => {
     })
     .catch(() => {})
 }
+// 下载导出模板
+const toTemplate = () => {
+  console.log('下载导出模板')
+}
+// 上传Excel
+const toUExcel = () => {
+  console.log('上传Excel')
+}
+// 下载Excel
+const toDownload = () => {
+  console.log('下载Excel')
+}
 const toClose = () => {
   form.value = { file: [] }
   dialog.value = { show: false }
@@ -291,14 +308,18 @@ const sizeChange = (limits) => {
     align-items: center;
     margin: 0 0 10px 0;
     .one_left {
-      background: #1875df;
-      padding: 0 10px;
-      height: 30px;
-      color: #fff;
-      line-height: 30px;
-      text-align: center;
+      display: flex;
       font-size: 16px;
-      cursor: default;
+      .button {
+        background: #1875df;
+        padding: 0 10px;
+        height: 30px;
+        color: #fff;
+        line-height: 30px;
+        text-align: center;
+        cursor: default;
+        margin: 0 10px 0 0;
+      }
     }
   }
   .thr {

+ 29 - 8
src/views/center/demand.vue

@@ -3,7 +3,12 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
         <el-col :span="24" class="one">
-          <div class="one_left" @click="toAdd">发布需求</div>
+          <div class="one_left">
+            <div class="button" @click="toAdd">发布需求</div>
+            <div class="button" @click="toTemplate">下载导出模板</div>
+            <div class="button" @click="toUExcel">上传Excel</div>
+            <div class="button" @click="toDownload">下载Excel</div>
+          </div>
           <div class="one_right">
             <el-input v-model="searchForm.name" style="width: 250px" size="large" placeholder="搜索" @change="search" :suffix-icon="Search" />
           </div>
@@ -314,6 +319,18 @@ const toClose = () => {
   width.value = '50%'
   dialog.value = { show: false }
 }
+// 下载导出模板
+const toTemplate = () => {
+  console.log('下载导出模板')
+}
+// 上传Excel
+const toUExcel = () => {
+  console.log('上传Excel')
+}
+// 下载Excel
+const toDownload = () => {
+  console.log('下载Excel')
+}
 // 分页
 const changePage = (page = currentPage.value) => {
   search({ skip: (page - 1) * limit, limit: limit })
@@ -333,14 +350,18 @@ const sizeChange = (limits) => {
     align-items: center;
     margin: 0 0 10px 0;
     .one_left {
-      background: #1875df;
-      padding: 0 10px;
-      height: 30px;
-      color: #fff;
-      line-height: 30px;
-      text-align: center;
+      display: flex;
       font-size: 16px;
-      cursor: default;
+      .button {
+        background: #1875df;
+        padding: 0 10px;
+        height: 30px;
+        color: #fff;
+        line-height: 30px;
+        text-align: center;
+        cursor: default;
+        margin: 0 10px 0 0;
+      }
     }
   }
   .thr {

+ 29 - 8
src/views/center/project.vue

@@ -3,7 +3,12 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
         <el-col :span="24" class="one">
-          <div class="one_left" @click="toAdd">发布项目</div>
+          <div class="one_left">
+            <div class="button" @click="toAdd">发布项目</div>
+            <div class="button" @click="toTemplate">下载导出模板</div>
+            <div class="button" @click="toUExcel">上传Excel</div>
+            <div class="button" @click="toDownload">下载Excel</div>
+          </div>
           <div class="one_right">
             <el-input v-model="searchForm.name" style="width: 250px" size="large" placeholder="搜索" @change="search" :suffix-icon="Search" />
           </div>
@@ -317,6 +322,18 @@ const getArea = (data) => {
   if (data) return data.join('-')
   else return '暂无地区'
 }
+// 下载导出模板
+const toTemplate = () => {
+  console.log('下载导出模板')
+}
+// 上传Excel
+const toUExcel = () => {
+  console.log('上传Excel')
+}
+// 下载Excel
+const toDownload = () => {
+  console.log('下载Excel')
+}
 const toClose = () => {
   form.value = { file: [] }
   width.value = '50%'
@@ -341,14 +358,18 @@ const sizeChange = (limits) => {
     align-items: center;
     margin: 0 0 10px 0;
     .one_left {
-      background: #1875df;
-      padding: 0 10px;
-      height: 30px;
-      color: #fff;
-      line-height: 30px;
-      text-align: center;
+      display: flex;
       font-size: 16px;
-      cursor: default;
+      .button {
+        background: #1875df;
+        padding: 0 10px;
+        height: 30px;
+        color: #fff;
+        line-height: 30px;
+        text-align: center;
+        cursor: default;
+        margin: 0 10px 0 0;
+      }
     }
   }
   .thr {

+ 29 - 8
src/views/center/supply.vue

@@ -3,7 +3,12 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
         <el-col :span="24" class="one">
-          <div class="one_left" @click="toAdd">发布供给</div>
+          <div class="one_left">
+            <div class="button" @click="toAdd">发布供给</div>
+            <div class="button" @click="toTemplate">下载导出模板</div>
+            <div class="button" @click="toUExcel">上传Excel</div>
+            <div class="button" @click="toDownload">下载Excel</div>
+          </div>
           <div class="one_right">
             <el-input v-model="searchForm.name" style="width: 250px" size="large" placeholder="搜索" @change="search" :suffix-icon="Search" />
           </div>
@@ -307,6 +312,18 @@ const getArea = (data) => {
   if (data) return data.join('-')
   else return '暂无地区'
 }
+// 下载导出模板
+const toTemplate = () => {
+  console.log('下载导出模板')
+}
+// 上传Excel
+const toUExcel = () => {
+  console.log('上传Excel')
+}
+// 下载Excel
+const toDownload = () => {
+  console.log('下载Excel')
+}
 const toClose = () => {
   form.value = { time: [] }
   width.value = '50%'
@@ -331,14 +348,18 @@ const sizeChange = (limits) => {
     align-items: center;
     margin: 0 0 10px 0;
     .one_left {
-      background: #1875df;
-      padding: 0 10px;
-      height: 30px;
-      color: #fff;
-      line-height: 30px;
-      text-align: center;
+      display: flex;
       font-size: 16px;
-      cursor: default;
+      .button {
+        background: #1875df;
+        padding: 0 10px;
+        height: 30px;
+        color: #fff;
+        line-height: 30px;
+        text-align: center;
+        cursor: default;
+        margin: 0 10px 0 0;
+      }
     }
   }
   .thr {

+ 51 - 10
src/views/detail/industryDetail.vue

@@ -5,13 +5,22 @@
         <div class="info_1"></div>
         <div class="info_2">
           <div class="info_name">{{ info.title || '暂无' }}</div>
-          <div class="info_friend" v-if="info.partner && info.partner.length > 0">
-            <span>合作伙伴:</span>
-            <div class="other_1" v-for="(tag, indexx) in info.partner" :key="indexx">{{ tag.name }}</div>
-          </div>
           <div class="info_brief">
             <div v-html="info.brief"></div>
           </div>
+          <div class="info_friend" v-if="info.partner && info.partner.length > 0">
+            <div class="info_title">
+              <el-image class="image" :src="left" fit="fill" />
+              <div class="title">合作伙伴</div>
+              <el-image class="image" :src="right" fit="fill" />
+            </div>
+            <div class="list">
+              <div class="other_1" v-for="(tag, indexx) in info.partner" :key="indexx">
+                <el-image class="image" :src="getUrl(tag.url)" fit="fill" />
+                <div class="name">{{ tag.name }}</div>
+              </div>
+            </div>
+          </div>
         </div>
       </div>
     </el-col>
@@ -19,6 +28,9 @@
 </template>
 
 <script setup>
+import { get } from 'lodash-es'
+import left from '/images/top-left.png'
+import right from '/images/top-right.png'
 // 接口
 import { SectorStore } from '@/store/api/platform/sector'
 const store = SectorStore()
@@ -41,6 +53,9 @@ const search = async () => {
     if (res.errcode == '0') info.value = res.data
   }
 }
+const getUrl = (item) => {
+  if (item) return `${import.meta.env.VITE_APP_HOST}${get(item, '0.uri')}`
+}
 </script>
 <style scoped lang="scss">
 .main {
@@ -60,15 +75,41 @@ const search = async () => {
         font-size: $global-font-size-22;
         font-weight: bold;
         text-align: center;
+        margin: 0 0 40px 0;
       }
       .info_friend {
-        display: flex;
-        font-size: $global-font-size-18;
-        color: $global-color-595;
-        margin: 5px 0 0 0;
-        .other_1 {
+        .info_title {
+          display: flex;
+          align-items: flex-end;
+          justify-content: center;
+          margin: 40px 0;
+
+          .image:first-child {
+            margin: 0 10px 0 0;
+          }
+          .title {
+            font-size: $global-font-size-28;
+            font-weight: 600;
+          }
+          .image:last-child {
+            margin: 0 0 0 10px;
+          }
+        }
+        .list {
           display: flex;
-          margin: 0 5px;
+          justify-content: center;
+          .other_1 {
+            margin: 0 5px;
+            .image {
+              width: 200px;
+              height: 140px;
+            }
+            .name {
+              margin: 10px 0 0 0;
+              font-size: $global-font-size-20;
+              text-align: center;
+            }
+          }
         }
       }
       .info_brief {