webpackJsonp([1],{"+tPU":function(t,e,r){r("xGkn");for(var n=r("7KvD"),o=r("hJx8"),i=r("/bQp"),a=r("dSzd")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;ci;)a(r[i++]);t._c=[],t._n=!1,e&&!t._h&&j(t)})}},j=function(t){m.call(c,function(){var e,r,n,o=t._v,i=X(t);if(i&&(e=y(function(){I?k.emit("unhandledRejection",o,t):(r=c.onunhandledrejection)?r({promise:t,reason:o}):(n=c.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=I||X(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},X=function(t){return 1!==t._h&&0===(t._a||t._c).length},U=function(t){m.call(c,function(){var e;I?k.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},H=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),_(e,!0))},D=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw L("Promise can't be resolved itself");(e=E(t))?w(function(){var n={_w:r,_d:!1};try{e.call(t,h(D,n,1),h(H,n,1))}catch(t){H.call(n,t)}}):(r._v=t,r._s=1,_(r,!1))}catch(t){H.call({_w:r,_d:!1},t)}}};P||(A=function(t){d(this,A,"Promise","_h"),f(t),n.call(this);try{t(h(D,this,1),h(H,this,1))}catch(t){H.call(this,t)}},(n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r("xH/j")(A.prototype,{then:function(t,e){var r=M(g(this,A));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=I?k.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&_(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new n;this.promise=t,this.resolve=h(D,t,1),this.reject=h(H,t,1)},x.f=M=function(t){return t===A||t===a?new i(t):o(t)}),p(p.G+p.W+p.F*!P,{Promise:A}),r("e6n0")(A,"Promise"),r("bRrM")("Promise"),a=r("FeBl").Promise,p(p.S+p.F*!P,"Promise",{reject:function(t){var e=M(this);return(0,e.reject)(t),e.promise}}),p(p.S+p.F*(s||!P),"Promise",{resolve:function(t){return C(s&&this===a?A:this,t)}}),p(p.S+p.F*!(P&&r("dY0y")(function(t){A.all(t).catch(T)})),"Promise",{all:function(t){var e=this,r=M(e),n=r.resolve,o=r.reject,i=y(function(){var r=[],i=0,a=1;v(t,!1,function(t){var s=i++,c=!1;r.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,r[s]=t,--a||n(r))},o)}),--a||n(r)});return i.e&&o(i.v),r.promise},race:function(t){var e=this,r=M(e),n=r.reject,o=y(function(){v(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}})},EGZi:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},EqBC:function(t,e,r){"use strict";var n=r("kM2E"),o=r("FeBl"),i=r("7KvD"),a=r("t8x9"),s=r("fJUb");n(n.P+n.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),r="function"==typeof t;return this.then(r?function(r){return s(e,t()).then(function(){return r})}:t,r?function(r){return s(e,t()).then(function(){throw r})}:t)}})},L42u:function(t,e,r){var n,o,i,a=r("+ZMJ"),s=r("knuC"),c=r("RPLV"),h=r("ON07"),u=r("7KvD"),p=u.process,l=u.setImmediate,f=u.clearImmediate,d=u.MessageChannel,v=u.Dispatch,g=0,m={},w=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},x=function(t){w.call(t.data)};l&&f||(l=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return m[++g]=function(){s("function"==typeof t?t:Function(t),e)},n(g),g},f=function(t){delete m[t]},"process"==r("R9M2")(p)?n=function(t){p.nextTick(a(w,t,1))}:v&&v.now?n=function(t){v.now(a(w,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=x,n=a(i.postMessage,i,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(n=function(t){u.postMessage(t+"","*")},u.addEventListener("message",x,!1)):n="onreadystatechange"in h("script")?function(t){c.appendChild(h("script")).onreadystatechange=function(){c.removeChild(this),w.call(t)}}:function(t){setTimeout(a(w,t,1),0)}),t.exports={set:l,clear:f}},M6a0:function(t,e){},Mhyx:function(t,e,r){var n=r("/bQp"),o=r("dSzd")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||i[o]===t)}},"NWt+":function(t,e,r){var n=r("+ZMJ"),o=r("msXi"),i=r("Mhyx"),a=r("77Pl"),s=r("QRG4"),c=r("3fs2"),h={},u={};(e=t.exports=function(t,e,r,p,l){var f,d,v,g,m=l?function(){return t}:c(t),w=n(r,p,e?2:1),x=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(f=s(t.length);f>x;x++)if((g=e?w(a(d=t[x])[0],d[1]):w(t[x]))===h||g===u)return g}else for(v=m.call(t);!(d=v.next()).done;)if((g=o(v,w,d.value,e))===h||g===u)return g}).BREAK=h,e.RETURN=u},PzxK:function(t,e,r){var n=r("D2L2"),o=r("sB3e"),i=r("ax3d")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),n(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},RPLV:function(t,e,r){var n=r("7KvD").document;t.exports=n&&n.documentElement},"RY/4":function(t,e,r){var n=r("R9M2"),o=r("dSzd")("toStringTag"),i="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,r,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?r:i?n(e):"Object"==(a=n(e))&&"function"==typeof e.callee?"Arguments":a}},SHNa:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r("mvHQ"),o=r.n(n),i=r("Xxa5"),a=r.n(i),s=r("//Fk"),c=r.n(s),h=r("exGp"),u=r.n(h),p=r("woOf"),l=r.n(p),f=r("YDP2"),d=r.n(f),v=r("YZ0n"),g={components:{VueCropper:v.VueCropper},data:function(){return{previewImage2:!1,previewImages2:[],radio:"",imgListDialog:!1,httpUrl:"",userData:{},token:"",form:{fieldAcquisitionUrl:"",personType:1,phoneNumber:"",departmentId:"",teamId:"",enterDate:"",enterpriseId:"",idCardBigPhotoUrl:"",jobType:"",jobName:"",personSerial:""},fileList:[],fileList2:[],showPicker:!1,columns:[],columns2:[],pickerList2:[],pickerList:[],checkedIndex:"",checkedIndex2:"",showCalendar:!1,currentDate:new Date,minDate:"",companyList:[],showPicker2:!1,showLoading:!1,repetitionRender:!0,showJob:!1,showJobType:!1,jobList:[],jobList2:[],jobTypeList:[],jobTypeList2:[],checkedJobIndex:"",checkedJobTypeIndex:"",previewImage:!1,previewImages:[d.a],needAudit:0,imgClipDialog:!1,cropperOption:{outputType:"png",img:"",fixedBox:!0,centerBox:!0,autoCrop:!0,autoCropWidth:100,autoCropHeight:100},isSzProject:"",imgLibraryList:[]}},created:function(){this.httpUrl=rootURL;var t=JSON.parse(localStorage.getItem("infoData"));l()(this.form,t),this.userData=JSON.parse(localStorage.getItem("userData"));var e=new Date(1950,1,1);this.minDate=e,this.getToken(),this.showLoading=!0,this.form.enterDate=this.GetDateStr(0,"-")},methods:{priviewImg:function(t){var e=[t];this.previewImage2=!0,this.previewImages2=e},removeImg:function(){return this.form.fieldAcquisitionUrl="",this.form.personSerial="",!0},checkImg:function(){var t=this;console.log(this.radio),this.imgLibraryList.forEach(function(e){t.radio==e.personSerial&&(t.form.fieldAcquisitionUrl=e.imageUrl,t.form.personSerial=e.personSerial)})},getClipImgFn:function(t){var e=this;this.$refs.cropper.startCrop(),this.$refs.cropper.getCropBlob(function(t){console.log(t),e.afterRead({file:t},1,"clip")})},getProjectSetting:function(){var t=this,e=this.httpUrl+"xmgl/projectConfig/getProjectConfigList",r={projectSn:this.userData.projectSn};this.$axios.post(e,r,{headers:{Authorization:this.token}}).then(function(e){if(t.showLoading=!1,200==e.data.code){var r=e.data.result;if(console.log(e.data.result[0]),t.isSzProject=e.data.result[0].isSzProject,r&&0!=r.length){var n=r[0].workerAuditType;t.needAudit=n}else t.needAudit=0}else t.$toast(e.data.message)})},GetDateStr:function(t,e,r){var n=r?stringToDate(r,e):new Date;return n.setDate(n.getDate()+t),n.getFullYear()+e+(n.getMonth()+1<10?"0"+(n.getMonth()+1):n.getMonth()+1)+e+(n.getDate()<10?"0"+n.getDate():n.getDate())},goback:function(){this.$router.back()},beforeRead:function(t){var e=this;return u()(a.a.mark(function r(){return a.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",new c.a(function(r,n){e.imgClipDialog=!0,e.cropperOption.img=t.file,n()}));case 1:case"end":return r.stop()}},r,e)}))()},afterRead:function(t,e,r){var n=this;console.log(t),t.status="uploading",t.message="上传中...";var o=new FormData;o.append("files",t.file,"image.png");var i=this.httpUrl+"upload/image";this.$axios.post(i,o).then(function(o){"SUCCESS"==o.data.status?(t.status="success",1==e?1==n.isSzProject?(console.log(o.data.data[0].imageUrl),n.$axios.post(n.httpUrl+"xmgl/workerImage/list",{fileUrl:o.data.data[0].imageUrl,projectSn:n.userData.projectSn},{headers:{Authorization:n.token}}).then(function(t){if(console.log(t),200==t.data.code&&t.data.result)n.imgLibraryList=t.data.result,n.imgListDialog=!0;else{var e=o.data.data[0].imageUrl;n.form.fieldAcquisitionUrl=e,n.imgClipDialog="clip"!=r,n.cropperOption.img=n.httpUrl+"image/"+n.form.fieldAcquisitionUrl,n.fileList=[{url:n.cropperOption.img,isImage:!0}]}})):n.$axios.post(n.httpUrl+"xmgl/recognition/checkfaceHikvision",{fileUrl:o.data.data[0].imageUrl},{headers:{Authorization:n.token}}).then(function(t){if(200==t.data.code||0==t.data.code)if(1==t.data.result.checkType){var e=o.data.data[0].imageUrl;n.form.fieldAcquisitionUrl=e,n.imgClipDialog="clip"!=r,n.cropperOption.img=n.httpUrl+"image/"+n.form.fieldAcquisitionUrl,n.fileList=[{url:n.cropperOption.img,isImage:!0}]}else if("0"==t.data.result.checkType)n.fileList=[],n.$toast(t.data.result.message),n.form.fieldAcquisitionUrl="";else{e=o.data.data[0].imageUrl;n.form.fieldAcquisitionUrl=e,n.imgClipDialog="clip"!=r,n.cropperOption.img=n.httpUrl+"image/"+n.form.fieldAcquisitionUrl,n.fileList=[{url:n.cropperOption.img,isImage:!0}]}else n.$toast(t.data.message)}):n.form.idCardBigPhotoUrl=o.data.data[0].imageUrl):(t.status="failed",t.message="上传失败")})},getToken:function(){var t=this,e=this.httpUrl+"xmgl/base/getToken",r={userId:this.userData.userId};this.$axios.post(e,r).then(function(e){t.showLoading=!1,200==e.data.code?(t.token="Bearer "+e.data.result.token,t.getCompanyList(),t.getSelectList(1),t.getProjectSetting()):t.$toast(e.message)})},getCompanyList:function(){var t=this,e=this.httpUrl+"xmgl/enterpriseInfo/list",r={projectSn:this.userData.projectSn};this.$axios.post(e,r,{headers:{Authorization:this.token}}).then(function(e){(t.showLoading=!1,200==e.data.code)?e.data.result.forEach(function(e){t.columns2.push(e.enterpriseName),t.pickerList2.push(e)}):t.$toast(e.data.message)})},getDutuiesList:function(){var t=this,e=this.httpUrl+"xmgl/dictionariesRecord/selectJobList?lang=zh_CN";this.$axios.get(e,{headers:{Authorization:t.token}}).then(function(e){if(console.log(e),200==e.data.code){var r=JSON.parse(o()(e.data.result.jobTypeList)),n=JSON.parse(o()(e.data.result.jobNameList));r.forEach(function(e){e.options.forEach(function(e){t.jobTypeList.push(e.remarks+"-"+e.dictionaryName),t.jobTypeList2.push(e)})}),t.jobList2=n,n.forEach(function(e){t.jobList.push(e.dictionaryName)})}})},getSelectList:function(t){var e=this,r="",n={projectSn:this.userData.projectSn,enterpriseId:""!==this.checkedIndex2?this.pickerList2[this.checkedIndex2].id:""};r=1==t?this.httpUrl+"xmgl/teamInfo/getProjectTeamList":this.httpUrl+"xmgl/departmentInfo/getDepartmentInfoList",this.$axios.post(r,n,{headers:{Authorization:this.token}}).then(function(r){(e.showLoading=!1,200==r.data.code)?(e.repetitionRender=!1,e.columns=[],e.pickerList=[],1==t?r.data.result.forEach(function(t){e.columns.push(t.teamName),e.pickerList.push(t)}):r.data.result.list.forEach(function(t){e.columns.push(t.departmentName),e.pickerList.push(t)})):e.$toast(r.data.message)})},changePersonType:function(t){this.form.personType=t,this.pickerList=[],1==this.form.personType?(this.form.departmentId="",this.form.jobType="",this.form.jobName=""):this.form.teamId="",this.showLoading=!0,1==t?this.getSelectList(1):(this.getSelectList(2),this.getDutuiesList())},onConfirm:function(t,e){this.checkedIndex=e,1==this.form.personType?this.form.teamId=t:this.form.departmentId=t,this.showPicker=!1},onConfirm2:function(t,e){this.form.enterpriseId=t,this.checkedIndex2=e,this.showPicker2=!1,1==this.form.personType?(this.showLoading=!0,this.getSelectList(1)):this.getSelectList(2),this.form.teamId="",this.form.departmentId=""},onConfirmJob:function(t,e){this.showJob=!1,this.form.jobName=t,this.checkedJobIndex=e},onConfirmJobType:function(t,e){this.showJobType=!1,this.form.jobType=t,this.checkedJobTypeIndex=e},onDateConfirm:function(t){var e=t.getFullYear(),r=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,n=t.getDate()<10?"0"+t.getDate():t.getDate();this.form.enterDate=e+"-"+r+"-"+n,this.currentDate=e+"-"+r+"-"+n,this.showCalendar=!1},onCancel:function(t){this.showCalendar=!1},onSubmit:function(t){var e=this,r=JSON.parse(o()(this.form));if(""!=r.fieldAcquisitionUrl)if(""==r.idCardBigPhotoUrl&&(r.idCardBigPhotoUrl=r.fieldAcquisitionUrl),this.checkPhone(r.phoneNumber)){r.longTerm.length>0?r.longTerm=1:r.longTerm=0,r.jobType=2==this.form.personType?this.jobTypeList2[this.checkedJobTypeIndex].id:"",r.jobName=2==this.form.personType?this.jobList2[this.checkedJobIndex].id:"",3!=t.personType&&(r.enterpriseId=this.pickerList2[this.checkedIndex2].id),1==t.personType?(r.teamId=this.pickerList[this.checkedIndex].id,delete r.departmentId,delete r.jobType,delete r.jobName):3!=t.personType?(r.departmentId=this.pickerList[this.checkedIndex].id,delete r.teamId):(delete r.teamId,delete r.departmentId);var n="";n=1==this.needAudit?this.httpUrl+"xmgl/xzWorkerInfoAuditRecord/add?lang=zh_CN":this.httpUrl+"xmgl/workerInfo/add?lang=zh_CN",r.projectSn=this.userData.projectSn,r.registerType=2,this.$axios.post(n,r,{headers:{Authorization:this.token}}).then(function(t){200==t.data.code?e.$router.push({path:"/finish"}):e.$toast(t.data.message)})}else this.$toast("请输入正确的手机号");else this.$toast("请上传现场采集照片")},checkPhone:function(t){return!!/^1(3|4|5|6|7|8|9)\d{9}$/.test(t)}}},m={render:function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"submitPage"},[r("div",{staticClass:"title flex2"},[r("van-icon",{staticStyle:{margin:"3px 5px","font-size":"18px"},attrs:{name:"arrow-left"},on:{click:t.goback}}),t._v(" "),r("span",{staticStyle:{"margin-left":"-26px"}},[t._v(" 人员录入 ")]),t._v(" "),r("span")],1),t._v(" "),r("div",{staticClass:"upload_wrap"},[t._m(0),t._v(" "),r("div",{staticClass:"flex",staticStyle:{margin:"15px 0"}},[r("div",{staticClass:"uploader"},[r("van-uploader",{attrs:{"after-read":function(e){return t.afterRead(e,1)},"before-delete":t.removeImg,"max-count":1},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}}),t._v(" "),r("div",{staticStyle:{"padding-right":"8px"}},[t._v("现场采集照")]),t._v(" "),r("van-icon",{staticClass:"question",attrs:{name:"question-o"},on:{click:function(e){t.previewImage=!0}}})],1),t._v(" "),r("div",{staticClass:"uploader"},[r("van-uploader",{attrs:{"after-read":function(e){return t.afterRead(e,2)},"max-count":1},model:{value:t.fileList2,callback:function(e){t.fileList2=e},expression:"fileList2"}}),t._v(" "),r("div",{staticStyle:{"padding-right":"8px"}},[t._v("身份证头像照")])],1)]),t._v(" "),r("p",{staticStyle:{color:"red","font-size":"12px"}},[t._v("注:未上传身份证头像照,系统会默认使用现场采集照")])]),t._v(" "),r("div",{staticClass:"form_center"},[r("div",{staticClass:"flex info_wrap"},[r("van-icon",{staticClass:"icon",attrs:{name:"records"}}),t._v(" "),r("span",[t._v("详细信息")])],1),t._v(" "),r("van-form",{staticStyle:{"padding-bottom":"10px"},on:{submit:t.onSubmit}},[r("van-field",{attrs:{name:"personType",rules:[{required:!0}]},scopedSlots:t._u([{key:"input",fn:function(){return[r("van-radio-group",{attrs:{direction:"horizontal",disabled:t.repetitionRender},on:{change:t.changePersonType},model:{value:t.form.personType,callback:function(e){t.$set(t.form,"personType",e)},expression:"form.personType"}},[r("van-radio",{staticClass:"sex",attrs:{name:1}},[t._v("施工人员")]),t._v(" "),r("van-radio",{staticClass:"sex",attrs:{name:2}},[t._v("管理人员")])],1)]},proxy:!0}])}),t._v(" "),3!=t.form.personType?r("van-field",{attrs:{readonly:"",clickable:"",name:"teamId",value:t.form.enterpriseId,label:"企业",placeholder:"点击选择企业",rules:[{required:!0}]},on:{click:function(e){t.showPicker2=!0}}}):t._e(),t._v(" "),2==t.form.personType?r("van-field",{attrs:{readonly:"",clickable:"",name:"departmentId",value:t.form.departmentId,label:"部门",placeholder:"点击选择部门",rules:[{required:!0}]},on:{click:function(e){t.showPicker=!0}}}):3!=t.form.personType?r("van-field",{attrs:{readonly:"",clickable:"",name:"teamId",value:t.form.teamId,label:"班组",placeholder:"点击选择班组",rules:[{required:!0}],disabled:""==t.form.enterpriseId},on:{click:function(e){t.showPicker=""!=t.form.enterpriseId}}}):t._e(),t._v(" "),2==t.form.personType?r("van-field",{attrs:{readonly:"",clickable:"",name:"jobType",value:t.form.jobType,label:"职务类型",placeholder:"点击选择职务类型",rules:[{required:!0}]},on:{click:function(e){t.showJobType=!0}}}):t._e(),t._v(" "),2==t.form.personType?r("van-field",{attrs:{readonly:"",clickable:"",name:"jobName",value:t.form.jobName,label:"职务",placeholder:"点击选择职务",rules:[{required:!0}]},on:{click:function(e){t.showJob=!0}}}):t._e(),t._v(" "),r("van-field",{attrs:{name:"phoneNumber",label:"手机号",placeholder:"请输入手机号",rules:[{required:!0}],maxlength:"11"},model:{value:t.form.phoneNumber,callback:function(e){t.$set(t.form,"phoneNumber",e)},expression:"form.phoneNumber"}}),t._v(" "),r("van-field",{attrs:{readonly:"",clickable:"",name:"enterDate",value:t.form.enterDate,label:"进场日期",placeholder:"点击选择进场日期",rules:[{required:!0}]},on:{click:function(e){t.showCalendar=!0}}}),t._v(" "),r("div",{staticStyle:{margin:"36px auto",width:"90%"}},[r("van-button",{attrs:{round:"",block:"",type:"info","native-type":"submit"}},[t._v("提交")])],1)],1)],1),t._v(" "),r("van-popup",{attrs:{position:"bottom"},model:{value:t.showPicker2,callback:function(e){t.showPicker2=e},expression:"showPicker2"}},[r("van-picker",{attrs:{"show-toolbar":"",columns:t.columns2},on:{confirm:t.onConfirm2,cancel:function(e){t.showPicker2=!1}}})],1),t._v(" "),r("van-popup",{attrs:{position:"bottom"},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},[r("van-picker",{attrs:{"show-toolbar":"",columns:t.columns},on:{confirm:t.onConfirm,cancel:function(e){t.showPicker=!1}}})],1),t._v(" "),r("van-popup",{attrs:{position:"bottom"},model:{value:t.showJob,callback:function(e){t.showJob=e},expression:"showJob"}},[r("van-picker",{attrs:{"show-toolbar":"",columns:t.jobList},on:{confirm:t.onConfirmJob,cancel:function(e){t.showJob=!1}}})],1),t._v(" "),r("van-popup",{attrs:{position:"bottom"},model:{value:t.showJobType,callback:function(e){t.showJobType=e},expression:"showJobType"}},[r("van-picker",{attrs:{"show-toolbar":"",columns:t.jobTypeList},on:{confirm:t.onConfirmJobType,cancel:function(e){t.showJobType=!1}}})],1),t._v(" "),r("van-popup",{style:{height:"50%"},attrs:{position:"bottom"},model:{value:t.showCalendar,callback:function(e){t.showCalendar=e},expression:"showCalendar"}},[r("van-datetime-picker",{attrs:{type:"date",title:"选择进场日期","min-date":t.minDate},on:{confirm:t.onDateConfirm,cancel:t.onCancel},model:{value:t.currentDate,callback:function(e){t.currentDate=e},expression:"currentDate"}})],1),t._v(" "),r("van-popup",{staticStyle:{background:"none"},model:{value:t.showLoading,callback:function(e){t.showLoading=e},expression:"showLoading"}},[r("van-loading",{attrs:{type:"spinner",color:"#1989fa"}})],1),t._v(" "),r("van-image-preview",{attrs:{images:t.previewImages},model:{value:t.previewImage,callback:function(e){t.previewImage=e},expression:"previewImage"}}),t._v(" "),r("van-dialog",{attrs:{title:"图片裁剪"},on:{confirm:t.getClipImgFn},model:{value:t.imgClipDialog,callback:function(e){t.imgClipDialog=e},expression:"imgClipDialog"}},[r("div",{staticStyle:{height:"300px"}},[r("vueCropper",{ref:"cropper",attrs:{img:t.cropperOption.img,outputType:t.cropperOption.outputType,autoCrop:!0}})],1)]),t._v(" "),r("van-dialog",{attrs:{title:"照片比对结果"},on:{confirm:t.checkImg},model:{value:t.imgListDialog,callback:function(e){t.imgListDialog=e},expression:"imgListDialog"}},[r("div",{staticStyle:{height:"300px",overflow:"auto","padding-bottom":"10px"}},[r("van-radio-group",{staticClass:"radio-box",model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},t._l(t.imgLibraryList,function(e){return r("van-radio",{key:e.id,attrs:{name:e.personSerial}},[r("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:t.httpUrl+"image/"+e.imageUrl},on:{click:function(r){return t.priviewImg(t.httpUrl+"image/"+e.imageUrl)}}})])}),1)],1)]),t._v(" "),r("van-image-preview",{attrs:{images:t.previewImages2},model:{value:t.previewImage2,callback:function(e){t.previewImage2=e},expression:"previewImage2"}})],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"step"},[e("img",{staticStyle:{width:"auto",height:"28px"},attrs:{src:r("2SFc")}})])}]};var w=r("VU/8")(g,m,!1,function(t){r("btk3")},"data-v-23eccd18",null);e.default=w.exports},SldL:function(t,e){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",h="object"==typeof t,u=e.regeneratorRuntime;if(u)h&&(t.exports=u);else{(u=e.regeneratorRuntime=h?t.exports:{}).wrap=y;var p="suspendedStart",l="suspendedYield",f="executing",d="completed",v={},g={};g[a]=function(){return this};var m=Object.getPrototypeOf,w=m&&m(m(P([])));w&&w!==n&&o.call(w,a)&&(g=w);var x=k.prototype=C.prototype=Object.create(g);L.prototype=x.constructor=k,k.constructor=L,k[c]=L.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===L||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},u.awrap=function(t){return{__await:t}},S(O.prototype),O.prototype[s]=function(){return this},u.AsyncIterator=O,u.async=function(t,e,r,n){var o=new O(y(t,e,r,n));return u.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},S(x),x[c]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},u.values=P,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return s.type="throw",s.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),h=o.call(a,"finallyLoc");if(c&&h){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:P(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}function y(t,e,r,n){var o=e&&e.prototype instanceof C?e:C,i=Object.create(o.prototype),a=new M(n||[]);return i._invoke=function(t,e,r){var n=p;return function(o,i){if(n===f)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return E()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=A(a,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===p)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var c=b(t,e,r);if("normal"===c.type){if(n=r.done?d:l,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function b(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function C(){}function L(){}function k(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function O(t){var e;this._invoke=function(r,n){function i(){return new Promise(function(e,i){!function e(r,n,i,a){var s=b(t[r],t,n);if("throw"!==s.type){var c=s.arg,h=c.value;return h&&"object"==typeof h&&o.call(h,"__await")?Promise.resolve(h.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(h).then(function(t){c.value=t,i(c)},a)}a(s.arg)}(r,n,e,i)})}return e=e?e.then(i,i):i()}}function A(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,A(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=b(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,v;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0&&c.splice(e,1)}function d(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=r.nc;n&&(t.attrs.nonce=n)}return v(e,t.attrs),l(t,e),e}function v(t,e){Object.keys(e).forEach(function(r){t.setAttribute(r,e[r])})}function g(t,e){var r,n,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var c=s++;r=a||(a=d(e)),n=w.bind(null,r,c,!1),o=w.bind(null,r,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),l(t,e),e}(e),n=function(t,e,r){var n=r.css,o=r.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(n=h(n)),o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([n],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,r,e),o=function(){f(r),r.href&&URL.revokeObjectURL(r.href)}):(r=d(e),n=function(t,e){var r=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}.bind(null,r),o=function(){f(r)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var r=p(t,e);return u(r,e),function(t){for(var o=[],i=0;i=8&&(s=r+n))),s)for(p=u.getUint16(s,o),h=0;h21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){var e=1;this.high&&!this.full&&(e=window.devicePixelRatio),1!==this.enlarge&!this.full&&(e=Math.abs(Number(this.enlarge))),t.width=t.width*e,t.height=t.height*e,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:function(){return navigator.userAgent,!!window.ActiveXObject||"ActiveXObject"in window},passive:function(){return this.isIE?null:{passive:!1}}},watch:{img:function(){this.checkedImg()},imgs:function(t){""!==t&&this.reload()},cropW:function(){this.showPreview()},cropH:function(){this.showPreview()},cropOffsertX:function(){this.showPreview()},cropOffsertY:function(){this.showPreview()},scale:function(t,e){this.showPreview()},x:function(){this.showPreview()},y:function(){this.showPreview()},autoCrop:function(t){t&&this.goAutoCrop()},autoCropWidth:function(){this.autoCrop&&this.goAutoCrop()},autoCropHeight:function(){this.autoCrop&&this.goAutoCrop()},mode:function(){this.checkedImg()},rotate:function(){this.showPreview(),this.autoCrop?this.goAutoCrop(this.cropW,this.cropH):(this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion:function(t){for(var e=navigator.userAgent.split(" "),r="",n=new RegExp(t,"i"),o=0;o=81)e=-1;else if(this.getVersion("safari")[0]>=605){var i=this.getVersion("version");i[0]>13&&i[1]>1&&(e=-1)}else{var a=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(a){var s=a[1];((s=s.split("_"))[0]>13||s[0]>=13&&s[1]>=4)&&(e=-1)}}var c=document.createElement("canvas"),h=c.getContext("2d");switch(h.save(),e){case 2:c.width=r,c.height=n,h.translate(r,0),h.scale(-1,1);break;case 3:c.width=r,c.height=n,h.translate(r/2,n/2),h.rotate(180*Math.PI/180),h.translate(-r/2,-n/2);break;case 4:c.width=r,c.height=n,h.translate(0,n),h.scale(1,-1);break;case 5:c.height=r,c.width=n,h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:c.width=n,c.height=r,h.translate(n/2,r/2),h.rotate(90*Math.PI/180),h.translate(-r/2,-n/2);break;case 7:c.height=r,c.width=n,h.rotate(.5*Math.PI),h.translate(r,-n),h.scale(-1,1);break;case 8:c.height=r,c.width=n,h.translate(n/2,r/2),h.rotate(-90*Math.PI/180),h.translate(-r/2,-n/2);break;default:c.width=r,c.height=n}h.drawImage(t,0,0,r,n),h.restore(),c.toBlob(function(t){var e=URL.createObjectURL(t);URL.revokeObjectURL(o.imgs),o.imgs=e},"image/"+this.outputType,1)},checkedImg:function(){var t=this;if(null===this.img||""===this.img)return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();var e=new Image;if(e.onload=function(){if(""===t.img)return t.$emit("imgLoad","error"),t.$emit("img-load","error"),!1;var r=e.width,n=e.height;i.getData(e).then(function(o){t.orientation=o.orientation||1;var i=Number(t.maxImgSize);!t.orientation&&ri&&(n=n/r*i,r=i),n>i&&(r=r/n*i,n=i),t.checkOrientationImage(e,t.orientation,r,n))})},e.onerror=function(){t.$emit("imgLoad","error"),t.$emit("img-load","error")},"data"!==this.img.substr(0,4)&&(e.crossOrigin=""),this.isIE){var r=new XMLHttpRequest;r.onload=function(){var t=URL.createObjectURL(this.response);e.src=t},r.open("GET",this.img,!0),r.responseType="blob",r.send()}else e.src=this.img},startMove:function(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==t.touches.length&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("imgMoving",{moving:!0,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale:function(t){var e=this;t.preventDefault();var r=this.scale,n=this.touches[0].clientX,o=this.touches[0].clientY,i=t.touches[0].clientX,a=t.touches[0].clientY,s=this.touches[1].clientX,c=this.touches[1].clientY,h=t.touches[1].clientX,u=t.touches[1].clientY,p=Math.sqrt(Math.pow(n-s,2)+Math.pow(o-c,2)),l=Math.sqrt(Math.pow(i-h,2)+Math.pow(a-u,2))-p,f=1,d=(f=(f=f/this.trueWidth>f/this.trueHeight?f/this.trueHeight:f/this.trueWidth)>.1?.1:f)*l;if(!this.touchNow){if(this.touchNow=!0,l>0?r+=Math.abs(d):l<0&&r>Math.abs(d)&&(r-=Math.abs(d)),this.touches=t.touches,setTimeout(function(){e.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,r))return!1;this.scale=r}},cancelTouchScale:function(t){window.removeEventListener("touchmove",this.touchScale)},moveImg:function(t){var e=this;if(t.preventDefault(),t.touches&&2===t.touches.length)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;var r,n,o="clientX"in t?t.clientX:t.touches[0].clientX,i="clientY"in t?t.clientY:t.touches[0].clientY;r=o-this.moveX,n=i-this.moveY,this.$nextTick(function(){if(e.centerBox){var t,o,i,a,s=e.getImgAxis(r,n,e.scale),c=e.getCropAxis(),h=e.trueHeight*e.scale,u=e.trueWidth*e.scale;switch(e.rotate){case 1:case-1:case 3:case-3:t=e.cropOffsertX-e.trueWidth*(1-e.scale)/2+(h-u)/2,o=e.cropOffsertY-e.trueHeight*(1-e.scale)/2+(u-h)/2,i=t-h+e.cropW,a=o-u+e.cropH;break;default:t=e.cropOffsertX-e.trueWidth*(1-e.scale)/2,o=e.cropOffsertY-e.trueHeight*(1-e.scale)/2,i=t-u+e.cropW,a=o-h+e.cropH}s.x1>=c.x1&&(r=t),s.y1>=c.y1&&(n=o),s.x2<=c.x2&&(r=i),s.y2<=c.y2&&(n=a)}e.x=r,e.y=n,e.$emit("imgMoving",{moving:!0,axis:e.getImgAxis()}),e.$emit("img-moving",{moving:!0,axis:e.getImgAxis()})})},leaveImg:function(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("imgMoving",{moving:!1,axis:this.getImgAxis()}),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg:function(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale:function(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize:function(t){var e=this;t.preventDefault();var r=this.scale,n=t.deltaY||t.wheelDelta;n=navigator.userAgent.indexOf("Firefox")>0?30*n:n,this.isIE&&(n=-n);var o=this.coe,i=(o=o/this.trueWidth>o/this.trueHeight?o/this.trueHeight:o/this.trueWidth)*n;i<0?r+=Math.abs(i):r>Math.abs(i)&&(r-=Math.abs(i));var a=i<0?"add":"reduce";if(a!==this.coeStatus&&(this.coeStatus=a,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(function(){e.scaling=!1,e.coe=e.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,r))return!1;this.scale=r},changeScale:function(t){var e=this.scale;t=t||1;var r=20;if((t*=r=r/this.trueWidth>r/this.trueHeight?r/this.trueHeight:r/this.trueWidth)>0?e+=Math.abs(t):e>Math.abs(t)&&(e-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,e))return!1;this.scale=e},createCrop:function(t){var e=this;t.preventDefault();var r="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,n="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick(function(){var t=r-e.cropX,o=n-e.cropY;if(t>0?(e.cropW=t+e.cropChangeX>e.w?e.w-e.cropChangeX:t,e.cropOffsertX=e.cropChangeX):(e.cropW=e.w-e.cropChangeX+Math.abs(t)>e.w?e.cropChangeX:Math.abs(t),e.cropOffsertX=e.cropChangeX+t>0?e.cropChangeX+t:0),e.fixed){var i=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];i+e.cropOffsertY>e.h?(e.cropH=e.h-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0],e.cropOffsertX=t>0?e.cropChangeX:e.cropChangeX-e.cropW):e.cropH=i,e.cropOffsertY=e.cropOffsertY}else o>0?(e.cropH=o+e.cropChangeY>e.h?e.h-e.cropChangeY:o,e.cropOffsertY=e.cropChangeY):(e.cropH=e.h-e.cropChangeY+Math.abs(o)>e.h?e.cropChangeY:Math.abs(o),e.cropOffsertY=e.cropChangeY+o>0?e.cropChangeY+o:0)})},changeCropSize:function(t,e,r,n,o){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=e,this.canChangeY=r,this.changeCropTypeX=n,this.changeCropTypeY=o,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow:function(t){var e=this;t.preventDefault();var r="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,n="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0,o=this.w,i=this.h,a=0,s=0;if(this.centerBox){var c=this.getImgAxis(),h=c.x2,u=c.y2;a=c.x1>0?c.x1:0,s=c.y1>0?c.y1:0,o>h&&(o=h),i>u&&(i=u)}this.$nextTick(function(){var t=r-e.cropX,c=n-e.cropY;if(e.canChangeX&&(1===e.changeCropTypeX?e.cropOldW-t>0?(e.cropW=o-e.cropChangeX-t<=o-a?e.cropOldW-t:e.cropOldW+e.cropChangeX-a,e.cropOffsertX=o-e.cropChangeX-t<=o-a?e.cropChangeX+t:a):(e.cropW=Math.abs(t)+e.cropChangeX<=o?Math.abs(t)-e.cropOldW:o-e.cropOldW-e.cropChangeX,e.cropOffsertX=e.cropChangeX+e.cropOldW):2===e.changeCropTypeX&&(e.cropOldW+t>0?(e.cropW=e.cropOldW+t+e.cropOffsertX<=o?e.cropOldW+t:o-e.cropOffsertX,e.cropOffsertX=e.cropChangeX):(e.cropW=o-e.cropChangeX+Math.abs(t+e.cropOldW)<=o-a?Math.abs(t+e.cropOldW):e.cropChangeX-a,e.cropOffsertX=o-e.cropChangeX+Math.abs(t+e.cropOldW)<=o-a?e.cropChangeX-Math.abs(t+e.cropOldW):a))),e.canChangeY&&(1===e.changeCropTypeY?e.cropOldH-c>0?(e.cropH=i-e.cropChangeY-c<=i-s?e.cropOldH-c:e.cropOldH+e.cropChangeY-s,e.cropOffsertY=i-e.cropChangeY-c<=i-s?e.cropChangeY+c:s):(e.cropH=Math.abs(c)+e.cropChangeY<=i?Math.abs(c)-e.cropOldH:i-e.cropOldH-e.cropChangeY,e.cropOffsertY=e.cropChangeY+e.cropOldH):2===e.changeCropTypeY&&(e.cropOldH+c>0?(e.cropH=e.cropOldH+c+e.cropOffsertY<=i?e.cropOldH+c:i-e.cropOffsertY,e.cropOffsertY=e.cropChangeY):(e.cropH=i-e.cropChangeY+Math.abs(c+e.cropOldH)<=i-s?Math.abs(c+e.cropOldH):e.cropChangeY-s,e.cropOffsertY=i-e.cropChangeY+Math.abs(c+e.cropOldH)<=i-s?e.cropChangeY-Math.abs(c+e.cropOldH):s))),e.canChangeX&&e.fixed){var h=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];h+e.cropOffsertY>i?(e.cropH=i-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0]):e.cropH=h}if(e.canChangeY&&e.fixed){var u=e.cropH/e.fixedNumber[1]*e.fixedNumber[0];u+e.cropOffsertX>o?(e.cropW=o-e.cropOffsertX,e.cropH=e.cropW/e.fixedNumber[0]*e.fixedNumber[1]):e.cropW=u}})},checkCropLimitSize:function(){this.cropW,this.cropH;var t=this.limitMinSize,e=new Array;return e=Array.isArray[t]?t:[t,t],[parseFloat(e[0]),parseFloat(e[1])]},changeCropEnd:function(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},endCrop:function(){0===this.cropW&&0===this.cropH&&(this.cropping=!1),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop:function(){this.crop=!0},stopCrop:function(){this.crop=!1},clearCrop:function(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove:function(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&2===t.touches.length)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);var e,r,n="clientX"in t?t.clientX:t.touches[0].clientX,o="clientY"in t?t.clientY:t.touches[0].clientY;e=n-this.cropOffsertX,r=o-this.cropOffsertY,this.cropX=e,this.cropY=r,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(t,e){var r=this,n=0,o=0;t&&(t.preventDefault(),n="clientX"in t?t.clientX:t.touches[0].clientX,o="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick(function(){var t,i,a=n-r.cropX,s=o-r.cropY;if(e&&(a=r.cropOffsertX,s=r.cropOffsertY),t=a<=0?0:a+r.cropW>r.w?r.w-r.cropW:a,i=s<=0?0:s+r.cropH>r.h?r.h-r.cropH:s,r.centerBox){var c=r.getImgAxis();t<=c.x1&&(t=c.x1),t+r.cropW>c.x2&&(t=c.x2-r.cropW),i<=c.y1&&(i=c.y1),i+r.cropH>c.y2&&(i=c.y2-r.cropH)}r.cropOffsertX=t,r.cropOffsertY=i,r.$emit("cropMoving",{moving:!0,axis:r.getCropAxis()}),r.$emit("crop-moving",{moving:!0,axis:r.getCropAxis()})})},getImgAxis:function(t,e,r){t=t||this.x,e=e||this.y,r=r||this.scale;var n={x1:0,x2:0,y1:0,y2:0},o=this.trueWidth*r,i=this.trueHeight*r;switch(this.rotate){case 0:n.x1=t+this.trueWidth*(1-r)/2,n.x2=n.x1+this.trueWidth*r,n.y1=e+this.trueHeight*(1-r)/2,n.y2=n.y1+this.trueHeight*r;break;case 1:case-1:case 3:case-3:n.x1=t+this.trueWidth*(1-r)/2+(o-i)/2,n.x2=n.x1+this.trueHeight*r,n.y1=e+this.trueHeight*(1-r)/2+(i-o)/2,n.y2=n.y1+this.trueWidth*r;break;default:n.x1=t+this.trueWidth*(1-r)/2,n.x2=n.x1+this.trueWidth*r,n.y1=e+this.trueHeight*(1-r)/2,n.y2=n.y1+this.trueHeight*r}return n},getCropAxis:function(){var t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop:function(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("cropMoving",{moving:!1,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked:function(t){var e=this,r=document.createElement("canvas"),n=new Image,o=this.rotate,i=this.trueWidth,a=this.trueHeight,s=this.cropOffsertX,c=this.cropOffsertY;function h(t,e){r.width=Math.round(t),r.height=Math.round(e)}n.onload=function(){if(0!==e.cropW){var u=r.getContext("2d"),p=1;e.high&!e.full&&(p=window.devicePixelRatio),1!==e.enlarge&!e.full&&(p=Math.abs(Number(e.enlarge)));var l=e.cropW*p,f=e.cropH*p,d=i*e.scale*p,v=a*e.scale*p,g=(e.x-s+e.trueWidth*(1-e.scale)/2)*p,m=(e.y-c+e.trueHeight*(1-e.scale)/2)*p;switch(h(l,f),u.save(),o){case 0:e.full?(h(l/e.scale,f/e.scale),u.drawImage(n,g/e.scale,m/e.scale,d/e.scale,v/e.scale)):u.drawImage(n,g,m,d,v);break;case 1:case-3:e.full?(h(l/e.scale,f/e.scale),g=g/e.scale+(d/e.scale-v/e.scale)/2,m=m/e.scale+(v/e.scale-d/e.scale)/2,u.rotate(90*o*Math.PI/180),u.drawImage(n,m,-g-v/e.scale,d/e.scale,v/e.scale)):(g+=(d-v)/2,m+=(v-d)/2,u.rotate(90*o*Math.PI/180),u.drawImage(n,m,-g-v,d,v));break;case 2:case-2:e.full?(h(l/e.scale,f/e.scale),u.rotate(90*o*Math.PI/180),g/=e.scale,m/=e.scale,u.drawImage(n,-g-d/e.scale,-m-v/e.scale,d/e.scale,v/e.scale)):(u.rotate(90*o*Math.PI/180),u.drawImage(n,-g-d,-m-v,d,v));break;case 3:case-1:e.full?(h(l/e.scale,f/e.scale),g=g/e.scale+(d/e.scale-v/e.scale)/2,m=m/e.scale+(v/e.scale-d/e.scale)/2,u.rotate(90*o*Math.PI/180),u.drawImage(n,-m-d/e.scale,g,d/e.scale,v/e.scale)):(g+=(d-v)/2,m+=(v-d)/2,u.rotate(90*o*Math.PI/180),u.drawImage(n,-m-d,g,d,v));break;default:e.full?(h(l/e.scale,f/e.scale),u.drawImage(n,g/e.scale,m/e.scale,d/e.scale,v/e.scale)):u.drawImage(n,g,m,d,v)}u.restore()}else{var w=i*e.scale,x=a*e.scale,y=r.getContext("2d");switch(y.save(),o){case 0:h(w,x),y.drawImage(n,0,0,w,x);break;case 1:case-3:h(x,w),y.rotate(90*o*Math.PI/180),y.drawImage(n,0,-x,w,x);break;case 2:case-2:h(w,x),y.rotate(90*o*Math.PI/180),y.drawImage(n,-w,-x,w,x);break;case 3:case-1:h(x,w),y.rotate(90*o*Math.PI/180),y.drawImage(n,-w,0,w,x);break;default:h(w,x),y.drawImage(n,0,0,w,x)}y.restore()}t(r)},"data"!==this.img.substr(0,4)&&(n.crossOrigin="Anonymous"),n.src=this.imgs},getCropData:function(t){var e=this;this.getCropChecked(function(r){t(r.toDataURL("image/"+e.outputType,e.outputSize))})},getCropBlob:function(t){var e=this;this.getCropChecked(function(r){r.toBlob(function(e){return t(e)},"image/"+e.outputType,e.outputSize)})},showPreview:function(){var t=this;if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout(function(){t.isCanShow=!0},16);var e=this.cropW,r=this.cropH,n=this.scale,o={};o.div={width:"".concat(e,"px"),height:"".concat(r,"px")};var i=(this.x-this.cropOffsertX)/n,a=(this.y-this.cropOffsertY)/n;o.w=e,o.h=r,o.url=this.imgs,o.img={width:"".concat(this.trueWidth,"px"),height:"".concat(this.trueHeight,"px"),transform:"scale(".concat(n,")translate3d(").concat(i,"px, ").concat(a,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,"deg)")},o.html='\n
\n
\n \n
\n
'),this.$emit("realTime",o),this.$emit("real-time",o)},reload:function(){var t=this,e=new Image;e.onload=function(){t.w=parseFloat(window.getComputedStyle(t.$refs.cropper).width),t.h=parseFloat(window.getComputedStyle(t.$refs.cropper).height),t.trueWidth=e.width,t.trueHeight=e.height,t.original?t.scale=1:t.scale=t.checkedMode(),t.$nextTick(function(){t.x=-(t.trueWidth-t.trueWidth*t.scale)/2+(t.w-t.trueWidth*t.scale)/2,t.y=-(t.trueHeight-t.trueHeight*t.scale)/2+(t.h-t.trueHeight*t.scale)/2,t.loading=!1,t.autoCrop&&t.goAutoCrop(),t.$emit("img-load","success"),t.$emit("imgLoad","success"),setTimeout(function(){t.showPreview()},20)})},e.onerror=function(){t.$emit("imgLoad","error"),t.$emit("img-load","error")},e.src=this.imgs},checkedMode:function(){var t=1,e=(this.trueWidth,this.trueHeight),r=this.mode.split(" ");switch(r[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":(e*=t=this.w/this.trueWidth)0,i=(o?this.trueHeight:this.trueWidth)*this.scale,a=(o?this.trueWidth:this.trueHeight)*this.scale;r=ir?r:s,c=c>n?n:c,this.fixed&&(c=s/this.fixedNumber[0]*this.fixedNumber[1]),c>this.h&&(s=(c=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(s,c)}},changeCrop:function(t,e){var r=this;if(this.centerBox){var n=this.getImgAxis();t>n.x2-n.x1&&(e=(t=n.x2-n.x1)/this.fixedNumber[0]*this.fixedNumber[1]),e>n.y2-n.y1&&(t=(e=n.y2-n.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,this.cropH=e,this.checkCropLimitSize(),this.$nextTick(function(){r.cropOffsertX=(r.w-r.cropW)/2,r.cropOffsertY=(r.h-r.cropH)/2,r.centerBox&&r.moveCrop(null,!0)})},refresh:function(){var t=this;this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick(function(){t.checkedImg()})},rotateLeft:function(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight:function(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear:function(){this.rotate=0},checkoutImgAxis:function(t,e,r){t=t||this.x,e=e||this.y,r=r||this.scale;var n=!0;if(this.centerBox){var o=this.getImgAxis(t,e,r),i=this.getCropAxis();o.x1>=i.x1&&(n=!1),o.x2<=i.x2&&(n=!1),o.y1>=i.y1&&(n=!1),o.y2<=i.y2&&(n=!1)}return n}},mounted:function(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";var t=this,e=navigator.userAgent;this.isIOS=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(e,r,n){for(var o=atob(this.toDataURL(r,n).split(",")[1]),i=o.length,a=new Uint8Array(i),s=0;sdocument.F=Object<\/script>"),t.close(),c=t.F;n--;)delete c.prototype[i[n]];return c()};t.exports=Object.create||function(t,e){var r;return null!==t?(s.prototype=n(t),r=new s,s.prototype=null,r[a]=t):r=c(),void 0===e?r:o(r,e)}},bRrM:function(t,e,r){"use strict";var n=r("7KvD"),o=r("FeBl"),i=r("evD5"),a=r("+E39"),s=r("dSzd")("species");t.exports=function(t){var e="function"==typeof o[t]?o[t]:n[t];a&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},btk3:function(t,e){},dNDb:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},dSzd:function(t,e,r){var n=r("e8AB")("wks"),o=r("3Eo+"),i=r("7KvD").Symbol,a="function"==typeof i;(t.exports=function(t){return n[t]||(n[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=n},dY0y:function(t,e,r){var n=r("dSzd")("iterator"),o=!1;try{var i=[7][n]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i=[7],a=i[n]();a.next=function(){return{done:r=!0}},i[n]=function(){return a},t(i)}catch(t){}return r}},e6n0:function(t,e,r){var n=r("evD5").f,o=r("D2L2"),i=r("dSzd")("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},exGp:function(t,e,r){"use strict";e.__esModule=!0;var n,o=r("//Fk"),i=(n=o)&&n.__esModule?n:{default:n};e.default=function(t){return function(){var e=t.apply(this,arguments);return new i.default(function(t,r){return function n(o,a){try{var s=e[o](a),c=s.value}catch(t){return void r(t)}if(!s.done)return i.default.resolve(c).then(function(t){n("next",t)},function(t){n("throw",t)});t(c)}("next")})}}},fJUb:function(t,e,r){var n=r("77Pl"),o=r("EqjI"),i=r("qARP");t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},h65t:function(t,e,r){var n=r("UuGF"),o=r("52gC");t.exports=function(t){return function(e,r){var i,a,s=String(o(e)),c=n(r),h=s.length;return c<0||c>=h?t?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===h||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):i:t?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},iUbK:function(t,e,r){var n=r("7KvD").navigator;t.exports=n&&n.userAgent||""},"jKW+":function(t,e,r){"use strict";var n=r("kM2E"),o=r("qARP"),i=r("dNDb");n(n.S,"Promise",{try:function(t){var e=o.f(this),r=i(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}})},jyFz:function(t,e,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r("SldL"),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},knuC:function(t,e){t.exports=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)}},msXi:function(t,e,r){var n=r("77Pl");t.exports=function(t,e,r,o){try{return o?e(n(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&n(i.call(t)),e}}},qARP:function(t,e,r){"use strict";var n=r("lOnJ");t.exports.f=function(t){return new function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=n(e),this.reject=n(r)}(t)}},qio6:function(t,e,r){var n=r("evD5"),o=r("77Pl"),i=r("lktj");t.exports=r("+E39")?Object.defineProperties:function(t,e){o(t);for(var r,a=i(e),s=a.length,c=0;s>c;)n.f(t,r=a[c++],e[r]);return t}},t8x9:function(t,e,r){var n=r("77Pl"),o=r("lOnJ"),i=r("dSzd")("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||void 0==(r=n(a)[i])?e:o(r)}},"vIB/":function(t,e,r){"use strict";var n=r("O4g8"),o=r("kM2E"),i=r("880/"),a=r("hJx8"),s=r("/bQp"),c=r("94VQ"),h=r("e6n0"),u=r("PzxK"),p=r("dSzd")("iterator"),l=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(t,e,r,d,v,g,m){c(r,e,d);var w,x,y,b=function(t){if(!l&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},C=e+" Iterator",L="values"==v,k=!1,S=t.prototype,O=S[p]||S["@@iterator"]||v&&S[v],A=O||b(v),I=v?L?b("entries"):A:void 0,T="Array"==e&&S.entries||O;if(T&&(y=u(T.call(new t)))!==Object.prototype&&y.next&&(h(y,C,!0),n||"function"==typeof y[p]||a(y,p,f)),L&&O&&"values"!==O.name&&(k=!0,A=function(){return O.call(this)}),n&&!m||!l&&!k&&S[p]||a(S,p,A),s[e]=A,s[C]=f,v)if(w={values:L?A:b("values"),keys:g?A:b("keys"),entries:I},m)for(x in w)x in S||i(S,x,w[x]);else o(o.P+o.F*(l||k),e,w);return w}},xGkn:function(t,e,r){"use strict";var n=r("4mcu"),o=r("EGZi"),i=r("/bQp"),a=r("TcQ7");t.exports=r("vIB/")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},"xH/j":function(t,e,r){var n=r("hJx8");t.exports=function(t,e,r){for(var o in e)r&&t[o]?t[o]=e[o]:n(t,o,e[o]);return t}},zQR9:function(t,e,r){"use strict";var n=r("h65t")(!0);r("vIB/")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=n(e,r),this._i+=t.length,{value:t,done:!1})})}}); //# sourceMappingURL=1.578ea456fe8c81e20520.js.map