1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-92c2d30e"],{"06a8":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div")},i=[],s=e("795b"),r=e.n(s),c=(e("7f7f"),e("ac6a"),e("f20c")),o=e("5cab"),l=e("f499"),u=e.n(l),d=e("8982"),f="/industryParkApi",g="/wx/data",h="/wx/public",p="/wx/dictController";function v(t){return Object(d["a"])({url:f+g+"/listBizAll/"+t,method:"post"})}function m(t){return Object(d["a"])({url:f+h+"/listProjectAll",method:"post",data:t})}function b(t){return Object(d["a"])({url:f+p+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:u()(t)};return new r.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var S=e("3089"),C={name:"BaseData",data:function(){return{currentPage:1,totalSize:0,pageSize:10,InitialLoading:!0,allLoaded:!1,bottomStatus:"",StaffData:[],StaffMap:{},BizData:[],BizMap:{},UserProject:[],ProjectData:[],ProjectMap:{},dialogImageUrl:"",dialogImageVisible:!1,dc_map:{},dc_data:{},dc_map_no_all:{},dc_data_no_all:{}}},mounted:function(){},methods:{initDict:function(t){var a=this;return t||(t=a.dc_key),_(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!0);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var i=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=i,a.dc_map_no_all[e]=a.$common.transDcMap(i)})})},initDict2:function(t){var a=this;return t||(t=a.dc_key),_(t).then(function(t){t.data&&a.dc_key.forEach(function(e){var n=a.getDictValue(t.data,e,!1);a.dc_data[e]=n,a.dc_map[e]=a.$common.transDcMap(n);var i=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=i,a.dc_map_no_all[e]=a.$common.transDcMap(i)})})},initBiz:function(){var t=this;return this.BizData=[],v(o["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.businessName,value:a.id};t.BizData.push(e),t.BizMap[a.id]=a.businessName})}).catch(function(){})},initProjectData:function(){var t=this;return this.ProjectData=[],m(o["a"].uid()).then(function(a){a.data&&a.data.forEach(function(a){var e={label:a.name,value:a.id};t.ProjectData.push(e),t.ProjectMap[e.value]=a})}).catch(function(){})},pagination:function(t){var a=this.currentPage,e=this.pageSize,n=a*e-e,i=a*e;return t.slice(n,i)},getDictValue:function(t,a,e){var n=t[a]?c["a"].castEval(t[a].dictValue):[],i=[];if(n.forEach(function(t){var a={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};i.push(a)}),e){var s={label:"全部",value:"",active:!0};i.unshift(s)}return i},confirm:function(t,a){return new r.a(function(e,n){S["Dialog"].confirm({title:a,message:t}).then(function(t){e(t)}).catch(function(t){Object(S["Toast"])("已取消"),n(t)})})},handleBottomChange:function(t){console.log("handleBottomChange:"+t),this.bottomStatus=t,"drop"===this.bottomStatus&&this.currentPage++},loadBottom:function(){var t=this,a=this;console.log("loadBottom"),setTimeout(function(){a.getData(),t.$refs.loadmore.onBottomLoaded()},500)},imgPreview:function(t){this.dialogImageUrl="/industryParkApi/wx/img/viewImg/"+t,this.dialogImageVisible=!0},imgRemove:function(t,a){var e=a.indexOf(t);a.splice(e,1)},noImg:function(){var t=event.srcElement;t.src=e("aed7"),t.onerror=null}}},y=C,w=e("2877"),x=Object(w["a"])(y,n,i,!1,null,"3fa5b905",null);a["a"]=x.exports},"37fa":function(t,a,e){},"386d":function(t,a,e){"use strict";var n=e("cb7c"),i=e("83a1"),s=e("5f1b");e("214f")("search",1,function(t,a,e,r){return[function(e){var n=t(this),i=void 0==e?void 0:e[a];return void 0!==i?i.call(e,n):new RegExp(e)[a](String(n))},function(t){var a=r(e,t,this);if(a.done)return a.value;var c=n(t),o=String(this),l=c.lastIndex;i(l,0)||(c.lastIndex=0);var u=s(c,o);return i(c.lastIndex,l)||(c.lastIndex=l),null===u?-1:u.index}]})},"45d9":function(t,a,e){"use strict";e.d(a,"d",function(){return r}),e.d(a,"c",function(){return c}),e.d(a,"b",function(){return o}),e.d(a,"e",function(){return l}),e.d(a,"f",function(){return u}),e.d(a,"g",function(){return d}),e.d(a,"a",function(){return f});var n=e("8982"),i="/industryParkApi",s="/wx/parkTrain";function r(t){return Object(n["a"])({url:i+s+"/list",method:"post",data:t})}function c(t,a){return Object(n["a"])({url:i+s+"/getTrainById?id="+t+"&userId="+a,method:"get"})}function o(t){return Object(n["a"])({url:i+s+"/clickCollect",method:"post",data:t})}function l(t){return Object(n["a"])({url:i+s+"/listRegisSignInfo",method:"post",data:t})}function u(t){return Object(n["a"])({url:i+s+"/updatePartakeNumber",method:"post",data:t})}function d(t){return Object(n["a"])({url:i+s+"/updatePublishStatus",method:"post",data:t})}function f(t){return Object(n["a"])({url:i+s+"/add",method:"post",data:t})}},"7c0c":function(t,a,e){"use strict";var n=e("37fa"),i=e.n(n);i.a},"7f7f":function(t,a,e){var n=e("86cc").f,i=Function.prototype,s=/^\s*function ([^ (]*)/,r="name";r in i||e("9e1e")&&n(i,r,{configurable:!0,get:function(){try{return(""+this).match(s)[1]}catch(t){return""}}})},"83a1":function(t,a){t.exports=Object.is||function(t,a){return t===a?0!==t||1/t===1/a:t!=t&&a!=a}},8982:function(t,a,e){"use strict";e.d(a,"a",function(){return g}),e.d(a,"b",function(){return h});var n=e("795b"),i=e.n(n),s=e("bc3a"),r=e.n(s),c=e("4328"),o=e.n(c),l=e("4360"),u=e("5cab"),d=e("a18c"),f=e("3089");function g(t,a){t.headers||(t.headers={}),t.headers&&u["a"].getToken()&&(t.headers["RC-Token"]=u["a"].getToken());var e={method:t.method,url:t.url,data:o.a.stringify(t.data)};return a&&(e.data=t.data),t.headers&&(e.headers=t.headers),new i.a(function(a,n){r()(e).then(function(t){if(t&&t.data&&200===t.status){var e=t.data;switch(e.errno){case 501:Object(f["Toast"])(e.errmsg),setTimeout(function(){l["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),n(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(e.errmsg),n(e.errmsg);break}a(e)}else console.log(t),n(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}function h(t){t.headers||(t.headers={}),t.headers&&u["a"].getToken()&&(t.headers["RC-Token"]=u["a"].getToken());var a={method:t.method,url:t.url};return a.data=t.data,t.headers&&(a.headers=t.headers,a.headers["MVVM-Key"]=String((new Date).getTime()),a.headers["xx"]="anything",a.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new i.a(function(e,n){r.a.defaults.withCredentials=!0,r()(a).then(function(t){if(console.log("response:",t),t&&t.data&&200===t.status){var a=t.data;switch(a.errno){case 501:Object(f["Toast"])(a.errmsg),setTimeout(function(){l["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),n(a.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(f["Toast"])(a.errmsg),n(a.errmsg);break}e(a)}else console.log(t),n(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(f["Toast"])(a),n(a,e)})})}},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},e278:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"announcement"},[e("div",{staticClass:"tap-part"},[e("van-tabs",{attrs:{color:"#2A3980","line-width":"175px","title-active-color":"#2A3980"},model:{value:t.active,callback:function(a){t.active=a},expression:"active"}},[e("van-tab",{attrs:{title:"最新培训"}},[e("div",{staticClass:"tips-list"},t._l(t.tipList,function(a){return e("div",{class:["tip-item",a.active&&"active"],on:{click:function(e){return t.selectChange(a.value)}}},[t._v("\n "+t._s(a.label)+"\n ")])}),0),e("div",{staticClass:"card-news-list"},t._l(t.list,function(a){return e("div",{staticClass:"detail-card shadow-radius news-card",on:{click:function(e){return t.getDetail(a)}}},[e("div",{staticClass:"image"},[e("img",{attrs:{src:a.annexArray[0],alt:""}})]),e("div",{staticClass:"info-part"},[e("div",{staticClass:"top"},[e("p",{staticClass:"text"},[t._v(t._s(a.trainTitle))]),"线下"===a.onlineOfflineStatus?e("span",{staticClass:"tip-grid-bg"},[t._v("线下")]):e("span",{staticClass:"tip-grid-bg red"},[t._v("线上")])]),e("div",{staticClass:"bottom"},["线下"===a.onlineOfflineStatus&&"1"===a.registrationStatus?e("div",{staticClass:"left"},[e("span",{staticClass:"normal-tip by y-bg",staticStyle:{"text-align":"center"}},[t._v("报名中")])]):t._e(),"线下"===a.onlineOfflineStatus&&"2"===a.registrationStatus?e("div",{staticClass:"left"},[e("span",{staticClass:"normal-tip by h-bg",staticStyle:{"text-align":"center"}},[t._v("报名已结束")])]):t._e(),"线下"!==a.onlineOfflineStatus||a.registrationStatus?t._e():e("div",{staticClass:"left"},[e("span",{staticClass:"normal-tip by h-bg",staticStyle:{"text-align":"center"}},[t._v("报名未开始")])]),"线上"===a.onlineOfflineStatus&&"2"===a.trainStatus?e("div",{staticClass:"left"},[e("span",{staticClass:"normal-tip by z-bg",staticStyle:{"text-align":"center"}},[t._v("可观看")])]):t._e(),e("div",{staticClass:"right"},[e("div",{staticClass:"num"},[t._v(t._s(a.partakeNumber)+"人参与")]),e("div",{staticClass:"icon-collect",on:{click:function(e){return e.stopPropagation(),t.changeCollectorsStatus(a)}}},["2"===a.collectorsStatus?e("i",{staticClass:"iconfont icon-wujiaoxingxingxingshoucangdianji blue"}):e("i",{staticClass:"iconfont icon-wujiaoxingxingxingshoucangdianji"})])])])])])}),0)]),e("van-tab",{attrs:{title:"报名记录"}},[e("div",{staticClass:"card-news-list"},t._l(t.regisSignList,function(a){return e("div",{staticClass:"record-card shadow-radius"},[e("div",{staticClass:"left"},[a.annexArray?e("img",{attrs:{src:a.annexArray[0],alt:""}}):t._e(),e("p",{staticClass:"text"},[t._v("请出示二维码签到")])]),e("div",{staticClass:"right"},[e("div",{staticClass:"title"},[t._v(t._s(a.trainTitle))]),e("div",{staticClass:"time"},[t._v("时间:"+t._s(a.trainStartTime)+"开始")]),e("div",{staticClass:"add"},[e("p",[t._v("地址:"+t._s(a.trainAddress))])]),e("div",{staticClass:"bottom"},["1"==a.registrationStatus?e("p",{staticClass:"normal-tip by y-bg",staticStyle:{"text-align":"center"}},[t._v("\n 报名中\n ")]):t._e(),"2"==a.registrationStatus?e("p",{staticClass:"normal-tip by y-bg",staticStyle:{"text-align":"center"}},[t._v("\n 报名已结束\n ")]):t._e(),a.registrationStatus?t._e():e("p",{staticClass:"normal-tip by y-bg",staticStyle:{"text-align":"center"}},[t._v("\n 报名未开始\n ")])])])])}),0)])],1)],1)])},i=[],s=(e("a481"),e("ac6a"),e("386d"),e("06a8")),r=e("5cab"),c=e("45d9"),o={name:"ParkTraining",mixins:[s["a"]],data:function(){return{url:"https://www.idea-co-sf.com/industryParkApi",active:0,dc_key:["trainType"],userId:"",tipList:[],search:{trainType:"",userId:"",publishStatus:"2",pageNum:1,pageSize:10},list:[],regisSignList:[]}},mounted:function(){var t=this;this.userId=r["a"].uid(),this.initDict(this.dc_key).then(function(a){t.tipList=t.dc_data.trainType,t.getData(),t.getRegisSignInfo()})},methods:{loadMore:function(){this.search.pageNum+=1,this.getData()},getData:function(){var t=this;this.search.userId=this.userId,Object(c["d"])(this.search).then(function(a){t.list=a,t.list.forEach(function(t){t.annexArray[0]=t.annexArray?t.annexArray[0].replace("/webServer/FileController/download/","https://www.idea-co-sf.com/industryParkApi/FileController/download/"):""})})},getRegisSignInfo:function(){var t=this,a=this;Object(c["e"])({userId:this.userId,referenceType:"2"}).then(function(e){a.regisSignList=e,console.log("_this.regisSignList",a.regisSignList),a.regisSignList.forEach(function(a){console.log(t.url),a.annexArray[0]=a.annexArray[0].replace("/server/FileController/download/","https://www.idea-co-sf.com/industryParkApi/FileController/download/"),a.trainStartTime=t.$common.transBaseDateTime(a.trainStartTime)}),console.log(a.regisSignList)}).catch(function(){})},selectChange:function(t){var a=!0;this.tipList.forEach(function(e){e.value===t?e.active?a=!1:e.active=!0:e.active=!1}),a&&(this.search.trainType=t,this.getData())},getDetail:function(t){"线下"===t.onlineOfflineStatus?this.$router.push({path:"/parkTraining/detail",query:{id:t.id}}):this.$router.push({path:"/parkTraining/onlineDetail",query:{id:t.id}})},changeCollectorsStatus:function(t){if("2"===t.collectorsStatus){var a=this;Object(c["b"])({id:t.id,userId:r["a"].currUser().id,collectorsStatus:"1"}).then(function(t){a.getData(),a.getRegisSignInfo()})}else{var e=this;Object(c["b"])({id:t.id,userId:r["a"].currUser().id,collectorsStatus:"2"}).then(function(t){e.getData(),e.getRegisSignInfo()})}}}},l=o,u=(e("7c0c"),e("2877")),d=Object(u["a"])(l,n,i,!1,null,"6b453c2d",null);a["default"]=d.exports}}]);
|