chunk-b3b646be.45258ed9.js 8.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b3b646be"],{"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"),o=e.n(c),s=(e("7f7f"),e("ac6a"),e("f20c")),r=e("5cab"),u=e("f499"),d=e.n(u),l=e("8982"),f="/industryParkApi",h="/wx/data",m="/wx/public",p="/wx/dictController";function g(t){return Object(l["a"])({url:f+h+"/listBizAll/"+t,method:"post"})}function v(t){return Object(l["a"])({url:f+m+"/listProjectAll",method:"post",data:t})}function b(t){return Object(l["a"])({url:f+p+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:d()(t)};return new o.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var j=e("3089"),k={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=[],g(r["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=[],v(r["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 o.a(function(e,n){j["Dialog"].confirm({title:a,message:t}).then(function(t){e(t)}).catch(function(t){Object(j["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=k,C=e("2877"),D=Object(C["a"])(y,n,i,!1,null,"3fa5b905",null);a["a"]=D.exports},3616:function(t,a,e){},"506f":function(t,a,e){"use strict";var n=e("3616"),i=e.n(n);i.a},7121:function(t,a,e){"use strict";e.d(a,"d",function(){return o}),e.d(a,"c",function(){return s}),e.d(a,"b",function(){return r}),e.d(a,"a",function(){return u}),e.d(a,"e",function(){return d});var n=e("8982"),i="/industryParkApi",c="/wx/parkProgressRecord";function o(t){return Object(n["a"])({url:i+c+"/listGroup",method:"post",data:t})}function s(t){return Object(n["a"])({url:i+c+"/list",method:"post",data:t})}function r(t){return Object(n["a"])({url:i+c+"/getRecordById?id="+t,method:"get"})}function u(t){return Object(n["a"])({url:i+c+"/add",method:"post",data:t})}function d(t){return Object(n["a"])({url:i+c+"/remove",method:"post",data:t})}},"7f7f":function(t,a,e){var n=e("86cc").f,i=Function.prototype,c=/^\s*function ([^ (]*)/,o="name";o in i||e("9e1e")&&n(i,o,{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 m});var n=e("795b"),i=e.n(n),c=e("bc3a"),o=e.n(c),s=e("4328"),r=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:r.a.stringify(t.data)};return a&&(e.data=t.data),t.headers&&(e.headers=t.headers),new i.a(function(a,n){o()(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 m(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){o.a.defaults.withCredentials=!0,o()(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)})})}},a6fc: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:"detail"},[e("ul",{staticClass:"timeline-wrapper"},t._l(t.timelineList,function(a){return e("li",{key:a.createdAt,staticClass:"timeline-item"},[t._m(0,!0),e("div",{staticClass:"timeline-content"},[e("div",{staticClass:"content-top"},[e("span",{staticClass:"top-title"},[t._v(t._s(a.createdAt))]),e("span",{staticClass:"top-status"},[t._v(t._s(a.stage))])]),e("div",{staticClass:"content-text"},[t._v("\n "+t._s(a.progressContent)+"\n ")]),e("div",{staticClass:"content-bottom"},[e("span",{staticClass:"normal-button-app z-bt",on:{click:function(e){return t.handleEdit(a)}}},[t._v("编辑")]),e("span",{staticClass:"normal-button-app y-bt",on:{click:function(e){return t.remove(a)}}},[t._v("删除")])])])])}),0)])},i=[function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"timeline-box"},[e("div",{staticClass:"out-circle"},[e("div",{staticClass:"in-circle"})]),e("div",{staticClass:"long-line"})])}],c=(e("ac6a"),e("06a8")),o=e("5cab"),s=e("7121"),r=e("3089"),u={mixins:[c["a"]],data:function(){return{timelineList:[],userId:"",dc_key:["progressStage"],tipList:[],companyName:""}},mounted:function(){var t=this;this.userId=o["a"].currUser().truename,this.companyName=this.$route.query.companyName,this.initDict(this.dc_key).then(function(a){t.tipList=t.dc_map.progressStage,t.list()})},methods:{list:function(){var t=this;Object(s["c"])({createdBy:this.userId,progressContent:this.companyName}).then(function(a){t.timelineList=a,t.timelineList.forEach(function(a){a.createdAt=t.$common.transDate(a.createdAt),a.stage=t.tipList[a.stage]})})},remove:function(t){var a=this;Object(s["e"])({id:t.id}).then(function(t){Object(r["Toast"])("删除成功"),a.list()})},handleEdit:function(t){this.$router.push({path:"/merchants-app/add",query:{id:t.id,isAdd:"1"}})}}},d=u,l=(e("506f"),e("2877")),f=Object(l["a"])(d,n,i,!1,null,"7739d990",null);a["default"]=f.exports},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"}}]);