Kaynağa Gözat

Merge branch 'feature-2.0' into 'Dev'

Feature 2.0

See merge request crowd-2019/crowd-test-service-front!57
郭超 5 yıl önce
ebeveyn
işleme
5d2e446f2e

+ 22 - 3
src/App.vue

@@ -1,5 +1,6 @@
 <template>
-  <div>
+  <div style="width:100%;min-width: 1300px">
+    <home-slice v-if="showSlice"/>
     <header-container/>
     <div class="container-wrapper">
       <slot>
@@ -15,11 +16,17 @@
 <script>
 import HeaderContainer from '@/components/commons/Header2.0'
 import FooterContainer from '@/components/commons/Footer2.0'
+import HomeSlice from '@/components/commons/HomeSlice'
 import {getCurrentUser, storageGet, storageSave} from '@/js/index'
 
 export default {
   name: 'App',
-  components: {HeaderContainer, FooterContainer},
+  components: {HeaderContainer, FooterContainer, HomeSlice},
+  data(){
+    return {
+      // showSlice:false
+    }
+  },
   methods: {
     setUserInfo () {
       // storageGet('user').then((res)=>{
@@ -61,7 +68,13 @@ export default {
       //   this.isLogin = true
       // }
     },
-  }
+  },
+  computed:{
+    showSlice(){
+      if(this.$route.path==='/home')
+        return  true;
+    }
+  },
 }
 </script>
 
@@ -71,4 +84,10 @@ export default {
     min-height: calc(100% - 70px - 64px);
     margin: 0 auto;
   }
+  .home-slice {
+    width: 100%;
+    height: 170px;
+    background-image: url("./assets/img/homeSlice.png");
+    background-size: 100% 100%
+  }
 </style>

BIN
src/assets/img/home-btn1.png


BIN
src/assets/img/home-btn2.png


BIN
src/assets/img/homeSlice.png


BIN
src/assets/img/homeslice1.png


BIN
src/assets/img/homeslice2.png


+ 42 - 0
src/components/commons/HomeSlice.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="home-slice">
+    <el-row style="padding-top: 40px">
+      <el-col :span="14">
+        <div class="slice-wrapper" style="padding-left: 20%">
+          <div class="slice-title"><img src="../../assets/img/homeslice1.png" alt="slice1"></div>
+          <div class="slice-info">1分钟带你玩转众测服务平台</div>
+          <div class="slice-btn">立即进入<img src="../../assets/img/home-btn1.png" style="margin-left: 5px"></div>
+        </div>
+      </el-col>
+      <el-col :span="10">
+        <div class="slice-wrapper">
+          <div class="slice-title"><img src="../../assets/img/homeslice2.png" alt="slice2"></div>
+          <div class="slice-info">入住众测服务平台流程</div>
+          <div class="slice-btn">立即进入<img src="../../assets/img/home-btn2.png" style="margin-left: 5px"></div>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'HomeSlice'
+  }
+</script>
+
+<style scoped lang="less">
+.slice-info {
+  font-size:16px;
+  font-family:Source Han Sans CN;
+  color:rgba(243,224,10,1);
+}
+  .slice-btn{
+    display: flex;
+    margin-top: 5px;
+    line-height: 30px;
+    color: white;
+    font-weight: 400;
+  }
+
+</style>

+ 16 - 11
src/pages/Homepage/InstitutionCard.vue

@@ -20,9 +20,7 @@
       </el-col>
       <el-col :span="8">
         <div class="insititution-block">
-          <div style="line-height: 60px;text-align: center;font-size:22px;
-                        font-family:Source Han Sans CN;
-                        font-weight:400;">
+          <div class="single-title">
             北京计算机技术及应用研究所
           </div>
 
@@ -56,9 +54,7 @@
         </el-col>
         <el-col :span="8">
           <div class="insititution-block">
-            <div style="line-height: 60px;text-align: center;font-size:22px;
-                        font-family:Source Han Sans CN;
-                        font-weight:400;">
+            <div class="single-title">
               上海计算机软件技术开发中心
             </div>
 
@@ -96,9 +92,7 @@
                  alt="logo-institution"
                  class="insititution-logo">
             <div class="iscas-info">
-              <div class="iscas-title" style="line-height: 60px;text-align: center;font-size:22px;
-                        font-family:Source Han Sans CN;
-                        font-weight:400;">
+              <div class="iscas-title single-title" >
                 南京慕测信息科技有限公司
               </div>
             </div>
@@ -108,7 +102,7 @@
           <div class="insititution-block">
             <img src="../../assets/img/SQA.png"
                  alt="logo-institution"
-                 style="height: 60px;width: 100%"
+                 style="height: 60px;width: 60px"
 
             >
           </div>
@@ -148,6 +142,11 @@
         border: 1px solid #ccc;
         margin: 0 10px 20px 0;
         height: 60px;
