Bläddra i källkod

add:大赛、众测、用户more界面和数据对接

guo00guo 5 år sedan
förälder
incheckning
a1c647ac62

+ 9 - 2
src/pages/Homepage/BrandCard.vue

@@ -2,7 +2,7 @@
   <el-card class="test-card">
     <div slot="header" class="clearfix test-card-header">
       <span>入驻品牌机构</span>
-      <a class="pull-right" style="color: rgba(0, 118, 203, 1)" href="#">more>></a>
+      <a class="pull-right" style="color: rgba(0, 118, 203, 1); cursor: pointer" @click="goToMoreAgency()">more>></a>
     </div>
     <div style="height: 96px">
       <el-row :gutter="15">
@@ -17,7 +17,14 @@
 <script>
   export default {
     name: "BrandCard",
-    props:['residentAgencyList']
+    props:['residentAgencyList'],
+    methods:{
+        goToMoreAgency(){
+            this.$router.push({
+                name: 'AgencyResidentList',
+            });
+        },
+    }
   }
 </script>
 

+ 0 - 50
src/pages/Homepage/HotAgency.vue

@@ -33,60 +33,10 @@
   export default {
     name: 'HotAgency',
     props:['agencyRank'],
-    data() {
-        return {
-            agencyList:[],
-            searchType: '1',
-            searchVal: '',
-            searchTypeArr: [
-                {
-                    "name": "全部",
-                    "value": "all"
-                },
-                {
-                    "name": "项目",
-                    "value": "0"
-                },
-                {
-                    "name": "机构",
-                    "value": "1"
-                },
-                {
-                    "name": "工具",
-                    "value": "2"
-                },
-                {
-                    "name": "专家",
-                    "value": "3"
-                }
-            ],
-            // agencyList: [],
-            activePage: 1,
-            totalElements: 0
-        }
-    },
     methods:{
         goToMoreAgency(){
-            // let url = '/api/common/index/page';
-            // let params = {
-            //     "keyword": this.searchVal,
-            //     "activePage": this.activePage,
-            //     "columnFilters": [
-            //         {
-            //             "field": "type",
-            //             "type": "enums",
-            //             "enums": this.searchTypeArr,
-            //             "value": this.searchType
-            //         }
-            //     ]
-            // }
-            // Http.post(url, params).then((res) => {
-            //     console.log(res.data.agencyPage.content);
-            //     this.agencyList = res.data.agencyPage.content;
-            // })
             this.$router.push({
                 name: 'AgencyList',
-                // params: {searchVal: this.searchVal, agencyList: this.agencyList}
             });
         },
     }

+ 9 - 4
src/pages/Homepage/HotContest.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/crowd-contest.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">众测大赛</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in competitionList" :key="item.id">
@@ -34,9 +34,14 @@
     name: 'HotContest',
     props:['competitionList'],
     methods:{
-      gotoDetail(item){
-        window.open(item.linkUrl)
-      }
+        getMore(){
+            this.$router.push({
+                name: 'CompetitionList',
+            });
+        },
+        gotoDetail(item){
+            window.open(item.linkUrl)
+        }
     }
   }
 </script>

+ 9 - 2
src/pages/Homepage/HotCrowd.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/HotCrowd.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">热门众测</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in applicationTypeRank" :key="item.id">
@@ -31,7 +31,14 @@
 <script>
   export default {
     name: 'HotCrowd',
-    props:['applicationTypeRank']
+    props:['applicationTypeRank'],
+    methods:{
+        getMore(){
+            this.$router.push({
+                name: 'CrowdList',
+            });
+        },
+    }
   }
 </script>
 

+ 9 - 2
src/pages/Homepage/HotUser.vue

@@ -3,7 +3,7 @@
     <div slot="header" class="popular-header">
       <img src="../../assets/img/userRank.png" alt="hot-crowd" class="popular-header-img"/>
       <span class="popular-header-title">众测人员排行榜</span>
