25.6b6da734620b8aa13d7b.js 4.9 KB

1
  1. webpackJsonp([25],{RzzK:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("SQ4B"),n=a("b9vf"),i=a("ggl6"),l=a("qI5z"),r=a("3Kss"),o=a("vGYV"),c=a("2uFj"),p={name:"CrowdDetail",comments:{ProjectItem:r.a},data:function(){return{logoTitle:c.a.logoTitle,logo_transparent:c.a.logo_transparent,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:i.a},computed:{},methods:{loadData:function(){this.showLoading(),null!=Object(o.K)("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(n.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(n.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(o.K)("user")&&Object(o.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",[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"},model:{value:t.searchType,callback:function(e){t.searchType=e},expression:"searchType"}},t._l(t.tabArr,function(t){return a("el-tab-pane",{key:t.label,attrs:{label:t.label,name:t.name}})}),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),t._v(" "),a("div")],1),t._v(" "),a("div",{staticClass:"mine-body",staticStyle:{"text-align":"center"}},[a("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?a("el-tab-pane",{attrs:{name:"myProject"}},[null==t.projectList||0==t.projectList.length?a("span",[t._v(" 暂无项目 ")]):t._e(),t._v(" "),null!=t.projectList&&0!=t.projectList.length?a("el-row",{staticStyle:{"font-size":"14px"},attrs:{type:"flex",align:"middle",justify:"center"}},[a("el-col",{attrs:{span:6,type:"flex",align:"middle",justify:"center"}},[t._v("项目名称")]),t._v(" "),a("el-col",{attrs:{span:6,type:"flex",align:"middle",justify:"center"}},[t._v("项目状态")]),t._v(" "),a("el-col",{attrs:{span:3,type:"flex",align:"middle",justify:"center"}},[t._v("应用类型")]),t._v(" "),a("el-col",{attrs:{span:3,type:"flex",align:"middle",justify:"center"}},[t._v("项目预算")]),t._v(" "),a("el-col",{attrs:{span:3,type:"flex",align:"middle",justify:"center"}},[t._v("参与人数")]),t._v(" "),a("el-col",{attrs:{span:4,type:"flex",align:"middle",justify:"center"}},[t._v("操作")])],1):t._e(),t._v(" "),t._l(t.projectList,function(e,s){return null!=t.projectList||t.projectList.length>0?a("project-item",{key:e.id,attrs:{projectItem:e}}):t._e()})],2):t._e()],1)],1),t._v(" "),a("div",{staticClass:"container"},[a("el-row",[a("el-col",{staticClass:"project-task",attrs:{span:18}},["squareHome"!==t.currTab&&t.projectList&&t.projectList.length?a("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("o9H4")},null,null);e.default=d.exports},o9H4:function(t,e){}});