+        .single-title{
+          line-height: 60px;text-align: center;font-size:22px;
+          font-family:Source Han Sans CN;
+          font-weight:400;
+        }
         .insititution-logo {
           height: 60px;
           width: 65px;
@@ -157,7 +156,7 @@
       .iscas-block {
         display: flex;
         .iscas-logo {
-          width: 120px;
+          width: 100px;
           height: 60px;
           display: inline-block;
         }
@@ -182,4 +181,10 @@
       }
     }
   }
+  @media screen and (max-width: 1450px) { /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
+    .single-title {
+      font-size: 16px !important;
+    }
+  }
+
 </style>

+ 2 - 1
src/pages/Square/PopularProject.vue

@@ -21,7 +21,8 @@
         </el-col>
         <el-col :span="5">
           <div class="project-people-number">
-            {{item.joinCount}}人
+            <span v-if="item.joinCount > 10000">{{item.joinCount > 10000 ? Math.floor(item.joinCount/10000) + 'w+' : item.joinCount}}人</span>
+            <span v-else>{{item.joinCount > 1000 ? Math.floor(item.joinCount/1000) + 'k+' : item.joinCount}}人</span>
           </div>
         </el-col>
       </el-row>

+ 1 - 1
src/pages/Square/PopularTask.vue

@@ -2,7 +2,7 @@
   <el-card class="popular-card">
     <div slot="header" class="popular-header">
       <img src="../../assets/img/popularTask.png" alt="popular-project" class="popular-header-img"/>
-      <span class="popular-header-title">热门项目</span>
+      <span class="popular-header-title">热门任务</span>
       <el-button style="float: right; padding: 3px 0" type="text" class="pull-right">more>></el-button>
     </div>
     <div class="popular-list">

+ 3 - 3
src/pages/Square/Square2.0.vue

@@ -12,7 +12,7 @@
         <el-col :span="12">
           <div class="search-nav">
             <div id="search-block " class="">
-              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick" v-if="tabArr">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
                 <el-tab-pane v-for="item in tabArr" :label="item.label" :name="item.name" :key="item.label"></el-tab-pane>
               </el-tabs>
               <div class="search-input">
@@ -109,7 +109,7 @@
         this.searchVal = '';
         this.searchData()
       },
