浏览代码

修改样式

zs 1 年之前
父节点
当前提交
402fa93f97

+ 1 - 1
src/layout/index.vue

@@ -63,9 +63,9 @@
                 <template #dropdown>
                   <el-dropdown-menu>
                     <el-dropdown-item @click="toOpen">管理中心</el-dropdown-item>
+                    <el-dropdown-item @click="toCommon(2)">个人中心</el-dropdown-item>
                     <el-dropdown-item @click="toCommon(0)">我的收藏</el-dropdown-item>
                     <el-dropdown-item @click="toCommon(3)">我的报名</el-dropdown-item>
-                    <el-dropdown-item @click="toCommon(2)">个人中心</el-dropdown-item>
                     <el-dropdown-item @click="toLogout">注销</el-dropdown-item>
                   </el-dropdown-menu>
                 </template>

+ 9 - 9
src/layout/site.js

@@ -24,13 +24,13 @@ export const footInfo = {
 }
 // 菜单设置
 export const menuList = [
-  // { _id: '1', title: '首页', href: 'home', English: 'Home', type: '0' },
-  { _id: '2', title: '政策新闻', href: 'news', English: 'Policy News', type: '0' },
-  { _id: '3', title: '新闻资讯', href: 'brain', English: 'News Information', type: '0' },
-  { _id: '4', title: '供需商城', href: 'demand', English: 'Demand Mall', type: '0' },
-  { _id: '5', title: '专家智库', href: 'expert', English: 'Expert Tank', type: '0' },
-  { _id: '6', title: '优质企业', href: 'company', English: 'Authorized Operator', type: '0' },
-  { _id: '7', title: '项目精选', href: 'project', English: 'Project Selection', type: '0' },
-  { _id: '8', title: '创新大赛', href: 'innovation', English: 'Innovation Competition', type: '0' },
-  { _id: '9', title: '成果展示', href: 'achievement', English: 'Achievement Display', type: '0' }
+  { _id: '1', title: '首页', href: 'home', English: 'Home', type: '1' },
+  { _id: '2', title: '政策新闻', href: 'news', English: 'Policy News', type: '1' },
+  { _id: '3', title: '新闻资讯', href: 'brain', English: 'News Information', type: '1' },
+  { _id: '4', title: '供需商城', href: 'demand', English: 'Demand Mall', type: '1' },
+  { _id: '5', title: '专家智库', href: 'expert', English: 'Expert Tank', type: '1' },
+  { _id: '6', title: '优质企业', href: 'company', English: 'Authorized Operator', type: '1' },
+  { _id: '7', title: '项目精选', href: 'project', English: 'Project Selection', type: '1' },
+  { _id: '8', title: '创新大赛', href: 'innovation', English: 'Innovation Competition', type: '1' },
+  { _id: '9', title: '成果展示', href: 'achievement', English: 'Achievement Display', type: '1' }
 ]

+ 212 - 63
src/views/brain/index.vue

@@ -7,36 +7,75 @@
         </el-col>
         <div class="w_1200">
           <el-col :span="24" class="two">
-            <el-col :span="24" class="two_1">
-              <el-col :span="20" class="title">标题</el-col>
-              <el-col :span="4" class="title">时间</el-col>
-            </el-col>
-            <el-col :span="24" class="two_2">
-              <vue3-seamless-scroll
-                :list="list"
-                :hover="true"
-                :step="0.5"
-                :wheel="true"
-                :isWatch="true"
+            <el-col :span="18" class="left">
+              <el-col
+                :span="24"
+                class="list"
+                v-for="(item, index) in list"
+                :key="index"
+                @click="toView(item)"
               >
-                <el-col
-                  :span="24"
-                  class="list"
-                  v-for="(item, index) in list"
-                  :key="index"
-                  @click="toView(item)"
-                >
-                  <el-col :span="20" class="content textOver">
-                    <el-tooltip effect="dark" :content="item.title" placement="top">
-                      {{ item.title || '暂无标题' }}
-                    </el-tooltip>
+                <el-col :span="6" class="left">
+                  <el-image
+                    class="image"
+                    v-if="item.logo && item.logo.length > 0"
+                    :src="item.logo[0].url"
+                    fit="fill"
+                  />
+                  <el-image class="image" v-else :src="new_4" fit="fill" />
+                </el-col>
+                <el-col :span="17" class="right">
+                  <el-col :span="24" class="right_1 textOver">
+                    {{ item.title || '暂无标题' }}
+                  </el-col>
+                  <el-col :span="24" class="right_2 textMore">
+                    <div v-html="item.content"></div>
                   </el-col>
-                  <el-col :span="4" class="content textOver">
-                    {{ item.time || '暂无时间' }}
+                  <el-col :span="24" class="right_3">
+                    {{ item.time || '暂无' }}
                   </el-col>
                 </el-col>
