Browse Source

增加详情界面

guo00guo 4 years ago
parent
commit
eb6da85605

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

@@ -13,10 +13,10 @@
         </el-col>
         <el-col :span="19" style="padding-left: 15%">
           <div class="copyright-block pull-left" style="margin: 12px 0">
-            版权所有 © 信息产品及科技服务集成化众测服务平台研发与应用项目组<br/>
-            京ICP备xxxxxxx号 文保网安备xxxxxxx<br/>
-            电话:86-10-xxxxxxxx 传真:86-10-xxxxxxx<br/>
-            电子邮箱:xxx@xxxxxxx.com
+            版权所有©信息产品及科技服务集成化众测服务平台与应用项目组<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">

+ 0 - 1
src/constants/tabMenu.js

@@ -23,7 +23,6 @@ const homeTabArr = {
   menuArr3:[
     {label: "找机构", name: "findInstitution"},
     {label: "找专家", name: "finfExpert"},
-    {label: "更多", name: "findMore"},
   ],
 };
 

+ 10 - 0
src/js/api.js

@@ -64,6 +64,7 @@ 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}",
   },
   PAGE: {
     HOME_PAGE: '/api/common/index/',
@@ -73,6 +74,15 @@ 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}',
+  },
   GENERAL: {
     GET_ALL_INSTITUTIONS: '/api/regionalManager',
     GET_ALL_AGENCIES: '/api/agency/list',

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

@@ -0,0 +1,165 @@
+<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" :rules="rules" ref="authentication" label-width="12%" class="demo-report">
+        <el-form-item prop="agencyPhoto" label="机构logo">
+          <span >
+          <el-image
+            style="width: 100px;"
+            :src="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="name">
+          <el-tag :type="authentication.authStatus.style">{{authentication.authStatus.text}}</el-tag>
+        </el-form-item>
+        <el-form-item v-if="!isModifyMode && authentication.authStatus.text == '认证失败'" label="失败原因" prop="name">
+          <el-link v-if="authentication.explain!=null&&authentication.explain!=''" type="danger" disabled>
+            {{authentication.explain}}
+          </el-link>
+          <el-link v-if="authentication.explain==null || authentication.explain==''" type="danger" disabled>管理员未填写
+          </el-link>
+        </el-form-item>
+        <el-form-item label="地址" prop="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 >
+          <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,
+        getCurrentAgencyAuthInfo,
+        getAllAgencyResourceTypes,
+        getAllServiceTypes,} from '@/js/index'
+
+    export default {
+        name: 'AgencyDetail',
+        components: {},
+        data() {
+            return {
+                user: {},
+                loading: false,
+                type: 0,
+                userId: 0,
+                resourceTypes: [],
+                serviceTypes: [],
+                authentication: {
+                    mobile: '',
+                    evaluationAgencyName: '',
+                    bankAccount: '',
+                    address: '',
+                    evaluationAgencyAbilityList: [],
+                    evaluationAgencyResourceList: [],
+                    authStatus: {},
+                    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.push({
+                    name: 'AgencyList'
+                })
+            },
+            //加载数据
+            getAuthInfo () {
+                this.showLoading()
+                getCurrentAgencyAuthInfo(this.userId, this.getAuthInfoSuccess, this.getAuthInfoFail)
+            },
+            getAuthInfoSuccess (res) {
+                this.hideLoading()
+                this.authentication.agencyPhoto = res.agencyPhoto == null ? defaultValue.image : res.agencyPhoto
+                this.authentication.evaluationAgencyName = res.evaluationAgencyName == null ? '暂未填写' : res.evaluationAgencyName
+                this.authentication.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList == null ? [] : res.evaluationAgencyAbilityList
+                this.authentication.evaluationAgencyResourceList = res.evaluationAgencyResourceList == null ? [] : res.evaluationAgencyResourceList
+                this.authentication.bankAccount = res.bankAccount == null ? '暂未填写' : res.bankAccount
+                this.authentication.address = res.address == null ? '暂未填写' : res.address
+                this.authentication.authStatus = res.authStatus
+                this.authentication.explain = res.explain
+                this.authentication.taskCount = res.taskCount
+            },
+            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
+            }
+        },
+        watch: {
+            agencyType(val) {
+                this.agencyType = val
+            }
+        }
+    }
+</script>
+
+<style>
+  .demo {
+    font-size: 32px;
+  }
+
+  .el-form-item {
+    max-height: 120px !important;
+    overflow: auto;
+  }
+</style>

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

@@ -0,0 +1,108 @@
+<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 class="badge">{{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" @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: '',
+                    // gender: '',
+                },
+            }
+        },
+        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.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;
+    overflow: auto;
+  }
+</style>

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

@@ -0,0 +1,110 @@
+<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="count" v-if="!type">
+          <span>{{resource.type}}</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>
+          <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
+                },
+            }
+        },
+        mounted() {
+            this.$nextTick(() => {
+                this.init()
+            })
+        },
+        methods: {
+            init() {
+                this.code = this.$route.params.id
+                this.loadData()
+            },
+            back() {
+                this.$router.push({
+                    name: 'ResourceList'
+                })
+            },
+            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.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;
+    overflow: auto;
+  }
+</style>

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