-      searchData(){
+      searchData(index){
         if(this.currTab === 'squareHome'){
           this.loadData();
         }else{
@@ -119,6 +119,7 @@
       },
       handleTypeClick(tab){
         this.searchType = tab.name;
+        this.activePage = 1;
       },
 
       loadData(){
@@ -146,7 +147,6 @@
         Http.post(url,params).then((res)=>{
           this.currTab = this.searchType;
           this.projectAndTaskArr = res.data.content;
-          this.activePage = 1;
           this.totalElements=res.data.totalElements;
         })
       },

+ 9 - 4
src/pages/Square/SquareCard.vue

@@ -8,11 +8,13 @@
     </div>
     <div class="card-detail">
       <el-row>
-        <el-col :span="6">
-          <span class="card-detail-money">¥{{card.quotedPrice ? card.quotedPrice : card.quotePrice}}</span>
+        <el-col :lg="6" :md="24">
+          <span class="card-detail-money" v-if="card.quotedPrice||card.quotedPrice === 0">¥{{card.quotedPrice > 10000 ? Math.floor(card.quotedPrice/10000) + 'w+' : card.quotedPrice}}</span>
+          <span class="card-detail-money" v-else>¥{{card.quotePrice > 10000 ? Math.floor(card.quotePrice/10000)+'w+' : card.quotePrice}}</span>
+<!--          <span class="card-detail-money">¥{{(card.quotedPrice||card.quotedPrice === 0) ? card.quotedPrice : card.quotePrice}}</span>-->
         </el-col>
-        <el-col :span="18">
-          <span class="card-detail-info pull-right">{{card.time_interval}}/{{card.joinCount}}人参与</span>
+        <el-col :lg="18" :md="24">
+          <span class="card-detail-info pull-right">{{card.time_interval}}/{{card.joinCount > 10000 ? Math.floor(card.joinCount/10000)+'w+': card.joinCount}}人参与</span>
         </el-col>
       </el-row>
     </div>
@@ -52,6 +54,9 @@
       color:rgba(0,0,0,1);
       line-height:30px;
       margin: 10px 0;
+      overflow:hidden; //超出的文本隐藏
+      text-overflow:ellipsis; //溢出用省略号显示
+      white-space:nowrap; //溢出不换行
     }
 
     .card-content {

+ 3 - 4
src/pages/Technology/HotActicle.vue

@@ -8,10 +8,10 @@
       </div>
       <div class="popular-list">
         <el-row class="popular-list-item" v-for="(item,index) in articleArr" :key="item.id" v-if="index<7">
-          <el-col :span=24  @click.native="gotoArticle(item)">
+          <el-col :span="24">
             <img :src="item.photoUrl" alt="logo-project" class="pull-left project-logo-img">
             <div style="margin-left: 55px">
-              <div class="list-item-title">
+              <div class="list-item-title" @click="gotoArticle(item)">
                 {{item.name}}
               </div>
               <div class="project-people-reading">
@@ -37,8 +37,7 @@
     },
     methods:{
       gotoArticle(item){
-        console.log('sss')
-        window.open(item.articles);
+        window.open(item.articlesUrl);
       }
     },
     mounted() {

+ 17 - 8
src/pages/Technology/Technology2.0.vue

@@ -13,8 +13,11 @@
           <div class="search-nav">
             <div id="search-block " class="">
               <div class="search-input">
+                <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                  <el-tab-pane v-for="item in searchTypeArr" :label="item.label" :name="item.value" :key="item.value"></el-tab-pane>
+                </el-tabs>
                 <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
-                  <el-button class="search-button" slot="append"  type="primary" @click="loadTechnologyArticles">搜索</el-button>
+                  <el-button class="search-button" slot="append"  type="primary" @click="loadTechnologyArticles(1)">搜索</el-button>
                 </el-input>
               </div>
             </div>
@@ -37,7 +40,7 @@
       <el-row>
         <el-col :span="18" class="project-task">
           <TechnologyCard
-            :techArticleList = techArticleList.content v-if="searchType=='0'" @refreshList="loadTechnologyArticles">
+            :techArticleList = techArticleList.content v-if="searchType=='0'" @refreshList="loadTechnologyArticles(activePage)">
           </TechnologyCard>
           <TechnologyMG :techArticleList = techArticleList.content v-if="searchType=='1'"></TechnologyMG>
           <el-pagination
@@ -85,11 +88,13 @@
         searchTypeArr:[
           {
             "name": "技术文章",
-            "value": "0"
+            "value": "0",
+            "label":'文章'
           },
           {
             "name": "论文专著",
-            "value": "1"
+            "value": "1",
+            "label":'专著'
           }
         ],
         articleArr:[],
@@ -99,21 +104,25 @@
       }
     },
     methods:{
+      handleTypeClick(tab){
+        this.handleTabClick(tab);
+      },
       handleTabClick(tab){
         this.searchType = tab.name
         this.activePage = 1;
         this.searchVal = '';
-        this.loadTechnologyArticles();
+        this.loadTechnologyArticles(1);
       },
       loadHotArticles(){
         Http.get('/api/technical/ranking').then((res)=>{
           this.articleArr = res.data.technicalArticlesPage.content;
         })
       },
-      loadTechnologyArticles(){
+      loadTechnologyArticles(index){
         // let url=`/api/technical/articles?searchCondition={"keyword":"${this.keyword}","activePage":${this.activePage}}`;
         // Http.get(encodeURI(url))
         let url = '/api/technical/articles';
+        this.activePage = index;
         let params = {
           "keyword": this.searchVal,//查询条件,分页展示时就不填
           "activePage": this.activePage,//指定页数
@@ -140,12 +149,12 @@
       },
       handlePageChange(index){
         this.activePage = index;
-        this.loadTechnologyArticles();
+        this.loadTechnologyArticles(index);
       }
     },
     mounted() {
       this.loadHotArticles();
-      this.loadTechnologyArticles();
+      this.loadTechnologyArticles(1);
     }
   }
 </script>

+ 2 - 3
src/pages/Technology/TechnologyCard.vue

@@ -2,13 +2,12 @@
   <div class="technology-card">
     <div class="card-wrapper" v-if="techArticleList&&techArticleList.length">
       <el-card  v-for="item in techArticleList" :key="item.id"  style="margin-bottom: 15px">
-        <el-row @click.native="gotoDetail(item)">
+        <el-row >
           <el-col :span="6">
             <img :src="item.photoUrl" alt="technology-img" class="pull-left technology-img">
           </el-col>
           <el-col :span="18" class="technology-detail">
-
-            <div class="technology-title">
+            <div class="technology-title" @click="gotoDetail(item)">
               {{item.name}}
             </div>
             <div class="technology-info">

+ 1 - 2
src/pages/Technology/TechnologyMG.vue

@@ -7,7 +7,7 @@
               {{item.longTitle}}
             </div>
           <div class="technology-info">
-            发表年份:{{item.publicYear}}
+            发表年份:{{item.publicTime}}
           </div>
           <div class="technology-info">
             会议:{{item.conferenceJournal}}
@@ -33,7 +33,6 @@
     props:['techArticleList'],
     methods:{
       gotoDetail(item){
-        console.log('aaa');
         item.chineseBrief ? window.open(item.chineseBrief) : null
       }
     }

+ 1 - 0
src/router/index.js

@@ -34,6 +34,7 @@ export default new Router({
       meta: {
         title: '',
         requireAuth: false,
+        showSlice: true
       },
     },
     // {