32.8eb32b5a53b77a27cbca.js 5.5 KB

1
  1. webpackJsonp([32],{EnLl:function(e,t){},kpxo:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("SQ4B"),n=a("ea32"),l=a("vGYV"),i=a("qI5z"),c=a("b9vf"),r=a("2uFj"),o={name:"AgencyList",components:{TopSearch:n.a},data:function(){return{logoTitle:r.a.logoTitle,logo_transparent:r.a.logo_transparent,user:{},isLogin:!1,loading:!1,defaultValue:l.c,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:function(){this.showLoading(),null!=Object(l.K)("user")&&(this.isLogin=!0),this.searchVal=this.$route.params.searchVal,this.handleSearchData(),this.hideLoading()},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1},checkLogin:function(){this.checkCreateProjectAuth()},checkCreateProjectAuth:function(){var e=this;this.isLogin?this.isLogin&&s.a.get(c.a.USER.IS_PART.replace("{userId}",this.user.id)).then(function(t){e.$router.push("/project/create")}).catch(function(e){Object(i.a)("error",e.data)}):(console.log("请登录后访问"),Object(i.a)("warning","请登录后访问"))},handleSearchData:function(){var e=this;if(0==this.searchType);else if(1==this.searchType){var t={keyword:this.searchVal,activePage:this.activePage,columnFilters:[{field:"type",type:"enums",enums:this.searchTypeArr,value:this.searchType}]};s.a.post("/api/agency/list/more",t).then(function(t){e.curAgencyList=t.data.content,e.totalElements=t.data.totalElements})}else 2==this.searchType?this.$router.push({name:"ResourceList",params:{searchVal:this.searchVal}}):3==this.searchType&&this.$router.push({name:"ExpertList",params:{searchVal:this.searchVal}})},goToDetail:function(e){this.$router.push({name:"NewAgencyDetail",path:"/agency/detail",query:{id:e,type:0}})},nextPage:function(){var e=this,t={keyword:this.searchVal,activePage:this.activePage,columnFilters:[{field:"type",type:"enums",enums:this.searchTypeArr,value:this.searchType}]};s.a.post("/api/agency/list/more",t).then(function(t){e.curAgencyList=t.data.content,e.totalElements=t.data.totalElements})},gotoHome:function(){this.$router.push("/home")},handleTypeClick:function(e){this.searchType=e.name},handlePageChange:function(e){this.activePage=e,this.nextPage()},setUserInfo:function(){this.user=Object(l.K)("user")&&Object(l.K)("user").userVO}},mounted:function(){this.setUserInfo(),this.loadData()}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"home-wrapper"},[a("div",{staticClass:"nav",attrs:{stype:"height:500px"}},[a("el-row",{staticClass:"search-nav",staticStyle:{padding:"30px 0 20px 0"}},[a("el-col",{attrs:{span:6}},[a("div",{staticClass:"pull-left",staticStyle:{cursor:"pointer"},on:{click:e.gotoHome}},[a("img",{staticClass:"logo-img",attrs:{src:e.logo_transparent}}),e._v(" "),a("span",{staticClass:"logo-title"},[e._v(e._s(e.logoTitle))])])]),e._v(" "),a("el-col",{attrs:{span:12}},[a("div",{staticClass:"search-nav"},[a("div",{attrs:{id:"search-block "}},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleTypeClick},model:{value:e.searchType,callback:function(t){e.searchType=t},expression:"searchType"}},e._l(e.searchTypeArr,function(t){return"all"!==t.value?a("el-tab-pane",{key:t.value,attrs:{label:t.name,name:t.value}}):e._e()}),1),e._v(" "),a("div",{staticClass:"search-input"},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入内容"},model:{value:e.searchVal,callback:function(t){e.searchVal=t},expression:"searchVal"}},[a("el-button",{staticClass:"search-button",attrs:{slot:"append",type:"primary"},on:{click:e.handleSearchData},slot:"append"},[e._v("搜索")])],1)],1)],1)])]),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-button",{staticClass:"releaseBtn",attrs:{type:"primary pull-right"},on:{click:function(t){return e.checkLogin()}}},[e._v("免费发布众测需求")])],1)],1)],1),e._v(" "),a("div",{staticClass:"container",staticStyle:{margin:"20px auto"}},[a("div",{staticClass:"create-body"},[a("div",{staticClass:"title h2"},[e._v("测评机构")]),e._v(" "),a("el-collapse",{staticStyle:{margin:"0 30px"},attrs:{accordion:""}},[[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%","font-size":"20px",color:"black"},attrs:{data:e.curAgencyList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"头像",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:null==t.row.agencyPhoto?e.defaultValue.image:t.row.agencyPhoto}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"evaluationAgencyName",label:"名称",align:"left",width:"300"}}),e._v(" "),a("el-table-column",{attrs:{prop:"address",align:"left",label:"地址"}}),e._v(" "),a("el-table-column",{attrs:{prop:"taskCount",align:"center",label:"接包数量"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"btn btn-small btn-info",on:{click:function(a){return e.goToDetail(t.row.userId)}}},[e._v("查看详情")])]}}])})],1)],e._v(" "),e.curAgencyList&&e.curAgencyList.length?a("el-pagination",{staticClass:"pull-right",attrs:{"page-size":9,layout:"prev, pager, next",total:e.totalElements,"current-page":e.activePage},on:{"current-change":e.handlePageChange}}):e._e()],2)],1)])])},staticRenderFns:[]};var u=a("VU/8")(o,h,!1,function(e){a("EnLl")},"data-v-62f69b8c",null);t.default=u.exports}});