chunk-7cc74170.58c6e2c8.js 9.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7cc74170"],{"06a8":function(t,a,e){"use strict";var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div")},o=[],c=e("795b"),i=e.n(c),s=(e("7f7f"),e("ac6a"),e("f20c")),r=e("5cab"),u=e("f499"),d=e.n(u),l=e("8982"),h="/industryParkApi",m="/wx/data",f="/wx/public",p="/wx/dictController";function g(t){return Object(l["a"])({url:h+m+"/listBizAll/"+t,method:"post"})}function b(t){return Object(l["a"])({url:h+f+"/listProjectAll",method:"post",data:t})}function v(t){return Object(l["a"])({url:h+p+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:d()(t)};return new i.a(function(t,e){v(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var y=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 o=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=o,a.dc_map_no_all[e]=a.$common.transDcMap(o)})})},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 o=a.getDictValue(t.data,e,!1);a.dc_data_no_all[e]=o,a.dc_map_no_all[e]=a.$common.transDcMap(o)})})},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=[],b(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,o=a*e;return t.slice(n,o)},getDictValue:function(t,a,e){var n=t[a]?s["a"].castEval(t[a].dictValue):[],o=[];if(n.forEach(function(t){var a={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};o.push(a)}),e){var c={label:"全部",value:"",active:!0};o.unshift(c)}return o},confirm:function(t,a){return new i.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}}},C=k,w=e("2877"),P=Object(w["a"])(C,n,o,!1,null,"3fa5b905",null);a["a"]=P.exports},"4a32":function(t,a,e){"use strict";var n=e("5626"),o=e.n(n);o.a},5626:function(t,a,e){},7121:function(t,a,e){"use strict";e.d(a,"d",function(){return i}),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"),o="/industryParkApi",c="/wx/parkProgressRecord";function i(t){return Object(n["a"])({url:o+c+"/listGroup",method:"post",data:t})}function s(t){return Object(n["a"])({url:o+c+"/list",method:"post",data:t})}function r(t){return Object(n["a"])({url:o+c+"/getRecordById?id="+t,method:"get"})}function u(t){return Object(n["a"])({url:o+c+"/add",method:"post",data:t})}function d(t){return Object(n["a"])({url:o+c+"/remove",method:"post",data:t})}},"7f7f":function(t,a,e){var n=e("86cc").f,o=Function.prototype,c=/^\s*function ([^ (]*)/,i="name";i in o||e("9e1e")&&n(o,i,{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 m}),e.d(a,"b",function(){return f});var n=e("795b"),o=e.n(n),c=e("bc3a"),i=e.n(c),s=e("4328"),r=e.n(s),u=e("4360"),d=e("5cab"),l=e("a18c"),h=e("3089");function m(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 o.a(function(a,n){i()(e).then(function(t){if(t&&t.data&&200===t.status){var e=t.data;switch(e.errno){case 501:Object(h["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(h["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(h["Toast"])(a),n(a,e)})})}function f(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 o.a(function(e,n){i.a.defaults.withCredentials=!0,i()(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(h["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(h["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(h["Toast"])(a),n(a,e)})})}},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},fdd3: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:"application"},[e("div",{staticClass:"white-box form-part"},[e("van-form",[e("van-field",{staticClass:"input-item",attrs:{label:"企业名称","input-align":"right",disabled:"1"===t.isAdd},model:{value:t.companyName,callback:function(a){t.companyName=a},expression:"companyName"}}),e("van-field",{staticClass:"input-item",attrs:{label:"联系人","input-align":"right",disabled:"1"===t.isAdd},model:{value:t.contactName,callback:function(a){t.contactName=a},expression:"contactName"}}),e("van-field",{staticClass:"input-item",attrs:{label:"联系电话","input-align":"right",disabled:"1"===t.isAdd},model:{value:t.contactPhone,callback:function(a){t.contactPhone=a},expression:"contactPhone"}}),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("日期")]),e("p",{staticClass:"tit"},[t._v(t._s(t.updatedAt))])]),e("van-field",{staticClass:"input-item picker-item",attrs:{readonly:"",clickable:"",value:t.stageName,"input-align":"right",label:"目前阶段"},on:{click:function(a){t.showPicker=!0}},scopedSlots:t._u([{key:"button",fn:function(){return[e("i",{staticClass:"iconfont icon-zuo"})]},proxy:!0}])}),e("van-popup",{attrs:{position:"bottom"},model:{value:t.showPicker,callback:function(a){t.showPicker=a},expression:"showPicker"}},[e("van-picker",{attrs:{"show-toolbar":"",columns:t.columns},on:{confirm:function(a){return t.onConfirm(a)},cancel:function(a){t.showPicker=!1}}})],1),e("div",{staticClass:"custom-item-tit"},[e("div",{staticClass:"tit"},[t._v("推进情况")])]),e("van-field",{staticClass:"textarea-item input-item-warp",attrs:{autosize:"",type:"textarea",placeholder:"请填写"},model:{value:t.progressContent,callback:function(a){t.progressContent=a},expression:"progressContent"}})],1)],1),e("div",{staticClass:"repair-bottom bottom-button"},[e("button",{staticClass:"btn",on:{click:t.submit}},[t._v("保存")])])])},o=[],c=(e("ac6a"),e("06a8")),i=e("7121"),s=e("3089"),r=e("5cab"),u={mixins:[c["a"]],data:function(){return{stageName:"",companyName:"",contactName:"",contactPhone:"",progressContent:"",createdBy:"",updatedAt:new Date,stage:"",columns:[],showPicker:!1,id:"",isAdd:"",dc_key:["progressStage"]}},mounted:function(){var t=this;this.id=this.$route.query.id,this.isAdd=this.$route.query.isAdd,this.updatedAt=this.$common.transDate(this.updatedAt),this.initDict(this.dc_key).then(function(a){t.columns=[],t.dc_data_no_all.progressStage.forEach(function(a){a.text=a.label,t.columns.push(a)}),t.getRecordById()})},methods:{onConfirm:function(t){console.log(t),this.stage=t.value,this.stageName=t.text,this.showPicker=!1},getRecordById:function(){var t=this;this.id&&Object(i["b"])(this.id).then(function(a){t.companyName=a.data.companyName,t.contactName=a.data.contactName,t.contactPhone=a.data.contactPhone,t.progressContent=a.data.progressContent,t.createdBy=a.data.createdBy,t.stage=a.data.stage,t.stageName=t.dc_map_no_all.progressStage[a.data.stage]})},submit:function(){var t=this,a="";a="2"===this.isAdd?r["a"].currUser().truename:this.createdBy,Object(i["a"])({id:this.id,companyName:this.companyName,contactName:this.contactName,contactPhone:this.contactPhone,progressContent:this.progressContent,stage:this.stage,createdBy:a,updatedBy:r["a"].currUser().truename}).then(function(a){Object(s["Toast"])("1"===t.isAdd?"编辑成功":"新增成功"),t.$router.push({path:"/merchants-app/detail",query:{companyName:t.companyName}})})}}},d=u,l=(e("4a32"),e("2877")),h=Object(l["a"])(d,n,o,!1,null,"5b6c9f3c",null);a["default"]=h.exports}}]);