Jelajahi Sumber

Merge branch 'Test' into 'master'

Test

See merge request crowd-2019/crowd-test-service-front!101
郭超 5 tahun lalu
induk
melakukan
9233618ae2
100 mengubah file dengan 6595 tambahan dan 1179 penghapusan
  1. 2 1
      config/dev.env.js
  2. 2 1
      config/prod.env.js
  3. 3 2
      config/test.env.js
  4. 58 167
      package-lock.json
  5. 7 1
      package.json
  6. 41 9
      src/App.vue
  7. TEMPAT SAMPAH
      src/assets/img/HotCrowd.png
  8. TEMPAT SAMPAH
      src/assets/img/ISCAS.png
  9. TEMPAT SAMPAH
      src/assets/img/NJU.png
  10. TEMPAT SAMPAH
      src/assets/img/QRcode.png
  11. TEMPAT SAMPAH
      src/assets/img/SJTU.png
  12. TEMPAT SAMPAH
      src/assets/img/SQA.png
  13. TEMPAT SAMPAH
      src/assets/img/agency.png
  14. TEMPAT SAMPAH
      src/assets/img/bankimg.png
  15. TEMPAT SAMPAH
      src/assets/img/business-license.png
  16. TEMPAT SAMPAH
      src/assets/img/count-security.png
  17. TEMPAT SAMPAH
      src/assets/img/crowd-contest.png
  18. TEMPAT SAMPAH
      src/assets/img/home-btn1.png
  19. TEMPAT SAMPAH
      src/assets/img/home-btn2.png
  20. TEMPAT SAMPAH
      src/assets/img/homeSlice.png
  21. TEMPAT SAMPAH
      src/assets/img/homeslice1.png
  22. TEMPAT SAMPAH
      src/assets/img/homeslice2.png
  23. TEMPAT SAMPAH
      src/assets/img/hot-article.jpg
  24. TEMPAT SAMPAH
      src/assets/img/idcard-back.png
  25. TEMPAT SAMPAH
      src/assets/img/idcard-example1.png
  26. TEMPAT SAMPAH
      src/assets/img/idcard-example2.png
  27. TEMPAT SAMPAH
      src/assets/img/idcard-positive.png
  28. TEMPAT SAMPAH
      src/assets/img/idcard1.png
  29. TEMPAT SAMPAH
      src/assets/img/idcard2.png
  30. TEMPAT SAMPAH
      src/assets/img/logo-blue.png
  31. TEMPAT SAMPAH
      src/assets/img/logo-project.png
  32. TEMPAT SAMPAH
      src/assets/img/logo-white.png
  33. TEMPAT SAMPAH
      src/assets/img/phoneBinding.png
  34. TEMPAT SAMPAH
      src/assets/img/phoneUnbinding.png
  35. TEMPAT SAMPAH
      src/assets/img/popular-project.png
  36. TEMPAT SAMPAH
      src/assets/img/popularTask.png
  37. TEMPAT SAMPAH
      src/assets/img/project-manager.png
  38. TEMPAT SAMPAH
      src/assets/img/selectAuthentication.png
  39. TEMPAT SAMPAH
      src/assets/img/technology-img.png
  40. TEMPAT SAMPAH
      src/assets/img/testType.png
  41. TEMPAT SAMPAH
      src/assets/img/user-info.png
  42. TEMPAT SAMPAH
      src/assets/img/userRank.png
  43. TEMPAT SAMPAH
      src/assets/img/拓思.png
  44. TEMPAT SAMPAH
      src/assets/img/解放军工程.png
  45. 1 1
      src/components/Home.vue
  46. 10 57
      src/components/Mine.vue
  47. 145 45
      src/components/authen/AuthenticationManage.vue
  48. 1 1
      src/components/authen/IndividualAuthentication.vue
  49. 1 0
      src/components/cheat/ProjectAdd.vue
  50. 51 51
      src/components/commons/Footer.vue
  51. 62 0
      src/components/commons/Footer2.0.vue
  52. 15 14
      src/components/commons/Header.vue
  53. 419 0
      src/components/commons/Header2.0.vue
  54. 113 0
      src/components/commons/HomeSlice.vue
  55. 33 0
      src/components/commons/MidTab.vue
  56. 5 21
      src/components/commons/ProjectItem.vue
  57. 13 4
      src/components/commons/ProvinceCity.vue
  58. 84 0
      src/components/commons/SearchBar.vue
  59. 109 0
      src/components/commons/TopSearch.vue
  60. 726 721
      src/components/project/Project.vue
  61. 4 2
      src/components/project/ProjectCreate.vue
  62. 3 1
      src/components/report/ProjectReport.vue
  63. 3 1
      src/components/report/TaskReport.vue
  64. 11 8
      src/components/task/Task.vue
  65. 31 0
      src/constants/tabMenu.js
  66. 21 1
      src/js/api.js
  67. 7 5
      src/js/index.js
  68. 9 0
      src/js/userService.js
  69. 77 65
      src/main.js
  70. 188 0
      src/pages/DetailPage/AgencyDetail.vue
  71. 215 0
      src/pages/DetailPage/CrowdDetail.vue
  72. 111 0
      src/pages/DetailPage/ExpertDetail.vue
  73. 42 0
      src/pages/DetailPage/FieldDetail.vue
  74. 142 0
      src/pages/DetailPage/ResourceDetail.vue
  75. 41 0
      src/pages/DetailPage/TestTypeDetail.vue
  76. 107 0
      src/pages/DetailPage/UserDetail.vue
  77. 45 0
      src/pages/Homepage/BrandCard.vue
  78. 301 0
      src/pages/Homepage/Homepage.vue
  79. 60 0
      src/pages/Homepage/HotAgency.vue
  80. 116 0
      src/pages/Homepage/HotContest.vue
  81. 53 0
      src/pages/Homepage/HotCrowd.vue
  82. 59 0
      src/pages/Homepage/HotUser.vue
  83. 190 0
      src/pages/Homepage/InstitutionCard.vue
  84. 108 0
      src/pages/Homepage/LoginCard.vue
  85. 39 0
      src/pages/Homepage/ResourceAndTool.vue
  86. 79 0
      src/pages/Homepage/TestCard.vue
  87. 77 0
      src/pages/Homepage/TestMenu.vue
  88. 247 0
      src/pages/HomepageSearch/AgencyList.vue
  89. 210 0
      src/pages/HomepageSearch/AgencyResidentList.vue
  90. 202 0
      src/pages/HomepageSearch/CompetitionList.vue
  91. 205 0
      src/pages/HomepageSearch/CrowdList.vue
  92. 110 0
      src/pages/HomepageSearch/ExpertCard.vue
  93. 205 0
      src/pages/HomepageSearch/ExpertList.vue
  94. 250 0
      src/pages/HomepageSearch/ResourceList.vue
  95. 220 0
      src/pages/HomepageSearch/UserList.vue
  96. 123 0
      src/pages/Square/PopularProject.vue
  97. 303 0
      src/pages/Square/PopularProjectAndTaskList.vue
  98. 55 0
      src/pages/Square/PopularTask.vue
  99. 249 0
      src/pages/Square/Square2.0.vue
  100. 176 0
      src/pages/Square/SquareCard.vue

+ 2 - 1
config/dev.env.js

@@ -6,5 +6,6 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG: "'dev'",
   API_ROOT: '"//crowd.dev.mooctest.net"',
-  LOGIN_URL: '"http://user.mooctest.net:8081/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fmine"'
+  LOGIN_URL: '"http://user.mooctest.net:8081/page/login?redirect=http%3a%2f%2fcrowd.dev.mooctest.net%2f%23%2fhome"',
+  REGISTER_URL: '"http://user.mooctest.net:8081/page/register"'
 })

+ 2 - 1
config/prod.env.js

@@ -3,5 +3,6 @@ module.exports = {
   NODE_ENV: '"production"',
   ENV_CONFIG: "'prod'",
   API_ROOT: '"//www.cofortest.com"',
-  LOGIN_URL:'"http://user.cofortest.com/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fmine"'
+  LOGIN_URL:'"http://user.cofortest.com/page/login?redirect=http%3a%2f%2fwww.cofortest.com%2f%23%2fhome"',
+  REGISTER_URL: '"http://user.cofortest.com/page/register"'
 }

+ 3 - 2
config/test.env.js

@@ -3,5 +3,6 @@ module.exports = {
   NODE_ENV: '"test"',
   ENV_CONFIG: "'test'",
   API_ROOT: '"//crowd.mooctest.net:8083"',
-  LOGIN_URL:'"http://user.mooctest.net:8081/page/login?redirect=http%3a%2f%2fcrowd.mooctest.net:8083%2f%23%2fmine"'
-}
+  LOGIN_URL:'"http://user.mooctest.net:8081/page/login?redirect=http%3a%2f%2fcrowd.mooctest.net:8083%2f%23%2fhome"',
+  REGISTER_URL: '"http://user.mooctest.net:8081/page/register"'
+}

File diff ditekan karena terlalu besar
+ 58 - 167
package-lock.json


+ 7 - 1
package.json

@@ -18,9 +18,15 @@
     "element-ui": "^2.11.0",
     "font-awesome": "^4.7.0",
     "mockjs": "^1.0.1-beta3",
+    "moment": "^2.27.0",
+    "querystring": "^0.2.0",
+    "v-region": "^2.2.2",
     "vue": "^2.5.2",
     "vue-router": "^3.0.1",
-    "vuex": "^3.1.1"
+    "vue-waterfall": "^1.0.6",
+    "vue-waterfall-easy": "^2.4.4",
+    "vuex": "^3.1.1",
+    "webpack-dev-server": "^2.11.5"
   },
   "devDependencies": {
     "autoprefixer": "^7.1.2",

+ 41 - 9
src/App.vue

@@ -1,21 +1,32 @@
 <template>
-  <div style="height:100%;width:100%;">
+  <div class="body-content">
+    <home-slice v-if="showSlice"/>
     <header-container/>
-    <div class="main-container">
-      <router-view/>
+    <div class="container-wrapper">
+      <slot>
+        <div class="main-container">
+          <router-view/>
+        </div>
+      </slot>
     </div>
     <footer-container/>
   </div>
 </template>
 
 <script>
-import HeaderContainer from '@/components/commons/Header'
-import FooterContainer from '@/components/commons/Footer'
+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)=>{
@@ -57,14 +68,35 @@ export default {
       //   this.isLogin = true
       // }
     },
-  }
+  },
+  computed:{
+    showSlice(){
+      if(this.$route.path==='/home')
+        return  true;
+    }
+  },
 }
 </script>
 
-<style>
+<style lang="less">
+  .body-content{
+    width:100%;
+    min-width: 1300px;
+    height: 100%;
+  }
+  .container-wrapper {
+    min-height: calc(~"100% - 70px - 180px");
+  }
   .main-container {
     width: 100%;
-    min-height: calc(100% - 70px - 64px);
+    min-height: calc(~"100% - 70px - 180px");
     margin: 0 auto;
+    padding-bottom: 30px;
+  }
+  .home-slice {
+    width: 100%;
+    height: 170px;
+    background-image: url("./assets/img/homeSlice.png");
+    background-size: 100% 100%
   }
 </style>

TEMPAT SAMPAH
src/assets/img/HotCrowd.png


TEMPAT SAMPAH
src/assets/img/ISCAS.png


TEMPAT SAMPAH
src/assets/img/NJU.png


TEMPAT SAMPAH
src/assets/img/QRcode.png


TEMPAT SAMPAH
src/assets/img/SJTU.png


TEMPAT SAMPAH
src/assets/img/SQA.png


TEMPAT SAMPAH
src/assets/img/agency.png


TEMPAT SAMPAH
src/assets/img/bankimg.png


TEMPAT SAMPAH
src/assets/img/business-license.png


TEMPAT SAMPAH
src/assets/img/count-security.png


TEMPAT SAMPAH
src/assets/img/crowd-contest.png


TEMPAT SAMPAH
src/assets/img/home-btn1.png


TEMPAT SAMPAH
src/assets/img/home-btn2.png


TEMPAT SAMPAH
src/assets/img/homeSlice.png


TEMPAT SAMPAH
src/assets/img/homeslice1.png


TEMPAT SAMPAH
src/assets/img/homeslice2.png


TEMPAT SAMPAH
src/assets/img/hot-article.jpg


TEMPAT SAMPAH
src/assets/img/idcard-back.png


TEMPAT SAMPAH
src/assets/img/idcard-example1.png


TEMPAT SAMPAH
src/assets/img/idcard-example2.png


TEMPAT SAMPAH
src/assets/img/idcard-positive.png


TEMPAT SAMPAH
src/assets/img/idcard1.png


TEMPAT SAMPAH
src/assets/img/idcard2.png


TEMPAT SAMPAH
src/assets/img/logo-blue.png


TEMPAT SAMPAH
src/assets/img/logo-project.png


TEMPAT SAMPAH
src/assets/img/logo-white.png


TEMPAT SAMPAH
src/assets/img/phoneBinding.png


TEMPAT SAMPAH
src/assets/img/phoneUnbinding.png


TEMPAT SAMPAH
src/assets/img/popular-project.png


TEMPAT SAMPAH
src/assets/img/popularTask.png


TEMPAT SAMPAH
src/assets/img/project-manager.png


TEMPAT SAMPAH
src/assets/img/selectAuthentication.png


TEMPAT SAMPAH
src/assets/img/technology-img.png


TEMPAT SAMPAH
src/assets/img/testType.png


TEMPAT SAMPAH
src/assets/img/user-info.png


TEMPAT SAMPAH
src/assets/img/userRank.png


TEMPAT SAMPAH
src/assets/img/拓思.png


TEMPAT SAMPAH
src/assets/img/解放军工程.png


+ 1 - 1
src/components/Home.vue

@@ -151,7 +151,7 @@
           </span>
         </div>
         <el-row :gutter="20">
-          <el-col :span="6" v-for="item,index in hotTaskList" :key="index">
+          <el-col :span="6" v-for="(item,index) in hotTaskList" :key="index">
             <task-card :item="item"/>
           </el-col>
         </el-row>

+ 10 - 57
src/components/Mine.vue

@@ -1,56 +1,6 @@
 <template>
   <div class="mine-container">
     <div id="myChart" style="width: 100%;height: 200px;padding-top: 40px"></div>
-    <!--<div class="mine-top-wrapper">-->
-    <!--<el-row :gutter="0" style="height:100%">-->
-    <!--<el-col :span="16">-->
-    <!--<div class="advertise-imgs">-->
-    <!--<img-->
-    <!--src="http://sinastorage.com/storage.miaosha.sina.com.cn/products/201903/e496d11b3d74cf660c286fbd5ab8d0bb.png"-->
-    <!--&gt;-->
-    <!--</div>-->
-    <!--</el-col>-->
-    <!--<el-col :span="8">-->
-    <!--<div class="user-banner">-->
-    <!--<p class="head">-->
-    <!--<a href="javascript:;" class="login-link">-->
-    <!--<img :src="user == null || user.userVO.photoUrl == null?defaultValue.image:user.userVO.photoUrl"-->
-    <!--class="user-img">-->
-    <!--<span class="vertify hide"></span>-->
-    <!--</a>-->
-    <!--</p>-->
-    <!--<div class="username_box">-->
-    <!--<div class="username_icon username_"></div>-->
-    <!--<span class="username">{{user == null?'...':user.userVO.name}}</span>-->
-    <!--</div>-->
-    <!--&lt;!&ndash;<p class="name">&ndash;&gt;-->
-    <!--&lt;!&ndash;<a href="javascript:;" class="login-btn btn btn-medium btn-info">登录</a>&ndash;&gt;-->
-    <!--&lt;!&ndash;<a&ndash;&gt;-->
-    <!--&lt;!&ndash;href="https://login.sina.com.cn/signup/signup?entry=tech"&ndash;&gt;-->
-    <!--&lt;!&ndash;class="register-btn btn btn-medium btn-info"&ndash;&gt;-->
-    <!--&lt;!&ndash;target="_blank"&ndash;&gt;-->
-    <!--&lt;!&ndash;&gt;注册</a>&ndash;&gt;-->
-    <!--&lt;!&ndash;</p>&ndash;&gt;-->
-    <!--&lt;!&ndash;<p class="scores">&ndash;&gt;-->
-    <!--&lt;!&ndash;<a href="/rule/merit" target="_blank">&ndash;&gt;-->
-    <!--&lt;!&ndash;积分&ndash;&gt;-->
-    <!--&lt;!&ndash;<em class="num1">{{user.score}}</em>&ndash;&gt;-->
-    <!--&lt;!&ndash;</a>&ndash;&gt;-->
-    <!--&lt;!&ndash;<span class="line">|</span>&ndash;&gt;-->
-    <!--&lt;!&ndash;<a href="/rule/merit" target="_blank">&ndash;&gt;-->
-    <!--&lt;!&ndash;威望&ndash;&gt;-->
-    <!--&lt;!&ndash;<em class="num2">{{user.prestige}}</em>&ndash;&gt;-->
-    <!--&lt;!&ndash;</a>&ndash;&gt;-->
-    <!--&lt;!&ndash;</p>&ndash;&gt;-->
-    <!--<p>-->
-    <!--<router-link :to="{ name: 'AuthenticationIndex'}">-->
-    <!--<div class="btn btn-medium">实名认证</div>-->
-    <!--</router-link>-->
-    <!--</p>-->
-    <!--</div>-->
-    <!--</el-col>-->
-    <!--</el-row>-->
-    <!--</div>-->
     <div class="mine-body" style="text-align: center;">
       <el-tabs value="myProject" @tab-click="handleTabClick" v-loading="loading" style="width: 90%;margin-left: 5%">
         <el-tab-pane name="unFinishedTask">
@@ -102,8 +52,9 @@
                   style="font-size: 14px;">
             <el-col :span="6" type="flex" align="middle" justify="center">项目图片</el-col>
             <el-col :span="6" type="flex" align="middle" justify="center">项目名称</el-col>
-            <el-col :span="6" type="flex" align="middle" justify="center">应用类型</el-col>
-            <el-col :span="2" type="flex" align="middle" justify="center">项目预算</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">应用类型</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">项目预算</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">参与人数</el-col>
             <el-col :span="4" type="flex" align="middle" justify="center">操作</el-col>
           </el-row>
           <project-item v-if="myProjects != null || myProjects.length > 0"
@@ -120,8 +71,9 @@
                   justify="center" style="font-size: 14px;">
             <el-col :span="6">项目图片</el-col>
             <el-col :span="6">项目名称</el-col>
-            <el-col :span="6">应用类型</el-col>
-            <el-col :span="2">项目预算</el-col>
+            <el-col :span="3">应用类型</el-col>
+            <el-col :span="3">项目预算</el-col>
+            <el-col :span="3">参与人数</el-col>
             <el-col :span="4">操作</el-col>
           </el-row>
           <span v-if="handlingProjects == null || handlingProjects.length == 0"> 暂无项目 </span>
@@ -139,8 +91,9 @@
                   justify="center" style="font-size: 14px;">
             <el-col :span="6">项目图片</el-col>
             <el-col :span="6">项目名称</el-col>
-            <el-col :span="6">应用类型</el-col>
-            <el-col :span="2">项目预算</el-col>
+            <el-col :span="3">应用类型</el-col>
+            <el-col :span="3">项目预算</el-col>
+            <el-col :span="3">参与人数</el-col>
             <el-col :span="4">操作</el-col>
           </el-row>
           <span v-if="acceptableProjects == null || acceptableProjects.length == 0"> 暂无项目 </span>
@@ -290,7 +243,7 @@ export default {
         xAxis: {
           type: 'category',
           boundaryGap: false,
-          data: ['2019年11月', '2019年12月', '2020年1月', '2020年2月', '2020年3月', '2020年4月', '2020年5月']
+          data: ['2020年1月', '2020年2月', '2020年3月', '2020年4月', '2020年5月', '2020年6月', '2020年7月']
         },
         yAxis: {
           type: 'value'

+ 145 - 45
src/components/authen/AuthenticationManage.vue

@@ -57,7 +57,7 @@
         </el-table-column>
       </el-table>
       <el-dialog title="认证详情" :visible.sync="showDialog" center width="40%">
-        <el-form :model="authInfoDetail" label-width="120px" label-position="right">
+        <el-form :model="authInfoDetail" label-width="150px" label-position="right">
           <el-form-item label="类型:">
             <span>
               <el-tag v-if="authInfoDetail.type=='personal'" type="success">个人</el-tag>
@@ -68,34 +68,68 @@
           <el-form-item label="姓名:" v-if="authInfoDetail.type == 'personal'">
             <span>{{authInfoDetail.realName}}</span>
           </el-form-item>
+          <el-form-item label="性别:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.gender}}</span>
+          </el-form-item>
           <el-form-item label="身份证号:" v-if="authInfoDetail.type == 'personal'">
-            <span>{{authInfoDetail.IDCard}}</span>
+            <span>{{authInfoDetail.idCard}}</span>
           </el-form-item>
-          <el-form-item label="身份证照:" v-if="authInfoDetail.type == 'personal'">
+          <el-form-item label="身份证正面照:" v-if="authInfoDetail.type == 'personal'">
             <span>
               <el-image
                 style="width: 100px;"
-                :src="authInfoDetail.IDCardPositivePhoto"
+                :src="authInfoDetail.idCardPositivePhoto"
                 fit="scale-down"></el-image>
             </span>
           </el-form-item>
-<!--          <el-form-item label="银行账号:">-->
-<!--            <span>{{authInfoDetail.bankAccount}}</span>-->
-<!--          </el-form-item>-->
+          <el-form-item label="身份证反面照:" v-if="authInfoDetail.type == 'personal'">
+            <span>
+              <el-image
+                style="width: 100px;"
+                :src="authInfoDetail.idCardBackPhoto"
+                fit="scale-down"></el-image>
+            </span>
+          </el-form-item>
+          <el-form-item label="身份证截止时间:" v-if="authInfoDetail.type == 'personal'">
+            <span>{{authInfoDetail.idCardDeadTime}}</span>
+          </el-form-item>
           <el-form-item label="地址:">
             <span>{{authInfoDetail.address}}</span>
           </el-form-item>
+          <el-form-item label="角色:" v-if="authInfoDetail.type == 'personal'">
+            <el-checkbox-group v-model="authInfoDetail.roleList" disabled>
+              <el-checkbox :label="1">发包</el-checkbox>
+              <el-checkbox :label="0">接包</el-checkbox>
+            </el-checkbox-group>
+<!--            <span>{{authInfoDetail.roleList}}</span>-->
+          </el-form-item>
           <el-form-item label="申请时间:">
             <span>{{reformTime(new Date(authInfoDetail.applyTime))}}</span>
           </el-form-item>
 
-          <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'enterprise'">
-            <span>{{authInfoDetail.enterpriseName}}</span>
-          </el-form-item>
-          <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'enterprise'">
-            <span>{{authInfoDetail.legalPersonName}}</span>
+<!--          <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'enterprise'">-->
+<!--            <span>{{authInfoDetail.enterpriseName}}</span>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'enterprise'">-->
+<!--            <span>{{authInfoDetail.legalPersonName}}</span>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'enterprise'">-->
+<!--            <span>-->
+<!--              <el-image-->
+<!--                style="width: 100px;"-->
+<!--                :src="authInfoDetail.businessLicensePhoto"-->
+<!--                fit="scale-down"></el-image>-->
+<!--            </span>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="统一信用代码:" v-if="authInfoDetail.type == 'enterprise'">-->
+<!--            <span>{{authInfoDetail.unifiedSocialCreditCode}}</span>-->
+<!--          </el-form-item>-->
+
+
+          <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.evaluationAgencyName}}</span>
           </el-form-item>
-          <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'enterprise'">
+          <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'agency'">
             <span>
               <el-image
                 style="width: 100px;"
@@ -103,29 +137,66 @@
                 fit="scale-down"></el-image>
             </span>
           </el-form-item>
-          <el-form-item label="统一信用代码:" v-if="authInfoDetail.type == 'enterprise'">
-            <span>{{authInfoDetail.unifiedSocialCreditCode}}</span>
+          <el-form-item label="企业地址:">
+            <span>{{authInfoDetail.address}}</span>
           </el-form-item>
 
-          <el-form-item label="机构名称:" v-if="authInfoDetail.type == 'agency'">
-            <span>{{authInfoDetail.evaluationAgencyName}}</span>
-          </el-form-item>
-          <el-form-item label="机构能力:" v-if="authInfoDetail.type == 'agency'">
-            <span v-for="item in authInfoDetail.evaluationAgencyAbilityList"> <el-tag>{{item}}</el-tag>
+          <el-form-item label="企业Logo:" v-if="authInfoDetail.type == 'agency'">
+            <span>
+              <el-image
+                style="width: 100px;"
+                :src="authInfoDetail.agencyPhoto"
+                fit="scale-down"></el-image>
             </span>
           </el-form-item>
-          <el-form-item label="机构资源:" v-if="authInfoDetail.type == 'agency'">
-            <span v-for="item in authInfoDetail.evaluationAgencyResourceList"> <el-tag>{{item.type}} ( {{item.name}} ) :&nbsp; [总数:{{item.totalNum}} ,可用数量:{{item.availableNum}}]</el-tag>
+          <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.legalPersonName}}</span>
+          </el-form-item>
+          <el-form-item label="法人性别:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.gender}}</span>
+          </el-form-item>
+          <el-form-item label="法人身份证号:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.idCardNum}}</span>
+          </el-form-item>
+          <el-form-item label="法人身份证正面照:" v-if="authInfoDetail.type == 'agency'">
+            <span>
+              <el-image
+                style="width: 100px;"
+                :src="authInfoDetail.idCardPositivePhoto"
+                fit="scale-down"></el-image>
             </span>
           </el-form-item>
-          <el-form-item label="机构Logo:" v-if="authInfoDetail.type == 'agency'">
+          <el-form-item label="法人身份证反面照:" v-if="authInfoDetail.type == 'agency'">
             <span>
               <el-image
                 style="width: 100px;"
-                :src="authInfoDetail.agencyPhoto"
+                :src="authInfoDetail.idCardBackPhoto"
                 fit="scale-down"></el-image>
             </span>
           </el-form-item>
