1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1b434a68"],{"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=[],r=e("795b"),c=e.n(r),s=(e("7f7f"),e("ac6a"),e("f20c")),o=e("5cab"),u=e("f499"),d=e.n(u),l=e("8982"),f="/industryParkApi",h="/wx/data",p="/wx/public",m="/wx/dictController";function v(t){return Object(l["a"])({url:f+h+"/listBizAll/"+t,method:"post"})}function g(t){return Object(l["a"])({url:f+p+"/listProjectAll",method:"post",data:t})}function b(t){return Object(l["a"])({url:f+m+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:d()(t)};return new c.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var y=e("3089"),w={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=[],g(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]?s["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 r={label:"全部",value:"",active:!0};i.unshift(r)}return i},confirm:function(t,a){return new c.a(function(e,n){y["Dialog"].confirm({title:a,message:t}).then(function(t){e(t)}).catch(function(t){Object(y["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}}},k=w,x=e("2877"),j=Object(x["a"])(k,n,i,!1,null,"3fa5b905",null);a["a"]=j.exports},"386d":function(t,a,e){"use strict";var n=e("cb7c"),i=e("83a1"),r=e("5f1b");e("214f")("search",1,function(t,a,e,c){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=c(e,t,this);if(a.done)return a.value;var s=n(t),o=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var d=r(s,o);return i(s.lastIndex,u)||(s.lastIndex=u),null===d?-1:d.index}]})},"45d9":function(t,a,e){"use strict";e.d(a,"d",function(){return c}),e.d(a,"c",function(){return s}),e.d(a,"b",function(){return o}),e.d(a,"e",function(){return u}),e.d(a,"f",function(){return d}),e.d(a,"g",function(){return l}),e.d(a,"a",function(){return f});var n=e("8982"),i="/industryParkApi",r="/wx/parkTrain";function c(t){return Object(n["a"])({url:i+r+"/list",method:"post",data:t})}function s(t,a){return Object(n["a"])({url:i+r+"/getTrainById?id="+t+"&userId="+a,method:"get"})}function o(t){return Object(n["a"])({url:i+r+"/clickCollect",method:"post",data:t})}function u(t){return Object(n["a"])({url:i+r+"/listRegisSignInfo",method:"post",data:t})}function d(t){return Object(n["a"])({url:i+r+"/updatePartakeNumber",method:"post",data:t})}function l(t){return Object(n["a"])({url:i+r+"/updatePublishStatus",method:"post",data:t})}function f(t){return Object(n["a"])({url:i+r+"/add",method:"post",data:t})}},4917:function(t,a,e){"use strict";var n=e("cb7c"),i=e("9def"),r=e("0390"),c=e("5f1b");e("214f")("match",1,function(t,a,e,s){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=s(e,t,this);if(a.done)return a.value;var o=n(t),u=String(this);if(!o.global)return c(o,u);var d=o.unicode;o.lastIndex=0;var l,f=[],h=0;while(null!==(l=c(o,u))){var p=String(l[0]);f[h]=p,""===p&&(o.lastIndex=r(u,i(o.lastIndex),d)),h++}return 0===h?null:f}]})},"686d":function(t,a,e){},"7f7f":function(t,a,e){var n=e("86cc").f,i=Function.prototype,r=/^\s*function ([^ (]*)/,c="name";c in i||e("9e1e")&&n(i,c,{configurable:!0,get:function(){try{return(""+this).match(r)[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 h}),e.d(a,"b",function(){return p});var n=e("795b"),i=e.n(n),r=e("bc3a"),c=e.n(r),s=e("4328"),o=e.n(s),u=e("4360"),d=e("5cab"),l=e("a18c"),f=e("3089");function h(t,a){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["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){c()(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(){u["a"].dispatch("user/logout").then(function(){l["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 p(t){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["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){c.a.defaults.withCredentials=!0,c()(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(){u["a"].dispatch("user/logout").then(function(){l["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)})})}},a041: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:"training"},[e("div",{staticClass:"menu-top-box"},[e("div",{staticClass:"meun-item",on:{click:function(a){return t.addDetail("1")}}},[e("span",{staticClass:"txt"},[t._v("新增线下培训")])]),e("div",{staticClass:"meun-item",on:{click:function(a){return t.addDetail("2")}}},[e("span",{staticClass:"txt"},[t._v("新增线上培训")])]),e("div",{staticClass:"meun-item"},[e("i",{staticClass:"iconfont icon-sao"}),e("span",{staticClass:"txt",on:{click:t.richScan}},[t._v("扫一扫")])])]),e("div",{staticClass:"tabs-box"},[e("van-tabs",{attrs:{color:"#2A3980","title-active-color":"#2A3980","title-inactive-color":"#666666"},model:{value:t.activeName,callback:function(a){t.activeName=a},expression:"activeName"}},t._l(t.tabsList,function(a){return e("van-tab",{attrs:{title:a.label,name:a.value}},[e("div",{staticClass:"tabs-card-list"},t._l(t.list,function(a){return e("div",{staticClass:"tabs-card"},[e("div",{staticClass:"image"},[e("img",{attrs:{src:a.annexArray[0],alt:""}})]),e("div",{staticClass:"card-info"},[e("p",{staticClass:"tit"},[t._v(t._s(a.trainTitle))]),e("p",{staticClass:"num"},[e("span",[t._v("报名:"+t._s(a.partakeNumber))]),e("span",[t._v("签到:"+t._s(a.signInNumber))])])]),e("div",{staticClass:"card-tips"},["2"!==a.registrationStatus?e("span",{staticClass:"normal-button-app z-bt",on:{click:function(e){return e.stopPropagation(),t.editDetail(a)}}},[t._v("编辑")]):t._e(),"3"!==a.registrationStatus&&"2"===a.publishStatus?e("span",{staticClass:"normal-button-app y-bt",on:{click:function(e){return e.stopPropagation(),t.updateStatus(a)}}},[t._v("下架")]):t._e()])])}),0)])}),1)],1)])},i=[],r=(e("ac6a"),e("386d"),e("4917"),e("06a8")),c=e("45d9"),s=e("3089"),o={mixins:[r["a"]],data:function(){return{activeName:"",dc_key:["trainType"],tabsList:[],list:[],userId:"",search:{trainType:"",userId:""}}},watch:{activeName:{deep:!0,handler:function(t){this.getData()}}},mounted:function(){var t=this;this.initDict(this.dc_key).then(function(a){t.tabsList=t.dc_data.trainType,t.$route.query.trainType&&(t.activeName=t.$route.query.trainType),t.getData()}),window.history&&window.history.pushState&&(history.pushState(null,null,document.URL),window.addEventListener("popstate",this.goBack,!1))},destroyed:function(){window.removeEventListener("popstate",this.goBack,!1)},methods:{goBack:function(){this.$router.push({path:"/home-app"})},richScan:function(){var t=navigator.userAgent,a=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);a?window.webkit.messageHandlers.androidNativeOpenQrcode.postMessage(1):window.MyJSInterface.androidNativeOpenQrcode()},getData:function(){var t=this,a=this;this.search.trainType=this.activeName,Object(c["d"])(this.search).then(function(e){a.list=e,a.list.forEach(function(a){null!=a.annexArray&&null!=a.annexArray.length&&(a.annexArray[0]=t.$common.replaceThumbnail(a.annexArray[0])),null===a.signInNumber&&(a.signInNumber=0)}),console.log(a.list)}).catch(function(){})},updateStatus:function(t){var a=this,e={id:t.id,updateType:"2"};Object(c["g"])(e).then(function(t){Object(s["Toast"])("下架成功"),a.getData()}).catch(function(){})},editDetail:function(t){"线下"===t.onlineOfflineStatus?this.$router.push({path:"/trainingRelease-app/addOffline",query:{isAdd:"1",id:t.id}}):this.$router.push({path:"/trainingRelease-app/addOnline",query:{isAdd:"1",id:t.id}})},addDetail:function(t){"1"===t?this.$router.push({path:"/trainingRelease-app/addOffline",query:{isAdd:"2"}}):this.$router.push({path:"/trainingRelease-app/addOnline",query:{isAdd:"2"}})}}},u=o,d=(e("c736"),e("2877")),l=Object(d["a"])(u,n,i,!1,null,"9a0decf0",null);a["default"]=l.exports},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},c736:function(t,a,e){"use strict";var n=e("686d"),i=e.n(n);i.a}}]);
|