chunk-feb9af44.dd6b50ca.js 7.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-feb9af44"],{"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=[],c=e("795b"),r=e.n(c),s=(e("7f7f"),e("ac6a"),e("f20c")),o=e("5cab"),u=e("f499"),l=e.n(u),d=e("8982"),f="/industryParkApi",h="/wx/data",p="/wx/public",m="/wx/dictController";function v(t){return Object(d["a"])({url:f+h+"/listBizAll/"+t,method:"post"})}function g(t){return Object(d["a"])({url:f+p+"/listProjectAll",method:"post",data:t})}function b(t){return Object(d["a"])({url:f+m+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:l()(t)};return new r.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var y=e("3089"),D={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 c={label:"全部",value:"",active:!0};i.unshift(c)}return i},confirm:function(t,a){return new r.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}}},j=D,k=e("2877"),T=Object(k["a"])(j,n,i,!1,null,"3fa5b905",null);a["a"]=T.exports},"168f":function(t,a,e){"use strict";var n=e("67c7"),i=e.n(n);i.a},"67c7":function(t,a,e){},"7f7f":function(t,a,e){var n=e("86cc").f,i=Function.prototype,c=/^\s*function ([^ (]*)/,r="name";r in i||e("9e1e")&&n(i,r,{configurable:!0,get:function(){try{return(""+this).match(c)[1]}catch(t){return""}}})},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),c=e("bc3a"),r=e.n(c),s=e("4328"),o=e.n(s),u=e("4360"),l=e("5cab"),d=e("a18c"),f=e("3089");function h(t,a){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["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(){u["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 p(t){t.headers||(t.headers={}),t.headers&&l["a"].getToken()&&(t.headers["RC-Token"]=l["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(){u["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)})})}},a87f: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:"service"},[e("div",{staticClass:"tips-list-bg"},t._l(t.serviceList,function(a){return e("div",{key:a.label,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:"center"},t._l(t.allData,function(a){return e("div",{staticClass:"card",on:{click:function(e){return t.$router.push({path:"/periphery/merchantDetails",query:{id:a.id}})}}},[e("div",{staticClass:"card-type"},[e("div",{staticClass:"left"},[e("div",{staticClass:"top"},[e("span",[t._v(t._s(a.businessName))])]),e("div",{staticClass:"bottom"},[t._v("入驻时间:"+t._s(a.releaseTime))])]),e("div",{staticClass:"right"},[e("div",{staticClass:"tip tip-dark"},[t._v(t._s(a.type))])])])])}),0)])},i=[],c=(e("ac6a"),e("06a8")),r=e("ff65"),s={data:function(){return{dc_key:["periphery_type","QUICK_SELECTION"],serviceList:[],type:"",params:{pageNum:1,pageSize:10,releaseType:"periphery"},totalPage:1,allData:[]}},mixins:[c["a"]],mounted:function(){var t=this;this.type=this.$route.query.type,this.initDict(this.dc_key).then(function(a){t.serviceList=t.dc_data.periphery_type,t.selectChange(t.type)})},created:function(){},methods:{selectData:function(t){var a=this;a.params.type=t,Object(r["d"])(a.params).then(function(t){t.data.rows&&t.data.rows.forEach(function(t){var e=a.getItemJson(t);a.allData.push(e)}),console.log(a.allData)})},selectChange:function(t){var a=!0;this.serviceList.forEach(function(e){e.value===t?e.active?a=!1:e.active=!0:e.active=!1}),a&&(this.allData=[],this.selectData(t))},getItemJson:function(t){return t.releaseTime=this.$common.transDate(t.releaseTime),t.type=this.dc_map.periphery_type[t.type],t}}},o=s,u=(e("168f"),e("2877")),l=Object(u["a"])(o,n,i,!1,null,"37bbd78a",null);a["default"]=l.exports},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},ff65:function(t,a,e){"use strict";e.d(a,"a",function(){return r}),e.d(a,"d",function(){return s}),e.d(a,"c",function(){return o}),e.d(a,"b",function(){return u});var n=e("8982"),i="/industryParkApi",c="/wx/periphery";function r(t){return Object(n["a"])({url:i+c+"/add",method:"post",data:t})}function s(t){return Object(n["a"])({url:i+c+"/list",method:"post",data:t})}function o(t){return Object(n["a"])({url:i+c+"/getById",method:"post",data:t})}function u(t){return Object(n["a"])({url:i+c+"/edit",method:"post",data:t})}}}]);