Browse Source

修改样式

guo00guo 4 years ago
parent
commit
722f4501dd

+ 1 - 1
src/pages/Homepage/BrandCard.vue

@@ -7,7 +7,7 @@
     <div style="height: 96px">
       <el-row :gutter="15">
         <el-col v-for="item in residentAgencyList" :key="item.id" :span="6" style="height: 50px">
-          <img :src="item.logo" :alt="item.name" style="width: 100%;height: 100%"/>
+          <img :src="item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 100%;height: 100%"/>
         </el-col>
       </el-row>
     </div>

+ 19 - 30
src/pages/Homepage/Homepage.vue

@@ -25,13 +25,12 @@
         </el-col>
         <el-col :span="6">
             <el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
-            <el-button type="primary pull-right" class="releaseBtn" @click="expertList()">专家列表</el-button>
         </el-col>
       </el-row>
       <!--TabNav-->
       <el-tabs v-model="currTab" @tab-click="handleTabClick" class="square-tab">
         <el-tab-pane v-for="item in homeTabArr.menuArr1" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
-        <el-tab-pane v-for="item in homeTabArr.menuArr2" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
+        <el-tab-pane v-for="item in homeTabArr.menuArr2" :label="item.name" :name="item.code" :key="item.code"></el-tab-pane>
         <el-tab-pane v-for="item in homeTabArr.menuArr3" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
       </el-tabs>
       <div>
@@ -83,7 +82,7 @@
   import {mapActions,mapGetters} from 'vuex'
   import Waterfall from 'vue-waterfall/lib/waterfall'
   import WaterfallSlot from 'vue-waterfall/lib/waterfall-slot'
-  import {storageGet} from '@/js/index.js'
+  import {storageGet, getAllFields} from '@/js/index.js'
   import {notify} from "../../constants";
   // console.log(commonData);
   export default {
@@ -138,12 +137,7 @@
             {label: "众测技术", name: "technology",linkTo:'technology'}
           ],
           menuArr2:[
-            {label: "科技服务", name: "monograph"},
-            {label: "服务互联网", name: "Internet"},
-            {label: "集成电路", name: "integratedCircuit"},
-            {label: "智能传感器", name: "Sensor"},
-            {label: "高端装备", name: "Assembly"},
-            {label: "更多", name: "more"}
+            {code: '', name: ''}
           ],
           menuArr3:[
             {label: "找机构", name: "findInstitution"},
@@ -160,6 +154,7 @@
         if (storageGet('user') != null) {
             this.isLogin = true;
         }
+        this.setFields();
         Http.get('/api/common/index/info').then((res)=>{
           this.homeData = res.data;
           this.homeData.applicationTypeList.map((item)=>{
@@ -168,6 +163,13 @@
           })
         })
       },
+      setFields(){
+          getAllFields().then((res) => {
+              this.homeTabArr.menuArr2 = res
+              console.log(this.homeTabArr.menuArr2)
+          })
+
+      },
       checkLogin(){
         if(!this.isLogin){
             console.log("请登录后访问");
@@ -177,9 +179,6 @@
             this.$router.push('/project/create');
         }
       },
-      expertList(){
-          this.$router.push('/expert/list');
-      },
       handleTabClick(tab){
         this.currTab = tab.name;
         this.$router.push(this.homeTabArr.menuArr1[Number(tab.index)].linkTo);
@@ -188,25 +187,15 @@
         this.searchType = tab.name
       },
       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
-            }
-          ]
+        if(this.searchType == 0){
+            // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
+        }else if(this.searchType == 1){
+            this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
+        }else if(this.searchType == 2){
+            this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
+        }else if(this.searchType == 3){
+            this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
         }
-        Http.post(url,params).then((res)=>{
-          if(this.searchType == 1){
-              this.$router.push({name: 'AgencyList'});
-          }
-        })
-
       }
     },
 

+ 2 - 2
src/pages/Homepage/HotAgency.vue

@@ -8,10 +8,10 @@
     <div class="popular-list">
       <el-row class="popular-list-item" v-for="item in agencyRank" :key="item.id">
         <el-col :span="19">
-          <img :src="item.logo" alt="logo-project" class="pull-left project-logo-img">
+          <img :src="item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img">
           <div style="margin-left: 55px">
             <div class="list-item-title">
-              {{item.name}}
+              {{item.evaluationAgencyName}}
             </div>
             <div class="list-item-info">
 

+ 65 - 35
src/pages/HomepageSearch/AgencyList.vue

@@ -35,18 +35,35 @@
       <div class="create-body">
         <div class="title h2">测评机构</div>
         <el-collapse accordion style="margin: 0 30px">
-          <el-collapse-item v-for="(item,index) in curAgencyList" :key="item.id" class="item-template">
-            <template slot="title">
-              <el-row style="width: 100%;font-size: 16px">
-                <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="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>
+          <template style="color: black">
+            <el-table
+              ref="multipleTable"
+              :data="curAgencyList"
+              tooltip-effect="dark"
+              style="width: 100%; font-size: 20px; color: black">
+              <el-table-column
+                label="头像"
+                width="200">
+                <template slot-scope="scope"><img :src="scope.row.agencyPhoto" style="width: 50px; height: 50px;"/></template>
+              </el-table-column>
+              <el-table-column
+                prop="evaluationAgencyName"
+                label="名称"
+                align="left"
+                width="400">
+              </el-table-column>
+              <el-table-column
+                prop="address"
+                align="left"
+                label="省市">
+              </el-table-column>
+              <el-table-column
+                prop="taskCount"
+                align="center"
+                label="接包数量">
+              </el-table-column>
+            </el-table>
+          </template>
           <el-pagination
             v-if="curAgencyList&&curAgencyList.length"
             :page-size="9"
@@ -71,12 +88,11 @@
 
     export default {
         name: "AgencyList",
-        props: ['searchVal', 'agencyList'],
         components: {TopSearch},
         data() {
             return {
                 isLogin: false,
-                // searchVal: '',
+                searchVal: '',
                 searchType: '1',
                 searchTypeArr: [
                     {
@@ -99,7 +115,7 @@
                         "name": "专家",
                         "value": "3"
                     }],
-                curAgencyList: this.agencyList,
+                curAgencyList: [],
                 activePage: 1,
                 totalElements: 0
             }
@@ -109,22 +125,8 @@
                 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.curAgencyList = res.data.agencyPage.content;
-                })
+                this.searchVal = this.$route.params.searchVal;
+                this.handleSearchData();
             },
             checkLogin() {
                 if (!this.isLogin) {
@@ -136,10 +138,37 @@
                 }
             },
             handleSearchData() {
-                let url = '/api/common/index/page';
+                if(this.searchType == 0){
+                    // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
+                }else if(this.searchType == 1){
+                    let url = '/api/agency/list/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) => {
+                        this.curAgencyList = res.data.content;
+                        this.totalElements=res.data.totalElements;
+                    })
+                }else if(this.searchType == 2){
+                    this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
+                }else if(this.searchType == 3){
+                    this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
+                }
+            },
+            nextPage(){
+                let url = '/api/agency/list/more';
                 let params = {
                     "keyword": this.searchVal,
-                    "activePage": 1,
+                    "activePage": this.activePage,
                     "columnFilters": [
                         {
                             "field": "type",
@@ -150,7 +179,8 @@
                     ]
                 }
                 Http.post(url, params).then((res) => {
-                    this.curAgencyList = res.data.agencyPage.content;
+                    this.curAgencyList = res.data.content;
+                    this.totalElements=res.data.totalElements;
                 })
             },
             gotoHome() {
@@ -161,7 +191,7 @@
             },
             handlePageChange(index) {
                 this.activePage = index;
-                this.searchData();
+                this.nextPage();
             }
         },
         mounted() {

+ 34 - 36
src/pages/HomepageSearch/AgencyResidentList.vue

@@ -35,17 +35,30 @@
       <div class="create-body">
         <div class="title h2">入驻品牌机构</div>
         <el-collapse accordion style="margin: 0 30px">
-          <el-collapse-item v-for="(item,index) in curAgencyList" :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>
+          <template style="color: black">
+            <el-table
+              ref="multipleTable"
+              :data="curAgencyList"
+              tooltip-effect="dark"
+              style="width: 100%; font-size: 20px; color: black">
+              <el-table-column
+                label="头像"
+                width="200">
+                <template slot-scope="scope"><img :src="scope.row.agencyPhoto" style="width: 50px; height: 50px;"/></template>
+              </el-table-column>
+              <el-table-column
+                prop="name"
+                label="名称"
+                align="left"
+                width="400">
+              </el-table-column>
+              <el-table-column
+                prop="address"
+                align="left"
+                label="省市">
+              </el-table-column>
+            </el-table>
+          </template>
           <el-pagination
             v-if="curAgencyList&&curAgencyList.length"
             :page-size="9"
@@ -75,28 +88,11 @@
         data() {
             return {
                 isLogin: false,
-                // searchVal: '',
-                searchType: '1',
+                searchType: '0',
                 searchTypeArr: [
                     {
-                        "name": "全部",
-                        "value": "all"
-                    },
-                    {
-                        "name": "项目",
+                        "name": "入驻机构",
                         "value": "0"
-                    },
-                    {
-                        "name": "机构",
-                        "value": "1"
-                    },
-                    {
-                        "name": "工具",
-                        "value": "2"
-                    },
-                    {
-                        "name": "专家",
-                        "value": "3"
                     }],
                 curAgencyList: this.agencyList,
                 activePage: 1,
@@ -108,7 +104,7 @@
                 if (storageGet('user') != null) {
                     this.isLogin = true;
                 }
-                let url = '/api/common/index/page';
+                let url = '/api/resident/agency/more';
                 let params = {
                     "keyword": this.searchVal,
                     "activePage": this.activePage,
@@ -122,7 +118,8 @@
                     ]
                 }
                 Http.post(url, params).then((res) => {
-                    this.curAgencyList = res.data.agencyPage.content;
+                    this.curAgencyList = res.data.content;
+                    this.totalElements=res.data.totalElements;
                 })
             },
             checkLogin() {
@@ -135,10 +132,10 @@
                 }
             },
             handleSearchData() {
-                let url = '/api/common/index/page';
+                let url = '/api/resident/agency/more';
                 let params = {
                     "keyword": this.searchVal,
-                    "activePage": 1,
+                    "activePage": this.activePage,
                     "columnFilters": [
                         {
                             "field": "type",
@@ -149,7 +146,8 @@
                     ]
                 }
                 Http.post(url, params).then((res) => {
-                    this.curAgencyList = res.data.agencyPage.content;
+                    this.curAgencyList = res.data.content;
+                    this.totalElements=res.data.totalElements;
                 })
             },
             gotoHome() {
@@ -160,7 +158,7 @@
             },
             handlePageChange(index) {
                 this.activePage = index;
-                this.searchData();
+                this.handleSearchData();
             }
         },
         mounted() {

+ 32 - 13
src/pages/HomepageSearch/CompetitionList.vue

@@ -35,16 +35,35 @@
       <div class="create-body">
         <div class="title h2">众测大赛</div>
         <el-collapse accordion style="margin: 0 30px">
-          <el-collapse-item v-for="(item,index) in curCompetitionList" :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>
+          <template style="color: black">
+            <el-table
+              ref="multipleTable"
+              :data="curCompetitionList"
+              tooltip-effect="dark"
+              style="width: 100%; font-size: 20px; color: black">
+              <el-table-column
+                label="图标"
+                width="100">
+                <template slot-scope="scope"><img :src="scope.row.image" style="width: 50px; height: 50px;"/></template>
+              </el-table-column>
+              <el-table-column
+                label="名称"
+                align="left"
+                width="500">
+                <template slot-scope="scope"><a target="_blank" :href="scope.row.linkUrl" itemscope>{{scope.row.name}}</a></template>
+              </el-table-column>
+              <el-table-column
+                prop="unit"
+                align="left"
+                label="单位">
+              </el-table-column>
+              <el-table-column
+                align="left"
+                label="时间">
+                <template slot-scope="scope">{{$moment(scope.row.startTime).format("YYYY-MM-DD HH:mm:ss")}}</template>
+              </el-table-column>
+            </el-table>
+          </template>
           <el-pagination
             v-if="curCompetitionList&&curCompetitionList.length"
             :page-size="9"
@@ -105,8 +124,8 @@
                     ]
                 }
                 Http.post(url, params).then((res) => {
-                    console.log(res.data)
                     this.curCompetitionList = res.data.content;
+                    this.totalElements=res.data.totalElements;
                 })
             },
             checkLogin() {
@@ -122,7 +141,7 @@
                 let url = '/api/common/index/competition';
                 let params = {
                     "keyword": this.searchVal,
-                    "activePage": 1,
+                    "activePage": this.activePage,
                     "columnFilters": [
                         {
                             "field": "type",
@@ -144,7 +163,7 @@
             },
             handlePageChange(index) {
                 this.activePage = index;
-                this.searchData();
+                this.handleSearchData();
             }
         },
         mounted() {

+ 29 - 16
src/pages/HomepageSearch/CrowdList.vue

@@ -33,17 +33,31 @@
     </div>
     <div class="container" style="margin: 20px auto;">
       <div class="create-body">
-        <div class="title h2">众测</div>
-        <el-collapse accordion style="margin: 0 30px">
-          <el-collapse-item v-for="(item,index) in curCrowdList" :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>
+        <div class="title h2">众测应用类型</div>
+        <template style="color: black">
+          <el-table
+            ref="multipleTable"
+            :data="curCrowdList"
+            tooltip-effect="dark"
+            style="width: 100%; font-size: 20px; color: black">
+            <el-table-column
+              label="图标"
+              width="400">
+              <template slot-scope="scope"><img :src="scope.row.image" style="width: 50px; height: 50px;"/></template>
+            </el-table-column>
+            <el-table-column
+              prop="name"
+              label="名称"
+              align="left"
+              width="300">
+            </el-table-column>
+            <el-table-column
+              prop="count"
+              align="center"
+              label="项目数量">
+            </el-table-column>
+          </el-table>
+        </template>
           <el-pagination
             v-if="curCrowdList&&curCrowdList.length"
             :page-size="9"
@@ -54,7 +68,6 @@
             class="pull-right"
           >
           </el-pagination>
-        </el-collapse>
       </div>
     </div>
   </div>
@@ -82,7 +95,7 @@
                     }],
                 curCrowdList: this.crowdList,
                 activePage: 1,
-                totalElements: 0
+                totalElements: 0,
             }
         },
         methods: {
@@ -104,8 +117,8 @@
                     ]
                 }
                 Http.post(url, params).then((res) => {
-                    console.log(res.data)
                     this.curCrowdList = res.data.content;
+                    this.totalElements=res.data.totalElements;
                 })
             },
             checkLogin() {
@@ -121,7 +134,7 @@
                 let url = '/api/common/index/application';
                 let params = {
                     "keyword": this.searchVal,
-                    "activePage": 1,
+                    "activePage": this.activePage,
                     "columnFilters": [
                         {
                             "field": "type",
@@ -143,7 +156,7 @@
             },
             handlePageChange(index) {
                 this.activePage = index;
-                this.searchData();
+                this.handleSearchData();
             }
         },
         mounted() {

+ 32 - 23
src/pages/HomepageSearch/ExpertList.vue

@@ -52,10 +52,6 @@
           >
           </el-pagination>
         </el-col>
-        <!--      <el-col :span="6"  class="popular-modules" style="padding-left: 15px">-->
-        <!--        <PopularProject :hotCrowdTestProjectVOs="hotCrowdTestProjectVOs" style="margin-bottom: 15px"/>-->
-        <!--        <PopularTask :hotCrowdTaskVOs="hotCrowdTaskVOs"/>-->
-        <!--      </el-col>-->
       </el-row>
     </div>
   </div>
@@ -70,12 +66,11 @@
 
     export default {
         name: "ExpertList",
-        props: ['searchVal'],
         components: {ExpertCard, TopSearch},
         data() {
             return {
                 isLogin: false,
-                // searchVal: '',
+                searchVal: '',
                 searchType: '3',
                 searchTypeArr: [
                     {
@@ -108,22 +103,8 @@
                 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.expertList = res.data.expertPage.content;
-                })
+                this.searchVal = this.$route.params.searchVal;
+                this.handleSearchData();
             },
             checkLogin() {
                 if (!this.isLogin) {
@@ -135,6 +116,33 @@
                 }
             },
             handleSearchData() {
+                if(this.searchType == 0){
+                    // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
+                }else if(this.searchType == 1){
+                    this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
+                }else if(this.searchType == 2){
+                    this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
+                }else if(this.searchType == 3){
+                    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.expertList = res.data.expertPage.content;
+                        this.totalElements = res.data.expertPage.totalElements;
+                    })
+                }
+            },
+            nextPage(){
                 let url = '/api/common/index/page';
                 let params = {
                     "keyword": this.searchVal,
@@ -150,6 +158,7 @@
                 }
                 Http.post(url, params).then((res) => {
                     this.expertList = res.data.expertPage.content;
+                    this.totalElements = res.data.expertPage.totalElements;
                 })
             },
             gotoHome() {
@@ -160,7 +169,7 @@
             },
             handlePageChange(index) {
                 this.activePage = index;
-                this.searchData();
+                this.nextPage();
             }
         },
         mounted() {

+ 70 - 37
src/pages/HomepageSearch/ResourceList.vue

@@ -34,21 +34,44 @@
     <div class="container" style="margin: 20px auto;">
       <div class="create-body">
         <div class="title h2">众测资源</div>
+        <template style="color: black">
+          <el-table
+            ref="multipleTable"
+            :data="curResourceList"
+            tooltip-effect="dark"
+            style="width: 100%; font-size: 20px; color: black">
+            <el-table-column
+              label="图标"
+              width="100">
+              <template slot-scope="scope"><img :src="scope.row.photoUrl" style="width: 50px; height: 50px;"/></template>
+            </el-table-column>
+            <el-table-column
+              prop="name"
+              label="名称"
+              align="left"
+              width="300">
+            </el-table-column>
+            <el-table-column
+              prop="type"
+              align="left"
+              label="类型">
+            </el-table-column>
+            <el-table-column
+              prop="state"
+              align="left"
+              label="状态">
+            </el-table-column>
+            <el-table-column
+              prop="unitWork"
+              align="center"
+              label="单位">
+            </el-table-column>
+          </el-table>
+        </template>
         <el-collapse accordion style="margin: 0 30px">
-          <el-collapse-item v-for="(item,index) in curResourceList" :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="curResourceList&&curResourceList.length"
-            :page-size="9"
+            :page-size="3"
             layout="prev, pager, next"
             :total="totalElements"
             :current-page="activePage"
@@ -70,12 +93,12 @@
 
     export default {
         name: "ResourceList",
-        props: ['searchVal', 'resourceList'],
         components: {TopSearch},
         data() {
             return {
                 isLogin: false,
-                // searchVal: '',
+                searchVal: '',
+                curResourceList: [],
                 searchType: '2',
                 searchTypeArr: [
                     {
@@ -98,7 +121,6 @@
                         "name": "专家",
                         "value": "3"
                     }],
-                curResourceList: this.resourceList,
                 activePage: 1,
                 totalElements: 0
             }
@@ -108,38 +130,48 @@
                 if (storageGet('user') != null) {
                     this.isLogin = true;
                 }
-                let url = '/api/common/index/resource';
-                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.curResourceList = res.data.content;
-                })
+                this.searchVal = this.$route.params.searchVal;
+                this.handleSearchData();
             },
             checkLogin() {
                 if (!this.isLogin) {
-                    console.log("请登录后访问");
                     notify('warning', '请登录后访问');
                 } else {
-                    console.log("已登录");
                     this.$router.push('/project/create');
                 }
             },
             handleSearchData() {
+                if(this.searchType == 0){
+                    // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
+                }else if(this.searchType == 1){
+                    this.$router.push({name: 'AgencyList', params: {searchVal: this.searchVal}});
+                }else if(this.searchType == 2){
+                    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.curResourceList = res.data.resourcePage.content;
+                        this.totalElements = res.data.resourcePage.totalElements;
+                    })
+                }else if(this.searchType == 3){
+                    this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
+                }
+            },
+            nextPage(){
                 let url = '/api/common/index/page';
                 let params = {
                     "keyword": this.searchVal,
-                    "activePage": 1,
+                    "activePage": this.activePage,
                     "columnFilters": [
                         {
                             "field": "type",
@@ -148,9 +180,10 @@
                             "value": this.searchType
                         }
                     ]
-                }
+                };
                 Http.post(url, params).then((res) => {
                     this.curResourceList = res.data.resourcePage.content;
+                    this.totalElements = res.data.resourcePage.totalElements;
                 })
             },
             gotoHome() {
@@ -161,7 +194,7 @@
             },
             handlePageChange(index) {
                 this.activePage = index;
-                this.searchData();
+                this.nextPage();
             }
         },
         mounted() {

+ 37 - 14
src/pages/HomepageSearch/UserList.vue

@@ -35,17 +35,40 @@
       <div class="create-body">
         <div class="title h2">众测人员</div>
         <el-collapse accordion style="margin: 0 30px">
-          <el-collapse-item v-for="(item,index) in curUserList" :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>
+          <template style="color: black">
+            <el-table
+              ref="multipleTable"
+              :data="curUserList"
+              tooltip-effect="dark"
+              style="width: 100%; font-size: 20px; color: black">
+              <el-table-column
+                label="头像"
+                width="100">
+                <template slot-scope="scope"><img :src="scope.row.photoUrl" style="width: 50px; height: 50px;"/></template>
+              </el-table-column>
+              <el-table-column
+                prop="name"
+                label="名称"
+                align="left"
+                width="300">
+              </el-table-column>
+              <el-table-column
+                prop="gender"
+                align="left"
+                label="性别">
+              </el-table-column>
+              <el-table-column
+                prop="address"
+                align="left"
+                label="省市">
+              </el-table-column>
+              <el-table-column
+                prop="taskCount"
+                align="center"
+                label="接包数量">
+              </el-table-column>
+            </el-table>
+          </template>
           <el-pagination
             v-if="curUserList&&curUserList.length"
             :page-size="9"
@@ -106,8 +129,8 @@
                     ]
                 }
                 Http.post(url, params).then((res) => {
-                    console.log(res.data)
                     this.curUserList = res.data.content;
+                    this.totalElements=res.data.totalElements;
                 })
             },
             checkLogin() {
@@ -123,7 +146,7 @@
                 let url = '/api/common/index/user/more';
                 let params = {
                     "keyword": this.searchVal,
-                    "activePage": 1,
+                    "activePage":  this.activePage,
                     "columnFilters": [
                         {
                             "field": "type",
@@ -145,7 +168,7 @@
             },
             handlePageChange(index) {
                 this.activePage = index;
-                this.searchData();
+                this.handleSearchData();
             }
         },
         mounted() {

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

@@ -132,6 +132,8 @@
         if (storageGet('user') != null) {
             this.isLogin = true;
         }
+        this.searchVal = this.$route.params.searchVal;
+        this.searchType = this.$route.params.searchType;
         Http.get('/api/square/list').then((res)=>{
           let crowdTestProjectVOs = res.data.crowdTestProjectVOs;
           let crowdTestTaskVOS = res.data.crowdTestTaskVOS;