-      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text">more>></el-button>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
     </div>
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in userRank" :key="item.id">
@@ -31,7 +31,14 @@
 <script>
   export default {
     name: 'HotCrowd',
-    props:['userRank']
+    props:['userRank'],
+    methods:{
+        getMore(){
+            this.$router.push({
+                name: 'UserList',
+            });
+        },
+    }
   }
 </script>
 

+ 0 - 91
src/pages/HomepageSearch/AgencyCard.vue

@@ -1,91 +0,0 @@
-<template>
-  <div class="item-info">
-      <div class="item-img" ><img :src="card.agencyPhoto" class="item-img-info"/></div>
-      <div class="item-title" >
-        {{card.evaluationAgencyName ? card.evaluationAgencyName :card.introduction}}
-      </div>
-      <div class="item-content">
-        {{card.evaluationAgencyName}}
-      </div>
-      <div class="item-detail">
-        {{card.address}}
-      </div>
-  </div>
-
-</template>
-
-<script>
-  export default {
-    name: 'AgencyCard',
-    props: ['card'],
-    mounted() {
-        // console.log(this.card);
-    }
-  }
-</script>
-
-<style lang="less">
-  /*.item-info .el-card__body{*/
-  /*  padding: 0 !important;*/
-  /*}*/
-
-
-  .item-info {
-    width: 80%;
-    .item-img{
-      margin: 10px;
-      width: 50px;
-      height: 50px;
-      position: relative;
-      float: left;
-    }
-    .item-img-info{
-      width: 50px;
-      height: 50px;
-      position: relative;
-      float: left;
-    }
-    .item-title {
-      margin-top: 10px;
-      font-size:24px;
-      font-family:Source Han Sans CN;
-      font-weight:500;
-      color:rgba(0,0,0,1);
-      line-height:30px;
-      /*margin: 10px 0;*/
-      overflow:hidden; //超出的文本隐藏
-      text-overflow:ellipsis; //溢出用省略号显示
-      white-space:nowrap; //溢出不换行
-    }
-
-    .item-content {
-      font-size:14px;
-      font-family:Source Han Sans CN;
-      font-weight:400;
-      color:rgba(0,0,0,1);
-      height: 70px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      display:-webkit-box; //作为弹性伸缩盒子模型显示。
-      -webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-      -webkit-line-clamp:3; //显示的行
-    }
-    .item-detail{
-      font-size:14px;
-      font-family:Source Han Sans CN;
-      font-weight:400;
-      color:rgba(0,0,0,1);
-      height: 70px;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      display:-webkit-box; //作为弹性伸缩盒子模型显示。
-      -webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-      -webkit-line-clamp:3; //显示的行
-    }
-
-  }
-
-  /*.item-title,.item-content,.item-detail{*/
-  /*  padding: 0 10px !important;*/
-  /*}*/
-</style>

+ 6 - 6
src/pages/HomepageSearch/AgencyList.vue

@@ -38,11 +38,12 @@
           <el-collapse-item v-for="(item,index) in agencyList" :key="item.id" class="item-template">
             <template slot="title">
               <el-row style="width: 100%;font-size: 16px">
-                <el-col :span="8"><img :src="item.agencyPhoto" style="width: 50px; height: 50px;"></el-col>
+                <el-col :span="2"><img :src="item.agencyPhoto" style="width: 50px; height: 50px;"></el-col>
                 <el-col :span="8">{{item.evaluationAgencyName}}</el-col>
-                <el-col :span="8">
-                  <el-tag type="success">{{item.address}}</el-tag>
+                <el-col :span="6">
+                  <el-tag type="success">{{item.city}}省市无</el-tag>
                 </el-col>
+                <el-col :span="4">{{item.count}}接包数量无</el-col>
               </el-row>
             </template>
           </el-collapse-item>
@@ -65,14 +66,13 @@
 <script>
     import Http from '@/js/http.js';
     import TopSearch from "../../components/commons/TopSearch";
