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