@@ -0,0 +1,109 @@
+<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" style="width: 50px; height: 50px;"/>
+        </el-form-item>
+        <el-form-item label="性别" prop="count">
+          <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} from '@/js/index'
+
+    export default {
+        name: 'UserDetail',
+        components: {},
+        data() {
+            return {
+                user: {},
+                loading: false,
+                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.push({
+                    name: 'UserList'
+                })
+            },
+            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;
+    overflow: auto;
+  }
+</style>

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

@@ -142,7 +142,6 @@
           menuArr3:[
             {label: "找机构", name: "findInstitution"},
             {label: "找专家", name: "finfExpert"},
-            {label: "更多", name: "findMore"},
           ],
         },
         homeData:{},

+ 37 - 13
src/pages/HomepageSearch/AgencyList.vue

@@ -40,28 +40,36 @@
               ref="multipleTable"
               :data="curAgencyList"
               tooltip-effect="dark"
-              style="width: 100%; font-size: 20px; color: black">
+              style="width: 100%; font-size: 20px; color: black" v-loading="loading">
               <el-table-column
                 label="头像"
-                width="200">
-                <template slot-scope="scope"><img :src="scope.row.agencyPhoto" style="width: 50px; height: 50px;"/></template>
+                width="100">
+                <template slot-scope="scope"><img :src="scope.row.agencyPhoto" style="width: 50px; height: 50px;"/>
+                </template>
               </el-table-column>
               <el-table-column
                 prop="evaluationAgencyName"
                 label="名称"
                 align="left"
-                width="400">
+                width="300">
               </el-table-column>
               <el-table-column
                 prop="address"
                 align="left"