-    import AgencyCard from "./AgencyCard";
     import {storageGet} from '@/js/index.js'
     import {notify} from "../../constants";
 
     export default {
-        name: "agencyList",
+        name: "AgencyList",
         props: ['searchVal', 'agencyList'],
-        components: {AgencyCard, TopSearch},
+        components: {TopSearch},
         data() {
             return {
                 isLogin: false,

+ 176 - 0
src/pages/HomepageSearch/AgencyResidentList.vue

@@ -0,0 +1,176 @@
+<template>
+  <div class="home-wrapper">
+    <!--    <TopSearch :searchVal="searchVal" :searchType="searchType" :searchTypeArr="searchTypeArr"/>-->
+    <div class="nav" stype="height:500px">
+      <!--搜索框-->
+      <el-row class="search-nav" style="padding: 30px 0 20px 0">
+        <el-col :span="6">
+          <div class="pull-left" @click="gotoHome" style="cursor: pointer">
+            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
+            <span class="logo-title">群智众测平台</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="search-nav">
+            <div id="search-block ">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                <el-tab-pane v-for="item in searchTypeArr" v-if="item.value!=='all'" :label="item.name"
+                             :name="item.value"
+                             :key="item.value"></el-tab-pane>
+              </el-tabs>
+              <div class="search-input">
+                <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
+                  <el-button class="search-button" slot="append" type="primary" @click="handleSearchData">搜索</el-button>
+                </el-input>
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="6">
+          <el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="container" style="margin: 20px auto;">
+      <div class="create-body" v-if="!isModifyMode">
+        <div class="title h2">入驻品牌机构</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <el-collapse-item v-for="(item,index) in agencyList" :key="item.id" class="item-template">
+            <template slot="title">
+              <el-row style="width: 100%;font-size: 16px">
+                <el-col :span="8"><img :src="item.agencyPhoto" style="width: 50px; height: 50px;"></el-col>
+                <el-col :span="8">{{item.evaluationAgencyName}}</el-col>
+                <el-col :span="8">
+                  <el-tag type="success">{{item.city}}省市无</el-tag>
+                </el-col>
+              </el-row>
+            </template>
+          </el-collapse-item>
+          <el-pagination
+            v-if="agencyList&&agencyList.length"
+            :page-size="9"
+            layout="prev, pager, next"
+            :total="totalElements"
+            :current-page="activePage"
+            @current-change="handlePageChange"
+            class="pull-right"
+          >
+          </el-pagination>
+        </el-collapse>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+    import Http from '@/js/http.js';
+    import TopSearch from "../../components/commons/TopSearch";
+    import {storageGet} from '@/js/index.js'
+    import {notify} from "../../constants";
+
+    export default {
+        name: "AgencyResidentList",
+        props: ['searchVal', 'agencyList'],
+        components: {TopSearch},
+        data() {
+            return {
+                isLogin: false,
+                // searchVal: '',
+                searchType: '1',
+                searchTypeArr: [
+                    {
+                        "name": "全部",
+                        "value": "all"
+                    },
+                    {
+                        "name": "项目",
+                        "value": "0"
+                    },
+                    {
+                        "name": "机构",
+                        "value": "1"
+                    },
+                    {
+                        "name": "工具",
+                        "value": "2"
+                    },
+                    {
+                        "name": "专家",
+                        "value": "3"
+                    }],
+                // agencyList: [],
+                activePage: 1,
+                totalElements: 0
+            }
+        },
+        methods: {
+            loadData() {
+                if (storageGet('user') != null) {
+                    this.isLogin = true;
+                }
+                let url = '/api/common/index/page';
+                let params = {
+                    "keyword": this.searchVal,
+                    "activePage": this.activePage,
+                    "columnFilters": [
+                        {
+                            "field": "type",
+                            "type": "enums",
+                            "enums": this.searchTypeArr,
+                            "value": this.searchType
+                        }
+                    ]
+                }
+                Http.post(url, params).then((res) => {
+                    this.agencyList = res.data.agencyPage.content;
+                })
+            },
+            checkLogin() {
+                if (!this.isLogin) {
+                    console.log("请登录后访问");
+                    notify('warning', '请登录后访问');
+                } else {
+                    console.log("已登录");
+                    this.$router.push('/project/create');
+                }
+            },
+            handleSearchData() {
+                let url = '/api/common/index/page';
+                let params = {
+                    "keyword": this.searchVal,
+                    "activePage": 1,
+                    "columnFilters": [
+                        {
+                            "field": "type",
+                            "type": "enums",
+                            "enums": this.searchTypeArr,
+                            "value": this.searchType
+                        }
+                    ]
+                }
+                Http.post(url, params).then((res) => {
+                    this.agencyList = res.data.agencyPage.content;
+                })
+            },
+            gotoHome() {
+                this.$router.push('/home');
+            },
+            handleTypeClick(tab) {
+                this.searchType = tab.name
+            },
+            handlePageChange(index) {
+                this.activePage = index;
+                this.searchData();
+            }
+        },
+        mounted() {
+            this.loadData();
+        }
+    }
+</script>
+
+<style scoped>
+  .item-template {
+    height: 80px;
+  }
+</style>

+ 160 - 0
src/pages/HomepageSearch/CompetitionList.vue

@@ -0,0 +1,160 @@
+<template>
+  <div class="home-wrapper">
+    <!--    <TopSearch :searchVal="searchVal" :searchType="searchType" :searchTypeArr="searchTypeArr"/>-->
+    <div class="nav" stype="height:500px">
+      <!--搜索框-->
+      <el-row class="search-nav" style="padding: 30px 0 20px 0">
+        <el-col :span="6">
+          <div class="pull-left" @click="gotoHome" style="cursor: pointer">
+            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
+            <span class="logo-title">群智众测平台</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="search-nav">
+            <div id="search-block ">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                <el-tab-pane v-for="item in searchTypeArr" v-if="item.value!=='all'" :label="item.name"
+                             :name="item.value"
+                             :key="item.value"></el-tab-pane>
+              </el-tabs>
+              <div class="search-input">
+                <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
+                  <el-button class="search-button" slot="append" type="primary" @click="handleSearchData">搜索</el-button>
+                </el-input>
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="6">
+          <el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="container" style="margin: 20px auto;">
+      <div class="create-body" v-if="!isModifyMode">
+        <div class="title h2">众测大赛</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <el-collapse-item v-for="(item,index) in competitionList" :key="item.id" class="item-template">
+            <template slot="title">
+              <el-row style="width: 100%;font-size: 16px">
+                <el-col :span="2"><img :src="item.image" style="width: 50px; height: 50px;"></el-col>
+                <el-col :span="12"><a target="_blank" :href="item.linkUrl" itemscope>{{item.name}}</a></el-col>
+                <el-col :span="4">单位无</el-col>
+                <el-col :span="6">{{$moment(item.startTime).format("YYYY-MM-DD HH:mm:ss")}}</el-col>
+              </el-row>
+            </template>
+          </el-collapse-item>
+          <el-pagination
+            v-if="competitionList&&competitionList.length"
+            :page-size="9"
+            layout="prev, pager, next"
+            :total="totalElements"
+            :current-page="activePage"
+            @current-change="handlePageChange"
+            class="pull-right"
+          >
+          </el-pagination>
+        </el-collapse>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+    import Http from '@/js/http.js';
+    import TopSearch from "../../components/commons/TopSearch";
+    import {storageGet} from '@/js/index.js'
+    import {notify} from "../../constants";
+
+    export default {
+        name: "CompetitionList",
+        props: ['searchVal', 'competitionList'],
+        components: {TopSearch},
+        data() {
+            return {
+                isLogin: false,
+                // searchVal: '',
+                searchType: '0',
+                searchTypeArr: [
+                    {
+                        "name": "大赛",
+                        "value": "0"
+                    }],
+                // competitionList: [],
+                activePage: 1,
+                totalElements: 0
+            }
+        },
+        methods: {
+            loadData() {
+                if (storageGet('user') != null) {
+                    this.isLogin = true;
+                }
+                let url = '/api/common/index/competition';
+                let params = {
+                    "keyword": this.searchVal,
+                    "activePage": this.activePage,
+                    "columnFilters": [
+                        {
+                            "field": "type",
+                            "type": "enums",
+                            "enums": this.searchTypeArr,
+                            "value": this.searchType
+                        }
+                    ]
+                }
+                Http.post(url, params).then((res) => {
+                    console.log(res.data)
+                    this.competitionList = res.data.content;
+                })
+            },
+            checkLogin() {
+                if (!this.isLogin) {
+                    console.log("请登录后访问");
+                    notify('warning', '请登录后访问');
+                } else {
+                    console.log("已登录");
+                    this.$router.push('/project/create');
+                }
+            },
+            handleSearchData() {
+                let url = '/api/common/index/competition';
+                let params = {
+                    "keyword": this.searchVal,
+                    "activePage": 1,
+                    "columnFilters": [
+                        {
+                            "field": "type",
+                            "type": "enums",
+                            "enums": this.searchTypeArr,
+                            "value": this.searchType
+                        }
+                    ]
+                }
+                Http.post(url, params).then((res) => {
+                    this.competitionList = res.data.content;
+                })
+            },
+            gotoHome() {
+                this.$router.push('/home');
+            },
+            handleTypeClick(tab) {
+                this.searchType = tab.name
+            },
+            handlePageChange(index) {
+                this.activePage = index;
+                this.searchData();
+            }
+        },
+        mounted() {
+            this.loadData();
+        }
+    }
+</script>
+
+<style scoped>
+  .item-template {
+    height: 80px;
+  }
+</style>

+ 159 - 0
src/pages/HomepageSearch/CrowdList.vue

@@ -0,0 +1,159 @@
+<template>
+  <div class="home-wrapper">
+    <!--    <TopSearch :searchVal="searchVal" :searchType="searchType" :searchTypeArr="searchTypeArr"/>-->
+    <div class="nav" stype="height:500px">
+      <!--搜索框-->
+      <el-row class="search-nav" style="padding: 30px 0 20px 0">
+        <el-col :span="6">
+          <div class="pull-left" @click="gotoHome" style="cursor: pointer">
+            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
+            <span class="logo-title">群智众测平台</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="search-nav">
+            <div id="search-block ">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                <el-tab-pane v-for="item in searchTypeArr" v-if="item.value!=='all'" :label="item.name"
+                             :name="item.value"
+                             :key="item.value"></el-tab-pane>
+              </el-tabs>
+              <div class="search-input">
+                <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
+                  <el-button class="search-button" slot="append" type="primary" @click="handleSearchData">搜索</el-button>
+                </el-input>
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="6">
+          <el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="container" style="margin: 20px auto;">
+      <div class="create-body" v-if="!isModifyMode">
+        <div class="title h2">众测大赛</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <el-collapse-item v-for="(item,index) in crowdList" :key="item.id" class="item-template">
+            <template slot="title">
+              <el-row style="width: 100%;font-size: 16px">
+                <el-col :span="2"><img :src="item.image" style="width: 50px; height: 50px;"></el-col>
+                <el-col :span="12">{{item.name}}</el-col>
+                <el-col :span="4">{{item.count}}</el-col>
+              </el-row>
+            </template>
+          </el-collapse-item>
+          <el-pagination
+            v-if="crowdList&&crowdList.length"
+            :page-size="9"
+            layout="prev, pager, next"
+            :total="totalElements"
+            :current-page="activePage"
+            @current-change="handlePageChange"
+            class="pull-right"
+          >
+          </el-pagination>
+        </el-collapse>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+    import Http from '@/js/http.js';
+    import TopSearch from "../../components/commons/TopSearch";
+    import {storageGet} from '@/js/index.js'
+    import {notify} from "../../constants";
+
+    export default {
+        name: "CrowdList",
+        props: ['searchVal', 'crowdList'],
+        components: {TopSearch},
+        data() {
+            return {
+                isLogin: false,
+                // searchVal: '',
+                searchType: '0',
+                searchTypeArr: [
+                    {
+                        "name": "众测",
+                        "value": "0"
+                    }],
+                // crowdList: [],
+                activePage: 1,
+                totalElements: 0
+            }
+        },
+        methods: {
+            loadData() {
+                if (storageGet('user') != null) {
+                    this.isLogin = true;
+                }
+                let url = '/api/common/index/application';
+                let params = {
+                    "keyword": this.searchVal,
+                    "activePage": this.activePage,
+                    "columnFilters": [
+                        {
+                            "field": "type",
+                            "type": "enums",
+                            "enums": this.searchTypeArr,
+                            "value": this.searchType
+                        }
+                    ]
+                }
+                Http.post(url, params).then((res) => {
+                    console.log(res.data)
+                    this.crowdList = res.data.content;
+                })
+            },
+            checkLogin() {
+                if (!this.isLogin) {
+                    console.log("请登录后访问");
+                    notify('warning', '请登录后访问');
+                } else {
+                    console.log("已登录");
+                    this.$router.push('/project/create');
+                }
+            },
+            handleSearchData() {
+                let url = '/api/common/index/application';
+                let params = {
+                    "keyword": this.searchVal,
+                    "activePage": 1,
+                    "columnFilters": [
+                        {
+                            "field": "type",
+                            "type": "enums",
+                            "enums": this.searchTypeArr,
+                            "value": this.searchType
+                        }
+                    ]
+                }
+                Http.post(url, params).then((res) => {
+                    this.crowdList = res.data.content;
+                })
+            },
+            gotoHome() {
+                this.$router.push('/home');
+            },
+            handleTypeClick(tab) {
+                this.searchType = tab.name
+            },
+            handlePageChange(index) {
+                this.activePage = index;
+                this.searchData();
+            }
+        },
+        mounted() {
+            this.loadData();
+        }
+    }
+</script>
+
+<style scoped>
+  .item-template {
+    height: 80px;
+  }
+</style>

+ 1 - 1
src/pages/HomepageSearch/ExpertCard.vue

@@ -18,7 +18,7 @@
 
 <script>
   export default {
-    name: 'ExpertCard',
+    name: 'AgencyLine',
     props: ['card'],
     mounted() {
 

+ 161 - 0
src/pages/HomepageSearch/UserList.vue

@@ -0,0 +1,161 @@
+<template>
+  <div class="home-wrapper">
+    <!--    <TopSearch :searchVal="searchVal" :searchType="searchType" :searchTypeArr="searchTypeArr"/>-->
+    <div class="nav" stype="height:500px">
+      <!--搜索框-->
+      <el-row class="search-nav" style="padding: 30px 0 20px 0">
+        <el-col :span="6">
+          <div class="pull-left" @click="gotoHome" style="cursor: pointer">
+            <img class="logo-img" src="../../assets/img/logo-blue.png"/>
+            <span class="logo-title">群智众测平台</span>
+          </div>
+        </el-col>
+        <el-col :span="12">
+          <div class="search-nav">
+            <div id="search-block ">
+              <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick">
+                <el-tab-pane v-for="item in searchTypeArr" v-if="item.value!=='all'" :label="item.name"
+                             :name="item.value"
+                             :key="item.value"></el-tab-pane>
+              </el-tabs>
+              <div class="search-input">
+                <el-input placeholder="请输入内容" v-model="searchVal" class="input-with-select">
+                  <el-button class="search-button" slot="append" type="primary" @click="handleSearchData">搜索</el-button>
+                </el-input>
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="6">
+          <el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="container" style="margin: 20px auto;">
+      <div class="create-body" v-if="!isModifyMode">
+        <div class="title h2">众测人员</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <el-collapse-item v-for="(item,index) in userList" :key="item.id" class="item-template">
+            <template slot="title">
+              <el-row style="width: 100%;font-size: 16px">
+                <el-col :span="2"><img :src="item.photoUrl" style="width: 50px; height: 50px;"></el-col>
+                <el-col :span="8">{{item.name}}</el-col>
+                <el-col :span="5">{{item.gender}}性别无</el-col>
+                <el-col :span="5">{{item.county}}省市无</el-col>
+                <el-col :span="4">{{item.taskCount}}</el-col>
+              </el-row>
+            </template>
+          </el-collapse-item>
+          <el-pagination
+            v-if="userList&&userList.length"
+            :page-size="9"
+            layout="prev, pager, next"
+            :total="totalElements"
+            :current-page="activePage"
+            @current-change="handlePageChange"
+            class="pull-right"
+          >
+          </el-pagination>
+        </el-collapse>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+    import Http from '@/js/http.js';
+    import TopSearch from "../../components/commons/TopSearch";
+    import {storageGet} from '@/js/index.js'
+    import {notify} from "../../constants";
+
+    export default {
+        name: "UserList",
+        props: ['searchVal', 'userList'],
+        components: {TopSearch},
+        data() {
+            return {
+                isLogin: false,
+                // searchVal: '',
+                searchType: '0',
+                searchTypeArr: [
+                    {
+                        "name": "众测人员",
+                        "value": "0"
+                    }],
+                // userList: [],
+                activePage: 1,
+                totalElements: 0
+            }
+        },
+        methods: {
+            loadData() {
+                if (storageGet('user') != null) {
+                    this.isLogin = true;
+                }
+                let url = '/api/common/index/user/more';
+                let params = {
+                    "keyword": this.searchVal,
+                    "activePage": this.activePage,
+                    "columnFilters": [
+                        {
+                            "field": "type",
+                            "type": "enums",
+                            "enums": this.searchTypeArr,
+                            "value": this.searchType
+                        }
+                    ]
+                }
+                Http.post(url, params).then((res) => {
+                    console.log(res.data)
+                    this.userList = res.data.content;
+                })
+            },
+            checkLogin() {
+                if (!this.isLogin) {
+                    console.log("请登录后访问");
+                    notify('warning', '请登录后访问');
+                } else {
+                    console.log("已登录");
+                    this.$router.push('/project/create');
+                }
+            },
+            handleSearchData() {
+                let url = '/api/common/index/user/more';
+                let params = {
+                    "keyword": this.searchVal,
+                    "activePage": 1,
+                    "columnFilters": [
+                        {
+                            "field": "type",
+                            "type": "enums",
+                            "enums": this.searchTypeArr,
+                            "value": this.searchType
+                        }
+                    ]
+                }
+                Http.post(url, params).then((res) => {
+                    this.userList = res.data.content;
+                })
+            },
+            gotoHome() {
+                this.$router.push('/home');
+            },
+            handleTypeClick(tab) {
+                this.searchType = tab.name
+            },
+            handlePageChange(index) {
+                this.activePage = index;
+                this.searchData();
+            }
+        },
+        mounted() {
+            this.loadData();
+        }
+    }
+</script>
+
+<style scoped>
+  .item-template {
+    height: 80px;
+  }
+</style>

+ 37 - 0
src/router/index.js

@@ -280,6 +280,43 @@ export default new Router({
         requireAuth: false,
       }
     },
+    {
+      path: '/agency/resident/list',
+      name: 'AgencyResidentList',
+      component: resolve => require(['@/pages/HomepageSearch/AgencyResidentList.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      }
+    },
+    {
+      path: '/competition/list',
+      name: 'CompetitionList',
+      component: resolve => require(['@/pages/HomepageSearch/CompetitionList.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      }
+    },
+    {
+      path: '/crowd/list',
+      name: 'CrowdList',
+      component: resolve => require(['@/pages/HomepageSearch/CrowdList.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      }
+    },
+    {
+      path: '/user/list',
+      name: 'UserList',
+      component: resolve => require(['@/pages/HomepageSearch/UserList.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      }
+    },
+
   ]
 })
 const originalPush = Router.prototype.push