chunk-1cda13c2.8026ea66.js 10 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1cda13c2"],{"06a8":function(t,a,e){"use strict";var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div")},i=[],n=e("795b"),c=e.n(n),o=(e("7f7f"),e("ac6a"),e("f20c")),r=e("5cab"),l=e("f499"),u=e.n(l),d=e("8982"),h="/industryParkApi",m="/wx/data",f="/wx/public",v="/wx/dictController";function p(t){return Object(d["a"])({url:h+m+"/listBizAll/"+t,method:"post"})}function g(t){return Object(d["a"])({url:h+f+"/listProjectAll",method:"post",data:t})}function b(t){return Object(d["a"])({url:h+v+"/getByCodes",method:"post",data:t})}function _(t){var a={codes:u()(t)};return new c.a(function(t,e){b(a).then(function(a){t(a)}).catch(function(t,a){e(t,a)})})}var C=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 s=a.getDictValue(t.data,e,!0);a.dc_data[e]=s,a.dc_map[e]=a.$common.transDcMap(s);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 s=a.getDictValue(t.data,e,!1);a.dc_data[e]=s,a.dc_map[e]=a.$common.transDcMap(s);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=[],p(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=[],g(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,s=a*e-e,i=a*e;return t.slice(s,i)},getDictValue:function(t,a,e){var s=t[a]?o["a"].castEval(t[a].dictValue):[],i=[];if(s.forEach(function(t){var a={id:t.id,isSearch:t.isSearch,label:t.label,value:t.value,active:!1};i.push(a)}),e){var n={label:"全部",value:"",active:!0};i.unshift(n)}return i},confirm:function(t,a){return new c.a(function(e,s){C["Dialog"].confirm({title:a,message:t}).then(function(t){e(t)}).catch(function(t){Object(C["Toast"])("已取消"),s(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}}},D=k,w=e("2877"),j=Object(w["a"])(D,s,i,!1,null,"3fa5b905",null);a["a"]=j.exports},"0cac":function(t,a,e){"use strict";e.d(a,"b",function(){return c}),e.d(a,"a",function(){return o});var s=e("8982"),i="/industryParkApi",n="/wx/parkVisitor";function c(t){return Object(s["a"])({url:i+n+"/list",method:"post",data:t})}function o(t){return Object(s["a"])({url:i+n+"/batchStatusUpdate",method:"post",data:t})}},"7f7f":function(t,a,e){var s=e("86cc").f,i=Function.prototype,n=/^\s*function ([^ (]*)/,c="name";c in i||e("9e1e")&&s(i,c,{configurable:!0,get:function(){try{return(""+this).match(n)[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 s=e("795b"),i=e.n(s),n=e("bc3a"),c=e.n(n),o=e("4328"),r=e.n(o),l=e("4360"),u=e("5cab"),d=e("a18c"),h=e("3089");function m(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:r.a.stringify(t.data)};return a&&(e.data=t.data),t.headers&&(e.headers=t.headers),new i.a(function(a,s){c()(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(){l["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),s(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),s(e.errmsg);break}a(e)}else console.log(t),s(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(h["Toast"])(a),s(a,e)})})}function f(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,s){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(h["Toast"])(a.errmsg),setTimeout(function(){l["a"].dispatch("user/logout").then(function(){d["a"].push("/login")})},1500),s(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),s(a.errmsg);break}e(a)}else console.log(t),s(t)}).catch(function(a,e){console.log(t.url+" fail",a,e),Object(h["Toast"])(a),s(a,e)})})}},a9ec:function(t,a,e){"use strict";var s=e("e626"),i=e.n(s);i.a},aed7:function(t,a,e){t.exports=e.p+"assets/img/no-result.b05bdcd3.jpg"},e1f2:function(t,a,e){"use strict";e.r(a);var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"detail"},[e("div",{staticClass:"detail-card"},[e("div",{staticClass:"white-box"},[e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("来访时间")]),e("p",{staticClass:"tit"},[t._v(t._s(t.formatTimeTwo(t.detail.reserveEndTime,"Y-M-D")))])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("姓名")]),e("p",{staticClass:"tit"},[t._v(t._s(t.detail.visitorName))])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("联系手机")]),e("p",{staticClass:"tit"},[t._v(t._s(t.detail.applicantPhone))])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("公司名称")]),e("p",{staticClass:"tit"},[t._v(t._s(t.detail.compnayName))])]),e("div",{staticClass:"block-cell-item"},[e("p",{staticClass:"label"},[t._v("名片")]),e("div",{staticClass:"tit"},[e("ul",{staticClass:"img-text"},[e("img",{attrs:{src:t.detail.mpUrl,alt:""}})])])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("来源地")]),e("p",{staticClass:"tit"},[t._v("\n "+t._s(t.detail.destination)+"\n ")])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("来访目的")]),e("p",{staticClass:"tit"},[t._v("\n "+t._s(t.detail.visitorGoal)+"\n ")])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("来访目的地")]),e("p",{staticClass:"tit"},[t._v("\n "+t._s(t.detail.visitorAddress)+"\n ")])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("来访人数")]),e("p",{staticClass:"tit"},[t._v("\n "+t._s(t.detail.visitorNum)+"\n ")])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("具体事由")]),e("p",{staticClass:"tit"},[t._v("\n "+t._s(t.detail.visitReason)+"\n ")])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("车牌号")]),e("p",{staticClass:"tit"},[t._v(t._s(t.detail.visitorCarNo))])]),e("div",{staticClass:"block-cell-item"},[e("p",{staticClass:"label"},[t._v("半身免冠照")]),e("div",{staticClass:"tit"},[e("ul",{staticClass:"img-text"},[e("img",{attrs:{src:t.detail.bsUrl,alt:""}})])])]),e("div",{staticClass:"cell-item"},[e("p",{staticClass:"label"},[t._v("备注")]),e("p",{staticClass:"tit"},[t._v(t._s(t.detail.remark))])])])]),e("div",{staticClass:"bottom-meun"},[e("div",{staticClass:"menu-left",on:{click:function(a){return t.updataBatch(4)}}},[t._v("拒绝")]),e("div",{staticClass:"menu-right",on:{click:function(a){return t.updataBatch(2)}}},[t._v("通过")])])])},i=[],n=(e("a481"),e("06a8")),c=e("5cab"),o=(e("3089"),e("0cac")),r={data:function(){return{dc_key:["EQUIPMENT_REQ"],id:"",detail:{},handleUserName:c["a"].currUser().truename,params:{id:"",handleExplain:"",status:"acceptance",handleUserId:c["a"].currUser().id,handleTime:this.$common.transServDate(new Date)}}},mixins:[n["a"]],mounted:function(){this.detail=this.$route.params.item,this.detail.bsUrl=this.detail.bustImg?this.$common.castEval(this.detail.bustImg)[0].url:"",this.detail.mpUrl=this.detail.businessCard?this.$common.castEval(this.detail.businessCard)[0].url:"",console.log("2322323"),console.log(this.detail),this.initDict(this.dc_key).then(function(t){})},methods:{updataBatch:function(t){var a=[];a.push(this.detail.id),this.confirmBatchSubmit(a,t)},confirmBatchSubmit:function(t,a){var e=this,s={ids:t.join(","),status:a};Object(o["a"])(s).then(function(t){console.log(t),e.$router.push({path:"/visitor-app"}),e.$toast("审核成功")}).catch(function(t){e.$toast("异常")})},formatTimeTwo:function(t,a){if(void 0!=t){var e=function(t){return t<10?"0"+t:t};(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)||navigator.userAgent.indexOf("Safari")>-1)&&(t=String(t).replace(/\-/g,"/"));var s="";s=-1!=t.indexOf("-")||-1!=t.indexOf("/")?new Date(t):new Date(JSON.parse(t));var i=s.getFullYear(),n=s.getMonth()+1,c=(t=s.getDate(),s.getHours()),o=s.getMinutes(),r=s.getSeconds(),l="";switch(a){case"Y-M-D hh:mm:ss":l=i+"-"+e(n)+"-"+e(t)+" "+e(c)+":"+e(o)+":"+e(r);break;case"Y-M-D":l=i+"-"+e(n)+"-"+e(t);break;case"M-D hh:mm:ss":l=e(n)+"-"+e(t)+" "+e(c)+":"+e(o)+":"+e(r);break;case"M-D hh:mm":l=e(n)+"-"+e(t)+" "+e(c)+":"+e(o);break;case"hh:mm:ss":l=e(c)+":"+e(o)+":"+e(r);break;case"hh:mm":l=e(c)+":"+e(o);break}return l}}}},l=r,u=(e("a9ec"),e("2877")),d=Object(u["a"])(l,s,i,!1,null,"3b248f4e",null);a["default"]=d.exports},e626:function(t,a,e){}}]);