+          <el-form-item label="身份证截止时间:" v-if="authInfoDetail.type == 'agency'">
+            <span>{{authInfoDetail.idCardDeadTime}}</span>
+          </el-form-item>
+<!--          <el-form-item label="企业角色:" v-if="authInfoDetail.type == 'agency'">-->
+<!--            <span>{{authInfoDetail.roleList}}</span>-->
+<!--          </el-form-item>-->
+
+          <el-form-item label="企业角色:" v-if="authInfoDetail.type == 'agency'">
+            <el-checkbox-group v-model="authInfoDetail.roleList" disabled>
+              <el-checkbox :label="1">发包</el-checkbox>
+              <el-checkbox :label="0">接包</el-checkbox>
+            </el-checkbox-group>
+            <!--            <span>{{authInfoDetail.roleList}}</span>-->
+          </el-form-item>
+
+<!--          <el-form-item label="机构能力:" v-if="authInfoDetail.type == 'agency'">-->
+<!--            <span v-for="item in authInfoDetail.evaluationAgencyAbilityList"> <el-tag>{{item}}</el-tag>-->
+<!--            </span>-->
+<!--          </el-form-item>-->
+<!--          <el-form-item label="机构资源:" v-if="authInfoDetail.type == 'agency'">-->
+<!--            <span v-for="item in authInfoDetail.evaluationAgencyResourceList"> <el-tag>{{item.type}} ( {{item.name}} ) :&nbsp; [总数:{{item.totalNum}} ,可用数量:{{item.availableNum}}]</el-tag>-->
+<!--            </span>-->
+<!--          </el-form-item>-->
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button type="info" size="mini" @click="hideAuthDialog()">返回</el-button>
@@ -179,25 +250,34 @@
                 handledAuthList: [],
                 authInfoDetail: {
                     userId: '',
+                    realName: "",
+                    applyTime: "",
+                    checkTime: "",
+                    explain: "",
+                    gender: "",
+                    idCard: "",
+                    idCardBackPhoto: "",
+                    idCardDeadTime: "",
+                    idCardPositivePhoto: "",
+                    isAuthentication: 0,
+                    isDeleted: 0,
+                    roleList: [],
+                    address: "",
+
                     type: '',
-                    realName: '',
-                    IDCard: '',
-                    IDCardPositivePhoto: '',
                     bankAccount: '',
-                    address: '',
-                    applyTime: '',
-
                     enterpriseName: '',
                     legalPersonName: '',
                     businessLicensePhoto: '',
                     unifiedSocialCreditCode: '',
 
-                    evaluationAgencyName: '',
+                    agencyPhoto: "",
+                    evaluationAgencyName: "",
+                    expireTime: '',
+                    idCardNum: "",
                     evaluationAgencyAbilityList: [],
                     evaluationAgencyResourceList: [],
-                    agencyPhoto: '',
                     updateTime: '',
-                    expireTime: ''
                 }
             }
         },
@@ -276,6 +356,7 @@
                 this.hideLoading()
                 this.getHandlingAuthList()
                 notify('success', '驳回成功')
+                this.hideAuthDialog()
                 console.log(res)
             },
             handleAuthenticationRejectFail (error) {
@@ -321,11 +402,18 @@
                 this.hideLoading()
                 console.log(res)
                 this.authInfoDetail.realName = res.realName
-                this.authInfoDetail.IDCard = res.idcard
-                this.authInfoDetail.IDCardPositivePhoto = res.idCardPositivePhotoi
-                this.authInfoDetail.bankAccount = res.bankAccount
-                this.authInfoDetail.address = res.address
                 this.authInfoDetail.applyTime = res.applyTime
+                this.authInfoDetail.checkTime = res.checkTime
+                this.authInfoDetail.explain = res.explain
+                this.authInfoDetail.gender = res.gender
+                this.authInfoDetail.idCard = res.idCard
+                this.authInfoDetail.idCardBackPhoto = res.idCardBackPhoto
+                this.authInfoDetail.idCardDeadTime = res.idCardDeadTime
+                this.authInfoDetail.idCardPositivePhoto = res.idCardPositivePhoto
+                this.authInfoDetail.isAuthentication = res.isAuthentication
+                this.authInfoDetail.isDeleted = res.isDeleted
+                this.authInfoDetail.roleList = res.roleList
+                this.authInfoDetail.address = res.address
                 this.showAuthDialog()
                 console.log(res)
 
@@ -351,14 +439,26 @@
             },
             getCurrentAgencyAuthInfoSuccess (res) {
                 this.hideLoading()
-              this.authInfoDetail.bankAccount = res.bankAccount
-              this.authInfoDetail.address = res.address
-              this.authInfoDetail.applyTime = res.applyTime
-                this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName
-                this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList
-                this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList
-                this.authInfoDetail.agencyPhoto = res.agencyPhoto
-                this.authInfoDetail.updateTime = res.updateTime
+              this.authInfoDetail.bankAccount = res.data.bankAccount
+              this.authInfoDetail.legalPersonName = res.data.legalPersonName
+              this.authInfoDetail.businessLicensePhoto = res.data.businessLicensePhoto
+              this.authInfoDetail.address = res.data.address
+              this.authInfoDetail.applyTime = res.data.applyTime
+              this.authInfoDetail.evaluationAgencyName = res.data.evaluationAgencyName
+              this.authInfoDetail.evaluationAgencyAbilityList = res.data.evaluationAgencyAbilityList
+              this.authInfoDetail.evaluationAgencyResourceList = res.data.evaluationAgencyResourceList
+              this.authInfoDetail.agencyPhoto = res.data.agencyPhoto
+              this.authInfoDetail.updateTime = res.data.updateTime
+              this.authInfoDetail.checkTime = res.data.checkTime
+              this.authInfoDetail.explain = res.data.explain
+              this.authInfoDetail.gender = res.data.gender
+              this.authInfoDetail.idCardNum = res.data.idCardNum
+              this.authInfoDetail.idCardBackPhoto = res.data.idCardBackPhoto
+              this.authInfoDetail.idCardDeadTime = res.data.idCardDeadTime
+              this.authInfoDetail.idCardPositivePhoto = res.data.idCardPositivePhoto
+              this.authInfoDetail.isAuthentication = res.data.isAuthentication
+              this.authInfoDetail.isDeleted = res.data.isDeleted
+              this.authInfoDetail.roleList = res.data.roleList
               this.showAuthDialog()
             },
             getCurrentAgencyAuthInfoFail (error) {

+ 1 - 1
src/components/authen/IndividualAuthentication.vue

@@ -256,7 +256,7 @@ export default {
         notify('error', '单个文件大小不能超过10M')
         return false;
       }
-      let fileName = file.name
+      let fileName = file.namep
       let index = fileName.lastIndexOf('.');
       // 文件不能没有后缀
       if (index <= 0){

+ 1 - 0
src/components/cheat/ProjectAdd.vue

@@ -135,6 +135,7 @@
             </el-form-item>
             <el-form-item type="file" prop="file" label="Excel文件">
               <el-upload
+                style="width: 400px"
                 v-if="isModifyMode"
                 drag
                 class="upload-demo"

+ 51 - 51
src/components/commons/Footer.vue

@@ -1,68 +1,67 @@
 <template>
   <div class="footer-nav">
-    <div class="container">
-      <nav class="pull-left">
-        <ul>
-          <li>
-            <a href="#">商务合作</a>
-          </li>
-          &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
-          <li>
-            <a href="#">关于众测</a>
-          </li>
-          &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
-          <li>
-            <a href="#">友情链接</a>
-          </li>
-          &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
-          <li>
-            <a href="#">用户协议</a>
-          </li>
-          &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
-           <li>
-            <a href="#">隐私政策</a>
-          </li>
-        </ul>
-      </nav>
-      <div class="copyright pull-right">
-        ©{{time}}
-        <a target="_blank" href="http://www.beian.miit.gov.cn">  粤ICP备09019504号</a>
-      </div>
+    <nav class="pull-left">
+      <ul>
+        <li>
+          <a href="#">商务合作</a>
+        </li>
+        &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+        <li>
+          <a href="#">关于众测</a>
+        </li>
+        &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+        <li>
+          <a href="#">友情链接</a>
+        </li>
+        &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+        <li>
+          <a href="#">用户协议</a>
+        </li>
+        &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+        <li>
+          <a href="#">隐私政策</a>
+        </li>
+      </ul>
+    </nav>
+    <div class="copyright pull-right">
+      ©{{time}}
+      <a target="_blank" href="http://www.beian.miit.gov.cn"> 粤ICP备09019504号</a>
     </div>
   </div>
 </template>
 
 <script>
-export default {
-  name: "footer-container",
-  data() {
-    return {
-      time: new Date().getFullYear()
-    };
-  }
-};
+  export default {
+    name: "footer-container",
+    data() {
+      return {
+        time: new Date().getFullYear()
+      };
+    }
+  };
 </script>
 
 <style scoped>
-.footer-nav {
-    background-color:#f0f0f0;
+  .footer-nav {
+    background-color: #f0f0f0;
     padding: 15px 0;
     text-align: center;
     display: flex;
     font-size: 1.2rem;
     color: #666;
-}
-.footer-nav ul{
+  }
+
+  .footer-nav ul {
     margin-bottom: 0;
     padding: 0;
     list-style: none;
-}
+  }
 
-.footer-nav ul li {
+  .footer-nav ul li {
     display: inline-block;
-}
+  }
 
-.footer-nav ul li a {
+  .footer-nav ul li a {
     color: inherit;
     padding: 5px;
     font-weight: 500;
@@ -70,13 +69,14 @@ export default {
     border-radius: 3px;
     position: relative;
     display: block;
-}
+  }
 
-.footer-nav .copyright {
+  .footer-nav .copyright {
     padding: 5px 0;
-    color:#333;
-}
-.copyright a{
-    color:#666;
-}
+    color: #333;
+  }
+
+  .copyright a {
+    color: #666;
+  }
 </style>

+ 62 - 0
src/components/commons/Footer2.0.vue

@@ -0,0 +1,62 @@
+<template>
+  <div class="footer-nav">
+    <div class="container">
+      <el-row style="height: 120px">
+        <el-col :span="5" class="nav-logo-block">
+          <div class="nav-title-wrapper">
+            <img src="../../assets/img/logo-white.png" alt="logo" class="nav-logo">
+            <div class="nav-title">
+              标准驱动的集成化众测服务<br/>
+              平台及示范应用
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="19" style="padding-left: 15%">
+          <div class="copyright-block pull-left" style="margin: 12px 0">
+            版权所有©信息产品及科技服务集成化众测服务平台与应用项目组<br/>
+            <a href="http://www.beian.miit.gov.cn/" style="color: white; font-size: 16px">粤ICP备09019504号</a><br/>
+            电话:020-32068333-223  传真:020-32068111<br/>
+            电子邮箱:topstest@gdsoftpark.com
+          </div>
+          <div class="code-block pull-right">
+            <img src="../../assets/img/QRcode.png" alt="QRcode" class="mooctest-code" style="width: 110px;height: 110px;display: block">
+            <div style="width: 110px;text-align: center">官方微信公众号</div>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "Footer2.0"
+  }
+</script>
+
+<style scoped>
+  .footer-nav{
+    height: 120px;
+    background:rgba(47,48,48,1);
+    color: white;
+    padding: 30px 0;
+    font-size: 14px;
+    font-family:Source Han Sans CN;
+  }
+  .nav-title{
+    display: inline-block;
+  }
+  .nav-logo{
+    height: 40px;
+    width: 40px;
+    margin-right: 10px;
+  }
+  .nav-logo-block{
+    border-right: 1px solid white;
+    padding: 10px 0;
+    margin: 20px 0
+  }
+  .copyright-block , .code-block{
+    display: inline-block;
+  }
+</style>

+ 15 - 14
src/components/commons/Header.vue

@@ -403,20 +403,20 @@ export default {
           'isAgency': false,
           'isSystemAdministrator': false
         })
-        console.log('本地没有用户信息,开始加载用户信息')
-        getCurrentUser().then((res) => {
-          console.log(res)
-          storageSave('user', res)
-          this.user = res
-          this.rolesPermissions = getRolesPermissions(res.roleList)
-          storageSave('rolesPermissions', getRolesPermissions(res.roleList))
-          console.log('用户信息加载成功')
-          this.isLogin = true
-          this.fullScreenLoading = false
-        }).catch((error) => {
-          console.log('用户信息加载失败')
-          this.fullScreenLoading = false
-        })
+        // console.log('本地没有用户信息,开始加载用户信息')
+        // getCurrentUser().then((res) => {
+        //   console.log(res)
+        //   storageSave('user', res)
+        //   this.user = res
+        //   this.rolesPermissions = getRolesPermissions(res.roleList)
+        //   storageSave('rolesPermissions', getRolesPermissions(res.roleList))
+        //   console.log('用户信息加载成功')
+        //   this.isLogin = true
+        //   this.fullScreenLoading = false
+        // }).catch((error) => {
+        //   console.log('用户信息加载失败')
+        //   this.fullScreenLoading = false
+        // })
       } else {
         this.user = storageGet('user')
         this.fullScreenLoading = false
@@ -618,6 +618,7 @@ export default {
     // if (storageGet('user' != null)){
     //   this.isLogin = true
     // }
+    console.log('header')
     console.log(this.isLogin)
   }
 }

+ 419 - 0
src/components/commons/Header2.0.vue

