24.91ddc722f55d83456e04.js 5.5 KB

1
  1. webpackJsonp([24],{GEY8:function(e,t){},kpxo:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("SQ4B"),l=a("ea32"),n=a("vGYV"),i=a("qI5z"),c=a("b9vf"),r=a("2uFj"),o={name:"AgencyList",components:{TopSearch:l.a},data:function(){return{logoTitle:r.a.logoTitle,user:{},isLogin:!1,loading:!1,defaultValue:n.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(n.J)("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(n.J)("user")&&Object(n.J)("user").userVO}},mounted:function(){this.setUserInfo(),this.loadData()}},h={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"home-wrapper"},[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:e.gotoHome}},[s("img",{staticClass:"logo-img",attrs:{src:a("mIp/")}}),e._v(" "),s("span",{staticClass:"logo-title"},[e._v(e._s(e.logoTitle))])])]),e._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":e.handleTypeClick},model:{value:e.searchType,callback:function(t){e.searchType=t},expression:"searchType"}},e._l(e.searchTypeArr,function(t){return"all"!==t.value?s("el-tab-pane",{key:t.value,attrs:{label:t.name,name:t.value}}):e._e()}),1),e._v(" "),s("div",{staticClass:"search-input"},[s("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入内容"},model:{value:e.searchVal,callback:function(t){e.searchVal=t},expression:"searchVal"}},[s("el-button",{staticClass:"search-button",attrs:{slot:"append",type:"primary"},on:{click:e.handleSearchData},slot:"append"},[e._v("搜索")])],1)],1)],1)])]),e._v(" "),s("el-col",{attrs:{span:6}},[s("el-button",{staticClass:"releaseBtn",attrs:{type:"primary pull-right"},on:{click:function(t){return e.checkLogin()}}},[e._v("免费发布众测需求")])],1)],1)],1),e._v(" "),s("div",{staticClass:"container",staticStyle:{margin:"20px auto"}},[s("div",{staticClass:"create-body"},[s("div",{staticClass:"title h2"},[e._v("测评机构")]),e._v(" "),s("el-collapse",{staticStyle:{margin:"0 30px"},attrs:{accordion:""}},[[s("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"}},[s("el-table-column",{attrs:{label:"头像",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:null==t.row.agencyPhoto?e.defaultValue.image:t.row.agencyPhoto}})]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"evaluationAgencyName",label:"名称",align:"left",width:"300"}}),e._v(" "),s("el-table-column",{attrs:{prop:"address",align:"left",label:"地址"}}),e._v(" "),s("el-table-column",{attrs:{prop:"taskCount",align:"center",label:"接包数量"}}),e._v(" "),s("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("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?s("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("GEY8")},"data-v-6838b7e4",null);t.default=u.exports}});