35.340e8803dc9cd18b4ed9.js 4.9 KB

1
  1. webpackJsonp([35],{htfW:function(t,e){},jz06:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("SQ4B"),s=a("ea32"),n=a("vGYV"),l=a("qI5z"),o=a("b9vf"),c=a("2uFj"),r={name:"CompetitionList",props:["searchVal","competitionList"],components:{TopSearch:s.a},data:function(){return{logoTitle:c.j,user:{},isLogin:!1,loading:!1,searchType:"0",defaultValue:n.c,searchTypeArr:[{name:"大赛",value:"0"}],curCompetitionList:this.competitionList,activePage:1,totalElements:0}},methods:{loadData:function(){var t=this;null!=Object(n.I)("user")&&(this.isLogin=!0);var e={keyword:this.searchVal,activePage:this.activePage,columnFilters:[{field:"type",type:"enums",enums:this.searchTypeArr,value:this.searchType}]};i.a.post("/api/common/index/competition",e).then(function(e){t.curCompetitionList=e.data.content,t.totalElements=e.data.totalElements})},checkLogin:function(){this.checkCreateProjectAuth()},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1},checkCreateProjectAuth:function(){var t=this;this.isLogin?this.isLogin&&i.a.get(o.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(){var t=this,e={keyword:this.searchVal,activePage:this.activePage,columnFilters:[{field:"type",type:"enums",enums:this.searchTypeArr,value:this.searchType}]};i.a.post("/api/common/index/competition",e).then(function(e){t.curCompetitionList=e.data.content})},gotoHome:function(){this.$router.push("/home")},handleTypeClick:function(t){this.searchType=t.name},handlePageChange:function(t){this.activePage=t,this.handleSearchData()},setUserInfo:function(){this.user=Object(n.I)("user")&&Object(n.I)("user").userVO}},mounted:function(){this.setUserInfo(),this.loadData()}},u={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"home-wrapper"},[i("div",{staticClass:"nav",attrs:{stype:"height:500px"}},[i("el-row",{staticClass:"search-nav",staticStyle:{padding:"30px 0 20px 0"}},[i("el-col",{attrs:{span:6}},[i("div",{staticClass:"pull-left",staticStyle:{cursor:"pointer"},on:{click:t.gotoHome}},[i("img",{staticClass:"logo-img",attrs:{src:a("mIp/")}}),t._v(" "),i("span",{staticClass:"logo-title"},[t._v(t._s(t.logoTitle))])])]),t._v(" "),i("el-col",{attrs:{span:12}},[i("div",{staticClass:"search-nav"},[i("div",{attrs:{id:"search-block "}},[i("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?i("el-tab-pane",{key:e.value,attrs:{label:e.name,name:e.value}}):t._e()}),1),t._v(" "),i("div",{staticClass:"search-input"},[i("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入内容"},model:{value:t.searchVal,callback:function(e){t.searchVal=e},expression:"searchVal"}},[i("el-button",{staticClass:"search-button",attrs:{slot:"append",type:"primary"},on:{click:t.handleSearchData},slot:"append"},[t._v("搜索")])],1)],1)],1)])]),t._v(" "),i("el-col",{attrs:{span:6}},[i("el-button",{staticClass:"releaseBtn",attrs:{type:"primary pull-right"},on:{click:function(e){return t.checkLogin()}}},[t._v("免费发布众测需求")])],1)],1)],1),t._v(" "),i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"container",staticStyle:{margin:"20px auto"}},[i("div",{staticClass:"create-body"},[i("div",{staticClass:"title h2"},[t._v("众测大赛")]),t._v(" "),i("el-collapse",{staticStyle:{margin:"0 30px"},attrs:{accordion:""}},[[i("el-table",{ref:"multipleTable",staticStyle:{width:"100%","font-size":"20px",color:"black"},attrs:{data:t.curCompetitionList,"tooltip-effect":"dark"}},[i("el-table-column",{attrs:{label:"图标",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:null==e.row.image?t.defaultValue.image:e.row.image}})]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"名称",align:"left",width:"500"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("a",{attrs:{target:"_blank",href:e.row.linkUrl,itemscope:""}},[t._v(t._s(e.row.name))])]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"unit",align:"left",label:"单位"}}),t._v(" "),i("el-table-column",{attrs:{align:"left",label:"时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.$moment(e.row.startTime).format("YYYY-MM-DD HH:mm:ss")))]}}])})],1)],t._v(" "),t.curCompetitionList&&t.curCompetitionList.length?i("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")(r,u,!1,function(t){a("htfW")},null,null);e.default=h.exports}});