1 |
- webpackJsonp([12],{BD3q:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("SQ4B"),i=a("ea32"),n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-card",{staticClass:"expert-card"},[a("el-row",{staticStyle:{"border-bottom":"1px solid #ccc"}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"card-img"},[a("img",{staticStyle:{height:"50px",width:"50px"},attrs:{src:t.card.photo}})])]),t._v(" "),a("el-col",{attrs:{span:18}},[a("div",{staticClass:"card-title"},[t._v("\n "+t._s(t.card.name)+"\n ")]),t._v(" "),a("div",{staticClass:"card-content"},[t._v("\n "+t._s(t.card.title)+"\n ")])])],1),t._v(" "),a("div",{staticClass:"card-detail"},[t._v("\n "+t._s(t.card.introduction)+"\n ")]),t._v(" "),a("div",{staticClass:"card-action"},[a("div",{staticClass:"btn btn-small btn-info pull-right",on:{click:function(e){return t.goToDetail(t.card.id)}}},[t._v("查看详情")]),t._v(" "),a("div",{staticClass:"participate-num"})])],1)},staticRenderFns:[]};var r=a("VU/8")({name:"AgencyLine",props:["card"],methods:{goToDetail:function(t){this.$router.push({path:"/expert/detail/",name:"ExpertDetail",query:{id:t}})},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1}},mounted:function(){}},n,!1,function(t){a("UjWf")},null,null).exports,c=a("vGYV"),l=a("qI5z"),o=a("b9vf"),h=a("2uFj"),p={name:"ExpertList",components:{ExpertCard:r,TopSearch:i.a},data:function(){return{logoTitle:h.a.logoTitle,user:{},isLogin:!1,loading:!1,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:function(){null!=Object(c.J)("user")&&(this.isLogin=!0),this.searchVal=this.$route.params.searchVal,this.handleSearchData()},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1},checkLogin:function(){this.checkCreateProjectAuth()},checkCreateProjectAuth:function(){var t=this;this.isLogin?this.isLogin&&s.a.get(o.a.USER.IS_PART.replace("{userId}",this.user.id)).then(function(e){t.$router.push("/project/create")}).catch(function(t){Object(l.a)("error",t.data)}):(console.log("请登录后访问"),Object(l.a)("warning","请登录后访问"))},handleSearchData:function(){var t=this;if(0==this.searchType)this.$router.push({name:"Square",params:{searchVal:this.searchVal,searchType:"project",currTab:"project"}});else if(1==this.searchType)this.$router.push({name:"AgencyList",params:{searchVal:this.searchVal}});else if(2==this.searchType)this.$router.push({name:"ResourceList",params:{searchVal:this.searchVal}});else if(3==this.searchType){var e={keyword:this.searchVal,activePage:1,columnFilters:[{field:"type",type:"enums",enums:this.searchTypeArr,value:this.searchType}]};s.a.post("/api/common/index/page",e).then(function(e){t.expertList=e.data.expertPage.content,t.totalElements=e.data.expertPage.totalElements})}},nextPage:function(){var t=this,e={keyword:this.searchVal,activePage:this.activePage,columnFilters:[{field:"type",type:"enums",enums:this.searchTypeArr,value:this.searchType}]};s.a.post("/api/common/index/page",e).then(function(e){t.expertList=e.data.expertPage.content,t.totalElements=e.data.expertPage.totalElements})},gotoHome:function(){this.$router.push("/home")},handleTypeClick:function(t){this.searchType=t.name},handlePageChange:function(t){this.activePage=t,this.nextPage()},setUserInfo:function(){this.user=Object(c.J)("user")&&Object(c.J)("user").userVO}},mounted:function(){this.setUserInfo(),this.loadData()}},u={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"nav",attrs:{stype:"height:500px"}},[s("el-row",{staticClass:"search-nav",staticStyle:{padding:"30px 0 20px 0"}},[s("el-col",{attrs:{span:6}},[s("div",{staticClass:"pull-left",staticStyle:{cursor:"pointer"},on:{click:t.gotoHome}},[s("img",{staticClass:"logo-img",attrs:{src:a("mIp/")}}),t._v(" "),s("span",{staticClass:"logo-title"},[t._v(t._s(t.logoTitle))])])]),t._v(" "),s("el-col",{attrs:{span:12}},[s("div",{staticClass:"search-nav"},[s("div",{attrs:{id:"search-block "}},[s("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleTypeClick},model:{value:t.searchType,callback:function(e){t.searchType=e},expression:"searchType"}},t._l(t.searchTypeArr,function(e){return"all"!==e.value?s("el-tab-pane",{key:e.value,attrs:{label:e.name,name:e.value}}):t._e()}),1),t._v(" "),s("div",{staticClass:"search-input"},[s("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入内容"},model:{value:t.searchVal,callback:function(e){t.searchVal=e},expression:"searchVal"}},[s("el-button",{staticClass:"search-button",attrs:{slot:"append",type:"primary"},on:{click:t.handleSearchData},slot:"append"},[t._v("搜索")])],1)],1)],1)])]),t._v(" "),s("el-col",{attrs:{span:6}},[s("el-button",{staticClass:"releaseBtn",attrs:{type:"primary pull-right"},on:{click:function(e){return t.checkLogin()}}},[t._v("免费发布众测需求")])],1)],1)],1),t._v(" "),s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"container",staticStyle:{margin:"20px auto"}},[s("div",{staticClass:"title h2"},[t._v("专家")]),t._v(" "),s("el-row",[s("el-col",{attrs:{span:18}},[s("el-row",{staticStyle:{"margin-bottom":"10px"},attrs:{gutter:15}},t._l(t.expertList,function(t,e){return s("el-col",{key:e,staticStyle:{"margin-bottom":"15px"},attrs:{span:8}},[s("ExpertCard",{attrs:{card:t}})],1)}),1),t._v(" "),t.expertList&&t.expertList.length?s("el-pagination",{staticClass:"pull-right",attrs:{"page-size":9,layout:"prev, pager, next",total:t.totalElements,"current-page":t.activePage},on:{"current-change":t.handlePageChange}}):t._e()],1)],1)],1)])},staticRenderFns:[]};var d=a("VU/8")(p,u,!1,function(t){a("aRb0")},null,null);e.default=d.exports},UjWf:function(t,e){},aRb0:function(t,e){}});
|