-                label="省市">
+                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
@@ -92,6 +100,7 @@
         data() {
             return {
                 isLogin: false,
+                loading: false,
                 searchVal: '',
                 searchType: '1',
                 searchTypeArr: [
@@ -122,11 +131,20 @@
         },
         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() {
                 if (!this.isLogin) {
@@ -138,9 +156,9 @@
                 }
             },
             handleSearchData() {
-                if(this.searchType == 0){
+                if (this.searchType == 0) {
                     // this.$router.push({name: 'Square2.0', params: {searchVal: this.searchVal, searchType: "project"}});
-                }else if(this.searchType == 1){
+                } else if (this.searchType == 1) {
                     let url = '/api/agency/list/more';
                     let params = {
                         "keyword": this.searchVal,
@@ -156,15 +174,21 @@
                     }
                     Http.post(url, params).then((res) => {
                         this.curAgencyList = res.data.content;
-                        this.totalElements=res.data.totalElements;
+                        this.totalElements = res.data.totalElements;
                     })
-                }else if(this.searchType == 2){
+                } else if (this.searchType == 2) {
                     this.$router.push({name: 'ResourceList', params: {searchVal: this.searchVal}});
-                }else if(this.searchType == 3){
+                } else if (this.searchType == 3) {
                     this.$router.push({name: 'ExpertList', params: {searchVal: this.searchVal}});
                 }
             },
-            nextPage(){
+            goToDetail(userId) {
+                this.$router.push({
+                    name: 'AgencyDetail',
+                    params: {id: userId, type: 0}
+                })
+            },
+            nextPage() {
                 let url = '/api/agency/list/more';
                 let params = {
                     "keyword": this.searchVal,
@@ -180,7 +204,7 @@
                 }
                 Http.post(url, params).then((res) => {
                     this.curAgencyList = res.data.content;
-                    this.totalElements=res.data.totalElements;
+                    this.totalElements = res.data.totalElements;
                 })
             },
             gotoHome() {
@@ -196,7 +220,7 @@
         },
         mounted() {
             this.loadData();
-        }
+        },
     }
 </script>
 

+ 23 - 3
src/pages/HomepageSearch/AgencyResidentList.vue

@@ -43,20 +43,27 @@
               style="width: 100%; font-size: 20px; color: black">
               <el-table-column
                 label="头像"
-                width="200">
+                width="100">
                 <template slot-scope="scope"><img :src="scope.row.agencyPhoto" style="width: 50px; height: 50px;"/></template>
               </el-table-column>
               <el-table-column
                 prop="name"
                 label="名称"
                 align="left"
-                width="400">
+                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
@@ -89,6 +96,7 @@
             return {
                 isLogin: false,
                 searchType: '0',
+                loading: false,
                 searchTypeArr: [
                     {
                         "name": "入驻机构",
@@ -159,7 +167,19 @@
             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
+            },
         },
         mounted() {
             this.loadData();

+ 55 - 33
src/pages/HomepageSearch/ExpertCard.vue

@@ -1,8 +1,8 @@
 <template>
   <el-card class="expert-card">
     <div>
-      <div class="card-img" ><img src="../../assets/img/logo-blue.png" /></div>
-      <div class="card-title" >
+      <div class="card-img"><img src="../../assets/img/logo-blue.png"/></div>
+      <div class="card-title">
         {{card.name ? card.name :card.introduction}}
       </div>
       <div class="card-content">
@@ -12,73 +12,95 @@
       <div class="card-detail">
         {{card.introduction}}
       </div>
+      <div class="card-action">
+        <div class="btn btn-small btn-info" @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>
     </div>
   </el-card>
 </template>
 
 <script>
-  export default {
-    name: 'AgencyLine',
-    props: ['card'],
-    mounted() {
+    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{
+  .expert-card .el-card__body {
     padding: 0 !important;
   }
 
 
   .expert-card {
-    .card-img{
+    .card-img {
       margin: 10px;
       position: relative;
       float: left;
     }
+
     .card-title {
       margin: 10px;
-      font-size:24px;
-      font-family:Source Han Sans CN;
-      font-weight:500;
-      color:rgba(0,0,0,1);
-      line-height:30px;
+      font-size: 24px;
+      font-family: Source Han Sans CN;
+      font-weight: 500;
+      color: rgba(0, 0, 0, 1);
+      line-height: 30px;
       /*margin: 10px 0;*/
-      overflow:hidden; //超出的文本隐藏
-      text-overflow:ellipsis; //溢出用省略号显示
-      white-space:nowrap; //溢出不换行
+      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);
+      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; //显示的行
+      display: -webkit-box; //作为弹性伸缩盒子模型显示。
+      -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
+      -webkit-line-clamp: 3; //显示的行
     }
-    .card-detail{
-      font-size:14px;
-      font-family:Source Han Sans CN;
-      font-weight:400;
-      color:rgba(0,0,0,1);
+
+    .card-detail {
+      font-size: 14px;
+      font-family: Source Han Sans CN;
+      font-weight: 400;
+      color: rgba(0, 0, 0, 1);
       height: 70px;
       overflow: hidden;
       text-overflow: ellipsis;
-      display:-webkit-box; //作为弹性伸缩盒子模型显示。
-      -webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-      -webkit-line-clamp:3; //显示的行
+      display: -webkit-box; //作为弹性伸缩盒子模型显示。
+      -webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
+      -webkit-line-clamp: 3; //显示的行
     }
 
   }
 
-  .card-title,.card-content,.card-detail{
+  .card-title, .card-content, .card-detail {
     padding: 0 10px !important;
   }
 </style>

+ 21 - 1
src/pages/HomepageSearch/ResourceList.vue

@@ -66,6 +66,13 @@
               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">
@@ -97,6 +104,7 @@
         data() {
             return {
                 isLogin: false,
+                loading: false,
                 searchVal: '',
                 curResourceList: [],
                 searchType: '2',
@@ -195,7 +203,19 @@
             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
+            },
         },
         mounted() {
             this.loadData();

+ 21 - 7
src/pages/HomepageSearch/UserList.vue

@@ -50,13 +50,13 @@
                 prop="name"
                 label="名称"
                 align="left"
-                width="300">
-              </el-table-column>
-              <el-table-column
-                prop="gender"
-                align="left"
-                label="性别">
+                width="200">
               </el-table-column>
+<!--              <el-table-column-->
+<!--                prop="gender"-->
+<!--                align="left"-->
+<!--                label="性别">-->
+<!--              </el-table-column>-->
               <el-table-column
                 prop="address"
                 align="left"
@@ -67,6 +67,13 @@
                 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
@@ -98,6 +105,7 @@
         data() {
             return {
                 isLogin: false,
+                id: 0,
                 // searchVal: '',
                 searchType: '0',
                 searchTypeArr: [
@@ -169,7 +177,13 @@
             handlePageChange(index) {
                 this.activePage = index;
                 this.handleSearchData();
-            }
+            },
+            goToDetail(id) {
+                this.$router.push({
+                    name: 'UserDetail',
+                    params: {id: id}
+                })
+            },
         },
         mounted() {
             this.loadData();

+ 36 - 0
src/router/index.js

@@ -325,6 +325,42 @@ export default new Router({
         requireAuth: false,
       }
     },
+    {
+      path: '/agency/detail',
+      name: 'AgencyDetail',
+      component: resolve => require(['@/pages/DetailPage/AgencyDetail.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      }
+    },
+    {
+      path: '/user/detail',
+      name: 'UserDetail',
+      component: resolve => require(['@/pages/DetailPage/UserDetail.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      }
+    },
+    {
+      path: '/resource/detail',
+      name: 'ResourceDetail',
+      component: resolve => require(['@/pages/DetailPage/ResourceDetail.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      }
+    },
+    {
+      path: '/expert/detail',
+      name: 'ExpertDetail',
+      component: resolve => require(['@/pages/DetailPage/ExpertDetail.vue'], resolve),
+      meta: {
+        title: '',
+        requireAuth: false,
+      }
+    },
 
   ]
 })

+ 1 - 1
tool4deploy-test/Dockerfile

@@ -8,4 +8,4 @@ RUN chmod -R 777 /usr/share/nginx/html
 
 EXPOSE 80
 
-CMD ["nginx", "-g", "daemon off;"]
+CMD ["nginx", "-g", "daemon off;"]