@@ -0,0 +1,419 @@
+<template>
+  <div class="header-nav" v-loading="loading">
+    <div class="container">
+        <div class="nav-location pull-left">
+          <i class="el-icon-location-outline" style="margin-right: 5px"></i>
+          <span style="line-height: 34px" v-if="!city || city == ''">暂无</span>
+          <span style="line-height: 34px" v-else>{{city}}</span>
+        </div>
+        <div class="nav-list pull-right">
+          <ul>
+            <li>
+              <a @click="gotoHome" style="cursor: pointer">首页</a>
+            </li>
+            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+            <li>
+            <li v-if="isLogin">
+              <el-dropdown>
+                <span class="el-dropdown-link">
+                  {{user.userVO.name}}<i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item>
+                    <router-link :to="{ path:'/personal/mine'}">
+                      <el-link icon="el-icon-user" :underline="false">
+                        个人中心
+                      </el-link>
+                    </router-link>
+                  </el-dropdown-item>
+                  <el-dropdown-item v-if="rolesPermissions.isSystemAdministrator">
+                    <router-link :to="{ name: 'AuthenticationManage'}">
+                      <el-link icon="el-icon-view" :underline="false">
+                        审核认证信息
+                      </el-link>
+                    </router-link>
+                  </el-dropdown-item>
+                  <el-dropdown-item divided @click.native="userLogout()">登出</el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </li>
+            <li v-if="!isLogin">
+              <a :href="loginUrl">请登录</a>
+            </li>
+            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
+            <li v-if="!isLogin">
+              <a :href="registerUrl">免费注册</a>
+            </li>
+              <span v-if="!isLogin">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
+            <li v-if="isLogin">
+              <router-link v-if="isLogin" to="/mine">
+                <a class="dropdown-toggle nav-link" data-toggle="dropdown">
+<!--                  <img class="icon" src="@/assets/img/mine_icon.svg">-->
+                  <span>我的众测</span>
+                </a>
+              </router-link>
+            </li>
+<!--            <span v-if="isLogin">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>-->
+<!--            <li>-->
+<!--              <a @click="gotoHome" style="cursor: pointer">首页</a>-->
+<!--            </li>-->
+<!--            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;-->
+<!--            <li>-->
+<!--              <a href="#">机构入驻</a>-->
+<!--            </li>-->
+<!--            &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;-->
+<!--            <li>-->
+<!--              <a href="#">客服中心</a>-->
+<!--            </li>-->
+          </ul>
+        </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import {
+      defaultValue,
+      deleteAuthInfo,
+      getCurrentAgencyAuthInfo,
+      getCurrentEnterpriseAuthInfo,
+      getCurrentIndividualAuthenInfo,
+      getCurrentUser,
+      getRolesPermissions,
+      logout,
+      storageGet,
+      storageSave
+  } from '@/js/index'
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+
+  export default {
+    name: "Header2.0",
+    data(){
+      return {
+        user: {},
+        loading: false,
+        fullScreenLoading: true,
+        loginUrl: process.env.LOGIN_URL,
+        registerUrl: process.env.REGISTER_URL,
+        authInfo: {},
+        isShowAuthCheckingDialog: false,
+        isShowAuthRejectDialog: false,
+        isShowAuthPassDialog: false,
+        //loading: true,
+        openNavBar: false,
+        defaultValue: defaultValue,
+        userIdentity: '',
+        isLogin: false,
+        rolesPermissions: {},
+        city: ''
+      }
+    },
+    watch: {
+        'user.authStatus' (val) {
+            this.user.authStatus = val
+            // console.log('changed')
+            // console.log(this.user.authStatus)
+        },
+        deep: true
+    },
+    methods: {
+        gotoHome(){
+            this.$router.push('/home');
+        },
+        openNavBarFunc () {
+            this.openNavBar = !this.openNavBar
+        },
+        getAddress(){
+            Http.get(Apis.USER.GET_ADDRESS).then((res) => {
+              console.log(res);
+                this.city = res.city
+              console.log(this.city);
+            }).catch((error) => {
+                this.hideLoading()
+                notify('error', '获取定位失败:' + error.data)
+            })
+        },
+
+        showLoading() {
+          this.loading = true
+        },
+        hideLoading() {
+          this.loading = false
+        },
+        setUserInfo () {
+            this.showLoading();
+            if (storageGet('user') == null) {
+                storageSave('rolesPermissions', {
+                    'isRegionManager': false,
+                    'isIndividualUser': false,
+                    'isEnterpriseUser': false,
+                    'isAgency': false,
+                    'isSystemAdministrator': false
+                });
+                // console.log('本地没有用户信息,开始加载用户信息')
+              //暂时注释
+              // this.user = storageGet('user')
+              // this.rolesPermissions = getRolesPermissions(storageGet('user')&&storageGet('user').roleList)
+              // storageSave('rolesPermissions', getRolesPermissions(torageGet('user')&&storageGet('user').roleList))
+              // this.isLogin = true
+              // this.fullScreenLoading = false
+
+                getCurrentUser().then((res) => {
+                    storageSave('user', res)
+                    this.user = res
+                    this.rolesPermissions = getRolesPermissions(res.roleList)
+                    storageSave('rolesPermissions', getRolesPermissions(res.roleList))
+                    console.log('用户信息加载成功')
+                    this.isLogin = true
+                    // this.fullScreenLoading = false
+                    this.hideLoading();
+                }).catch((error) => {
+                    console.log('用户信息加载失败')
+                    // this.fullScreenLoading = false
+                    this.hideLoading();
+                })
+            } else {
+                this.user = storageGet('user')
+                // this.fullScreenLoading = false
+                this.isLogin = true
+            }
+            this.hideLoading();
+        },
+        getCurrentUserSuccess (res) {
+            // console.log(res)
+            storageSave('user', res)
+            this.user = res
+            this.rolesPermissions = getRolesPermissions(res.roleList)
+            storageSave('rolesPermissions', getRolesPermissions(res.roleList))
+            console.log('用户信息加载成功')
+            this.isLogin = true
+            this.fullScreenLoading = false
+        },
+        getCurrentUserFail (error) {
+            console.log('用户信息加载失败')
+            this.fullScreenLoading = false
+        },
+        userLogout () {
+            this.isLogin = false
+            logout().then((res) => {
+                location.reload();
+                this.$router.push('/home')
+            })
+
+        },
+        // showLoading () {
+        //     this.fullScreenLoading = true
+        // },
+        // hideLoading () {
+        //     this.fullScreenLoading = false
+        // },
+        handleClickAuthReject () {
+            if (this.user.userVO.authType == 'agency') {
+                this.$router.push({
+                    name: 'AgencyAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }
+            if (this.user.userVO.authType == 'enterprise') {
+                this.$router.push({
+                    name: 'EnterpriseAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }
+            if (this.user.userVO.authType == 'personal') {
+                this.$router.push({
+                    name: 'IndividualAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }
+
+            //this.getAuthInfo()
+        },
+        handleClickAuthPass () {
+            if (this.user.personalAuthVO) {
+                this.$router.push({
+                    name: 'IndividualAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }else if (this.user.agencyVO) {
+                this.$router.push({
+                    name: 'AgencyAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }
+            else if (this.user.enterpriseAuthVO) {
+                this.$router.push({
+                    name: 'EnterpriseAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }
+
+            //this.getAuthInfo()
+        },
+        handleClickAuthChecking () {
+            //this.getAuthInfo()
+            if (this.user.userVO.authType == 'agency') {
+                this.$router.push({
+                    name: 'AgencyAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }
+            if (this.user.userVO.authType == 'enterprise') {
+                this.$router.push({
+                    name: 'EnterpriseAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }
+            if (this.user.userVO.authType == 'personal') {
+                this.$router.push({
+                    name: 'IndividualAuthentication',
+                    params: {userId: this.user.userVO.id}
+                })
+            }
+        },
+        showAuthRejectDialog () {
+            this.isShowAuthRejectDialog = true
+        },
+        showAuthPassDialog () {
+            this.isShowAuthPassDialog = true
+        },
+        showAuthCheckingDialog () {
+            this.isShowAuthCheckingDialog = true
+        },
+        hideAuthRejectDialog () {
+            this.isShowAuthRejectDialog = false
+        },
+        hideAuthPassDialog () {
+            this.isShowAuthPassDialog = false
+        },
+        hideAuthCheckingDialog () {
+            this.isShowAuthCheckingDialog = false
+        },
+        deleteOldAuthInfo () {
+            this.hideAuthCheckingDialog()
+            this.hideAuthRejectDialog()
+            this.hideAuthPassDialog()
+            this.showLoading()
+            deleteAuthInfo().then((res) => {
+                this.hideLoading()
+                notify('success', '成功删除认证信息')
+            }).catch((error) => {
+                this.hideLoading()
+                notify('error', '删除认证信息失败:' + error.data)
+            })
+        },
+        getAuthInfo () {
+            this.showLoading()
+            if (this.user.userVO.authType == 'agency') {
+                getCurrentAgencyAuthInfo(this.user.userVO.id, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail)
+            }
+            if (this.user.userVO.authType == 'personal') {
+                getCurrentIndividualAuthenInfo(this.user.userVO.id, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail)
+            }
+            if (this.user.userVO.authType == 'enterprise') {
+                getCurrentEnterpriseAuthInfo(this.user.userVO.id, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail)
+            }
+        },
+        getCurrentAgencyAuthInfoSuccess () {
+            this.hideLoading()
+        },
+        getCurrentAgencyAuthInfoFail () {
+            this.hideLoading()
+        },
+        getCurrentIndividualAuthenInfoSuccess () {
+            this.hideLoading()
+        },
+        getCurrentIndividualAuthenInfoFail () {
+            this.hideLoading()
+        },
+        getCurrentEnterpriseAuthInfoSuccess () {
+            this.hideLoading()
+        },
+        getCurrentEnterpriseAuthInfoFail () {
+            this.hideLoading()
+        },
+        handleUpdateAuthInfo () {
+            this.hideAuthPassDialog()
+            this.hideAuthRejectDialog()
+            this.hideAuthCheckingDialog()
+            if (this.user.userVO.authType == 'personal') {
+                this.$router.push({
+                    name: 'IndividualAuthentication',
+                    params: {
+                        userId: this.authInfo.userId
+                    }
+                })
+            }
+            if (this.authInfo.type == 'enterprise') {
+                this.$router.push({
+                    name: 'EnterpriseAuthentication',
+                    params: {
+                        userId: this.authInfo.userId
+                    }
+                })
+            }
+            if (this.authInfo.type == 'agency') {
+                this.$router.push({
+                    name: 'AgencyAuthentication',
+                    params: {
+                        userId: this.authInfo.userId
+                    }
+                })
+            }
+        }
+    },
+    created () {
+        var self = this
+        this.$root.$on('user', function (val) {
+            self.user = val
+        })
+    },
+    beforeMount () {
+      this.getAddress();
+        this.setUserInfo()
+        // if (storageGet('user' != null)){
+        //   this.isLogin = true
+        // }
+    }
+  }
+</script>
+
+<style scoped>
+  .header-nav {
+    padding: 10px 0;
+    text-align: center;
+    display: flex;
+    font-size: 16px;
+    color: rgba(153, 153, 153, 1);
+    /*height:58px;*/
+    background:rgba(243,244,247,1);
+  }
+  .header-nav ul{
+    margin-bottom: 0;
+    padding: 0;
+    list-style: none;
+  }
+
+  .header-nav ul li {
+    display: inline-block;
+  }
+
+  .header-nav ul li a {
+    color: inherit;
+    padding: 5px;
+    font-weight: 500;
+    text-transform: uppercase;
+    border-radius: 3px;
+    position: relative;
+    display: block;
+  }
+
+  .header-nav .copyright {
+    padding: 5px 0;
+    color:#333;
+  }
+  .copyright a{
+    color:#666;
+  }
+</style>

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

@@ -0,0 +1,113 @@
+<template>
+  <div class="home-slice">
+<!--    <el-row style="padding-top: 40px" v-loading="loading" element-loading-text="权限检查中...">-->
+    <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" @click="goToCreateProject" style="cursor: pointer">立即进入<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" @click="goToCreateTask" style="cursor: pointer">立即进入<img src="../../assets/img/home-btn2.png" style="margin-left: 5px"></div>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+    import Apis from '@/js/api'
+    import Http from '@/js/http'
+    import {storageGet} from '@/js/index.js'
+    import {notify} from "../../constants";
+    export default {
+        name: 'HomeSlice',
+        data() {
+            return {
+                user: {},
+                isLogin: false,
+              loading:false
+            }
+        },
+        methods: {
+          showLoading() {
+            this.loading = true
+          },
+          hideLoading() {
+            this.loading = false
+          },
+            loadData(){
+                if (storageGet('user') != null) {
+                    this.isLogin = true;
+                    this.user = storageGet('user').userVO;
+                }
+            },
+            checkCreateProjectAuth() {
+                if (!this.isLogin) {
+                    console.log("请登录后访问");
+                    notify('warning', '请登录后访问');
+                }
+                else if(this.isLogin){
+                  this.showLoading();
+                    Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+                        console.log(res)
+                      this.hideLoading()
+                        this.$router.push('/project/create');
+                    }).catch((error) => {
+                      this.hideLoading()
+                        notify('error', error.data)
+                    })
+                }
+            },
+            checkCreateTaskAuth() {
+                if (!this.isLogin) {
+                    console.log("请登录后访问");
+                    notify('warning', '请登录后访问');
+                }
+                else if(this.isLogin){
+                  this.showLoading();
+                    Http.get(Apis.USER.IS_AGENCY.replace('{userId}', this.user.id)).then((res) => {
+                        console.log(res)
+                      this.hideLoading()
+                        this.$router.push('/square');
+                    }).catch((error) => {
+                      this.hideLoading()
+                        notify('error', error.data)
+                    })
+
+                }
+            },
+            goToCreateProject(){
+              this.checkCreateProjectAuth();
+            },
+            goToCreateTask(){
+                this.checkCreateTaskAuth();
+            },
+        },
+        mounted() {
+            this.loadData();
+        }
+    }
+</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>

+ 33 - 0
src/components/commons/MidTab.vue

@@ -0,0 +1,33 @@
+<template>
+  <div class="nav" stype="height:50px">
+    <!--TabNav-->
+    <el-tabs :value="currTab" @tab-click="handleTabClick" class="square-tab" v-if="menuArr">
+      <el-tab-pane v-if="!menuArr.menuArr1" v-for="item in menuArr" :name="item.name" :key="item.name" class="tab-menu1">
+        <span slot="label" style="font-size: 18px">{{item.label}}</span>
+      </el-tab-pane>
+      <el-tab-pane v-if="menuArr.menuArr1" v-for="item in menuArr.menuArr1" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
+<!--      <el-tab-pane v-if="menuArr.menuArr1" name="name"  class="tab-menu1" label="|">|</el-tab-pane>-->
+      <el-tab-pane v-if="menuArr.menuArr1" v-for="item in menuArr.menuArr2" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
+      <el-tab-pane v-if="menuArr.menuArr1" v-for="item in menuArr.menuArr3" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
+    </el-tabs>
+    <div>
+    </div>
+  </div>
+</template>
+
+
+<script>
+  import { mapGetters , mapActions} from 'vuex'
+  import  commonData  from '../../constants/tabMenu'
+  import Http from '@/js/http.js'
+  export default {
+    name: 'MidTab',
+    props: ['menuArr']
+  }
+
+</script>
+
+
+<style>
+
+</style>

+ 5 - 21
src/components/commons/ProjectItem.vue

@@ -1,21 +1,5 @@
 <template>
   <div class="project-item-container">
-    <!--<span class="col-xl-2 col-lg-3 col-md-4 col-sm-1" style="width: 150px">-->
-    <!--<img class="project-cover" src="@/assets/img/home_ban1.jpg">-->
-    <!--</span>-->
-    <!--<span class="project-title col-md-2 col-sm-10" style="width: 150px;font-size: 12px">{{project.name}}</span>-->
-    <!--<span class="project-title col-md-2 col-sm-10" style="width: 10%;font-size: 12px">{{project.id}}</span>-->
-    <!--<span class="col-md-2 col-sm-10" style="width: 10%">-->
-    <!--<span-->
-    <!--style="font-size: 10px;"-->
-    <!--v-bind:class="['badge',{ 'ios-platform': item=='IOS','android-platform': item=='ANDROID','web-platform': item=='WEB'}]"-->
-    <!--v-for="item in project.platform"-->
-    <!--&gt;{{item}}</span>-->
-    <!--</span>-->
-    <!--<span class="col-md-1 col-sm-5" style="width: 10%;font-size: 12px"><div class="badge">¥{{project.budget}}</div></span>-->
-    <!--<span class="project-td" style="width: 15%">-->
-    <!--<span class="btn btn-small btn-info" @click="goToProjectDetail(project.id)">查看详情</span>-->
-    <!--</span>-->
     <el-row type="flex" align="middle" justify="center" style="font-size: 14px;">
       <el-col :span="6" type="flex" align="middle" justify="center">
         <el-badge :value="project.statusVO.text" class="item" :type="project.statusVO.style">
@@ -24,14 +8,17 @@
       </el-col>
       <el-col :span="6" type="flex" align="middle" justify="center">{{project.name}}</el-col>
       <!--<el-col :span="4">{{project.id}}</el-col>-->
-      <el-col :span="6" type="flex" align="middle" justify="center">
+      <el-col :span="3" type="flex" align="middle" justify="center">
         <span style="font-size: 10px;"
               v-bind:class="['badge']"
         >{{project.platform}}</span>
       </el-col>
-      <el-col :span="2" type="flex" align="middle" justify="center">
+      <el-col :span="3" type="flex" align="middle" justify="center">
         <div class="badge">¥{{project.budget}}</div>
       </el-col>
+      <el-col :span="3" type="flex" align="middle" justify="center">
+        <div>{{project.joinCount}}</div>
+      </el-col>
       <el-col :span="4" type="flex" align="middle" justify="center">
         <el-badge v-if="project.needHandle" is-dot class="item">
           <span class="btn btn-small btn-info" @click="goToProjectDetail(project.id)">查看详情</span>
@@ -39,10 +26,7 @@
         <span v-if="!project.needHandle" class="btn btn-small btn-info" @click="goToProjectDetail(project.id)">查看详情</span>
       </el-col>
     </el-row>
-
-
   </div>
-
 </template>
 
 <script>

+ 13 - 4
src/components/commons/ProvinceCity.vue

@@ -8,7 +8,7 @@
       prop="status"
       style="width: calc(50% - 20px)"
     >
-      <el-select v-model="province" placeholder="请选择" @change="provinceChanged">
+      <el-select v-model="province" placeholder="请选择" @change="provinceChanged" :disabled="isModifyMode">
 <!--        <el-option :key="''" :label="'全部'" :value="''"></el-option>-->
         <el-option v-for="item in provinces" :key="item.code" :label="item.name" :value="item.code"></el-option>
       </el-select>
@@ -20,7 +20,7 @@
       prop="status"
       style="width: calc(50% - 20px);margin-right: 0px"
     >
-      <el-select v-model="city" :loading="loadingCity" @change="cityChanged" placeholder="请选择">
+      <el-select v-model="city" :loading="loadingCity" @change="cityChanged" placeholder="请选择" :disabled="isModifyMode">
         <el-option :key="''" :label="'请选择'" :value="''"></el-option>
         <el-option v-for="item in cities" :key="item.code" :label="item.name" :value="item.code"></el-option>
       </el-select>
@@ -40,6 +40,10 @@ export default {
     cityCode: {
       type: String,
       default: ""
+    },
+    isModifyMode:{
+      type:Boolean,
+      default:false
     }
   },
   created() {
@@ -49,6 +53,10 @@ export default {
     this.province = this.provinceCode;
     this.provinceChanged(this.provinceCode);
     this.city = this.cityCode;
+    console.log(this.city)
+    console.log(this.province)
+    console.log(this.provinceCode)
+    console.log(this.cityCode)
   },
   data() {
     return {
@@ -98,8 +106,9 @@ export default {
     data(){
       this.province = this.provinceCode
       this.city = this.cityCode
-    }
-  }
+    },
+
+  },
 };
 </script>
 

+ 84 - 0
src/components/commons/SearchBar.vue

@@ -0,0 +1,84 @@
+<template>
+  <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">
+          <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 " class="">
+            <el-tabs v-model="searchType" type="card" @tab-click="handleTypeClick" v-if="tabArr">
+              <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">
+              <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>
+    <!--TabNav-->
+    <el-tabs :value="currTab" @tab-click="handleTabClick" class="square-tab" v-if="menuArr">
+      <el-tab-pane v-if="!menuArr.menuArr1" v-for="item in menuArr" :name="item.name" :key="item.name" class="tab-menu1">
+        <span slot="label" style="font-size: 18px">{{item.label}}</span>
+      </el-tab-pane>
+      <el-tab-pane v-if="menuArr.menuArr1" v-for="item in menuArr.menuArr1" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
+      <el-tab-pane v-if="menuArr.menuArr1" v-for="item in menuArr.menuArr2" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
+      <el-tab-pane v-if="menuArr.menuArr1" v-for="item in menuArr.menuArr3" :label="item.label" :name="item.name" :key="item.name"></el-tab-pane>
+    </el-tabs>
+    <div>
+    </div>
+  </div>
+</template>
+
+
+<script>
+  import { mapGetters , mapActions} from 'vuex'
+  import  commonData  from '../../constants/tabMenu'
+  import Http from '@/js/http.js'
+  export default {
+    name: 'SearchBar',
+    // components:{},
+    props: ['tabArr', 'menuArr'],
+    data() {
+      return {
+        searchType: 'project',
+        searchVal: '',
+        // currTab:''
+      }
+    },
+
+    methods: {
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+    }
+  }
+
+</script>
+
+
+<style>
+
+</style>

+ 109 - 0
src/components/commons/TopSearch.vue

@@ -0,0 +1,109 @@
+<template>
+  <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>
+</template>
+
+
+<script>
+    import {mapGetters, mapActions} from 'vuex'
+    import commonData from '../../constants/tabMenu'
+    import Http from '@/js/http.js'
+    import {storageGet} from '@/js/index.js'
+    import {notify} from "../../constants";
+
+    export default {
+        name: 'TopSearch',
+        props: ['searchVal','searchType','searchTypeArr'],
+        data() {
+            return {
+                isLogin: false,
+                resultList:[],
+            }
+        },
+
+        methods: {
+            loadData(){
+                if (storageGet('user') != null) {
+                    this.isLogin = true;
+                }
+            },
+          checkLogin() {
+            this.checkCreateProjectAuth();
+          },
+          checkCreateProjectAuth() {
+            if (!this.isLogin) {
+              console.log("请登录后访问");
+              notify('warning', '请登录后访问');
+            } else if (this.isLogin) {
+              Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+                this.$router.push('/project/create');
+              }).catch((error) => {
+                notify('error', error.data)
+              })
+            }
+          },
+            handleSearchData() {
+                console.log(this.searchType);
+                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) => {
+                    console.log(res.data.expertPage.content);
+                    resultList = res.data.expertPage.content;
+                })
+            },
+            gotoHome() {
+                this.$router.push('/home');
+            },
+            handleTypeClick(tab){
+                this.searchType = tab.name
+            },
+        },
+        mounted() {
+            this.loadData();
+        }
+    }
+
+</script>
+
+
+<style>
+
+</style>

+ 726 - 721
src/components/project/Project.vue

@@ -15,7 +15,9 @@
             <el-form-item label="项目名称" prop="name">
               <el-input size="small" v-if="isModifyMode" v-model="project.name"></el-input>
               <span v-if="!isModifyMode" style="margin-right: 5px">{{project.name}}</span>
-              <el-tag v-if="!isModifyMode" :type="project.statusVO&&project.statusVO.style">{{project.statusVO?project.statusVO.text:''}}</el-tag>
+              <el-tag v-if="!isModifyMode" :type="project.statusVO&&project.statusVO.style">
+                {{project.statusVO?project.statusVO.text:''}}
+              </el-tag>
             </el-form-item>
             <el-form-item size="small" label="联系人" prop="contactName">
               <el-input v-if="isModifyMode" v-model="project.contactName" placeholder="请输入联系人姓名"></el-input>
@@ -30,7 +32,7 @@
                 ¥
                 <template slot="append"></template>
               </el-input>
-              <span v-if="!isModifyMode">{{project.budget}}¥</span>
+              <span v-if="!isModifyMode">¥{{project.budget}}</span>
             </el-form-item>
 
             <el-form-item label="计价标准" prop="valuationStandard">
@@ -39,15 +41,15 @@
               <span v-if="!isModifyMode">{{project.valuationStandard}}</span>
             </el-form-item>
 
-<!--            <el-form-item size="small" label="计价标准" prop="valuationStandard">-->
-<!--              <el-input v-if="isModifyMode" type="number" v-model="project.valuationStandard">-->
-<!--                <template slot="append"></template>-->
-<!--              </el-input>-->
-<!--              <span v-if="!isModifyMode">{{project.valuationStandard}}</span>-->
-<!--            </el-form-item>-->
-            <el-form-item v-if="!isModifyMode" size="small" label="状态" prop="status">
-              <span v-if="!isModifyMode">{{project.status==1?'等待接收':(project.status==2?'已被接收':(project.status==3?'项目已提交':'项目已结束'))}}</span>
-            </el-form-item>
+            <!--            <el-form-item size="small" label="计价标准" prop="valuationStandard">-->
+            <!--              <el-input v-if="isModifyMode" type="number" v-model="project.valuationStandard">-->
+            <!--                <template slot="append"></template>-->
+            <!--              </el-input>-->
+            <!--              <span v-if="!isModifyMode">{{project.valuationStandard}}</span>-->
+            <!--            </el-form-item>-->
+            <!--            <el-form-item v-if="!isModifyMode" size="small" label="状态" prop="status">-->
+            <!--              <span v-if="!isModifyMode">{{project.statusVO?project.statusVO.text:''}}</span>-->
+            <!--            </el-form-item>-->
             <el-form-item size="small" label="区域管理员" prop="institution" v-if="project.institution">
               <span v-if="!isModifyMode">{{project.institution}}</span>
             </el-form-item>
@@ -65,7 +67,7 @@
             <el-form-item label="领域类型" prop="field">
               <el-radio-group v-if="isModifyMode" v-model="project.field">
                 <span v-for="(item,index) in fields" :key="index">
-              <el-radio :label="item.code" style="margin: 3px">{{ item.name }}&nbsp;&nbsp;&nbsp;&nbsp;</el-radio>
+              <el-radio :label="item.name" style="margin: 3px">{{ item.name }}&nbsp;&nbsp;&nbsp;&nbsp;</el-radio>
             </span>
               </el-radio-group>
               <span
@@ -78,7 +80,7 @@
             <el-form-item label="应用类型" prop="platform">
               <el-radio-group v-if="isModifyMode" v-model="project.platform">
                 <span v-for="(item,index) in platforms" :key="index">
-              <el-radio :label="item.code" style="margin: 3px">{{ item.name }}&nbsp;&nbsp;&nbsp;&nbsp;</el-radio>
+              <el-radio :label="item.name" style="margin: 3px">{{ item.name }}&nbsp;&nbsp;&nbsp;&nbsp;</el-radio>
             </span>
               </el-radio-group>
               <span
@@ -90,7 +92,7 @@
             <el-form-item label="测试类型" prop="type">
               <el-checkbox-group v-if="isModifyMode" v-model="project.type">
             <span v-for="(item,index) in serviceType" :key="index">
-              <el-checkbox :label="item.code" name="type">{{ item.name }}&nbsp;&nbsp;</el-checkbox>
+              <el-checkbox :label="item.name" name="type">{{ item.name }}&nbsp;&nbsp;</el-checkbox>
             </span>
               </el-checkbox-group>
               <span v-if="!isModifyMode" class="badge" v-for="item in project.type">{{item}}</span>
@@ -109,14 +111,14 @@
               </div>
               <el-tabs :tab-position="tabPosition" v-model="project.resource" style="max-height: 200px;"
                        v-if="isModifyMode">
-                <el-tab-pane :label="resourceType[0]" name="0">
+                <el-tab-pane :label="resourceType[0]" :name="0">
                   <el-radio-group v-model="project.institution">
                     <el-radio :label="item" name="type" v-for="(item,index) in institutionArray" :key="index">
                       {{item.name}}
                     </el-radio>
                   </el-radio-group>
                 </el-tab-pane>
-                <el-tab-pane :label="resourceType[1]" name="1">
+                <el-tab-pane :label="resourceType[1]" :name="1">
                   <provincecity
                     ref="addFormProvince"
                     @selectChange="locationChange"
@@ -124,7 +126,7 @@
                     :cityCode="project.location==null?'3201':project.location.cityCode"
                   ></provincecity>
                 </el-tab-pane>
-                <el-tab-pane :label="resourceType[2]" name="2"></el-tab-pane>
+                <el-tab-pane :label="resourceType[2]" :name="2"></el-tab-pane>
               </el-tabs>
             </el-form-item>
 
@@ -149,7 +151,7 @@
                   <em>点击上传</em>
                 </div>
               </el-upload>
-              <span v-if="!isModifyMode">
+              <span >
             <a :href="project.requireDocUrl" v-if="project.requireDocUrl!=null && project.requireDocUrl!=''"><el-link
               :underline="false" type="primary"><i
               class="el-icon-document"></i>下载文档</el-link></a>
@@ -239,7 +241,7 @@
         </el-col>
       </el-row>
     </div>
-<!--    任务列表-->
+    <!--    任务列表-->
     <div class="create-body" v-if="!isModifyMode && showTaskList">
       <div class="title h2">任务列表</div>
       <div class="task-list">
@@ -281,11 +283,11 @@
                 @click="goToTaskDetail(projectId, scope.row.id)"
               >查看详情
               </div>
-<!--              <div-->
-<!--                class="btn btn-small btn-danger"-->
-<!--                @click="handleDelete(scope.$index, scope.row.id)"-->
-<!--              >删除-->
-<!--              </div>-->
+              <!--              <div-->
+              <!--                class="btn btn-small btn-danger"-->
+              <!--                @click="handleDelete(scope.$index, scope.row.id)"-->
+              <!--              >删除-->
+              <!--              </div>-->
             </template>
           </el-table-column>
         </el-table>
@@ -300,743 +302,746 @@
 </template>
 
 <script>
-import ReportList from '@/components/report/ReportList'
-import Http from '@/js/http.js'
-import Apis from '@/js/api.js'
-import ResourceType from '@/constants/enum/resource-type'
-import provincecity from '@/components/commons/ProvinceCity'
-import {notify} from '@/constants/index'
-import echarts from 'echarts'
-import {
-  checkFileType,
-  ensureEndProject,
-  getAllInstitutions,
-  getAllPlatformTypes,
-  getAllFields,
-  getAllServiceTypes,
-  getFormalTimeFromDate,
-  getProvinceCodeByProvinceName,
-  getProvinceNameByProvinceCode,
-  receiveProjectRequest,
-  rejectProject,
-  storageGet,
-  submitProjectRequest,
-  deleteTask
-} from '@/js/index'
+  import ReportList from '@/components/report/ReportList'
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import ResourceType from '@/constants/enum/resource-type'
+  import provincecity from '@/components/commons/ProvinceCity'
+  import {notify} from '@/constants/index'
+  import echarts from 'echarts'
+  import {
+    checkFileType,
+    ensureEndProject,
+    getAllInstitutions,
+    getAllPlatformTypes,
+    getAllFields,
+    getAllServiceTypes,
+    getFormalTimeFromDate,
+    getProvinceCodeByProvinceName,
+    getProvinceNameByProvinceCode,
+    receiveProjectRequest,
+    rejectProject,
+    storageGet,
+    submitProjectRequest,
+    deleteTask
+  } from '@/js/index'
 
-export default {
-  name: 'Project',
-  components: {
-    provincecity,
-    ReportList
-  },
-  data () {
-    var validatePass = (rule, value, callback) => {
-      var reg = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/
-      if (this.project.contactPhone) {
-        if (!reg.test(this.project.contactPhone)) {
-          callback(new Error('请检查手机号码'))
-        } else {
-          callback()
+  export default {
+    name: 'Project',
+    components: {
+      provincecity,
+      ReportList
+    },
+    data() {
+      var validatePass = (rule, value, callback) => {
+        var reg = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/
+        if (this.project.contactPhone) {
+          if (!reg.test(this.project.contactPhone)) {
+            callback(new Error('请检查手机号码'))
+          } else {
+            callback()
+          }
         }
       }
-    }
-    return {
-      showTaskList: true,
-      acceptedUserList:[],
-      projectId: 0,
-      user: {},
-      loading: false,
-      tabPosition: 'top',
-      institutionArray: [],
-      isModifyMode: false,
-      platforms: [],
-      fields: [],
-      resourceType: ResourceType,
-      serviceType: [],
-      projectOperationControl: {
-        confirmFinish: false,
-        createTask: false,
-        finish: false,
-        receive: false,
-        reject: false,
-        update: false,
-        uploadReport: false,
-      },
-      project: {
-        userId: 0,
-        name: '',
-        type: [],
-        platform: '',
-        valuationStandard: '',
-        entrustUnit:'',
-        field: '',
-        desc: '',
-        resource: '',
-        location: '',
-        institution: {},
-        contactName: '',
-        contactPhone: '',
-        doc: [],
-        requireDocUrl: '',
-        file: [],
-        fileUrl: '',
-        budget: '',
-        price: '',
-        datetime: '',
-        usage: '',
-        status: ''
-      },
-      task: [],
-      progress: [],
-      reportList: [],
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() <= Date.now();
+      return {
+        showTaskList: true,
+        acceptedUserList: [],
+        projectId: 0,
+        user: {},
+        loading: false,
+        tabPosition: 'top',
+        institutionArray: [],
+        isModifyMode: false,
+        platforms: [],
+        fields: [],
+        resourceType: ResourceType,
+        serviceType: [],
+        projectOperationControl: {
+          confirmFinish: false,
+          createTask: false,
+          finish: false,
+          receive: false,
+          reject: false,
+          update: false,
+          uploadReport: false,
         },
-        shortcuts: [
-          {
-            text: '今天',
-            onClick (picker) {
-              picker.$emit('pick', new Date())
-            }
-          },
-          {
-            text: '明天',
-            onClick (picker) {
-              const date = new Date()
-              date.setTime(date.getTime() + 3600 * 1000 * 24)
-              picker.$emit('pick', date)
-            }
+        project: {
+          userId: 0,
+          name: '',
+          type: [],
+          platform: '',
+          valuationStandard: '',
+          entrustUnit: '',
+          field: '',
+          desc: '',
+          resource: '',
+          location: '',
+          institution: {},
+          contactName: '',
+          contactPhone: '',
+          doc: [],
+          requireDocUrl: '',
+          file: [],
+          fileUrl: '',
+          budget: '',
+          price: '',
+          datetime: '',
+          usage: '',
+          status: ''
+        },
+        task: [],
+        progress: [],
+        reportList: [],
+        pickerOptions: {
+          disabledDate(time) {
+            return time.getTime() <= Date.now();
           },
-          {
-            text: '一周后',
-            onClick (picker) {
-              const date = new Date()
-              date.setTime(date.getTime() + 3600 * 1000 * 24 * 7)
-              picker.$emit('pick', date)
-            }
-          }
-        ]
-      },
-      rules: {
-        name: [
-          {required: true, message: '请输入项目名称', trigger: 'blur'},
-          {min: 5, max: 50, message: '项目名称长度在 5 到 50 个字符', trigger: 'blur'}
-        ],
-        contactName: [
-          {required: true, message: '请输入联系人姓名', trigger: 'blur'}
-          // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
-        ],
-        contactPhone: [
-          {required: true, message: '请输入手机号', trigger: 'blur'},
-          {min: 11, max: 11, message: '请输入正确的手机号', trigger: 'blur'},
-          {
-            validator: (rule, value, callback) => {
-              if (!this.checkPhoneNumber(value)) {
-                callback(new Error('手机号输入有误'))
-              } else {
-                callback()
+          shortcuts: [
+            {
+              text: '今天',
+              onClick(picker) {
+                picker.$emit('pick', new Date())
               }
-            }, trigger: 'blur'
-          },
-        ],
-        type: [
-          {
-            type: 'array',
-            required: true,
-            message: '请至少选择一种测试类型',
-            trigger: 'change'
-          }
-        ],
-        platform: [
-          {
-            required: true,
-            message: '请选择一个应用类型',
-            trigger: 'change'
-          }
-        ],
-        field: [
+            },
             {
-                required: true,
-                message: '请选择一个领域类型',
-                trigger: 'change'
-            }
-        ],
-        desc: [{required: false, message: '请填写描述', trigger: 'blur'}],
-        //price: [{required: true, message: '请填写价格', trigger: 'blur'}],
-        budget: [
-          {required: true, message: '预算不可为空', trigger: 'blur'},
-          {
-            validator: (rule, value, callback) => {
-              if (value < 0) {
-                callback(new Error('请输入不小于0的数'))
-              } else {
-                callback()
+              text: '明天',
+              onClick(picker) {
+                const date = new Date()
+                date.setTime(date.getTime() + 3600 * 1000 * 24)
+                picker.$emit('pick', date)
               }
-            }, trigger: 'blur'
-          },
-        ],
-        resource: [
-          {required: true},
-          {
-            validator: (rule, value, callback) => {
-              if (value == 0 && this.project.institution == null) {
-                callback(new Error('定向发布至少要选择一个区域管理员'))
-              } else {
-                callback()
+            },
+            {
+              text: '一周后',
+              onClick(picker) {
+                const date = new Date()
+                date.setTime(date.getTime() + 3600 * 1000 * 24 * 7)
+                picker.$emit('pick', date)
               }
-            }, trigger: 'change'
-          },
-        ],
-        datetime: [{required: true, message: '截止时间不可为空', trigger: 'blur'}],
-      }
-    }
-  },
-  mounted () {
-    this.$nextTick(() => {
-      this.init();
-    })
-  },
-  watch: {
-    serviceType (val) {
-      this.serviceType = val
-    },
-    institutionArray (val) {
-      this.institutionArray = val
-    },
-    // 'project.institution' () {
-    //   if (this.project.institution) {
-    //     //this.$refs.addFormProvince.resetProviceCity()
-    //     this.project.location = {provinceCode: '', cityCode: ''}
-    //   }
-    // },
-    // 'project.location' () {
-    //   if (this.project.location.provinceCode || this.project.location.cityCode) {
-    //     this.project.institution = ''
-    //   }
-    // },
-    // 'project.resource' () {
-    //   if (this.project.resource == '2') {
-    //     //this.$refs.addFormProvince.resetProviceCity()
-    //     this.project.institution = ''
-    //     this.project.location = {provinceCode: '', cityCode: ''}
-    //   }
-    // },
-    deep: true
-  },
-  methods: {
-    updateLocation (location) {
-      //console.log(location)
-      const loactionName = getProvinceNameByProvinceCode(location.provinceCode, location.cityCode)
-      // var provinceName = ''
-      // var cityName = ''
-      // for (var item of provinceCityJSON.provinces) {
-      //   if (item.code === location.provinceCode) {
-      //     provinceName = item.name
-      //     for (var city of item.cities) {
-      //       if (city.code === location.cityCode) {
-      //         cityName = city.name
-      //         break
-      //       }
-      //     }
-      //   }
-      // }
-      return loactionName.provinceCode + ' / ' + loactionName.cityCode
-    },
-    init () {
-      this.projectId = this.$route.params.projectId
-      this.setServiceType()
-      this.setFields()
-      this.setPlatformType()
-      this.setInstitutions()
-      this.setUserInfo()
-      this.loadData()
-      //this.reformDate(123)
-      // this.project.platform.map(item => {
-      //   this.platformType.push(PlatformType[item])
-      // })
-    },
-    //画个饼
-    setEcharts () {
-      // 基于准备好的dom,初始化echarts实例
-      let myChart = echarts.init(document.getElementById('pieImage'))
-      // 绘制图表
-      var option = {
-        tooltip: {
-          trigger: 'item',
-          formatter: '{a} <br/>{b}: {c} ({d}%)'
-        },
-        legend: {
-          orient: 'vertical',
-          x: 'left',
-          data: ['已完成', '进行中']
+            }
+          ]
         },
-        series: [
-          {
-            name: '任务状态',
-            type: 'pie',
-            radius: ['50%', '70%'],
-            avoidLabelOverlap: false,
-            label: {
-              normal: {
-                show: false,
-                position: 'center'
-              },
-              emphasis: {
-                show: true,
-                textStyle: {
-                  fontSize: '30',
-                  fontWeight: 'bold'
+        rules: {
+          name: [
+            {required: true, message: '请输入项目名称', trigger: 'blur'},
+            {min: 5, max: 50, message: '项目名称长度在 5 到 50 个字符', trigger: 'blur'}
+          ],
+          contactName: [
+            {required: true, message: '请输入联系人姓名', trigger: 'blur'}
+            // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
+          ],
+          contactPhone: [
+            {required: true, message: '请输入手机号', trigger: 'blur'},
+            {min: 11, max: 11, message: '请输入正确的手机号', trigger: 'blur'},
+            {
+              validator: (rule, value, callback) => {
+                if (!this.checkPhoneNumber(value)) {
+                  callback(new Error('手机号输入有误'))
+                } else {
+                  callback()
                 }
-              }
+              }, trigger: 'blur'
             },
-            labelLine: {
-              normal: {
-                show: false
-              }
+          ],
+          type: [
+            {
+              type: 'array',
+              required: true,
+              message: '请至少选择一种测试类型',
+              trigger: 'change'
+            }
+          ],
+          platform: [
+            {
+              required: true,
+              message: '请选择一个应用类型',
+              trigger: 'change'
+            }
+          ],
+          field: [
+            {
+              required: true,
+              message: '请选择一个领域类型',
+              trigger: 'change'
+            }
+          ],
+          desc: [{required: false, message: '请填写描述', trigger: 'blur'}],
+          //price: [{required: true, message: '请填写价格', trigger: 'blur'}],
+          budget: [
+            {required: true, message: '预算不可为空', trigger: 'blur'},
+            {
+              validator: (rule, value, callback) => {
+                if (value < 0) {
+                  callback(new Error('请输入不小于0的数'))
+                } else {
+                  callback()
+                }
+              }, trigger: 'blur'
             },
-            data: this.progress,
-            color:['#909399','#409EFF']
-          }
-        ]
-      }
-      myChart.setOption(option)
-    },
-    //提交修改
-    submitForm (formName) {
-      this.$refs['project'].validate(valid => {
-        if (valid) {
-          this.showLoading()
-          const newProject = {
-            userId: this.user.userVO.id,
-            name: this.project.name,
-            type: this.project.type,
-            platform: this.project.platform,
-            valuationStandard: this.project.valuationStandard,
-            entrustUnit: this.project.entrustUnit,
-            field: this.project.field,
-            desc: this.project.desc,
-            resource: this.project.resource,
-            location: getProvinceNameByProvinceCode(this.project.location.provinceCode, this.project.location.cityCode),
-            institution: this.project.institution == null ? null : this.project.institution.id,
-            contactName: this.project.contactName,
-            contactPhone: this.project.contactPhone,
-            doc: this.project.requireDocUrl,
-            file: this.project.fileUrl,
-            budget: this.project.budget,
-            price: this.project.price,
-            datetime: this.project.datetime,
-            usage: this.project.usage,
-          }
-          console.log(newProject);
-          Http.put(Apis.PROJECT.UPDATE_PROJECT.replace('{projectId}', this.projectId), newProject).then((res) => {
-            console.log(res)
-            this.projectId = res.projectDetails.id
-            this.project.name = res.projectDetails.name
-            this.project.contactName = res.projectDetails.contactName
-            this.project.contactPhone = res.projectDetails.contactPhone
-            this.project.type = res.projectDetails.type
-            this.project.platform = res.projectDetails.platform
-            this.project.valuationStandard = res.projectDetails.valuationStandard
-            this.project.entrustUnit = res.projectDetails.entrustUnit
-            this.project.field = res.projectDetails.field
-            this.project.desc = res.projectDetails.desc
-            this.project.doc = []
-            this.project.file = []
-            this.project.resource = res.projectDetails.resource
-            this.project.location = getProvinceCodeByProvinceName(res.projectDetails.location.provinceCode, res.projectDetails.location.cityCode)
-            this.project.institution = res.projectDetails.institution
-            this.project.datetime = new Date(res.projectDetails.datetime)
-            this.project.price = res.projectDetails.price
-            this.project.budget = res.projectDetails.budget
-            this.project.usage = res.projectDetails.usage
-            this.project.fileUrl = res.projectDetails.file
-            this.project.requireDocUrl = res.projectDetails.doc
-            this.task = res.taskList
-            this.reportList = res.reportList
-            this.isModifyMode = false
-            this.hideLoading()
-            notify('success', '项目修改成功')
-          }).catch(error => {
-            this.hideLoading()
-            notify('error', error.data)
-            console.log(error)
-          })
-        } else {
-          notify('error', '表单填写错误!')
-          return false
+          ],
+          resource: [
+            {required: true},
+            {
+              validator: (rule, value, callback) => {
+                if (value == 0 && this.project.institution == null) {
+                  callback(new Error('定向发布至少要选择一个区域管理员'))
+                } else {
+                  callback()
+                }
+              }, trigger: 'change'
+            },
+          ],
+          datetime: [{required: true, message: '截止时间不可为空', trigger: 'blur'}],
         }
-      })
-    },
-    //重置表单
-    resetForm (formName) {
-      this.$refs[formName].resetFields()
-      this.project.name = ''
-      this.project.type = []
-      this.project.platform = ''
-      this.project.valuationStandard = ''
-      this.project.entrustUnit = ''
-      this.project.field = ''
-      this.project.desc = ''
-      this.project.doc = ''
-      this.project.file = ''
-      this.project.contactName = ''
-      this.project.contactPhone = ''
-      this.project.resource = '2'
-      this.project.institution = ''
-      this.project.datetime = ''
-      this.project.price = ''
-      this.project.usage = ''
-      this.project.budget = ''
-    },
-    //进入修改项目页面
-    modifyForm () {
-      this.isModifyMode = true
-      this.project.type = []
-      this.project.platform = []
-      this.project.field = []
-      console.log(this.project)
-      // console.log(this.project.doc)
-      //this.setInstitutions()
-      //获得update 信息
-      //this.loadData()
-    },
-    //接收项目
-    receiveProject () {
-      this.$confirm('确认接收项目?', '提示', {
-        confirmButtonText: '确认接收',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        this.showLoading()
-        console.log('接收项目')
-        receiveProjectRequest(this.projectId, this.user.userVO.id, this.receiveProjectSuccess, this.receiveProjectFail)
-      }).catch(() => {
-      })
-    },
-    receiveProjectSuccess (res) {
-      this.hideLoading()
-      notify('success', '项目接收成功!')
-      this.projectOperationControl = res.projectOperationControl
-      this.project.status = res.projectDetails.status
-      this.project.institution = res.projectDetails.institution
-    },
-    receiveProjectFail (error) {
-      this.hideLoading()
-      notify('error', '接收项目失败:' + error.data)
-    },
-    //拒绝项目
-    rejectProject () {
-      this.$confirm('确认拒绝项目?', '提示', {
-        confirmButtonText: '确认拒绝',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        this.showLoading()
-        rejectProject(this.projectId, this.rejectProjectSuccess, this.rejectProjectFail)
-      }).catch(() => {
-      })
-
-    },
-    rejectProjectSuccess (res) {
-      this.hideLoading()
-      notify('success', '拒绝项目成功')
-    },
-    rejectProjectFail (error) {
-      this.hideLoading()
-      notify('error', '拒绝项目失败:' + error.data)
-    },
-    //提交项目
-    submitProjectRequest () {
-      this.$confirm('确认提交项目?', '提示', {
-        confirmButtonText: '确认提交',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        this.showLoading()
-        submitProjectRequest(this.projectId, this.submitProjectRequestSuccess, this.submitProjectRequestFail)
-      }).catch(() => {
-      })
-    },
-    submitProjectRequestSuccess (res) {
-      this.hideLoading()
-      notify('success', '项目提交成功!')
-      this.loadData()
-      this.projectOperationControl = res.projectOperationControl
-      this.project.status = res.projectDetails.status
-      this.project.institution = res.projectDetails.institution
-    },
-    submitProjectRequestFail (error) {
-      this.hideLoading()
-      notify('error', '提交项目失败:' + error.data)
-    },
-    //结束项目
-    endProject () {
-      this.$confirm('确认结束项目?', '提示', {
-        confirmButtonText: '确认结束',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        this.showLoading()
-        ensureEndProject(this.projectId, this.endProjectSuccess, this.endProjectFail)
-      }).catch(() => {
-      })
-
-    },
-    endProjectSuccess (res) {
-      this.hideLoading()
-      notify('success', '项目提交成功!')
-      this.loadData()
-      this.projectOperationControl = res.projectOperationControl
-      this.project.status = res.projectDetails.status
-      this.project.institution = res.projectDetails.institution
-    },
-    endProjectFail (error) {
-      this.hideLoading()
-      notify('error', '结束项目失败:' + error.data)
-    },
-    cancelMode (formName) {
-      this.isModifyMode = false
-      this.loadData()
-
+      }
     },
-    goToTaskDetail (projectId, taskId) {
-      this.$router.push({
-        name: 'Task',
-        params: {projectId: projectId, taskId: taskId}
+    mounted() {
+      this.$nextTick(() => {
+        this.init();
       })
     },
-    createNewTask () {
-      const that = this
-      this.$router.push({
-        name: 'TaskCreate',
-        params: {projectId: that.projectId}
-      })
+    watch: {
+      serviceType(val) {
+        this.serviceType = val
+      },
+      institutionArray(val) {
+        this.institutionArray = val
+      },
+      // 'project.institution' () {
+      //   if (this.project.institution) {
+      //     //this.$refs.addFormProvince.resetProviceCity()
+      //     this.project.location = {provinceCode: '', cityCode: ''}
+      //   }
+      // },
+      // 'project.location' () {
+      //   if (this.project.location.provinceCode || this.project.location.cityCode) {
+      //     this.project.institution = ''
+      //   }
+      // },
+      // 'project.resource' () {
+      //   if (this.project.resource == '2') {
+      //     //this.$refs.addFormProvince.resetProviceCity()
+      //     this.project.institution = ''
+      //     this.project.location = {provinceCode: '', cityCode: ''}
+      //   }
+      // },
+      deep: true
     },
-    createReport () {
-      this.$router.push({
-        name: 'ProjectReportCreate',
-        params: {
-          scope: 0,
-          dependencyCode: this.projectId,
-          projectId: this.projectId,
+    methods: {
+      updateLocation(location) {
+        //console.log(location)
+        const loactionName = getProvinceNameByProvinceCode(location.provinceCode, location.cityCode)
+        // var provinceName = ''
+        // var cityName = ''
+        // for (var item of provinceCityJSON.provinces) {
+        //   if (item.code === location.provinceCode) {
+        //     provinceName = item.name
+        //     for (var city of item.cities) {
+        //       if (city.code === location.cityCode) {
+        //         cityName = city.name
+        //         break
+        //       }
+        //     }
+        //   }
+        // }
+        return loactionName.provinceCode + ' / ' + loactionName.cityCode
+      },
+      init() {
+        this.projectId = this.$route.params.projectId
+        this.setServiceType()
+        this.setFields()
+        this.setPlatformType()
+        this.setInstitutions()
+        this.setUserInfo()
+        this.loadData()
+        //this.reformDate(123)
+        // this.project.platform.map(item => {
+        //   this.platformType.push(PlatformType[item])
+        // })
+      },
+      //画个饼
+      setEcharts() {
+        // 基于准备好的dom,初始化echarts实例
+        let myChart = echarts.init(document.getElementById('pieImage'))
+        // 绘制图表
+        var option = {
+          tooltip: {
+            trigger: 'item',
+            formatter: '{a} <br/>{b}: {c} ({d}%)'
+          },
+          legend: {
+            orient: 'vertical',
+            x: 'left',
+            data: ['已完成', '进行中']
+          },
+          series: [
+            {
+              name: '任务状态',
+              type: 'pie',
+              radius: ['50%', '70%'],
+              avoidLabelOverlap: false,
+              label: {
+                normal: {
+                  show: false,
+                  position: 'center'
+                },
+                emphasis: {
+                  show: true,
+                  textStyle: {
+                    fontSize: '30',
+                    fontWeight: 'bold'
+                  }
+                }
+              },
+              labelLine: {
+                normal: {
+                  show: false
+                }
+              },
+              data: this.progress,
+              color: ['#909399', '#409EFF']
+            }
+          ]
         }
-      })
-    },
-    handleDelete (index, id) {
-      this.$confirm('确认删除该任务?')
-        .then(_ => {
-          //done()
-          //id->taskid
-          console.log(id)
-          console.log(this.projectId)
-          deleteTask(this.projectId,id,this.deleteTaskSuccess,this.deleteTaskFail)
+        myChart.setOption(option)
+      },
+      //提交修改
+      submitForm(formName) {
+        this.$refs['project'].validate(valid => {
+          if (valid) {
+            this.showLoading()
+            const newProject = {
+              userId: this.user.userVO.id,
+              name: this.project.name,
+              type: this.project.type,
+              platform: this.project.platform,
+              valuationStandard: this.project.valuationStandard,
+              entrustUnit: this.project.entrustUnit,
+              field: this.project.field,
+              desc: this.project.desc,
+              resource: this.project.resource,
+              location: getProvinceNameByProvinceCode(this.project.location.provinceCode, this.project.location.cityCode),
+              institution: this.project.institution == null ? null : this.project.institution.id,
+              contactName: this.project.contactName,
+              contactPhone: this.project.contactPhone,
+              doc: this.project.requireDocUrl,
+              file: this.project.fileUrl,
+              budget: this.project.budget,
+              price: this.project.price,
+              datetime: this.project.datetime,
+              usage: this.project.usage,
+            }
+            console.log(newProject);
+            Http.put(Apis.PROJECT.UPDATE_PROJECT.replace('{projectId}', this.projectId), newProject).then((res) => {
+              console.log(res)
+              this.projectId = res.projectDetails.id
+              this.project.name = res.projectDetails.name
+              this.project.contactName = res.projectDetails.contactName
+              this.project.contactPhone = res.projectDetails.contactPhone
+              this.project.type = res.projectDetails.type
+              this.project.platform = res.projectDetails.platform
+              this.project.valuationStandard = res.projectDetails.valuationStandard
+              this.project.entrustUnit = res.projectDetails.entrustUnit
+              this.project.field = res.projectDetails.field
+              this.project.desc = res.projectDetails.desc
+              this.project.doc = []
+              this.project.file = []
+              this.project.resource = res.projectDetails.resource
+              this.project.location = getProvinceCodeByProvinceName(res.projectDetails.location.provinceCode, res.projectDetails.location.cityCode)
+              this.project.institution = res.projectDetails.institution
+              this.project.datetime = new Date(res.projectDetails.datetime)
+              this.project.price = res.projectDetails.price
+              this.project.budget = res.projectDetails.budget
+              this.project.usage = res.projectDetails.usage
+              this.project.fileUrl = res.projectDetails.file
+              this.project.requireDocUrl = res.projectDetails.doc
+              this.task = res.taskList
+              this.reportList = res.reportList
+              this.isModifyMode = false
+              this.hideLoading()
+              notify('success', '项目修改成功')
+            }).catch(error => {
+              this.hideLoading()
+              notify('error', error.data)
+              console.log(error)
+            })
+          } else {
+            notify('error', '表单填写错误!')
+            return false
+          }
         })
-        .catch(_ => {
-          notify('error', '删除失败')
+      },
+      //重置表单
+      resetForm(formName) {
+        this.$refs[formName].resetFields()
+        this.project.name = ''
+        this.project.type = []
+        this.project.platform = ''
+        this.project.valuationStandard = ''
+        this.project.entrustUnit = ''
+        this.project.field = ''
+        this.project.desc = ''
+        this.project.doc = ''
+        this.project.file = ''
+        this.project.contactName = ''
+        this.project.contactPhone = ''
+        this.project.resource = '2'
+        this.project.institution = ''
+        this.project.datetime = ''
+        this.project.price = ''
+        this.project.usage = ''
+        this.project.budget = ''
+      },
+      //进入修改项目页面
+      modifyForm() {
+        this.isModifyMode = true
+        // this.project.type = []
+        // this.project.platform = ''
+        // this.project.field = ''
+        // console.log(this.project.doc)
+        //this.setInstitutions()
+        //获得update 信息
+        //this.loadData()
+      },
+      //接收项目
+      receiveProject() {
+        this.$confirm('确认接收项目?', '提示', {
+          confirmButtonText: '确认接收',
+          cancelButtonText: '取消',
+          type: 'success'
+        }).then(() => {
+          this.showLoading()
+          console.log('接收项目')
+          receiveProjectRequest(this.projectId, this.user.userVO.id, this.receiveProjectSuccess, this.receiveProjectFail)
+        }).catch(() => {
         })
-      //this.task.splice(index, 1)
-    },
-    deleteTaskSuccess(res){
-      notify('success', '删除成功')
-    },
-    deleteTaskFail(error){
-      console.log(error)
-      notify('error', '删除失败:'+error)
-    },
-    beforeApkUpload (file) {
-      return true;
-      //const fileTypeList = ['dmg', 'exe', 'apk']
-      //return checkFileType(file, fileTypeList, this.beforeFileUploadError)
-    },
-    beforeFileUpload (file) {
-      return true;
-      //const fileTypeList = ['pdf', 'xls', 'xlsx', 'doc', 'docx', 'txt']
-      //return checkFileType(file, fileTypeList, this.beforeFileUploadError)
-    },
-    beforeFileUploadError () {
-      this.$message.error('上传文件只能是 PDF 、 DOC 、DOCX 、XLS、TXT、XLSX 格式!')
-    },
-    analyseDemand () {
-      this.$router.push({name: 'AnalyseDemand'})
-    },
-    handleAccept (index, id) {
-      console.log('接收')
-    },
-    handleReject (index, id) {
-      console.log('拒绝')
-    },
-    loadData () {//PROJ--2019073114009
-      this.showLoading()
-      Http.get(Apis.PROJECT.GET_PROJECT.replace('{projectId}', this.projectId)).then((res) => {
-        console.log(res)
-        this.projectId = res.projectDetails.id
-        this.project.name = res.projectDetails.name
-        this.project.contactName = res.projectDetails.contactName
-        this.project.contactPhone = res.projectDetails.contactPhone
-        this.project.type = res.projectDetails.type
-        this.project.platform = res.projectDetails.platform
-        this.project.valuationStandard = res.projectDetails.valuationStandard
-        this.project.entrustUnit = res.projectDetails.entrustUnit
-        this.project.field = res.projectDetails.field
-        this.project.desc = res.projectDetails.desc
-        this.project.doc = []
-        this.project.file = []
-        this.project.resource = res.projectDetails.resource
-        this.project.location = getProvinceCodeByProvinceName(res.projectDetails.location.provinceCode, res.projectDetails.location.cityCode)
+      },
+      receiveProjectSuccess(res) {
+        this.hideLoading()
+        notify('success', '项目接收成功!')
+        this.projectOperationControl = res.projectOperationControl
+        this.project.status = res.projectDetails.status
         this.project.institution = res.projectDetails.institution
-        this.project.datetime = new Date(res.projectDetails.datetime)
-        this.project.price = res.projectDetails.price
-        this.project.budget = res.projectDetails.budget
-        this.project.usage = res.projectDetails.usage
-        this.project.fileUrl = res.projectDetails.file
-        this.project.requireDocUrl = res.projectDetails.doc
-        this.project.userId = res.projectDetails.userId
+      },
+      receiveProjectFail(error) {
+        this.hideLoading()
+        notify('error', '接收项目失败:' + error.data)
+      },
+      //拒绝项目
+      rejectProject() {
+        this.$confirm('确认拒绝项目?', '提示', {
+          confirmButtonText: '确认拒绝',
+          cancelButtonText: '取消',
+          type: 'success'
+        }).then(() => {
+          this.showLoading()
+          rejectProject(this.projectId, this.rejectProjectSuccess, this.rejectProjectFail)
+        }).catch(() => {
+        })
+
+      },
+      rejectProjectSuccess(res) {
+        this.hideLoading()
+        notify('success', '拒绝项目成功')
+      },
+      rejectProjectFail(error) {
+        this.hideLoading()
+        notify('error', '拒绝项目失败:' + error.data)
+      },
+      //提交项目
+      submitProjectRequest() {
+        this.$confirm('确认提交项目?', '提示', {
+          confirmButtonText: '确认提交',
+          cancelButtonText: '取消',
+          type: 'success'
+        }).then(() => {
+          this.showLoading()
+          submitProjectRequest(this.projectId, this.submitProjectRequestSuccess, this.submitProjectRequestFail)
+        }).catch(() => {
+        })
+      },
+      submitProjectRequestSuccess(res) {
+        this.hideLoading()
+        notify('success', '项目提交成功!')
+        this.loadData()
+        this.projectOperationControl = res.projectOperationControl
         this.project.status = res.projectDetails.status
-        this.project.statusVO = res.projectDetails.statusVO
-        this.task = res.taskList
-        this.reportList = res.reportList
+        this.project.institution = res.projectDetails.institution
+      },
+      submitProjectRequestFail(error) {
+        this.hideLoading()
+        notify('error', '提交项目失败:' + error.data)
+      },
+      //结束项目
+      endProject() {
+        this.$confirm('确认结束项目?', '提示', {
+          confirmButtonText: '确认结束',
+          cancelButtonText: '取消',
+          type: 'success'
+        }).then(() => {
+          this.showLoading()
+          ensureEndProject(this.projectId, this.endProjectSuccess, this.endProjectFail)
+        }).catch(() => {
+        })
+
+      },
+      endProjectSuccess(res) {
+        this.hideLoading()
+        notify('success', '项目提交成功!')
+        this.loadData()
         this.projectOperationControl = res.projectOperationControl
-        this.progress = res.progress
+        this.project.status = res.projectDetails.status
+        this.project.institution = res.projectDetails.institution
+      },
+      endProjectFail(error) {
         this.hideLoading()
-        this.handleShowTaskListOrNot()
-        for(var i = 0; i < this.progress.length; i++){
-          if(this.progress[i].value != 0){
+        notify('error', '结束项目失败:' + error.data)
+      },
+      cancelMode(formName) {
+        this.isModifyMode = false
+        this.loadData()
+
+      },
+      goToTaskDetail(projectId, taskId) {
+        this.$router.push({
+          name: 'Task',
+          params: {projectId: projectId, taskId: taskId}
+        })
+      },
+      createNewTask() {
+        const that = this
+        this.$router.push({
+          name: 'TaskCreate',
+          params: {projectId: that.projectId}
+        })
+      },
+      createReport() {
+        this.$router.push({
+          name: 'ProjectReportCreate',
+          params: {
+            scope: 0,
+            dependencyCode: this.projectId,
+            projectId: this.projectId,
+          }
+        })
+      },
+      handleDelete(index, id) {
+        this.$confirm('确认删除该任务?')
+          .then(_ => {
+            //done()
+            //id->taskid
+            console.log(id)
+            console.log(this.projectId)
+            deleteTask(this.projectId, id, this.deleteTaskSuccess, this.deleteTaskFail)
+          })
+          .catch(_ => {
+            notify('error', '删除失败')
+          })
+        //this.task.splice(index, 1)
+      },
+      deleteTaskSuccess(res) {
+        notify('success', '删除成功')
+      },
+      deleteTaskFail(error) {
+        console.log(error)
+        notify('error', '删除失败:' + error)
+      },
+      beforeApkUpload(file) {
+        return true;
+        //const fileTypeList = ['dmg', 'exe', 'apk']
+        //return checkFileType(file, fileTypeList, this.beforeFileUploadError)
+      },
+      beforeFileUpload(file) {
+        return true;
+        //const fileTypeList = ['pdf', 'xls', 'xlsx', 'doc', 'docx', 'txt']
+        //return checkFileType(file, fileTypeList, this.beforeFileUploadError)
+      },
+      beforeFileUploadError() {
+        this.$message.error('上传文件只能是 PDF 、 DOC 、DOCX 、XLS、TXT、XLSX 格式!')
+      },
+      analyseDemand() {
+        this.$router.push({name: 'AnalyseDemand'})
+      },
+      handleAccept(index, id) {
+        console.log('接收')
+      },
+      handleReject(index, id) {
+        console.log('拒绝')
+      },
+      loadData() {//PROJ--2019073114009
+        this.showLoading()
+        Http.get(Apis.PROJECT.GET_PROJECT.replace('{projectId}', this.projectId)).then((res) => {
+          console.log(res)
+          console.log(typeof res.projectDetails.field)
+          this.projectId = res.projectDetails.id
+          this.project.name = res.projectDetails.name
+          this.project.contactName = res.projectDetails.contactName
+          this.project.contactPhone = res.projectDetails.contactPhone
+          this.project.type = res.projectDetails.type
+          this.project.platform = res.projectDetails.platform
+          this.project.valuationStandard = res.projectDetails.valuationStandard
+          this.project.entrustUnit = res.projectDetails.entrustUnit
+          this.project.field = res.projectDetails.field
+          console.log(res.projectDetails.field)
+          console.log(this.project.field)
+          this.project.desc = res.projectDetails.desc
+          this.project.doc = []
+          this.project.file = []
+          this.project.resource = res.projectDetails.resource
+          this.project.location = getProvinceCodeByProvinceName(res.projectDetails.location.provinceCode, res.projectDetails.location.cityCode)
+          this.project.institution = res.projectDetails.institution
+          this.project.datetime = new Date(res.projectDetails.datetime)
+          this.project.price = res.projectDetails.price
+          this.project.budget = res.projectDetails.budget
+          this.project.usage = res.projectDetails.usage
+          this.project.fileUrl = res.projectDetails.file
+          this.project.requireDocUrl = res.projectDetails.doc
+          this.project.userId = res.projectDetails.userId
+          this.project.status = res.projectDetails.status
+          this.project.statusVO = res.projectDetails.statusVO
+          this.task = res.taskList
+          this.reportList = res.reportList
+          this.projectOperationControl = res.projectOperationControl
+          this.progress = res.progress
+          console.log(this.project)
+          this.hideLoading()
+          this.handleShowTaskListOrNot()
+          for (var i = 0; i < this.progress.length; i++) {
+            if (this.progress[i].value != 0) {
               this.setEcharts()
               break
+            }
           }
-        }
-      }).catch((error) => {
-        this.hideLoading()
-        notify('error', error.data)
-      })
-    },
+        }).catch((error) => {
+          this.hideLoading()
+          // notify('error', error.data)
+        })
+      },
 
-    handleShowTaskListOrNot () {
-      // console.log(storageGet('user')['userVO']['id'])
-      if(storageGet('user')['userVO']['id'] === this.project.userId){
-        this.showTaskList = false
-      }
-    },
+      handleShowTaskListOrNot() {
+        // console.log(storageGet('user')['userVO']['id'])
+        if (storageGet('user')['userVO']['id'] === this.project.userId) {
+          this.showTaskList = false
+        }
+      },
 
-    locationChange (provinceId, cityId) {
-      if (provinceId || cityId) {
-        this.project.location = {provinceCode: provinceId, cityCode: cityId}
-      }
-    },
-    handleRemove (file, fileList) {
-      console.log(file, fileList)
-    },
-    handleExceed (files, fileList) {
-      this.$message.warning(
-        `当前限制选择 1 个文件,本次选择了 ${
-          files.length
-          } 个文件,共选择了 ${files.length + fileList.length} 个文件`
-      )
-    },
-    beforeRemove (file, fileList) {
-      //return this.$confirm(`确定移除 ${file.name}?`)
-    },
-    beforeUploadRequireDoc () {
-    },
-    beforeUploadApkFile () {
-    },
-    uploadRequireDoc (param) {
-      this.showLoading()
-      const formData = new FormData()
-      let config = {
-        //添加请求头
-        headers: {'Content-Type': 'multipart/form-data'},
-      }
-      formData.append('file', param.file)
-      Http.upload(Apis.FILE.REQUIREMENT_FILE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
-        this.project.requireDocUrl = res.data
-        this.hideLoading()
-        notify('success', '需求文档上传成功')
-      }).catch((error) => {
-        this.hideLoading()
-        notify('error', '需求文档上传失败:' + error.data)
-      })
-    },
-    uploadApkFile (param) {
-      this.showLoading()
-      const formData = new FormData()
-      let config = {
-        //添加请求头
-        headers: {'Content-Type': 'multipart/form-data'},
-      }
-      formData.append('file', param.file)
-      Http.upload(Apis.FILE.APK.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
-        this.project.fileUrl = res.data
-        this.hideLoading()
-        notify('success', '文件上传成功')
-      }).catch((error) => {
-        this.hideLoading()
-        this.project.file = []
-        notify('error', '文件上传失败')
-      })
-    },
-    setServiceType () {
+      locationChange(provinceId, cityId) {
+        if (provinceId || cityId) {
+          this.project.location = {provinceCode: provinceId, cityCode: cityId}
+        }
+      },
+      handleRemove(file, fileList) {
+        console.log(file, fileList)
+      },
+      handleExceed(files, fileList) {
+        this.$message.warning(
+          `当前限制选择 1 个文件,本次选择了 ${
+            files.length
+            } 个文件,共选择了 ${files.length + fileList.length} 个文件`
+        )
+      },
+      beforeRemove(file, fileList) {
+        //return this.$confirm(`确定移除 ${file.name}?`)
+      },
+      beforeUploadRequireDoc() {
+      },
+      beforeUploadApkFile() {
+      },
+      uploadRequireDoc(param) {
+        this.showLoading()
+        const formData = new FormData()
+        let config = {
+          //添加请求头
+          headers: {'Content-Type': 'multipart/form-data'},
+        }
+        formData.append('file', param.file)
+        Http.upload(Apis.FILE.REQUIREMENT_FILE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
+          this.project.requireDocUrl = res.data
+          this.hideLoading()
+          notify('success', '需求文档上传成功')
+        }).catch((error) => {
+          this.hideLoading()
+          notify('error', '需求文档上传失败:' + error.data)
+        })
+      },
+      uploadApkFile(param) {
+        this.showLoading()
+        const formData = new FormData()
+        let config = {
+          //添加请求头
+          headers: {'Content-Type': 'multipart/form-data'},
+        }
+        formData.append('file', param.file)
+        Http.upload(Apis.FILE.APK.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
+          this.project.fileUrl = res.data
+          this.hideLoading()
+          notify('success', '文件上传成功')
+        }).catch((error) => {
+          this.hideLoading()
+          this.project.file = []
+          notify('error', '文件上传失败')
+        })
+      },
+      setServiceType() {
         getAllServiceTypes().then((res) => {
-            this.serviceType = res
+          this.serviceType = res
         })
-    },
-    setPlatformType () {
+      },
+      setPlatformType() {
         getAllPlatformTypes().then((res) => {
-            this.platforms = res
+          this.platforms = res
         })
-    },
-    setFields(){
+      },
+      setFields() {
         getAllFields().then((res) => {
-            this.fields = res
+          this.fields = res
         })
-    }  ,
-    setInstitutions () {
-      getAllInstitutions().then((res) => {
-        this.institutionArray = res
-      }).catch((error) => {
-        notify('error', '获取institution失败' + error.data)
-      })
-    },
-    setUserInfo () {
-      this.user = storageGet('user')
-    },
-    checkPhoneNumber(phoneNumber){
-      return /^1[3456789]\d{9}$/.test(phoneNumber)
-    },
-    showLoading () {
-      this.loading = true
-    },
-    hideLoading () {
-      this.loading = false
-    },
-    reformDate (date) {
-      return getFormalTimeFromDate(date)
-    },
-    dateFormat (date, format) {
-      date = new Date(date)
-      let o = {
-        'M+' : date.getMonth() + 1, //month
-        'd+' : date.getDate(), //day
-        'H+' : date.getHours(), //hour+8小时
-        'm+' : date.getMinutes(), //minute
-        's+' : date.getSeconds(), //second
-        'q+' : Math.floor((date.getMonth() + 3) / 3), //quarter
-        'S' : date.getMilliseconds() //millisecond
-      }
-      if (/(y+)/.test(format)){
-        format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
-      }
+      },
+      setInstitutions() {
+        getAllInstitutions().then((res) => {
+          this.institutionArray = res
+        }).catch((error) => {
+          notify('error', '获取institution失败' + error.data)
+        })
+      },
+      setUserInfo() {
+        this.user = storageGet('user')
+      },
+      checkPhoneNumber(phoneNumber) {
+        return /^1[3456789]\d{9}$/.test(phoneNumber)
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      reformDate(date) {
+        return getFormalTimeFromDate(date)
+      },
+      dateFormat(date, format) {
+        date = new Date(date)
+        let o = {
+          'M+': date.getMonth() + 1, //month
+          'd+': date.getDate(), //day
+          'H+': date.getHours(), //hour+8小时
+          'm+': date.getMinutes(), //minute
+          's+': date.getSeconds(), //second
+          'q+': Math.floor((date.getMonth() + 3) / 3), //quarter
+          'S': date.getMilliseconds() //millisecond
+        }
+        if (/(y+)/.test(format)) {
+          format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+        }
 
-      for (let k in o)
-        if (new RegExp('(' + k + ')').test(format))
-          format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
+        for (let k in o)
+          if (new RegExp('(' + k + ')').test(format))
+            format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
 
-      return format;
+        return format;
+      }
     }
   }
-}
 </script>
 
 <style lang="less" scoped>

+ 4 - 2
src/components/project/ProjectCreate.vue

@@ -197,7 +197,7 @@ export default {
         requireDocUrl: '',
         fileUrl: '',
         resource: '0',
-        location: {provinceCode: '3200', cityCode: '3201'},
+        location: {provinceCode: '3200', cityCode: ''},
         institution: {},
         datetime: '',
         price: '',
@@ -282,7 +282,7 @@ export default {
           {required: true, message: '预算不可为空', trigger: 'blur'},
           {
             validator: (rule, value, callback) => {
-              if(value < 0){
+              if(parseInt(value) < 0){
                 callback(new Error('请输入不小于0的数'))
               } else {
                 callback()
@@ -356,6 +356,8 @@ export default {
       return provinceName + ' / ' + cityName
     },
     locationChange (provinceId, cityId) {
+      // console.log("测试省:" + provinceId);
+      // console.log("测试市:" + cityId);
       if (provinceId || cityId) {
         this.project.location = {provinceCode: provinceId, cityCode: cityId}
       }

+ 3 - 1
src/components/report/ProjectReport.vue

@@ -60,7 +60,7 @@
           <span v-if="!isModifyMode">{{report.conclusion}}</span>
         </el-form-item>
         <el-form-item v-if="!isModifyMode">
-          <div class="btn btn-medium btn-info" @click="modifyForm()">修改</div>
+          <div class="btn btn-medium btn-info" @click="modifyForm()"  v-if="operational">修改</div>
           <div class="btn btn-medium" @click="back()">返回</div>
         </el-form-item>
         <el-form-item v-if="isModifyMode">
@@ -101,6 +101,7 @@ export default {
         fileUrl: '',
         conclusion: ''
       },
+        operational:'',
       rules: {
         name: [
           {required: true, message: '任务名称不可为空', trigger: 'blur'},
@@ -233,6 +234,7 @@ export default {
         this.report.fileUrl = res.crowdReportVO.file
         this.report.conclusion = res.crowdReportVO.conclusion
         this.report.target = res.crowdReportVO.target
+          this.operational = res.operational
         this.hideLoading()
         //notify('success', '修改成功')
       }).catch((error) => {

+ 3 - 1
src/components/report/TaskReport.vue

@@ -58,7 +58,7 @@
           <span v-if="!isModifyMode">{{report.conclusion}}</span>
         </el-form-item>
         <el-form-item v-if="!isModifyMode">
-          <div class="btn btn-medium btn-info" @click="modifyForm()">修改</div>
+          <div class="btn btn-medium btn-info" @click="modifyForm()"  v-if="operational">修改</div>
           <div class="btn btn-medium" @click="back()">返回</div>
         </el-form-item>
         <el-form-item v-if="isModifyMode">
@@ -88,6 +88,7 @@ export default {
       projectId: '',
       taskId: '',
       isModifyMode: false,
+        operational: '',
       reportType: [],
       report: {
         name: '',
@@ -239,6 +240,7 @@ export default {
         this.report.conclusion = res.crowdReportVO.conclusion
         this.report.target = res.crowdReportVO.target
         this.report.participantCount = res.crowdReportVO.participantCount
+          this.operational = res.operational
         this.hideLoading()
       }).catch((error) => {
         this.hideLoading()

+ 11 - 8
src/components/task/Task.vue

@@ -28,7 +28,7 @@
         <el-form-item label="测试类型" prop="serviceType">
           <el-radio-group v-if="isModifyMode" v-model="task.serviceType">
             <span v-for="(item,index) in serviceType" :key="index">
-              <el-radio :label="item.code" name="type">{{item.name}}</el-radio>
+              <el-radio :label="item.name" name="serviceType">{{item.name}}</el-radio>
             </span>
           </el-radio-group>
           <span class="badge" v-if="!isModifyMode">{{task.serviceType}}</span>
@@ -94,7 +94,7 @@
               <em>点击上传</em>
             </div>
           </el-upload>
-          <span v-if="!isModifyMode">
+          <span>
               <span v-if="task.requireDocUrl == null || task.requireDocUrl == ''">
                 <i class="el-icon-document"></i>暂无文件
               </span>
@@ -314,8 +314,8 @@
             {required: true, message: '请输入任务名称', trigger: 'blur'},
             {min: 5, max: 50, message: '任务名称长度在 5 到 50 个字符', trigger: 'blur'}
           ],
-          type: [
-            {required: true, message: '测试类型不可为空'},
+            serviceType: [
+            {required: true, message: '测试类型不可为空', trigger: 'change'},
           ],
           desc: [{required: false, message: '请填写描述', trigger: 'blur'}],
           //price: [{required: true, message: '请填写价格', trigger: 'blur'}],
@@ -323,8 +323,8 @@
             {required: true, message: '预算不可为空', trigger: 'blur'},
             {
               validator: (rule, value, callback) => {
-                if (value <= 0) {
-                  callback(new Error('请输入于0的数'))
+                if (value < 0) {
+                  callback(new Error('请输入不小于0的数'))
                 } else {
                   callback()
                 }
@@ -401,7 +401,7 @@
 
       //切换至可编辑页面
       modifyForm() {
-        this.task.serviceType = ''
+        // this.task.serviceType = ''
         this.isModifyMode = true
       },
       //切换至不可编辑页面
@@ -485,7 +485,7 @@
       //获取任务详情失败时回调函数
       getTaskDetailFail(error) {
         this.hideLoading()
-        notify('error', '获取任务详情失败:' + error.data)
+        // notify('error', '获取任务详情失败:' + error.data)
       },
 
       //处理显示报告
@@ -567,6 +567,7 @@
         this.task.requireDocUrl = res.crowdTaskVO.requirementFile,
           this.task.participantCount = res.crowdTaskVO.participantCount
         this.reportList = res.crowdReportVOList
+        this.acceptedUserList = res.acceptedUserList
         this.hideLoading()
         notify('success', '修改成功')
       },
@@ -584,8 +585,10 @@
         }
         formData.append('file', param.file)
         Http.upload(Apis.FILE.REQUIREMENT_FILE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
+            notify('success', '上传成功')
           this.uploadRequireDocSuccess(res)
         }).catch((error) => {
+            notify('error', '上传失败:' + error.data)
           this.uploadRequireDocFail(error)
         })
       },

+ 31 - 0
src/constants/tabMenu.js

@@ -0,0 +1,31 @@
+const menuData =  [
+  {label:"首页",name:"squareHome",searchUrl:"/api/square/search/list",targetPage:"/square"},
+  {label:"测试项目",name:"testProject",searchUrl:"/api/square/search/list",targetPage:"/square/project"},
+  {label:"测试任务",name:"testTask",searchUrl:"/api/square/search/list",targetPage:"/square/task"},
+  {label:"技术文章",name:"article",searchUrl:"/api/technical/articles",targetPage:"/technology/article"},
+  {label:"技术专著",name:"monograph",searchUrl:"/api/technical/articles",targetPage:"/technology/monograph"},
+
+];
+const homeTabArr = {
+  menuArr1: [
+    {label: "首页", name: "homepage"},
+    {label: "众测广场", name: "square"},
+    {label: "众测技术", name: "technology"}
+  ],
+  menuArr2:[
+    {label: "科技服务", name: "monograph"},
+    {label: "服务互联网", name: "Internet"},
+    {label: "集成电路", name: "integratedCircuit"},
+    {label: "智能传感器", name: "Sensor"},
+    {label: "高端装备", name: "Assembly"},
+    {label: "更多", name: "more"}
+  ],
+  menuArr3:[
+    {label: "找机构", name: "findInstitution"},
+    {label: "找专家", name: "findExpert"},
+  ],
+};
+
+export default {
+  menuData, homeTabArr
+}

+ 21 - 1
src/js/api.js

@@ -10,7 +10,9 @@ export default {
     ACCEPT_PROJECT: '/api/project/{projectId}/regionManager/{userId}',
     REJECT_PROJECT: '/api/project/{projectId}/status/rejected',
     SUBMIT_PROJECT: '/api/project/{projectId}/status/committed',
-    END_PROJECT: '/api/project/{projectId}/status/finished'
+    END_PROJECT: '/api/project/{projectId}/status/finished',
+    MORE_HOT_PROJECT: '/api/square/hotProject/list',
+    CROWD_PROJECT: '/api/common/index/crowd/project/{code}',
   },
   TASK: {
     GET_TASK: '/api/project/{projectId}/task/{taskId}/',
@@ -21,6 +23,7 @@ export default {
     REJECT_TASK: '/api/project/{projectId}/task/{taskId}/status/reject',
     SUBMIT_TASK: '/api/project/{projectId}/task/{taskId}/status/commit',
     END_TASK: '/api/project/{projectId}/task/{taskId}/status/finished',
+    MORE_HOT_TASK: '/api/square/hotTasks/list',
   },
   REPORT: {
     GET_TASK_REPORT: '/api/project/{projectId}/task/{taskId}/report/{reportId}/',
@@ -56,6 +59,7 @@ export default {
     GET_INDIVIDUAL_AUTHENTICATION_INFO: '/api/user/{userId}/personalAuth',
     GET_ENTERPRISE_AUTHENTICATION_INFO: '/api/user/{userId}/enterpriseAuth',
     GET_AGENCY_AUTHENTICATION_INFO: '/api/user/{userId}/agency',
+    GET_AGENCY_AUTHENTICATION_INFO_COMMON: '/api/user/{userId}/agency/common',
     GET_ALL_HANDLING_AUTH_INFO: '/api/user/authentication/handling',
     GET_ALL_HANDLED_AUTH_INFO: '/api/user/authentication/handled',
     PASS_AGENCY_AUTH:'/api/user/{userId}/agency/status/accept',
@@ -64,6 +68,10 @@ export default {
     REJECT_AGENCY_AUTH:'/api/user/{userId}/agency/status/reject',
     REJECT_ENTERPRISE_AUTH:'/api/user/{userId}/enterpriseAuth/status/reject',
     REJECT_INDIVIDUAL_AUTH:'/api/user/{userId}/personalAuth/status/reject',
+    GET_DETAIL: "/api/user/detail/{userId}",
+    GET_ADDRESS: "/api/index/address",
+    IS_PART: "/api/common/check/create/project/{userId}",
+    IS_AGENCY: "/api/common/check/accept/task/{userId}",
   },
   PAGE: {
     HOME_PAGE: '/api/common/index/',
@@ -73,6 +81,18 @@ export default {
     PROJECT_DETAIL_PAGE: '/api/project/{projectId}/',
     REPORT_DETAIL_PAGE: '/api/page/reportDetail/{reportId}/',
   },
+  AGENCY: {
+    GET_DETAIL: '/api/agency/{agencyId}',
+  },
+  RESOURCE: {
+    GET_DETAIL: '/api/common/index/resource/{code}',
+  },
+  EXPERT: {
+    GET_DETAIL: '/api/common/index/expert/{id}',
+  },
+  TECHNOLOGY: {
+    GET_MORE: '/api/technical/more',
+  },
   GENERAL: {
     GET_ALL_INSTITUTIONS: '/api/regionalManager',
     GET_ALL_AGENCIES: '/api/agency/list',

+ 7 - 5
src/js/index.js

@@ -6,6 +6,7 @@ import {
   getAllHandlingAuthInfo,
   getAuthUrls,
   getCurrentAgencyAuthInfo,
+  getAgencyAuthInfoCommon,
   getCurrentAuthenInfo,
   getCurrentEnterpriseAuthInfo,
   getCurrentIndividualAuthenInfo,
@@ -105,6 +106,7 @@ export {
   getCurrentIndividualAuthenInfo,
   getCurrentEnterpriseAuthInfo,
   getCurrentAgencyAuthInfo,
+  getAgencyAuthInfoCommon,
   checkPassAuth,
   checkRejectAuth,
   updateAgencyResourceAndAbility
@@ -629,7 +631,7 @@ export const defaultValue = {
 //     'cityCode': '南京市'
 //   }
 // }
-// //通过名称获取省、市代码
+//通过名称获取省、市代码
 // export const getProvinceCodeByProvinceName = (provinceName, cityName) => {
 //   for (var i = 0; i < ProvinceJson.provinces.length; i++) {
 //     if (ProvinceJson.provinces[i].name == provinceName) {
@@ -643,10 +645,10 @@ export const defaultValue = {
 //       }
 //     }
 //   }
-//   return {
-//     'provinceCode': '3200',
-//     'cityCode': '3201'
-//   }
+  // return {
+  //   'provinceCode': '3200',
+  //   'cityCode': '3201'
+  // }
 // }
 //
 // //获取批量上传项目模板文件

+ 9 - 0
src/js/userService.js

@@ -148,6 +148,15 @@ export const getCurrentAgencyAuthInfo = (userId, getCurrentEnterpriseAuthInfoSuc
     getCurrentEnterpriseAuthInfoFail(error)
   })
 }
+
+export const getAgencyAuthInfoCommon = (userId, getCurrentEnterpriseAuthInfoSuccess, getCurrentEnterpriseAuthInfoFail) => {
+  Http.get(Apis.USER.GET_AGENCY_AUTHENTICATION_INFO_COMMON.replace('{userId}', userId)).then((res) => {
+    getCurrentEnterpriseAuthInfoSuccess(res)
+  }).catch((error) => {
+    getCurrentEnterpriseAuthInfoFail(error)
+  })
+}
+
 export const getCurrentAuthenInfo = () => {
   const individualData = {
     type: '个人',//企业、机构、个人

+ 77 - 65
src/main.js

@@ -7,8 +7,12 @@ import 'font-awesome/css/font-awesome.css'
 import './style/main.scss'
 import {getAuthUrls, getCurrentUser, getRolesPermissions, storageGet, storageSave} from '@/js/index'
 import {notify} from '@/constants/index'
+import store from './store'
+import moment from 'moment'
+import vRegion from 'v-region'
 import {
   Avatar,
+  Alert,
   Badge,
   Button,
   ButtonGroup,
@@ -58,8 +62,12 @@ import {
   TimeSelect,
   Tooltip,
   Upload,
-  Progress
+  Progress,
+  Step,
+  Steps,
+  Divider
 } from 'element-ui'
+Vue.prototype.$moment = moment
 function getCurrentUserSuccess(res){
 
 }
@@ -70,68 +78,68 @@ function getCurrentUserSuccess(res){
 //   var s = document.getElementsByTagName("script")[0];
 //   s.parentNode.insertBefore(hm, s);
 // })();
-router.beforeEach((to, from, next) => {
-  // if (_hmt) {
-  //   if (to.path) {
-  //     _hmt.push(['_trackPageview', '/#' + to.fullPath]);
-  //   }
-  // }
-  const urls = getAuthUrls()
-  if (storageGet('user') == null) {
-    getCurrentUser().then((res) => {
-      storageSave('user', res)
-      storageSave('rolesPermissions', getRolesPermissions(res.roleList))
-      if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限
-        if (sessionStorage.userName === '2' && urls.includes(to.matched[0].path)) { // 判断缓存里面是否有 userName  //在登录的时候设置它的值
-          next()
-        } else {
-          next({
-            path: '/',
-            query: {
-              redirect: to.fullPath
-            } // 将跳转的路由path作为参数,登录成功后跳转到该路由
-          })
-        }
-      } else {
-        next()
-      }
-    }).catch((error) => {
-      notify('warning', '请登录')
-      if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限
-        if (sessionStorage.userName === '2' && urls.includes(to.matched[0].path)) { // 判断缓存里面是否有 userName  //在登录的时候设置它的值
-          next()
-        } else {
-          next({
-            path: '/',
-            query: {
-              redirect: to.fullPath
-            } // 将跳转的路由path作为参数,登录成功后跳转到该路由
-          })
-        }
-      } else {
-        next()
-      }
-    })
-  } else {
-    if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限
-      if (sessionStorage.userName === '2' && urls.includes(to.matched[0].path)) { // 判断缓存里面是否有 userName  //在登录的时候设置它的值
-        next()
-      } else {
-        next({
-          path: '/',
-          query: {
-            redirect: to.fullPath
-          } // 将跳转的路由path作为参数,登录成功后跳转到该路由
-        })
-      }
-    } else {
-      next()
-    }
-  }
-  //console.log(to.matched[0].path)
-  //console.log(urls.includes(to.matched[0].path))
-
-})
+// router.beforeEach((to, from, next) => {
+//   // if (_hmt) {
+//   //   if (to.path) {
+//   //     _hmt.push(['_trackPageview', '/#' + to.fullPath]);
+//   //   }
+//   // }
+//   const urls = getAuthUrls()
+//   if (storageGet('user') == null) {
+//     getCurrentUser().then((res) => {
+//       storageSave('user', res)
+//       storageSave('rolesPermissions', getRolesPermissions(res.roleList))
+//       if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限
+//         if (sessionStorage.userName === '2' && urls.includes(to.matched[0].path)) { // 判断缓存里面是否有 userName  //在登录的时候设置它的值
+//           next()
+//         } else {
+//           next({
+//             path: '/',
+//             query: {
+//               redirect: to.fullPath
+//             } // 将跳转的路由path作为参数,登录成功后跳转到该路由
+//           })
+//         }
+//       } else {
+//         next()
+//       }
+//     }).catch((error) => {
+//       // notify('warning', '请登录')
+//       if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限
+//         if (sessionStorage.userName === '2' && urls.includes(to.matched[0].path)) { // 判断缓存里面是否有 userName  //在登录的时候设置它的值
+//           next()
+//         } else {
+//           next({
+//             path: '/',
+//             query: {
+//               redirect: to.fullPath
+//             } // 将跳转的路由path作为参数,登录成功后跳转到该路由
+//           })
+//         }
+//       } else {
+//         next()
+//       }
+//     })
+//   } else {
+//     if (to.matched.some(record => record.meta.requireAuth)) { // 判断该路由是否需要登录权限
+//       if (sessionStorage.userName === '2' && urls.includes(to.matched[0].path)) { // 判断缓存里面是否有 userName  //在登录的时候设置它的值
+//         next()
+//       } else {
+//         next({
+//           path: '/',
+//           query: {
+//             redirect: to.fullPath
+//           } // 将跳转的路由path作为参数,登录成功后跳转到该路由
+//         })
+//       }
+//     } else {
+//       next()
+//     }
+//   }
+//   //console.log(to.matched[0].path)
+//   //console.log(urls.includes(to.matched[0].path))
+//
+// })
 
 // require('./mock.js')
 Vue.use(Carousel)
@@ -182,7 +190,10 @@ Vue.use(Image)
 Vue.use(Badge)
 Vue.use(Popover)
 Vue.use(Progress)
-
+Vue.use(Steps)
+Vue.use(Step)
+Vue.use(Divider)
+Vue.use(Alert)
 Vue.prototype.$msgbox = MessageBox
 Vue.prototype.$alert = MessageBox.alert
 Vue.prototype.$confirm = MessageBox.confirm
@@ -200,5 +211,6 @@ new Vue({
     Bus:new Vue()
   },
   components: {App},
-  template: '<App/>'
+  template: '<App/>',
+  store
 })

+ 188 - 0
src/pages/DetailPage/AgencyDetail.vue

@@ -0,0 +1,188 @@
+<template>
+  <div class="create-container">
+    <div class="create-body" v-loading="loading" style="width: 100%">
+      <div class="title" v-if="this.type == 0">测评机构信息</div>
+      <div class="title" v-else>入驻品牌机构信息</div>
+      <el-form :model="authentication" ref="authentication" label-width="12%" class="demo-report">
+        <el-form-item prop="agencyPhoto" label="机构logo">
+          <span>
+          <el-image
+            style="width: 100px;"
+            :src="authentication.agencyPhoto==null?defaultValue.image:authentication.agencyPhoto"
+            fit="scale-down"></el-image>
+        </span>
+        </el-form-item>
+        <el-form-item label="机构名称" prop="evaluationAgencyName">
+          <span>{{authentication.evaluationAgencyName}}</span>
+        </el-form-item>
+        <el-form-item label="法人名称" prop="legalPersonName">
+          <span>{{authentication.legalPersonName}}</span>
+        </el-form-item>
+        <!--        <el-form-item  label="认证状态" prop="name">-->
+        <!--          <el-tag :type="authentication.authStatus.style">{{authentication.authStatus.text}}</el-tag>-->
+        <!--        </el-form-item>-->
+        <el-form-item label="地址" prop="address"
+                      v-if="this.authentication.address != null &&  this.authentication.address != ''">
+          <span>{{authentication.address}}</span>
+        </el-form-item>
+        <!--        <el-form-item label="测评机构能力" prop="evaluationAgencyAbilityList">-->
+        <!--          <span  v-for="(item,index) in authentication.evaluationAgencyAbilityList"-->
+        <!--                :key="index"><span class="badge">{{item}}</span></span>-->
+        <!--        </el-form-item>-->
+        <!--        <el-form-item label="测评机构资源" prop="evaluationAgencyResourceList">-->
+        <!--          <span  v-for="item in authentication.evaluationAgencyResourceList" :key="item.id">-->
+        <!--            资源类型:{{item.type}};&nbsp;&nbsp;资源名称:{{item.name}};&nbsp;&nbsp;资源总量:{{item.totalNum}};&nbsp;&nbsp;可用资源:{{item.availableNum}}<br/>-->
+        <!--          </span>-->
+        <!--        </el-form-item>-->
+
+        <el-form-item label="接包数量" prop="taskCount" v-if="this.type == 0">
+          <span>{{authentication.taskCount}}</span>
+        </el-form-item>
+        <el-form-item label="认证时间" prop="checkTime">
+          <span>{{dateFormat(new Date(authentication.checkTime),'yyyy-MM-dd HH:mm:ss')}}</span>
+        </el-form-item>
+
+        <el-form-item>
+          <div class="btn btn-medium btn-info" @click="back()">返回</div>
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+<script>
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import {notify} from '@/constants/index'
+  import {
+    getAllReportTypes,
+    defaultValue,
+    storageGet,
+    getAgencyAuthInfoCommon,
+    getAllAgencyResourceTypes,
+    getAllServiceTypes,
+  } from '@/js/index'
+
+  export default {
+    name: 'AgencyDetail',
+    components: {},
+    data() {
+      return {
+        user: {},
+        loading: false,
+        type: 0,
+        userId: 0,
+        resourceTypes: [],
+        serviceTypes: [],
+        defaultValue:defaultValue,
+        authentication: {
+          mobile: '',
+          evaluationAgencyName: '',
+          // bankAccount: '',
+          address: '',
+          evaluationAgencyAbilityList: [],
+          evaluationAgencyResourceList: [],
+          authStatus: {},
+          legalPersonName: '',
+          checkTime: '',
+          agencyPhoto: defaultValue.image,
+          explain: '',
+          taskCount: 0
+        },
+      }
+    },
+    mounted() {
+      this.$nextTick(() => {
+        this.init()
+      })
+    },
+    methods: {
+      init() {
+        this.userId = this.$route.params.id
+        this.type = this.$route.params.type
+        this.setServiceTypes()
+        this.setResourceTypes()
+        this.getAuthInfo()
+      },
+      back() {
+        this.$router.go(-1);
+      },
+      //加载数据
+      getAuthInfo() {
+        this.showLoading()
+        getAgencyAuthInfoCommon(this.userId, this.getAuthInfoSuccess, this.getAuthInfoFail)
+      },
+      getAuthInfoSuccess(res) {
+        this.hideLoading()
+        this.authentication.agencyPhoto = res.data.agencyPhoto == null ? defaultValue.image : res.data.agencyPhoto
+        this.authentication.evaluationAgencyName = res.data.evaluationAgencyName == null ? '暂未填写' : res.data.evaluationAgencyName
+        this.authentication.evaluationAgencyAbilityList = res.data.evaluationAgencyAbilityList == null ? [] : res.data.evaluationAgencyAbilityList
+        this.authentication.evaluationAgencyResourceList = res.data.evaluationAgencyResourceList == null ? [] : res.data.evaluationAgencyResourceList
+        // this.authentication.bankAccount = res.data.bankAccount == null ? '暂未填写' : res.data.bankAccount
+        this.authentication.address = res.data.address == null ? '暂未填写' : res.data.address
+        this.authentication.authStatus = res.data.authStatus
+        this.authentication.legalPersonName = res.data.legalPersonName == null ? '暂未填写' : res.data.legalPersonName
+        // this.authentication.explain = res.data.explain
+        this.authentication.taskCount = res.data.taskCount
+        this.authentication.checkTime = res.data.checkTime
+      },
+      getAuthInfoFail(error) {
+        this.hideLoading()
+        notify('error', '加载认证信息失败:' + error.data)
+      },
+      //设置测试类型
+      setServiceTypes() {
+        getAllServiceTypes().then((res) => {
+          this.serviceTypes = res
+        }).catch((error) => {
+          notify('error', '机构能力加载失败')
+        })
+      },
+      //设置机构资源类型
+      setResourceTypes() {
+        this.resourceTypes = getAllAgencyResourceTypes()
+      },
+      setUserInfo() {
+        this.user = storageGet('user')
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      dateFormat (date, format) {
+        date = new Date(date)
+        let o = {
+          'M+' : date.getMonth() + 1, //month
+          'd+' : date.getDate(), //day
+          'H+' : date.getHours(), //hour+8小时
+          'm+' : date.getMinutes(), //minute
+          's+' : date.getSeconds(), //second
+          'q+' : Math.floor((date.getMonth() + 3) / 3), //quarter
+          'S' : date.getMilliseconds() //millisecond
+        }
+        if (/(y+)/.test(format)){
+          format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
+        }
+
+        for (let k in o)
+          if (new RegExp('(' + k + ')').test(format))
+            format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
+
+        return format;
+      }
+    },
+    watch: {
+      agencyType(val) {
+        this.agencyType = val
+      }
+    }
+  }
+</script>
+
+<style>
+  .demo {
+    font-size: 32px;
+  }
+
+</style>

+ 215 - 0
src/pages/DetailPage/CrowdDetail.vue

@@ -0,0 +1,215 @@
+<template>
+  <div>
+    <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 " class="">
+              <el-tabs v-model="searchType" type="card">
+                <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">
+                <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>
+    </div>
+    <div class="mine-body" style="text-align: center;">
+      <el-tabs value="myProject" v-loading="loading" style="width: 90%;margin-left: 5%">
+        <el-tab-pane name="myProject" v-if="currTab == 'project'">
+          <span v-if="projectList == null || projectList.length == 0"> 暂无项目 </span>
+          <el-row v-if="projectList != null && projectList.length != 0" type="flex" align="middle" justify="center"
+                  style="font-size: 14px;">
+            <el-col :span="6" type="flex" align="middle" justify="center">项目图片</el-col>
+            <el-col :span="6" type="flex" align="middle" justify="center">项目名称</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">应用类型</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">项目预算</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">参与人数</el-col>
+            <el-col :span="4" type="flex" align="middle" justify="center">操作</el-col>
+          </el-row>
+          <project-item v-if="(projectList != null || projectList.length > 0 )"
+                        v-for="(item,index) in projectList" :key="item.id" :projectItem="item"/>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+
+    <div class="container">
+      <el-row>
+        <el-col :span="18" class="project-task">
+          <el-pagination
+            v-if="currTab!=='squareHome'&&projectList&&projectList.length"
+            :page-size="10"
+            layout="prev, pager, next"
+            :total="totalElements"
+            :current-page="activePage"
+            @current-change="handlePageChange"
+            class="pull-right"
+          >
+          </el-pagination>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import SearchBar from '../../components/commons/SearchBar'
+  import {notify} from "../../constants"
+  import ProjectItem from '../../components/commons/ProjectItem'
+  import {defaultValue, storageGet} from '@/js/index'
+
+  export default {
+    name: 'CrowdDetail',
+    comments: {ProjectItem},
+    data() {
+      return {
+        user: {},
+        loading: false,
+        isLogin: false,
+        searchType: 'project',
+        searchVal: '',
+        currTab: 'project',
+        tabArr: [
+          {label: "众测项目", name: "project"},
+        ],
+        projectList: [],
+        activePage: 1,
+        totalElements: 0,
+        code: ''
+      }
+    },
+    components: {
+      ProjectItem,
+      SearchBar,
+    },
+    computed: {},
+    methods: {
+      loadData() {
+        this.showLoading();
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.code = this.$route.params.code;
+        this.getCrowdProject();
+        this.hideLoading();
+      },
+      getCrowdProject() {
+        let params = {
+          "keyword": this.searchVal,//搜索关键字
+          "activePage": this.activePage,//指定页面
+          "columnFilters": []
+        };
+        Http.post(Apis.PROJECT.CROWD_PROJECT.replace('{code}', this.code), params).then((res) => {
+          this.projectList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        this.activePage = 1;
+        this.getCrowdProject();
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.getCrowdProject();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+
+  .project-task {
+    padding: 15px 0;
+
+    .el-card {
+      border: none;
+    }
+  }
+
+  .popular-modules {
+    padding: 15px 0 15px 15px;
+  }
+
+
+  .mine-container {
+    padding: 0 80px 40px 80px;
+  }
+
+  .mine-top-wrapper {
+    height: 350px;
+    background-color: #fff;
+  }
+
+  [class*="el-col-"] {
+    height: 100%;
+  }
+
+  .advertise-imgs {
+    height: 100%;
+  }
+
+  .advertise-imgs img {
+    width: 100%;
+    height: 100%;
+  }
+
+  .user-banner {
+    text-align: center;
+    display: inline-table;
+    height: 100%;
+    width: 100%;
+    margin-top: 40px;
+  }
+
+</style>

+ 111 - 0
src/pages/DetailPage/ExpertDetail.vue

@@ -0,0 +1,111 @@
+<template>
+  <div class="create-container">
+    <div class="create-body" v-loading="loading">
+      <el-form :model="expert" label-width="12%" class="demo">
+        <el-form-item label="用户名称" prop="name">
+          <span>{{expert.name}}</span>
+        </el-form-item>
+        <el-form-item label="用户图标" prop="photo">
+          <!--          <span  class="badge">{{expert.photo}}</span>-->
+          <img :src="expert.photo" style="width: 50px; height: 50px;"/>
+        </el-form-item>
+<!--        <el-form-item label="性别" prop="count">-->
+<!--          <span>{{expert.gender}}</span>-->
+<!--        </el-form-item>-->
+        <el-form-item label="头衔" prop="address">
+          <span>{{expert.title}}</span>
+        </el-form-item>
+        <el-form-item label="简介" prop="address" style="height: 500px; overflow: scroll">
+          <span>{{expert.introduction}}</span>
+        </el-form-item>
+<!--        <el-form-item label="接包次数" prop="count">-->
+<!--          <span>{{expert.taskCount}}</span>-->
+<!--        </el-form-item>-->
+        <el-form-item>
+          <div class="btn btn-medium" style="margin-top: 20px" @click="back()">返回</div>
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+    import Http from '@/js/http.js'
+    import Apis from '@/js/api.js'
+    import {notify} from '@/constants/index'
+    import {getAllReportTypes, storageGet} from '@/js/index'
+
+    export default {
+        name: 'ExpertDetail',
+        components: {},
+        data() {
+            return {
+                expert: {},
+                loading: false,
+                id: 0,
+                expert: {
+                    name: '',
+                    photo: '',
+                    introduction: '',
+                    title: '',
+                },
+            }
+        },
+        mounted() {
+            this.$nextTick(() => {
+                this.init()
+            })
+        },
+        methods: {
+            init() {
+                this.id = this.$route.params.id
+                this.loadData()
+            },
+            back() {
+                this.$router.push({
+                    name: 'ExpertList'
+                })
+            },
+            loadData() {
+                this.showLoading()
+                Http.get(Apis.EXPERT.GET_DETAIL.replace('{id}', this.id)).then((res) => {
+                    console.log(res)
+                    this.expert.name = res.data.name
+                    this.expert.photo = res.data.photo
+                    // this.expert.gender = res.data.gender
+                    this.expert.title = res.data.title
+                    this.expert.introduction = res.data.introduction
+                    // this.expert.address = res.data.address
+                    this.hideLoading()
+                }).catch((error) => {
+                    this.hideLoading()
+                    notify('error', '打开详情失败:' + error.data)
+                })
+            },
+            setUserInfo() {
+                this.expert = storageGet('expert')
+            },
+            showLoading() {
+                this.loading = true
+            },
+            hideLoading() {
+                this.loading = false
+            }
+        },
+        watch: {
+            expertType(val) {
+                this.expertType = val
+            }
+        }
+    }
+</script>
+
+<style>
+  .demo {
+    font-size: 32px;
+  }
+
+  .el-form-item {
+    max-height: 120px !important;
+  }
+</style>

+ 42 - 0
src/pages/DetailPage/FieldDetail.vue

@@ -0,0 +1,42 @@
+<template>
+  <div class="home-wrapper">
+    <div class="container" style="margin: 20px auto;">
+      <div class="create-body" v-for="item in fields">
+        <div class="title h2">{{item.name}}</div>
+        <div class="h3">{{item.introduction}}</div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+    import {storageGet, getAllFields} from '@/js/index.js'
+    import {notify} from "../../constants";
+
+    export default {
+        name: "FieldDetail",
+        data() {
+            return {
+                isLogin: false,
+                fields: [],
+            }
+        },
+        methods: {
+            setFields(){
+                getAllFields().then((res) => {
+                    this.fields = res
+                    console.log(res);
+                })
+            },
+        },
+        mounted() {
+            this.setFields();
+        }
+    }
+</script>
+
+<style scoped>
+  .item-template {
+    height: 80px;
+  }
+</style>

+ 142 - 0
src/pages/DetailPage/ResourceDetail.vue

@@ -0,0 +1,142 @@
+<template>
+  <div class="create-container">
+    <div class="create-body" v-loading="loading">
+      <el-form :model="resource" label-width="12%" class="demo">
+        <el-form-item label="资源名称" prop="name">
+          <span>{{resource.name}}</span>
+        </el-form-item>
+        <el-form-item label="资源图标" prop="photo">
+          <!--          <span  class="badge">{{resource.photo}}</span>-->
+          <img :src="resource.photo" style="width: 50px; height: 50px;"/>
+        </el-form-item>
+        <el-form-item label="资源描述" prop="description" v-if="!description">
+          <span>{{resource.description}}</span>
+        </el-form-item>
+        <el-form-item label="类型" prop="type" v-if="!type">
+          <span>{{resource.type}}</span>
+        </el-form-item>
+
+        <el-form-item label="使用场景" prop="scene" v-if="!scene">
+          <span>{{resource.scene}}</span>
+        </el-form-item>
+        <el-form-item label="收费标准" prop="standard" v-if="!standard">
+          <span>{{resource.standard}}{{resource.unit}}</span>
+        </el-form-item>
+        <el-form-item label="注册日期" prop="startTime" v-if="!startTime">
+          <span>{{$moment(resource.startTime).format("YYYY-MM-DD HH:mm:ss")}}</span>
+        </el-form-item>
+
+        <el-form-item label="数量" prop="quantity">
+          <span>{{resource.quantity}}</span>
+        </el-form-item>
+        <el-form-item label="状态" prop="state">
+          <span class="badge">{{resource.state}}</span>
+        </el-form-item>
+        <el-form-item label="单位" prop="unit">
+          <span>{{resource.unitWork}}</span>
+        </el-form-item>
+
+        <el-form-item label="其他说明" prop="remarks" v-if="!remarks">
+          <span>{{resource.remarks}}</span>
+        </el-form-item>
+        <el-form-item>
+          <div class="btn btn-medium" @click="back()">返回</div>
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+    import Http from '@/js/http.js'
+    import Apis from '@/js/api.js'
+    import {notify} from '@/constants/index'
+    import {getAllReportTypes, storageGet} from '@/js/index'
+
+    export default {
+        name: 'ResourceDetail',
+        components: {},
+        data() {
+            return {
+                user: {},
+                loading: false,
+                type: 0,
+                code: 0,
+                resource: {
+                    name: '',
+                    photo: '',
+                    type: '',
+                    quantity: 0,
+                    state: 0,
+                    unit: '',
+                    description:'',
+                    standard:'',
+                    startTime:'',
+                    scene:'',
+                    remarks:'',
+                    unitWork:'',
+                },
+            }
+        },
+        mounted() {
+            this.$nextTick(() => {
+                this.init()
+            })
+        },
+        methods: {
+            init() {
+                this.code = this.$route.params.id
+                this.loadData()
+            },
+            back() {
+                this.$router.go(-1);
+            },
+            loadData() {
+                this.showLoading()
+                Http.get(Apis.RESOURCE.GET_DETAIL.replace('{code}', this.code)).then((res) => {
+                    console.log(res)
+                    this.resource.name = res.data.name
+                    this.resource.photo = res.data.photoUrl
+                    this.resource.type = res.data.type
+                    this.resource.state = res.data.state
+                    this.resource.quantity = res.data.quantity
+                    this.resource.unit = res.data.unit
+                    this.resource.description = res.data.description
+                    this.resource.standard = res.data.standard
+                    this.resource.startTime = res.data.startTime
+                    this.resource.scene = res.data.scene
+                    this.resource.remarks = res.data.remarks
+                    this.resource.unitWork = res.data.unitWork
+                    this.hideLoading()
+                }).catch((error) => {
+                    this.hideLoading()
+                    notify('error', '打开详情失败:' + error.data)
+                })
+            },
+            setUserInfo() {
+                this.user = storageGet('user')
+            },
+            showLoading() {
+                this.loading = true
+            },
+            hideLoading() {
+                this.loading = false
+            }
+        },
+        watch: {
+            resourceType(val) {
+                this.resourceType = val
+            }
+        }
+    }
+</script>
+
+<style>
+  .demo {
+    font-size: 32px;
+  }
+
+  .el-form-item {
+    max-height: 120px !important;
+  }
+</style>

+ 41 - 0
src/pages/DetailPage/TestTypeDetail.vue

@@ -0,0 +1,41 @@
+<template>
+  <div class="home-wrapper">
+    <div class="container" style="margin: 20px auto;">
+      <div class="create-body" v-for="item in fields">
+        <div class="title h2">{{item.name}}</div>
+        <div class="h3">{{item.introduction}}</div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+    import {getAllServiceTypes, getAllFields} from '@/js/index.js'
+
+    export default {
+        name: "TestTypeDetail",
+        data() {
+            return {
+                isLogin: false,
+                fields: [],
+            }
+        },
+        methods: {
+            setFields(){
+                getAllServiceTypes().then((res) => {
+                    this.fields = res
+                    console.log(res);
+                })
+            },
+        },
+        mounted() {
+            this.setFields();
+        }
+    }
+</script>
+
+<style scoped>
+  .item-template {
+    height: 80px;
+  }
+</style>

+ 107 - 0
src/pages/DetailPage/UserDetail.vue

@@ -0,0 +1,107 @@
+<template>
+  <div class="create-container">
+    <div class="create-body" v-loading="loading">
+      <el-form :model="user" label-width="12%" class="demo">
+        <el-form-item label="用户名称" prop="name">
+          <span>{{user.name}}</span>
+        </el-form-item>
+        <el-form-item label="用户图标" prop="photo">
+          <!--          <span  class="badge">{{user.photo}}</span>-->
+          <img :src="user.photo==null?defaultValue.image:user.photo" style="width: 50px; height: 50px;"/>
+        </el-form-item>
+        <el-form-item label="性别" prop="gender" v-if="user.gender != null &&  user.gender != ''">
+          <span>{{user.gender}}</span>
+        </el-form-item>
+<!--        <el-form-item label="地址" prop="address">-->
+<!--          <span class="badge">{{user.address}}</span>-->
+<!--        </el-form-item>-->
+        <el-form-item label="接包次数" prop="count">
+          <span>{{user.taskCount}}</span>
+        </el-form-item>
+        <el-form-item>
+          <div class="btn btn-medium" @click="back()">返回</div>
+        </el-form-item>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import {notify} from '@/constants/index'
+  import {getAllReportTypes, storageGet,defaultValue} from '@/js/index'
+
+  export default {
+    name: 'UserDetail',
+    components: {},
+    data() {
+      return {
+        user: {},
+        loading: false,
+        defaultValue: defaultValue,
+        id: 0,
+        user: {
+          name: '',
+          photo: '',
+          taskCount: '',
+          address: '',
+          gender: '',
+        },
+      }
+    },
+    mounted() {
+      this.$nextTick(() => {
+        this.init()
+      })
+    },
+    methods: {
+      init() {
+        this.id = this.$route.params.id
+        this.loadData()
+      },
+      back() {
+        this.$router.go(-1);
+      },
+      loadData() {
+        this.showLoading()
+        Http.get(Apis.USER.GET_DETAIL.replace('{userId}', this.id)).then((res) => {
+          console.log(res)
+          this.user.name = res.data.name
+          this.user.photo = res.data.photoUrl
+          this.user.gender = res.data.gender
+          this.user.taskCount = res.data.taskCount
+          this.user.address = res.data.address
+          this.hideLoading()
+        }).catch((error) => {
+          this.hideLoading()
+          notify('error', '打开详情失败:' + error.data)
+        })
+      },
+      setUserInfo() {
+        this.user = storageGet('user')
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      }
+    },
+    watch: {
+      userType(val) {
+        this.userType = val
+      }
+    }
+  }
+</script>
+
+<style>
+  .demo {
+    font-size: 32px;
+  }
+
+  .el-form-item {
+    max-height: 120px !important;
+  }
+</style>

+ 45 - 0
src/pages/Homepage/BrandCard.vue

@@ -0,0 +1,45 @@
+<template>
+  <el-card class="test-card" style="margin-top: 15px">
+    <div slot="header" class="clearfix test-card-header">
+      <span>入驻品牌机构</span>
+      <a class="pull-right" style="color: rgba(0, 118, 203, 1); cursor: pointer" @click="goToMoreAgency()">more>></a>
+    </div>
+    <div style="height: 210px">
+      <el-row :gutter="15">
+        <el-col v-for="item in residentAgencyList" :key="item.id" :span="4" style="height: 90px; margin-bottom: 20px">
+          <img :src="item.agencyPhoto==null?defaultValue.image:item.agencyPhoto" :alt="item.evaluationAgencyName" style="width: 70%;height: 100%; cursor: pointer;" @click="goToDetail(item.userId)"/>
+        </el-col>
+      </el-row>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  import {defaultValue} from '@/js/index.js'
+  export default {
+    name: "BrandCard",
+    props:['residentAgencyList'],
+    data() {
+      return{
+        defaultValue: defaultValue,
+      }
+    },
+    methods:{
+        goToMoreAgency(){
+            this.$router.push({
+                name: 'AgencyResidentList',
+            });
+        },
+        goToDetail(userId) {
+            this.$router.push({
+                name: 'AgencyDetail',
+                params: {id: userId, type: 1}
+            })
+        },
+    }
+  }
+</script>
+
+<style lang="less">
+
+</style>

+ 301 - 0
src/pages/Homepage/Homepage.vue

@@ -0,0 +1,301 @@
+<template>
+  <div class="home-wrapper">
+    <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">
+            <img class="logo-img" src="../../assets/img/logo-blue.png" :to="'/home'"/>
+            <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>
+      <!--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.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>
+      </div>
+    </div>
+
+    <div class="home-page container" >
+      <el-row>
+        <el-col :span="19" class="test-type-wrapper">
+          <TestMenu :testTypeList="homeData.testTypeList"></TestMenu>
+          <TestCard :applicationTypeList="homeData.applicationTypeList"></TestCard>
+          <el-row>
+            <ResourceAndTool :resourceList="homeDataNoCache.resourceList"></ResourceAndTool>
+          </el-row>
+          <el-row>
+            <BrandCard :residentAgencyList=homeData.residentAgencyList></BrandCard>
+          </el-row>
+        </el-col>
+        <el-col :span="5" class="homepage-right-modules">
+<!--          <LoginCard/>-->
+          <HotCrowd :applicationTypeRank="homeDataNoCache.applicationTypeRank"/>
+          <HotAgency :agencyRank="homeDataNoCache.agencyRank"/>
+          <HotUser :userRank="homeDataNoCache.userRank"/>
+          <HotContest :competitionList="homeData.competitionList"/>
+        </el-col>
+      </el-row>
+      <InstitutionCard></InstitutionCard>
+    </div>
+  </div>
+</template>
+
+<script>
+  // import commonData from '../../constants/tabMenu'
+  import SearchBar from '../../components/commons/SearchBar'
+  import TestMenu from './TestMenu'
+  import LoginCard from './LoginCard'
+  import BrandCard from './BrandCard'
+  import ResourceAndTool from './ResourceAndTool'
+  import TestCard from './TestCard'
+  import InstitutionCard from './InstitutionCard'
+  import HotCrowd from './HotCrowd'
+  import HotAgency from './HotAgency'
+  import HotUser from './HotUser'
+  import HotContest from './HotContest'
+  import PopularProject from '../Square/PopularProject'
+  import Http from '@/js/http.js'
+  import {mapActions, mapGetters} from 'vuex'
+  import Waterfall from 'vue-waterfall/lib/waterfall'
+  import WaterfallSlot from 'vue-waterfall/lib/waterfall-slot'
+  import {storageGet, getAllFields} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api'
+  // console.log(commonData);
+  export default {
+    name: 'Homepage',
+    components: {
+      HotCrowd,
+      HotContest,
+      HotUser,
+      HotAgency,
+      InstitutionCard,
+      SearchBar,
+      TestMenu,
+      PopularProject,
+      LoginCard,
+      TestCard,
+      BrandCard,
+      ResourceAndTool,
+      Waterfall,
+      WaterfallSlot
+      // vueWaterfallEasy
+    },
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        searchType: '0',
+        searchTypeArr: [
+          {
+            "name": "全部",
+            "value": "all"
+          },
+          {
+            "name": "项目",
+            "value": "0"
+          },
+          {
+            "name": "机构",
+            "value": "1"
+          },
+          {
+            "name": "工具",
+            "value": "2"
+          },
+          {
+            "name": "专家",
+            "value": "3"
+          }],
+        searchVal: '',
+        homeTabArr: {
+          menuArr1: [
+            {label: "首页", name: "homepage", linkTo: '/home'},
+            {label: "众测广场", name: "square", linkTo: '/square'},
+            {label: "众测技术", name: "technology", linkTo: 'technology'}
+          ],
+          menuArr2: [
+            {code: '', name: ''}
+          ],
+          menuArr3: [
+            {label: "找机构", name: "findInstitution", linkTo: '/agency/list/show'},
+            {label: "找专家", name: "findExpert", linkTo: '/expert/list'},
+          ],
+        },
+        homeData: {},
+        homeDataNoCache: {},
+        currTab: 'homepage'
+      }
+    },
+    methods: {
+      loadData() {
+        this.showLoading();
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.setFields();
+        let p1 = new Promise((resolve, reject) => {
+          Http.get('/api/common/index/info/cache').then((res) => {
+            this.homeData = res.data;
+            // this.homeData.applicationTypeList.map((item)=>{
+            //   item.height = (item.testTypeList.length / 2) * 24 + 100;
+            //   return item;
+            // })
+            resolve(res.data);
+          }).catch((error) => {
+            notify('error', error.data)
+            reject(error)
+          })
+        });
+        let p2 = new Promise((resolve, reject) => {
+          Http.get('/api/common/index/info/nocache').then((res) => {
+            this.homeDataNoCache = res.data;
+            resolve(res.data);
+          }).catch((error) => {
+            notify('error', error.data)
+            reject(error)
+          })
+        });
+        Promise.all([p1, p2]).then((result) => {
+          this.hideLoading();
+        }).catch((error) => {
+          notify('error', error.data)
+        })
+      },
+      setFields() {
+        getAllFields().then((res) => {
+          this.homeTabArr.menuArr2 = res
+          // console.log(this.homeTabArr.menuArr2)
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleTabClick(tab) {
+        this.currTab = tab.name;
+        // console.log(this.currTab +  "  "  + tab.index +  "  "  + tab.name );
+        for (let i = 0; i < this.homeTabArr.menuArr3.length; i++) {
+          if (this.currTab === this.homeTabArr.menuArr3[i].name) {
+            this.$router.push(this.homeTabArr.menuArr3[i].linkTo);
+          }
+        }
+
+        for (let i = 0; i < this.homeTabArr.menuArr2.length; i++) {
+          if (this.currTab === this.homeTabArr.menuArr2[i].code) {
+            this.$router.push('/field/detail');
+          }
+        }
+
+        this.$router.push(this.homeTabArr.menuArr1[Number(tab.index)].linkTo);
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handleSearchData() {
+        if (this.searchType == 0) {
+          this.$router.push({
+            name: 'Square',
+            params: {searchVal: this.searchVal, searchType: "project", currTab: "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}});
+        }
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+
+  .home-wrapper {
+    /deep/ .square-tab .el-tabs__item {
+      font-size: 16px !important;
+      margin-right: 0px !important;
+    }
+
+    /deep/ .login-card .popular-list {
+      padding: 0 10px !important;
+    }
+
+    .home-page {
+      padding: 15px 0;
+    }
+
+    .test-type-wrapper {
+      padding-right: 15px;
+      margin-bottom: 15px;
+    }
+
+    .homepage-right-modules {
+      .login-card .el-card__body {
+        padding: 10px !important;
+      }
+
+      .popular-card .el-card__header {
+        padding: 10px !important;
+      }
+
+      .popular-card .el-card__body {
+        padding: 10px !important;
+      }
+    }
+  }
+
+</style>

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

@@ -0,0 +1,60 @@
+<template>
+  <el-card class="popular-card">
+    <div slot="header" class="popular-header">
+      <img src="../../assets/img/agency.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" @click="goToMoreAgency()">more>></el-button>
+    </div>
+    <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.agencyPhoto==null?defaultValue.image:item.agencyPhoto" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.userId)">
+          <div style="margin-left: 55px; cursor: pointer;" @click="goToDetail(item.userId)"  >
+            <div class="list-item-title">
+              {{item.evaluationAgencyName}}
+            </div>
+            <div class="list-item-info">
+
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="5">
+          <div class="project-people-number">
+            {{item.taskCount}}次
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  import {defaultValue} from '@/js/index.js'
+  import Http from '@/js/http.js';
+  export default {
+    name: 'HotAgency',
+    props:['agencyRank'],
+    data() {
+      return{
+        defaultValue: defaultValue,
+      }
+    },
+    methods:{
+        goToMoreAgency(){
+            this.$router.push({
+                name: 'AgencyList',
+            });
+        },
+        goToDetail(userId) {
+            this.$router.push({
+                name: 'AgencyDetail',
+                params: {id: userId, type: 0}
+            })
+        },
+    }
+  }
+</script>
+
+<style lang="less">
+
+</style>

+ 116 - 0
src/pages/Homepage/HotContest.vue

@@ -0,0 +1,116 @@
+<template>
+  <el-card class="popular-card">
+    <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"  @click="getMore()">more>></el-button>
+    </div>
+    <div class="popular-list">
+      <el-row class="popular-list-item" v-for="item in competitionList" :key="item.id">
+        <el-col :span="23" @click.native="gotoDetail(item)">
+          <img src="../../assets/img/logo-project.png" alt="logo-project" class="pull-left project-logo-img">
+          <div style="margin-left: 55px">
+            <div class="list-item-title">
+              {{item.name}}
+            </div>
+            <div class="list-item-info">
+              {{$moment(item.startTime).format("YYYY-MM-DD HH:mm:ss")}}
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="1">
+          <div class="project-people-number">
+            >
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  import moment from 'moment';
+  export default {
+    name: 'HotContest',
+    props:['competitionList'],
+    methods:{
+        getMore(){
+            this.$router.push({
+                name: 'CompetitionList',
+            });
+        },
+        gotoDetail(item){
+            window.open(item.linkUrl)
+        }
+    }
+  }
+</script>
+
+<style lang="less">
+  .popular-card {
+    margin-bottom: 15px;
+  }
+  .popular-header .el-card__header{
+    border-bottom: 2px solid rgba(0,117,203,1) !important;
+  }
+
+  .popular-card .el-card__body{
+    padding: 0 !important;
+  }
+  .popular-header {
+    height: 25px;
+    vertical-align:middle;
+  }
+  .popular-header-title {
+    display: inline-block;
+    line-height: 25px;
+    vertical-align:middle;
+  }
+  .popular-header-img {
+    height: 25px;
+    width: 25px;
+    vertical-align:middle;
+  }
+
+  .popular-list {
+    .popular-list-item {
+      padding: 5px 10px;
+      border-bottom: 1px solid #ccc !important;
+
+      .list-item-title {
+        font-size: 14px;
+        font-family: Source Han Sans CN;
+        font-weight: 400;
+        color: rgba(0, 0, 0, 1);
+        overflow: hidden;
+        text-overflow: ellipsis; //溢出用省略号显示
+        white-space: nowrap; //溢出不换行
+      }
+
+      .list-item-info {
+        font-size: 14px;
+        font-family: Adobe Heiti Std;
+        font-weight: normal;
+        color: rgba(153, 153, 153, 1);
+        overflow: hidden; //超出的文本隐藏
+        text-overflow: ellipsis; //溢出用省略号显示
+        white-space: nowrap; //溢出不换行
+      }
+
+      .project-logo-img {
+        width: 44px;
+        height: 44px;
+        display: inline-block;
+        margin: 2px 0;
+      }
+
+      .project-people-number {
+        font-size: 16px;
+        font-family: Roboto;
+        font-weight: 400;
+        color: rgba(0, 117, 203, 1);
+        line-height: 48px;
+      }
+    }
+  }
+</style>

+ 53 - 0
src/pages/Homepage/HotCrowd.vue

@@ -0,0 +1,53 @@
+<template>
+  <el-card class="popular-card">
+    <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"  @click="getMore()">more>></el-button>
+    </div>
+    <div class="popular-list">
+      <el-row class="popular-list-item" v-for="item in applicationTypeRank" :key="item.id" @click.native="goToDetail(item.code)">
+        <el-col :span="19">
+          <img :src="item.image" alt="logo-project" class="pull-left project-logo-img">
+          <div style="margin-left: 55px">
+            <div class="list-item-title">
+              {{item.name}}
+            </div>
+            <div class="list-item-info">
+
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="5">
+          <div class="project-people-number">
+            {{item.count}}次
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  export default {
+    name: 'HotCrowd',
+    props:['applicationTypeRank'],
+    methods:{
+        getMore(){
+            this.$router.push({
+                name: 'CrowdList',
+            });
+        },
+      goToDetail(code) {
+        this.$router.push({
+          name: 'CrowdDetail',
+          params: {code: code}
+        })
+      },
+    }
+  }
+</script>
+
+<style lang="less">
+
+</style>

+ 59 - 0
src/pages/Homepage/HotUser.vue

@@ -0,0 +1,59 @@
+<template>
+  <el-card class="popular-card">
+    <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"  @click="getMore()">more>></el-button>
+    </div>
+    <div class="popular-list">
+      <el-row class="popular-list-item" v-for="item in userRank" :key="item.id">
+        <el-col :span="19">
+          <img :src="item.photoUrl==null?defaultValue.image:item.photoUrl" alt="logo-project" class="pull-left project-logo-img" style="cursor: pointer" @click="goToDetail(item.id)">
+          <div style="margin-left: 55px;cursor: pointer;" @click="goToDetail(item.id)">
+            <div class="list-item-title">
+              {{item.name}}
+            </div>
+            <div class="list-item-info">
+
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="5">
+          <div class="project-people-number">
+            {{item.taskCount}}次
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  import {defaultValue} from '@/js/index.js'
+  export default {
+    name: 'HotCrowd',
+    props:['userRank'],
+    data() {
+      return{
+        defaultValue: defaultValue,
+      }
+    },
+    methods:{
+        getMore(){
+            this.$router.push({
+                name: 'UserList',
+            });
+        },
+        goToDetail(id) {
+            this.$router.push({
+                name: 'UserDetail',
+                params: {id: id}
+            })
+        },
+    }
+  }
+</script>
+
+<style lang="less">
+
+</style>

+ 190 - 0
src/pages/Homepage/InstitutionCard.vue

@@ -0,0 +1,190 @@
+<template>
+  <div class="insititution-card">
+    <div class="insititution-card-header">平台合作机构(项目组)</div>
+    <div class="insititution-card-content">
+      <el-row style="height: 80px;margin-bottom: 20px">
+      <el-col :span="9">
+        <div class="iscas-block insititution-block">
+          <img src="../../assets/img/ISCAS.png"
+               alt="logo-institution"
+               class="iscas-logo">
+          <div class="iscas-info">
+            <div class="iscas-title">
+              中国科学院软件研究所
+            </div>
+            <div class="iscas-title-english">
+              Institute of Software Chinese Academy of Sciences
+            </div>
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="8">
+        <div class="insititution-block">
+          <div class="single-title">
+            北京计算机技术及应用研究所
+          </div>
+
+        </div>
+      </el-col>
+      <el-col :span="7">
+        <div class="insititution-block">
+          <img src="../../assets/img/SJTU.png"
+               alt="logo-institution"
+               style="height: 60px;width: 100%"
+
+          >
+        </div>
+      </el-col>
+    </el-row>
+      <el-row style="height: 80px;margin-bottom: 20px">
+        <el-col :span="9">
+          <div class="iscas-block insititution-block">
+            <img src="../../assets/img/解放军工程.png"
+                 alt="logo-institution"
+                 class="insititution-logo">
+            <div class="iscas-info">
+              <div class="iscas-title">
+                中国人民解放军陆军工程大学
+              </div>
+              <div class="iscas-title-english">
+                ARMY ENGINEERING UNIVERSITY OF PLA
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="insititution-block">
+            <div class="single-title">
+              上海计算机软件技术开发中心
+            </div>
+
+          </div>
+        </el-col>
+        <el-col :span="7">
+          <div class="insititution-block">
+            <img src="../../assets/img/NJU.png"
+                 alt="logo-institution"
+                 style="height: 60px;width: 100%"
+
+            >
+          </div>
+        </el-col>
+      </el-row>
+      <el-row style="height: 80px;margin-bottom: 20px">
+        <el-col :span="9">
+          <div class="iscas-block insititution-block">
+            <img src="../../assets/img/拓思.png"
+                 alt="logo-institution"
+                 class="insititution-logo">
+            <div class="iscas-info">
+              <div class="iscas-title">
+                广东拓思软件科学园有限公司
+              </div>
+              <div class="iscas-title-english">
+                GUANGDONG TOPS SOFT-PARK CO,.LTD
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="iscas-block insititution-block">
+            <img src="../../assets/img/logo-blue.png"
+                 alt="logo-institution"
+                 class="insititution-logo">
+            <div class="iscas-info">
+              <div class="iscas-title single-title" >
+                南京慕测信息科技有限公司
+              </div>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="7">
+          <div class="insititution-block">
+            <img src="../../assets/img/SQA.png"
+                 alt="logo-institution"
+                 style="height: 60px;width: 100%"
+
+            >
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "InstitutionCard"
+  }
+</script>
+
+<style scoped lang="less">
+  .insititution-card {
+    background: rgba(255, 255, 255, 1);
+    box-shadow: 0px 4px 30px 0px rgba(8, 6, 6, 0.08);
+    margin: 15px 0;
+    padding: 15px 0 15px 15px;
+
+    .insititution-card-header {
+      font-size: 24px;
+      font-family: Source Han Sans CN;
+      font-weight: 500;
+      color: rgba(0, 118, 203, 1);
+      text-align: center;
+      height: 60px;
+      line-height: 60px;
+      margin:25px auto;
+    }
+
+    .insititution-card-content {
+      .insititution-block {
+        padding: 10px;
+        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;
+          margin-right: 15px;
+        }
+      }
+      .iscas-block {
+        display: flex;
+        .iscas-logo {
+          width: 100px;
+          height: 60px;
+          display: inline-block;
+        }
+
+        .iscas-info {
+          display: inline-block;
+          height: 60px;
+          .iscas-title {
+            font-size: 17px;
+            font-family: Source Han Sans CN;
+            font-weight: 400;
+            color: rgba(0, 0, 0, 1);
+          }
+
+          .iscas-title-english {
+            font-size: 10px;
+            font-family: Source Han Sans CN;
+            font-weight: 400;
+            color: rgba(0, 0, 0, 1);
+          }
+        }
+      }
+    }
+  }
+  @media screen and (max-width: 1450px) { /*当屏幕尺寸小于600px时,应用下面的CSS样式*/
+    .single-title {
+      font-size: 16px !important;
+    }
+  }
+
+</style>

+ 108 - 0
src/pages/Homepage/LoginCard.vue

@@ -0,0 +1,108 @@
+<template>
+  <el-card class="login-card">
+    <div class="login-welcome">
+      <img v-if="user.userVO&&user.userVO.photoUrl" :src="user.userVO&&user.userVO.photoUrl" alt="welcome-img"
+           class="pull-left welcome-img">
+      <img v-else src="../../assets/img/logo-project.png" alt="welcome-img" class="pull-left welcome-img">
+      <div style="margin-left: 46px">
+        <div class="welcome-title">
+          hi,欢迎使用群智众测平台
+        </div>
+        <div class="welcome-content">
+          众测群智,不一样的深度测试
+        </div>
+      </div>
+      <div class="welcome-btn">
+        <a :href="loginUrl">
+          <el-button type="primary" size="mini" class="pull-left login-btn" v-if="!isLogin">登录</el-button>
+        </a>
+        <el-button type="danger" size="mini" class="pull-right cancel-btn" v-if="isLogin" @click.native="userLogout()">
+          登出
+        </el-button>
+      </div>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import {storageGet,logout} from '@/js/index.js'
+
+  export default {
+    name: "LoginCard",
+    data() {
+      return {
+        isLogin: false,
+        user: {},
+        loginUrl: process.env.LOGIN_URL,
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+          this.user = storageGet('user');
+        }
+      },
+      userLogout() {
+        this.isLogin = false
+        logout().then((res) => {
+          this.$router.go(0)
+        })
+      },
+    },
+    mounted() {
+      this.loadData();
+    }
+  }
+</script>
+
+<style scoped lang="less">
+  .login-card {
+    margin-bottom: 15px;
+
+    .welcome-img {
+      width: 40px;
+      height: 40px;
+      display: inline-block;
+      margin: 2px 0;
+    }
+
+    .welcome-title {
+      font-size: 14px;
+      font-family: Source Han Sans CN;
+      font-weight: bold;
+      color: rgba(0, 0, 0, 1);
+    }
+
+    .welcome-content {
+      font-size: 13px;
+      font-family: Source Han Sans CN;
+      font-weight: 400;
+      color: rgba(0, 0, 0, 1);
+    }
+
+    .welcome-btn {
+      width: 100%;
+      height: 28px;
+      margin-top: 25px;
+
+      .login-btn {
+        background-color: rgba(0, 118, 203, 1);
+
+        &:hover {
+          background-color: rgba(0, 118, 203, 0.8);
+        }
+      }
+
+      .cancel-btn {
+        background-color: rgba(217, 92, 93, 1);
+
+        &:hover {
+          background-color: rgba(217, 92, 93, 0.8);
+        }
+      }
+    }
+  }
+</style>

+ 39 - 0
src/pages/Homepage/ResourceAndTool.vue

@@ -0,0 +1,39 @@
+<template>
+  <el-card class="test-card">
+    <div slot="header" class="clearfix test-card-header">
+      <span>众测资源和工具</span>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text"  @click="getMore()">more>></el-button>
+    </div>
+    <div>
+      <el-row>
+        <el-col :span="8" v-for="item in resourceList" :key="item.code" >
+          <span style="cursor: pointer" @click="goToDetail(item.code)">{{item.name}}</span>
+        </el-col>
+      </el-row>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  export default {
+    name: "ResourceAndTool",
+    props:['resourceList'],
+    methods:{
+        getMore(){
+            this.$router.push({
+                name: 'ResourceList',
+            });
+        },
+        goToDetail(code) {
+            this.$router.push({
+                name: 'ResourceDetail',
+                params: {id: code}
+            })
+        },
+    }
+  }
+</script>
+
+<style lang="less">
+
+</style>

+ 79 - 0
src/pages/Homepage/TestCard.vue

@@ -0,0 +1,79 @@
+<template>
+  <div class="card-waterfull">
+    <el-row :gutter="10">
+      <waterfall
+                        :line-gap="400"
+                        :min-line-gap="150"
+                        :max-line-gap="220"
+                        :single-max-width="300"
+        :watch="applicationTypeList">
+        <!-- each component is wrapped by a waterfall slot -->
+        <waterfall-slot
+          v-for="(item, index) in applicationTypeList"
+          width="300"
+          :height="200"
+          :order="index"
+          :key="item.code"
+        >
+          <el-card class="test-card" :body-style="{width:'300'}" >
+            <div slot="header" class="clearfix test-card-header">
+              <span>{{item.name}}</span>
+            </div>
+            <div>
+              <span>{{item.introduction}}</span>
+            </div>
+          </el-card>
+        </waterfall-slot>
+      </waterfall>
+    </el-row>
+  </div>
+</template>
+
+<script>
+  import Waterfall from 'vue-waterfall/lib/waterfall'
+  import WaterfallSlot from 'vue-waterfall/lib/waterfall-slot'
+  import {mapGetters} from  'vuex'
+  export default {
+    name: "TestCard",
+    props:['applicationTypeList'],
+    data(){
+      return{
+      }
+    },
+    components:{
+      Waterfall,
+      WaterfallSlot
+    },
+    methods:{
+    },
+    mounted() {
+      console.log(this.applicationTypeList)
+    }
+  }
+
+
+</script>
+
+<style lang="less">
+.test-card {
+  border: none;
+  .el-card__header{
+    height:48px !important;
+    background:rgba(233,240,250,1) !important;
+    padding: 12px 15px !important;
+  }
+  .test-card-header {
+    border-left: 5px solid #0076cb;
+    padding-left: 5px;
+  }
+}
+
+  .card-waterfull {
+    .el-card {
+      width: 300px !important;
+    }
+    .el-row {
+      margin:  0 !important;
+    }
+  }
+</style>

+ 77 - 0
src/pages/Homepage/TestMenu.vue

@@ -0,0 +1,77 @@
+<template>
+  <div class="test-menu-wrapper">
+    <div class="test-menu-item-wrapper">
+      <div class="test-menu-item" v-for="(item,index) in testTypeList" :key="item.code" v-if="index<8"  @click="geToDetail">
+        <img src="../../assets/img/testType.png" alt="testType" class="test-menu-item-img">
+        {{item.name}}
+      </div>
+      <div class="more-test-wrapper">
+        <i class="el-icon-arrow-right more-test" @click="geToDetail"></i>更多分类
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: "TestMenu",
+    props:['testTypeList'],
+    data() {
+      return {
+
+      }
+    },
+    methods:{
+        geToDetail(){
+            this.$router.push("/test/type/detail");
+        }
+    },
+  }
+</script>
+
+<style scoped lang="less">
+  .test-menu-wrapper {
+    background: rgba(255, 255, 255, 1);
+    box-shadow: 0px 4px 30px 0px rgba(8, 6, 6, 0.08);
+    padding: 15px 20px;
+    margin-bottom: 15px;
+    display: flex;
+
+    .test-menu-item-wrapper {
+      display: flex;
+      width: 100%;
+      justify-content: space-between;
+      .test-menu-item {
+        font-size: 14px;
+        font-family:Source Han Sans CN;
+        font-weight:400;
+        color:rgba(0,0,0,1);
+        .test-menu-item-img {
+          width: 46px;
+          height: 46px;
+          background: rgba(231, 239, 247, 1);
+          border-radius: 50%;
+          padding: 6px;
+          display: block;
+          margin: 0 auto;
+          margin-bottom: 5px;
+        }
+      }
+    }
+
+    .more-test-wrapper {
+      display: block;
+      .more-test {
+        width: 20px;
+        height: 20px;
+        background: #0076cb;
+        border-radius: 50%;
+        color: white;
+        padding: 5px;
+        font-size: 20px;
+        display: block;
+        margin: 14px auto;
+      }
+    }
+  }
+</style>

+ 247 - 0
src/pages/HomepageSearch/AgencyList.vue

@@ -0,0 +1,247 @@
+<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">
+        <div class="title h2">测评机构</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <template style="color: black">
+            <el-table
+              ref="multipleTable"
+              :data="curAgencyList"
+              tooltip-effect="dark"
+              style="width: 100%; font-size: 20px; color: black" v-loading="loading">
+              <el-table-column
+                label="头像"
+                width="100">
+                <template slot-scope="scope"><img
+                  :src="scope.row.agencyPhoto==null?defaultValue.image:scope.row.agencyPhoto"
+                  style="width: 50px; height: 50px;"/>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="evaluationAgencyName"
+                label="名称"
+                align="left"
+                width="300">
+              </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-column
+                align="center"
+                label="操作">
+                <template slot-scope="scope">
+                  <div class="btn btn-small btn-info" @click="goToDetail(scope.row.userId)">查看详情</div>
+                </template>
+              </el-table-column>
+            </el-table>
+          </template>
+          <el-pagination
+            v-if="curAgencyList&&curAgencyList.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, defaultValue} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api'
+
+  export default {
+    name: "AgencyList",
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        defaultValue: defaultValue,
+        searchVal: '',
+        searchType: '1',
+        searchTypeArr: [
+          {
+            "name": "全部",
+            "value": "all"
+          },
+          {
+            "name": "项目",
+            "value": "0"
+          },
+          {
+            "name": "机构",
+            "value": "1"
+          },
+          {
+            "name": "工具",
+            "value": "2"
+          },
+          {
+            "name": "专家",
+            "value": "3"
+          }],
+        curAgencyList: [],
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        this.showLoading();
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.searchVal = this.$route.params.searchVal;
+        this.handleSearchData();
+        this.hideLoading();
+      },
+
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        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}});
+        }
+      },
+      goToDetail(userId) {
+        this.$router.push({
+          name: 'AgencyDetail',
+          params: {id: userId, type: 0}
+        })
+      },
+      nextPage() {
+        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;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.nextPage();
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+<style scoped lang="less">
+  @import "../../style/search-nav";
+  .item-template {
+    height: 80px;
+  }
+</style>
+

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

@@ -0,0 +1,210 @@
+<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;" v-loading="loading">
+      <div class="create-body">
+        <div class="title h2">入驻品牌机构</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <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="100">
+                <template slot-scope="scope"><img
+                  :src="scope.row.agencyPhoto==null?defaultValue.image:scope.row.agencyPhoto"
+                  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="address"
+                align="left"
+                label="省市">
+              </el-table-column>
+              <el-table-column
+                align="center"
+                label="操作">
+                <template slot-scope="scope">
+                  <div class="btn btn-small btn-info" @click="goToDetail(scope.row.userId)">查看详情</div>
+                </template>
+              </el-table-column>
+            </el-table>
+          </template>
+          <el-pagination
+            v-if="curAgencyList&&curAgencyList.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, defaultValue} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
+
+  export default {
+    name: "AgencyResidentList",
+    props: ['searchVal', 'agencyList'],
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        searchType: '0',
+        loading: false,
+        defaultValue: defaultValue,
+        searchTypeArr: [
+          {
+            "name": "入驻机构",
+            "value": "0"
+          }],
+        curAgencyList: this.agencyList,
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        let url = '/api/resident/agency/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;
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        let url = '/api/resident/agency/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;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.handleSearchData();
+      },
+      goToDetail(id) {
+        this.$router.push({
+          name: 'AgencyDetail',
+          params: {id: id, type: 1}
+        })
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+  .item-template {
+    height: 80px;
+  }
+</style>

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

@@ -0,0 +1,202 @@
+<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;" v-loading="loading">
+      <div class="create-body">
+        <div class="title h2">众测大赛</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <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==null?defaultValue.image: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"
+            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, defaultValue} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
+
+  export default {
+    name: "CompetitionList",
+    props: ['searchVal', 'competitionList'],
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        // searchVal: '',
+        searchType: '0',
+        defaultValue: defaultValue,
+        searchTypeArr: [
+          {
+            "name": "大赛",
+            "value": "0"
+          }],
+        curCompetitionList: this.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) => {
+          this.curCompetitionList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        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) => {
+          this.curCompetitionList = res.data.content;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.handleSearchData();
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+  .item-template {
+    height: 80px;
+  }
+</style>

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

@@ -0,0 +1,205 @@
+<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;" v-loading="loading">
+      <div class="create-body">
+        <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="200">
+              <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-column
+              align="center"
+              label="操作">
+              <template slot-scope="scope">
+                <div class="btn btn-small btn-info" @click="goToDetail(scope.row.code)">查看详情</div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </template>
+        <el-pagination
+          v-if="curCrowdList&&curCrowdList.length"
+          :page-size="9"
+          layout="prev, pager, next"
+          :total="totalElements"
+          :current-page="activePage"
+          @current-change="handlePageChange"
+          class="pull-right"
+        >
+        </el-pagination>
+      </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";
+  import Apis from '@/js/api';
+
+  export default {
+    name: "CrowdList",
+    props: ['searchVal', 'crowdList'],
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        // searchVal: '',
+        searchType: '0',
+        searchTypeArr: [
+          {
+            "name": "众测",
+            "value": "0"
+          }],
+        curCrowdList: this.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) => {
+          this.curCrowdList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        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) => {
+          this.curCrowdList = res.data.content;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.handleSearchData();
+      },
+      goToDetail(code) {
+        this.$router.push({
+          name: 'CrowdDetail',
+          params: {code: code}
+        })
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+  .item-template {
+    height: 80px;
+  }
+</style>

+ 110 - 0
src/pages/HomepageSearch/ExpertCard.vue

@@ -0,0 +1,110 @@
+<template>
+  <el-card class="expert-card">
+    <el-row style="border-bottom: 1px solid #ccc">
+      <el-col :span="6">
+        <div class="card-img"><img :src="card.photo" style="height: 50px; width: 50px;"/></div>
+      </el-col>
+      <el-col :span="18">
+        <div class="card-title">
+          {{card.name}}
+        </div>
+        <div class="card-content">
+          {{card.title}}
+        </div>
+      </el-col>
+    </el-row>
+    <div class="card-detail">
+      {{card.introduction}}
+    </div>
+    <div class="card-action">
+      <div class="btn btn-small btn-info pull-right" @click="goToDetail(card.id)">查看详情</div>
+      <div class="participate-num">
+        <!-- <span v-bind:class="['badge',{ 'ios-platform': item.toLowerCase()=='ios','android-platform': item.toLowerCase()=='android','web-platform': item.toLowerCase()=='web'}]" v-for="item in platformType">{{item}}</span> -->
+      </div>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  export default {
+    name: 'AgencyLine',
+    props: ['card'],
+    methods: {
+      goToDetail(id) {
+        this.$router.push({
+          name: 'ExpertDetail',
+          params: {id: id}
+        })
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+    },
+    mounted() {
+
+    }
+  }
+</script>
+
+<style lang="less">
+  .expert-card .el-card__body {
+    padding: 0 !important;
+  }
+
+  .el-divider--horizontal {
+    margin-bottom: 5px !important;
+  }
+  .expert-card {
+    padding: 10px;
+
+    .card-img {
+      margin: 10px;
+      position: relative;
+      float: left;
+    }
+
+    .card-title {
+      margin-top: 5px;
+      font-size: 24px;
+      font-family: Source Han Sans CN;
+      font-weight: 500;
+      color: rgba(0, 0, 0, 1);
+      line-height: 30px;
+      overflow: hidden; //超出的文本隐藏
+      text-overflow: ellipsis; //溢出用省略号显示
+      white-space: nowrap; //溢出不换行
+    }
+
+    .card-content {
+      font-size: 14px;
+      font-family: Source Han Sans CN;
+      font-weight: 400;
+      color: rgba(0, 0, 0, 1);
+      overflow: hidden;
+      text-overflow: ellipsis;
+      display: -webkit-box; //作为弹性伸缩盒子模型显示。
+      -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
+      -webkit-line-clamp: 1; //显示的行
+    }
+
+    .card-detail {
+      width: 100%;
+      height: 72px;
+      margin-bottom: 5px;
+      font-size: 14px;
+      font-family: Source Han Sans CN;
+      font-weight: 400;
+      color: rgba(0, 0, 0, 1);
+      overflow: hidden;
+      text-overflow: ellipsis;
+      display: -webkit-box; //作为弹性伸缩盒子模型显示。
+      -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
+      -webkit-line-clamp: 3; //显示的行
+    }
+
+  }
+
+</style>

+ 205 - 0
src/pages/HomepageSearch/ExpertList.vue

@@ -0,0 +1,205 @@
+<template>
+  <div>
+    <!--    <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;" v-loading="loading">
+      <div class="title h2">专家</div>
+      <el-row>
+        <el-col :span="18" class="">
+          <el-row :gutter="15" style="margin-bottom: 10px">
+            <el-col :span="8" v-for="(item,index) in expertList" :key="index" style="margin-bottom: 15px">
+              <ExpertCard :card="item"></ExpertCard>
+            </el-col>
+          </el-row>
+          <el-pagination
+            v-if="expertList&&expertList.length"
+            :page-size="9"
+            layout="prev, pager, next"
+            :total="totalElements"
+            :current-page="activePage"
+            @current-change="handlePageChange"
+            class="pull-right"
+          >
+          </el-pagination>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  import Http from '@/js/http.js';
+  import TopSearch from "../../components/commons/TopSearch";
+  import ExpertCard from "./ExpertCard";
+  import {storageGet} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
+
+  export default {
+    name: "ExpertList",
+    components: {ExpertCard, TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        searchVal: '',
+        searchType: '3',
+        searchTypeArr: [
+          {
+            "name": "全部",
+            "value": "all"
+          },
+          {
+            "name": "项目",
+            "value": "0"
+          },
+          {
+            "name": "机构",
+            "value": "1"
+          },
+          {
+            "name": "工具",
+            "value": "2"
+          },
+          {
+            "name": "专家",
+            "value": "3"
+          }],
+        expertList: [],
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.searchVal = this.$route.params.searchVal;
+        this.handleSearchData();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        if (this.searchType == 0) {
+          this.$router.push({
+            name: 'Square',
+            params: {searchVal: this.searchVal, searchType: "project", currTab: "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,
+          "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;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.nextPage();
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+</style>

+ 250 - 0
src/pages/HomepageSearch/ResourceList.vue

@@ -0,0 +1,250 @@
+<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">
+        <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" v-loading="loading">
+            <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="250">
+            </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-column
+              align="center"
+              label="操作">
+              <template slot-scope="scope">
+                <div class="btn btn-small btn-info" @click="goToDetail(scope.row.code)">查看详情</div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </template>
+        <el-collapse accordion style="margin: 0 30px">
+          <el-pagination
+            v-if="curResourceList&&curResourceList.length"
+            :page-size="10"
+            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";
+  import Apis from '@/js/api';
+
+  export default {
+    name: "ResourceList",
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        loading: false,
+        searchVal: '',
+        curResourceList: [],
+        searchType: '2',
+        searchTypeArr: [
+          {
+            "name": "全部",
+            "value": "all"
+          },
+          {
+            "name": "项目",
+            "value": "0"
+          },
+          {
+            "name": "机构",
+            "value": "1"
+          },
+          {
+            "name": "工具",
+            "value": "2"
+          },
+          {
+            "name": "专家",
+            "value": "3"
+          }],
+        activePage: 1,
+        totalElements: 0
+      }
+    },
+    methods: {
+      loadData() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.searchVal = this.$route.params.searchVal;
+        this.handleSearchData();
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+
+        if (this.searchType == 0) {
+          this.$router.push({
+            name: 'Square',
+            params: {searchVal: this.searchVal, searchType: "project", currTab: "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": this.activePage,
+          "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;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.nextPage();
+      },
+      goToDetail(code) {
+        this.$router.push({
+          name: 'ResourceDetail',
+          params: {id: code}
+        })
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+  .item-template {
+    height: 80px;
+  }
+</style>

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

@@ -0,0 +1,220 @@
+<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;" v-loading="loading">
+      <div class="create-body">
+        <div class="title h2">众测人员</div>
+        <el-collapse accordion style="margin: 0 30px">
+          <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==null?defaultValue.image: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-column
+                align="center"
+                label="操作">
+                <template slot-scope="scope">
+                  <div class="btn btn-small btn-info" @click="goToDetail(scope.row.id)">查看详情</div>
+                </template>
+              </el-table-column>
+            </el-table>
+          </template>
+          <el-pagination
+            v-if="curUserList&&curUserList.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, defaultValue} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import Apis from '@/js/api';
+
+  export default {
+    name: "UserList",
+    props: ['searchVal', 'userList'],
+    components: {TopSearch},
+    data() {
+      return {
+        user: {},
+        isLogin: false,
+        id: 0,
+        // searchVal: '',
+        searchType: '0',
+        loading: false,
+        searchTypeArr: [
+          {
+            "name": "众测人员",
+            "value": "0"
+          }],
+        curUserList: this.userList,
+        defaultValue: defaultValue,
+        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) => {
+          this.curUserList = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        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) => {
+          this.curUserList = res.data.content;
+        })
+      },
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.handleSearchData();
+      },
+      goToDetail(id) {
+        this.$router.push({
+          name: 'UserDetail',
+          params: {id: id}
+        })
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+  .item-template {
+    height: 80px;
+  }
+</style>

+ 123 - 0
src/pages/Square/PopularProject.vue

@@ -0,0 +1,123 @@
+<template>
+  <div class="popular-card">
+  <el-card>
+    <div slot="header" class="popular-header">
+      <img src="../../assets/img/popular-project.png" alt="popular-project" class="popular-header-img"/>
+      <span class="popular-header-title">热门项目</span>
+      <el-button style="float: right; padding: 3px 0;line-height: 25px" type="text" @click="goToMore()">more>></el-button>
+    </div>
+    <div class="popular-list">
+      <el-row class="popular-list-item" v-for="item in hotCrowdTestProjectVOs" :key="item.id">
+        <el-col :span="19">
+          <img src="../../assets/img/logo-project.png" alt="logo-project" class="pull-left project-logo-img">
+          <div style="margin-left: 55px; cursor: pointer;"  @click="goToProjectDetail(item.code)">
+            <div class="list-item-title">
+              {{item.name}}
+            </div>
+            <div class="list-item-info">
+              {{item.description}}
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="5">
+          <div class="project-people-number">
+            <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>
+    </div>
+  </el-card>
+  </div>
+</template>
+
+<script>
+    import Http from '@/js/http.js';
+    import Apis from '@/js/api.js';
+    import {notify} from "../../constants";
+  export default {
+    name: 'PopularProject',
+    props:['hotCrowdTestProjectVOs'],
+    methods:{
+        goToMore(){
+            console.log("goToMoreProject");
+            this.$router.push({
+                name: 'PopularProjectAndTaskList',
+                params: {type: "project"}
+            })
+        },
+        goToProjectDetail (id) {
+            this.$router.push({name: 'Project', params: {projectId: id}})
+        }
+    }
+  }
+</script>
+
+<style lang="less">
+  .popular-card {
+    margin-bottom: 15px;
+  }
+  .popular-header .el-card__header{
+    border-bottom: 2px solid rgba(0,117,203,1) !important;
+  }
+
+  .popular-card .el-card__body{
+    padding: 0 !important;
+  }
+  .popular-header {
+    height: 25px;
+    vertical-align:middle;
+  }
+  .popular-header-title {
+    display: inline-block;
+    line-height: 25px;
+    vertical-align:middle;
+  }
+  .popular-header-img {
+    height: 25px;
+    width: 25px;
+    vertical-align:middle;
+  }
+
+  .popular-list {
+    .popular-list-item {
+      padding: 5px 10px;
+      border-bottom: 1px solid #ccc !important;
+      .list-item-title{
+        font-size:14px;
+        font-family:Source Han Sans CN;
+        font-weight:400;
+        color:rgba(0,0,0,1);
+        overflow: hidden;
+        text-overflow:ellipsis; //溢出用省略号显示
+        white-space:nowrap; //溢出不换行
+      }
+      .list-item-info{
+        font-size:14px;
+        font-family:Adobe Heiti Std;
+        font-weight:normal;
+        color:rgba(153,153,153,1);
+        overflow:hidden; //超出的文本隐藏
+        text-overflow:ellipsis; //溢出用省略号显示
+        white-space:nowrap; //溢出不换行
+      }
+      .project-logo-img {
+        width: 44px;
+        height: 44px;
+        display: inline-block;
+        margin: 2px 0;
+      }
+      .project-people-number {
+        font-size:16px;
+        font-family:Roboto;
+        font-weight:400;
+        color:rgba(0,117,203,1);
+        line-height: 48px;
+      }
+    }
+
+  }
+
+
+
+</style>

+ 303 - 0
src/pages/Square/PopularProjectAndTaskList.vue

@@ -0,0 +1,303 @@
+<template>
+  <div>
+    <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 " class="">
+              <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">
+                <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>
+      <!--TabNav-->
+      <el-tabs v-model="currTab" @tab-click="handleTabClick" class="square-tab">
+        <el-tab-pane v-for="item in menuArr" :name="item.name" :key="item.name">
+          <span slot="label" style="font-size: 18px">{{item.label}}</span>
+        </el-tab-pane>
+      </el-tabs>
+      <div>
+      </div>
+    </div>
+    <div class="mine-body container" style="text-align: center;"  v-loading="loading">
+      <el-tabs value="myProject" @tab-click="handleTabClick">
+        <el-tab-pane name="myProject" v-if="currTab == 'project'">
+          <span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
+          <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle"
+                  justify="center"
+                  style="font-size: 14px;">
+            <el-col :span="6" type="flex" align="middle" justify="center">项目图片</el-col>
+            <el-col :span="6" type="flex" align="middle" justify="center">项目名称</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">应用类型</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">项目预算</el-col>
+            <el-col :span="3" type="flex" align="middle" justify="center">参与人数</el-col>
+            <el-col :span="4" type="flex" align="middle" justify="center">操作</el-col>
+          </el-row>
+          <project-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 )"
+                        v-for="(item,index) in projectAndTaskArr" :key="item.id" :projectItem="item"/>
+        </el-tab-pane>
+
+        <el-tab-pane name="myProject" v-if="currTab == 'task'">
+          <span v-if="projectAndTaskArr == null || projectAndTaskArr.length == 0"> 暂无项目 </span>
+          <el-row v-if="projectAndTaskArr != null && projectAndTaskArr.length != 0" type="flex" align="middle"
+                  justify="center"
+                  style="font-size: 14px;">
+            <el-col :span="5">任务封面</el-col>
+            <el-col :span="4">任务名称</el-col>
+            <el-col :span="4">测试类型</el-col>
+            <el-col :span="4">任务预算</el-col>
+            <el-col :span="4">领取人数</el-col>
+            <el-col :span="3">操作</el-col>
+          </el-row>
+          <task-item v-if="(projectAndTaskArr != null || projectAndTaskArr.length > 0 )"
+                     v-for="(item,index2) in projectAndTaskArr" :key="index2" :task="item"/>
+        </el-tab-pane>
+
+      </el-tabs>
+    </div>
+
+
+    <div class="container">
+      <el-row>
+        <el-pagination
+          v-if="currTab!=='squareHome'&&projectAndTaskArr&&projectAndTaskArr.length"
+          :page-size="12"
+          layout="prev, pager, next"
+          :total="totalElements"
+          :current-page="activePage"
+          @current-change="handlePageChange"
+          class="pull-right"
+        >
+        </el-pagination>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import SearchBar from '../../components/commons/SearchBar'
+  import SquareCard from './SquareCard'
+  import PopularProject from './PopularProject'
+  import PopularTask from './PopularTask'
+  import {notify} from "../../constants"
+  import TaskItem from '../../components/commons/TaskItem'
+  import ProjectItem from '../../components/commons/ProjectItem'
+  import {defaultValue, getRolesPermissions, storageGet} from '@/js/index'
+  import {mapActions, mapGetters} from 'vuex';
+
+  export default {
+    name: 'PopularProjectAndTaskList',
+    comments: {TaskItem, ProjectItem},
+    data() {
+      return {
+        loading: false,
+        isLogin: false,
+        searchType: 'project',
+        searchVal: '',
+        currTab: 'project',
+        tabArr: [
+          {label: "热门项目", name: "project"},
+          {label: "热门任务", name: "task"}
+        ],
+        menuArr: [
+          {label: "热门测试项目", name: "project"},
+          {label: "热门测试任务", name: "task"}
+        ],
+        projectAndTaskArr: [],
+        activePage: 1,
+        totalElements: 0,
+        type: ''
+      }
+    },
+    components: {
+      TaskItem,
+      ProjectItem,
+      SearchBar,
+      SquareCard,
+      PopularProject,
+      PopularTask
+    },
+    computed: {},
+    methods: {
+      loadData() {
+        this.showLoading();
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+        this.type = this.$route.params.type;
+        if (this.type === "project") {
+          this.currTab = 'project';
+          this.getHotProject();
+        } else {
+          this.currTab = 'task';
+          this.getHotTask();
+        }
+        this.hideLoading();
+      },
+      getHotProject() {
+        this.showLoading();
+        let params = {
+          "keyword": this.searchVal,//搜索关键字
+          "activePage": this.activePage,//指定页面
+          "columnFilters": []
+        };
+        Http.post(Apis.PROJECT.MORE_HOT_PROJECT, params).then((res) => {
+          console.log(res.data);
+          this.projectAndTaskArr = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+        this.hideLoading();
+      },
+      getHotTask() {
+        this.showLoading();
+        let params = {
+          "keyword": this.searchVal,//搜索关键字
+          "activePage": this.activePage,//指定页面
+          "columnFilters": []
+        };
+        Http.post(Apis.TASK.MORE_HOT_TASK, params).then((res) => {
+          this.projectAndTaskArr = res.data.content;
+          this.totalElements = res.data.totalElements;
+        })
+        this.hideLoading();
+      },
+
+      gotoHome() {
+        this.$router.push('/home');
+      },
+      handleTabClick(tab) {
+        this.currTab = tab.name
+        this.searchType = this.currTab;
+        this.activePage = 1;
+        this.searchVal = '';
+        this.searchData()
+      },
+      handleTabClickSearch() {
+        this.activePage = 1;
+        this.searchData()
+      },
+      searchData(index) {
+        if (this.currTab === 'project') {
+          this.getHotProject();
+        } else {
+          this.searchType = this.currTab;
+          this.getHotTask();
+        }
+      },
+      handleTypeClick(tab) {
+        this.searchType = tab.name;
+        // this.currTab = this.searchType;
+        this.activePage = 1;
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData() {
+        console.log("this.searchVal  " + this.searchVal)
+        this.activePage = 1;
+        if (this.currTab == 'project') {
+          this.getHotProject();
+        } else {
+          this.getHotTask();
+        }
+      },
+      handlePageChange(index) {
+        this.activePage = index;
+        this.searchData();
+      },
+      showLoading() {
+        this.loading = true
+      },
+      hideLoading() {
+        this.loading = false
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+
+  .project-task {
+    padding: 15px 0;
+
+    .el-card {
+      border: none;
+    }
+  }
+
+  .popular-modules {
+    padding: 15px 0 15px 15px;
+  }
+
+
+  .mine-container {
+    padding: 0 80px 40px 80px;
+  }
+
+  .mine-top-wrapper {
+    height: 350px;
+    background-color: #fff;
+  }
+
+  [class*="el-col-"] {
+    height: 100%;
+  }
+
+  .advertise-imgs {
+    height: 100%;
+  }
+
+  .advertise-imgs img {
+    width: 100%;
+    height: 100%;
+  }
+
+  .user-banner {
+    text-align: center;
+    display: inline-table;
+    height: 100%;
+    width: 100%;
+    margin-top: 40px;
+  }
+
+</style>

+ 55 - 0
src/pages/Square/PopularTask.vue

@@ -0,0 +1,55 @@
+<template>
+  <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>
+      <el-button style="float: right; padding: 3px 0" type="text" class="pull-right"  @click="goToMore()">more>></el-button>
+    </div>
+    <div class="popular-list">
+      <el-row class="popular-list-item" v-for="item in hotCrowdTaskVOs" :key="item.id">
+        <el-col :span="19">
+          <img src="../../assets/img/logo-blue.png" alt="logo-project" class="pull-left project-logo-img">
+          <div style="margin-left: 55px; cursor: pointer;"  @click="goToTaskDetail(item.projectId,item.code)">
+            <div class="list-item-title" >
+              {{item.title}}
+            </div>
+            <div class="list-item-info">
+              {{item.description}}
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="5">
+          <div class="project-people-number">
+            {{item.acceptedCount}}人
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  import Http from '@/js/http.js';
+  import Apis from '@/js/api.js';
+  import {notify} from "../../constants";
+  export default {
+    name: 'PopularTask',
+    props:['hotCrowdTaskVOs'],
+      methods:{
+          goToMore(){
+              console.log("goToMoreTask");
+              this.$router.push({
+                  name: 'PopularProjectAndTaskList',
+                  params: {type: "task"}
+              })
+          },
+          goToTaskDetail (projectId, id) {
+              this.$router.push({name: 'Task', params: {projectId: projectId, taskId: id}})
+          },
+      }
+  }
+</script>
+
+<style lang="less">
+
+</style>

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

@@ -0,0 +1,249 @@
+<template>
+  <div>
+    <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 " class="">
+              <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">
+                <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>
+      <!--TabNav-->
+      <el-tabs v-model="currTab" @tab-click="handleTabClick" class="square-tab" >
+        <el-tab-pane  v-for="item in menuArr" :name="item.name" :key="item.name">
+          <span slot="label" style="font-size: 18px">{{item.label}}</span>
+        </el-tab-pane>
+      </el-tabs>
+      <div>
+      </div>
+    </div>
+    <div class="container">
+      <el-row>
+        <el-col :span="18" class="project-task">
+          <el-row :gutter="15"  style="margin-bottom: 10px">
+            <el-col :span="8" v-for="(item,index) in projectAndTaskArr" :key="index" style="margin-bottom: 15px">
+              <SquareCard :card="item"></SquareCard>
+            </el-col>
+          </el-row>
+          <el-pagination
+            v-if="currTab!=='squareHome'&&projectAndTaskArr&&projectAndTaskArr.length"
+            :page-size="12"
+            layout="prev, pager, next"
+            :total="totalElements"
+            :current-page = "activePage"
+            @current-change="handlePageChange"
+            class="pull-right"
+          >
+          </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>
+</template>
+
+<script>
+  import Http from '@/js/http.js'
+  import Apis from '@/js/api.js'
+  import SearchBar from '../../components/commons/SearchBar'
+  import SquareCard from './SquareCard'
+  import PopularProject from './PopularProject'
+  import PopularTask from './PopularTask'
+  import {storageGet} from '@/js/index.js'
+  import {notify} from "../../constants";
+  import { mapActions ,mapGetters} from 'vuex';
+  export default {
+    name: 'Square2.0',
+    data(){
+      return {
+        user: {},
+        isLogin: false,
+        searchType:'project',
+        searchVal: '',
+        currTab:'squareHome',
+        tabArr : [
+          {label:"项目",name:"project"},
+          {label:"任务",name:"task"}
+        ],
+        menuArr: [
+          {label:"首页",name:"squareHome"},
+          {label:"测试项目",name:"project"},
+          {label:"测试任务",name:"task"}
+        ],
+        projectAndTaskArr:[],
+        type: 0,
+        hotCrowdTestProjectVOs:[],
+        hotCrowdTaskVOs:[],
+        activePage:1,
+        totalElements:0
+      }
+    },
+    components: {
+      SearchBar,
+      SquareCard,
+      PopularProject,
+      PopularTask
+    },
+    computed:{
+    },
+    methods:{
+      gotoHome(){
+        this.$router.push('/home');
+      },
+      handleTabClick(tab){
+          console.log("handleTabClick ");
+        this.currTab = tab.name
+        this.activePage = 1;
+        this.searchVal = '';
+        this.searchData()
+      },
+      handleTabClickSearch(){
+          this.activePage = 1;
+          this.searchData()
+      },
+      searchData(index){
+        if(this.currTab === 'squareHome'){
+          this.getData();
+        }else{
+          this.searchType = this.currTab;
+          this.handleSearchData();
+        }
+      },
+      handleTypeClick(tab){
+        this.searchType = tab.name;
+        this.activePage = 1;
+      },
+
+      loadData(){
+        if (storageGet('user') != null) {
+            this.isLogin = true;
+        }
+
+        // this.projectAndTaskArr = this.$route.params.projectAndTaskArr;
+        // this.type = this.$route.params.type;
+
+        // 从首页项目搜索框跳转过来
+        this.currTab = this.$route.params.currTab;
+        if(this.currTab === "project"){
+            this.searchVal = this.$route.params.searchVal;
+            this.searchType = this.$route.params.searchType;
+            this.getHotData();
+            this.handleTabClickSearch();
+        }
+
+        // // 从热门项目和任务跳转过来
+        // else if(this.type == 1){
+        //     console.log("type " + this.type);
+        //     this.getHotData();
+        // }
+
+        // 正常点击众测广场跳转过来
+        else{
+            this.searchVal = this.$route.params.searchVal;
+            this.searchType = 'project';
+            this.currTab = "squareHome"
+            this.getData();
+        }
+      },
+
+      getData(){
+          Http.get('/api/square/list').then((res)=>{
+              let crowdTestProjectVOs = res.data.crowdTestProjectVOs;
+              let crowdTestTaskVOS = res.data.crowdTestTaskVOS;
+              let projectAndTaskArr = crowdTestProjectVOs.concat(crowdTestTaskVOS);
+              this.hotCrowdTestProjectVOs = res.data.hotCrowdTestProjectVOs;
+              this.hotCrowdTaskVOs = res.data.hotCrowdTaskVOs;
+              this.projectAndTaskArr = projectAndTaskArr;
+          })
+      },
+
+      getHotData(){
+          Http.get('/api/square/list').then((res)=>{
+              this.hotCrowdTestProjectVOs = res.data.hotCrowdTestProjectVOs;
+              this.hotCrowdTaskVOs = res.data.hotCrowdTaskVOs;
+          })
+      },
+      checkLogin() {
+        this.checkCreateProjectAuth();
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      handleSearchData(){
+        let url = '/api/square/search/list';
+        let params = {
+          "keyword": this.searchVal,//搜索关键字
+          "activePage": this.activePage,//指定页面
+          "columnFilters":
+            [
+              {
+                "type": this.searchType // 查询项目就是project,任务就是task
+              }
+            ]
+        };
+        Http.post(url,params).then((res)=>{
+          this.currTab = this.searchType;
+          this.projectAndTaskArr = res.data.content;
+          this.totalElements=res.data.totalElements;
+        })
+      },
+      handlePageChange(index){
+        this.activePage = index;
+        this.searchData();
+      },
+      setUserInfo() {
+        this.user = storageGet('user') && storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.setUserInfo();
+      this.loadData();
+    }
+  }
+</script>
+
+<style lang="less">
+  @import "../../style/search-nav";
+  .project-task {
+     padding: 15px 0;
+    .el-card {
+      border: none;
+    }
+   }
+
+  .popular-modules {
+    padding: 15px 0 15px 15px;
+  }
+
+</style>

+ 176 - 0
src/pages/Square/SquareCard.vue

@@ -0,0 +1,176 @@
+<template>
+  <el-card class="square-card">
+    <div class="card-title">
+      {{card.name ? card.name :card.title}}
+    </div>
+    <div class="card-content">
+      {{card.description}}
+    </div>
+    <div class="card-detail">
+      <el-row>
+        <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 :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>
+    <div class="card-footer">
+      <el-row class="card-footer-row">
+        <el-col :span="12" class="pull-left">
+          {{card.applicationType || card.serviceType}}
+        </el-col>
+        <el-col :span="12" class=" test-btn">
+          <el-button type="primary" round size="mini" class="pull-right" v-if="card.applicationType"
+                     @click="goToProjectDetail(card.code)">查看详情
+          </el-button>
+          <el-button type="primary" round size="mini" class="pull-right" v-else
+                     @click="goToTaskDetail(card.projectId, card.code)">我要众测
+          </el-button>
+        </el-col>
+      </el-row>
+    </div>
+  </el-card>
+</template>
+
+<script>
+  import {notify} from "../../constants";
+  import Http from '@/js/http.js';
+  import {storageGet} from '@/js/index.js'
+  import Apis from '@/js/api'
+  export default {
+    name: 'SquareCard',
+    props: ['card'],
+    data() {
+      return {
+        isLogin: false,
+        user:{}
+      }
+    },
+    methods: {
+      onload() {
+        if (storageGet('user') != null) {
+          this.isLogin = true;
+        }
+      },
+      checkCreateProjectAuth() {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push('/project/create');
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      goToProjectDetail(id) {
+        if (!this.isLogin) {
+          notify('warning', '请登录后访问');
+        }
+        // else if (this.isLogin) {
+        //   Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
+        //     this.$router.push({name: 'Project', params: {projectId: id}})
+        //   }).catch((error) => {
+        //     notify('error', error.data)
+        //   })
+        // }
+        this.$router.push({name: 'Project', params: {projectId: id}})
+      },
+      goToTaskDetail(projectId, taskId) {
+        if (!this.isLogin) {
+          console.log("请登录后访问");
+          notify('warning', '请登录后访问');
+        } else if (this.isLogin) {
+          Http.get(Apis.USER.IS_AGENCY.replace('{userId}', this.user.id)).then((res) => {
+            this.$router.push({
+              name: 'Task',
+              params: {projectId: projectId, taskId: taskId}
+            })
+          }).catch((error) => {
+            notify('error', error.data)
+          })
+        }
+      },
+      setUserInfo() {
+        this.user = storageGet('user')&&storageGet('user').userVO;
+      }
+    },
+    mounted() {
+      this.onload();
+      this.setUserInfo();
+    }
+  }
+</script>
+
+<style lang="less">
+  .square-card .el-card__body {
+    padding: 0 !important;
+  }
+
+  .square-card {
+    .card-title {
+      font-size: 16px;
+      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; //溢出不换行
+    }
+
+    .card-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; //显示的行
+    }
+
+    .card-detail {
+      margin: 10px 0;
+
+      .card-detail-money {
+        font-size: 14px;
+        font-family: Source Han Sans CN;
+        font-weight: bold;
+        color: rgba(0, 117, 203, 1);
+      }
+
+      .card-detail-info {
+        font-size: 14px;
+        font-family: Roboto;
+        font-weight: 400;
+        color: rgba(153, 153, 153, 1);
+      }
+    }
+  }
+
+  .card-title, .card-content, .card-detail {
+    padding: 0 10px !important;
+  }
+
+  .card-footer {
+    background: rgba(233, 239, 249, 1);
+    /*height: 40px;*/
+
+    .card-footer-row {
+      padding: 15px 10px;
+      font-size: 14px;
+      font-family: Source Han Sans CN;
+      font-weight: bold;
+    }
+  }
+
+</style>

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini