webpackJsonp([39],{FgSA:function(t,e){},RzzK:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("SQ4B"),i=a("b9vf"),n=a("ggl6"),l=a("qI5z"),r=a("3Kss"),c=a("vGYV"),o=a("2uFj"),p={name:"CrowdDetail",comments:{ProjectItem:r.a},data:function(){return{logoTitle:o.j,user:{},loading:!1,isLogin:!1,searchType:"project",searchVal:"",currTab:"project",tabArr:[{label:"众测项目",name:"project"}],projectList:[],activePage:1,totalElements:0,code:""}},components:{ProjectItem:r.a,SearchBar:n.a},computed:{},methods:{loadData:function(){this.showLoading(),null!=Object(c.I)("user")&&(this.isLogin=!0),this.code=this.$route.query.code,this.getCrowdProject(),this.hideLoading()},getCrowdProject:function(){var t=this,e={keyword:this.searchVal,activePage:this.activePage,columnFilters:[]};s.a.post(i.a.PROJECT.CROWD_PROJECT.replace("{code}",this.code),e).then(function(e){t.projectList=e.data.content,t.totalElements=e.data.totalElements})},gotoHome:function(){this.$router.push("/home")},checkLogin:function(){this.checkCreateProjectAuth()},checkCreateProjectAuth:function(){var t=this;this.isLogin?this.isLogin&&s.a.get(i.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(){this.activePage=1,this.getCrowdProject()},handlePageChange:function(t){this.activePage=t,this.getCrowdProject()},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1},setUserInfo:function(){this.user=Object(c.I)("user")&&Object(c.I)("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"},model:{value:t.searchType,callback:function(e){t.searchType=e},expression:"searchType"}},t._l(t.tabArr,function(t){return s("el-tab-pane",{key:t.label,attrs:{label:t.label,name:t.name}})}),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),t._v(" "),s("div")],1),t._v(" "),s("div",{staticClass:"mine-body",staticStyle:{"text-align":"center"}},[s("el-tabs",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"90%","margin-left":"5%"},attrs:{value:"myProject"}},["project"==t.currTab?s("el-tab-pane",{attrs:{name:"myProject"}},[null==t.projectList||0==t.projectList.length?s("span",[t._v(" 暂无项目 ")]):t._e(),t._v(" "),null!=t.projectList&&0!=t.projectList.length?s("el-row",{staticStyle:{"font-size":"14px"},attrs:{type:"flex",align:"middle",justify:"center"}},[s("el-col",{attrs:{span:6,type:"flex",align:"middle",justify:"center"}},[t._v("项目图片")]),t._v(" "),s("el-col",{attrs:{span:6,type:"flex",align:"middle",justify:"center"}},[t._v("项目名称")]),t._v(" "),s("el-col",{attrs:{span:3,type:"flex",align:"middle",justify:"center"}},[t._v("应用类型")]),t._v(" "),s("el-col",{attrs:{span:3,type:"flex",align:"middle",justify:"center"}},[t._v("项目预算")]),t._v(" "),s("el-col",{attrs:{span:3,type:"flex",align:"middle",justify:"center"}},[t._v("参与人数")]),t._v(" "),s("el-col",{attrs:{span:4,type:"flex",align:"middle",justify:"center"}},[t._v("操作")])],1):t._e(),t._v(" "),t._l(t.projectList,function(e,a){return null!=t.projectList||t.projectList.length>0?s("project-item",{key:e.id,attrs:{projectItem:e}}):t._e()})],2):t._e()],1)],1),t._v(" "),s("div",{staticClass:"container"},[s("el-row",[s("el-col",{staticClass:"project-task",attrs:{span:18}},["squareHome"!==t.currTab&&t.projectList&&t.projectList.length?s("el-pagination",{staticClass:"pull-right",attrs:{"page-size":10,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("FgSA")},null,null);e.default=d.exports}});