-              </vue3-seamless-scroll>
+              </el-col>
             </el-col>
+            <el-col :span="5" class="right">
+              <el-col :span="24" class="title">
+                <el-col :span="24" class="left">成果展示 </el-col>
+                <el-col :span="24" class="right" @click="toMore(0)"> 查看更多</el-col>
+              </el-col>
+              <el-col :span="24" class="content">
+                <a-timeline>
+                  <a-timeline-item v-for="(item, index) in achievementList" :key="index">
+                    <div class="name">{{ item.name }}</div>
+                    <div class="time">{{ item.time }}</div>
+                  </a-timeline-item>
+                </a-timeline>
+              </el-col>
+              <el-col :span="24" class="title">
+                <el-col :span="24" class="left">项目精选 </el-col>
+                <el-col :span="24" class="right" @click="toMore(1)"> 查看更多</el-col>
+              </el-col>
+              <el-col :span="24" class="content">
+                <a-timeline>
+                  <a-timeline-item v-for="(item, index) in projectList" :key="index">
+                    <div class="name">{{ item.name }}</div>
+                    <div class="time">{{ item.time }}</div>
+                  </a-timeline-item>
+                </a-timeline>
+              </el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="thr">
+            <el-pagination
+              background
+              layout="total, prev, pager, next"
+              :page-sizes="[10, 20, 50, 100, 200]"
+              :total="total"
+              :page-size="limit"
+              v-model:current-page="currentPage"
+              @current-change="changePage"
+              @size-change="sizeChange"
+            >
+            </el-pagination>
           </el-col>
         </div>
       </el-col>
@@ -47,30 +86,77 @@
 <script setup>
 // 接口
 import { NewsStore } from '@/store/api/platform/news'
+import { AchievementStore } from '@/store/api/platform/achievement'
+import { ProjectStore } from '@/store/api/platform/project'
 const store = NewsStore()
+const projectStore = ProjectStore()
+const achievementStore = AchievementStore()
 // 路由
 const router = useRouter()
 // 图片引入
 import brain from '@/assets/home.jpg'
+import new_4 from '@/assets/new_4.png'
 // 加载中
 const loading = ref(false)
 // 列表
 const list = ref([])
+let skip = 0
+let limit = inject('limit')
+const total = ref(0)
+const achievementList = ref([])
+const projectList = ref([])
 // 请求
 onMounted(async () => {
   loading.value = true
-  search()
+  await searchOther()
+  await search({ skip, limit })
   loading.value = false
 })
-const search = async () => {
-  const info = { type: '1', status: '1', is_use: '0' }
+const searchOther = async () => {
+  const info = {
+    skip: 0,
+    limit: 6,
+    status: '1',
+    is_use: '0'
+  }
+  let res
+  res = await achievementStore.query(info)
+  if (res.errcode == '0') achievementList.value = res.data
+  res = await projectStore.query(info)
+  if (res.errcode == '0') projectList.value = res.data
+}
+const search = async (query = { skip: 0, limit }) => {
+  const info = {
+    skip: query.skip,
+    limit: query.limit,
+    status: '1',
+    is_use: '0'
+  }
   const res = await store.query(info)
-  if (res.errcode == '0') list.value = res.data
+  if (res.errcode == '0') {
+    list.value = res.data
+    total.value = res.total
+  }
 }
 // 查看
 const toView = (item) => {
   router.push({ path: `/news/detail`, query: { id: item.id || item._id } })
 }
+// 查看更多
+const toMore = () => {
+  router.push({ path: `/achievement` })
+}
+
+const currentPage = ref(1)
+// 分页
+const changePage = (page = currentPage.value) => {
+  search({ skip: (page - 1) * limit, limit: limit })
+}
+const sizeChange = (limits) => {
+  limit = limits
+  currentPage.value = 1
+  search({ skip: 0, limit: limit })
+}
 </script>
 <style lang="scss" scoped>
 .main {
@@ -116,50 +202,113 @@ const toView = (item) => {
   }
 
   .two {
+    display: flex;
     width: 100%;
     margin: 10px;
-
-    .two_1 {
-      display: flex;
-      justify-content: center;
-      height: 50px;
-      background: #2374ff;
-      line-height: 50px;
-      color: #ffffff;
-      font-size: 16px;
-
-      .title {
-        text-align: center;
+    .left {
+      .list {
+        display: flex;
+        align-items: center;
+        margin-bottom: 30px;
+        .left {
+          .image {
+            width: 216px;
+            height: 144px;
+          }
+        }
+        .right {
+          .right_1 {
+            height: 24px;
+            font-size: 18px;
+            font-family:
+              PingFangSC-Medium,
+              PingFang SC;
+            font-weight: 500;
+            color: #111;
+            display: block;
+            line-height: 24px;
+            margin-bottom: 20px;
+          }
+          .right_2 {
+            height: 48px;
+            margin-bottom: 20px;
+            font-size: 14px;
+          }
+          .right_3 {
+            font-size: 12px;
+            font-family:
+              PingFangSC-Regular,
+              PingFang SC;
+            font-weight: 400;
+            color: #999;
+            line-height: 12px;
+          }
+          .right_1:hover {
+            color: #2374ff;
+          }
+        }
       }
     }
-
-    .two_2 {
-      max-height: 400px;
-      overflow: hidden;
-
-      .list {
+    .right {
+      .title {
         display: flex;
-        justify-content: center;
-        height: 50px;
-        line-height: 50px;
-        font-size: 16px;
-        color: #666;
-        background: #fff;
-
-        .content {
-          text-align: center;
-          padding: 0 10px;
+        align-items: center;
+        justify-content: space-between;
+        background: linear-gradient(90deg, #d7e8ff, #fff);
+        width: 300px;
+        height: 64px;
+        padding-left: 21px;
+        padding-right: 5px;
+        box-sizing: border-box;
+        margin-bottom: 7px;
+        .left {
+          font-size: 24px;
+          font-family:
+            PingFangSC-Medium,
+            PingFang SC;
+          font-weight: 500;
+          color: #111;
+          line-height: 24px;
         }
-
-        .content:hover {
-          color: #2374ff;
+        .right {
+          font-size: 14px;
+          font-family:
+            PingFangSC-Regular,
+            PingFang SC;
+          font-weight: 400;
+          color: #666;
         }
       }
-
-      .list:nth-child(2n) {
-        background: #f4f4f4;
+      .content {
+        margin: 10px 0 0 0;
+        .name {
+          max-height: 48px;
+          font-size: 14px;
+          font-family:
+            PingFangSC-Medium,
+            PingFang SC;
+          font-weight: 500;
+          color: #111;
+          line-height: 24px;
+          display: block;
+        }
+        .time {
+          margin-top: 8px;
+          font-size: 12px;
+          font-family:
+            PingFangSC-Medium,
+            PingFang SC;
+          font-weight: 500;
+          color: #999;
+          line-height: 17px;
+        }
       }
     }
   }
+  .thr {
+    display: flex;
+    flex-direction: row-reverse;
+    padding: 20px;
+  }
 }
 </style>

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

@@ -146,7 +146,6 @@ const search = async () => {
   if (user.value._id) {
     let res = await store.fetch(user.value._id)
     if (res.errcode == '0') form.value = res.data
-    form.value.type = '1'
   }
 }
 const searchOther = async () => {

+ 4 - 8
src/views/company/detail.vue

@@ -58,15 +58,11 @@
                   <el-col :span="8" class="info">员工人数:{{ info.person || '暂无' }}人</el-col>
                 </el-col>
                 <el-col :span="24" class="right_3">
-                  <el-col :span="8" class="info"
-                    >注册资本:{{ info.register || '暂无' }}万元人民币</el-col
-                  >
-                  <el-col :span="8" class="info">官网:{{ info.email || '暂无' }}</el-col>
-                  <el-col :span="8" class="info">营业收入:{{ info.money || '暂无' }}</el-col>
-                </el-col>
-                <el-col :span="24" class="right_3">
+                  <el-col :span="8" class="info">
+                    注册资本:{{ info.register || '暂无' }}万元
+                  </el-col>
                   <el-col :span="8" class="info">成立日期:{{ info.create_time || '暂无' }}</el-col>
-                  <el-col :span="16" class="info">地址:{{ info.address || '暂无' }}</el-col>
+                  <el-col :span="8" class="info">地址:{{ info.address || '暂无' }}</el-col>
                 </el-col>
               </el-col>
             </el-col>

+ 6 - 1
src/views/innovation/detail.vue

@@ -132,6 +132,7 @@
 </template>
 
 <script setup>
+import moment from 'moment'
 import { get, cloneDeep } from 'lodash-es'
 const $checkRes = inject('$checkRes')
 // 组件
@@ -277,7 +278,11 @@ const submitForm = async (formEl) => {
   await formEl.validate(async (valid, fields) => {
     if (valid) {
       const data = cloneDeep(form.value)
-      const other = { match: info.value._id, user: user.value._id }
+      const other = {
+        match: info.value._id,
+        user: user.value._id,
+        time: moment().format('YYYY-MM-DD')
+      }
       let res = await signStore.create({ ...data, ...other })
       if ($checkRes(res, true)) toClose()
     } else {

+ 72 - 57
src/views/sign/index.vue

@@ -4,36 +4,34 @@
       <el-col :span="24" class="main animate__animated animate__backInRight">
         <div class="w_1200">
           <el-col :span="24" class="one">
-            <el-col
-              :span="24"
-              class="list"
-              v-for="(item, index) in list"
-              :key="index"
-              @click="toView(item)"
-            >
-              <el-col :span="24" class="name">
-                <el-tooltip effect="dark" :content="item.name" placement="top">
-                  {{ item.name || '暂无姓名' }}
-                </el-tooltip>
-              </el-col>
-              <el-row class="other">
-                <el-col :span="8" class="other_1">
-                  <span>手机号:</span>
-                  {{ item.phone || '暂无' }}
-                </el-col>
-                <el-col :span="8" class="other_1">
-                  <span>证件类型:</span>
-                  {{ getDict(item.cardType, 'cardType') }}
-                </el-col>
-                <el-col :span="8" class="other_1">
-                  <span>证件号码:</span>
-                  {{ item.card || '暂无' }}
+            <a-list :loading="loading" :grid="{ gutter: 14, column: 4 }" :data-source="list">
+              <template #renderItem="{ item }">
+                <el-col :span="24" class="list" @click="toView(item)">
+                  <el-col :span="24" class="name textOver">
+                    <el-tooltip effect="dark" :content="item.name" placement="top">
+                      {{ item.match_name || '暂无比赛名称' }}
+                    </el-tooltip>
+                  </el-col>
+                  <el-col :span="24" class="two_1">
+                    <span>比赛日期:</span>
+                    {{ item.match_time || '暂无' }}
+                  </el-col>
+                  <el-col :span="24" class="two_1">
+                    <span>组织单位:</span>
+                    {{ item.organization || '暂无组织单位' }}
+                  </el-col>
+                  <el-col :span="24" class="two_1 textOver">
+                    <span>报名时间:</span>
+                    {{ item.time || '暂无' }}
+                  </el-col>
+                  <el-col :span="24" class="bottom">
+                    <el-button @click.stop="toView(item)" type="primary" size="small">
+                      查看赛事详情
+                    </el-button>
+                  </el-col>
                 </el-col>
-              </el-row>
-              <el-col :span="24" class="brief textOver">
-                {{ item.remark || '没有更多备注' }}
-              </el-col>
-            </el-col>
+              </template>
+            </a-list>
           </el-col>
           <el-col :span="24" class="two">
             <el-pagination
@@ -124,53 +122,70 @@ const sizeChange = (limits) => {
 </script>
 <style lang="scss" scoped>
 .main {
+  min-height: 77vh;
   background: rgb(248, 248, 248);
   .one {
-    margin-top: 20px;
-    background: #ffffff;
-    border-radius: 10px;
-    padding: 15px;
-
+    margin: 15px 0;
     .list {
-      margin-bottom: 10px;
-      border-bottom: 1px solid #ebebeb;
-      padding-bottom: 10px;
+      background: #fff;
+      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.03);
+      border-radius: 2px;
+      width: 285px;
+      height: 180px;
+      margin-bottom: 15px;
+      cursor: pointer;
+      transition: all 0.3s;
+      padding: 20px;
 
       .name {
-        color: #337ab7;
-        font-size: 18px;
-        font-weight: bold;
-        display: inline-block;
-        margin: 10px 0;
+        display: flex;
+        align-items: center;
+        font-size: 16px;
+        color: #121834;
+        font-weight: 500;
+        margin: 5px 0 0 0;
       }
 
       .name:hover {
         color: #2374ff;
       }
 
-      .other {
-        padding: 5px 0;
+      .two_1 {
+        font-size: 12px;
+        text-align: justify;
+        line-height: 12px;
+        font-weight: 400;
+        letter-spacing: 0;
+        color: #8f97a3;
+        margin-top: 10px;
 
-        .other_1 {
-          font-family: 'PingFangSC-Light', 'Microsoft YaHei', 'WenQuanYi Micro Hei', arial,
-            sans-serif;
-          font-size: 12px;
-          font-weight: normal;
+        span:last-child {
+          color: #525a68;
         }
+      }
 
-        .other_1:hover {
-          color: #2374ff;
+      .bottom {
+        margin: 10px;
+        text-align: right;
+        .button {
+          font-size: 12px;
+          color: #fff;
+          text-align: center;
+          line-height: 12px;
+          font-weight: 500;
+          padding: 5px 12px;
+          background: #2374ff;
+          box-shadow: 0 3px 6px 0 rgba(35, 116, 255, 0.1);
+          border-radius: 2px;
         }
       }
+    }
 
-      .brief {
-        line-height: 30px;
-        color: #666;
-        font-size: 14px;
-      }
+    .list:hover {
+      background: #f0f7ff;
+      box-shadow: 0 0 16px rgba(205, 205, 205, 0.6);
     }
   }
-
   .two {
     display: flex;
     flex-direction: row-reverse;