diff --git a/public/doc/h5Entry/index.html b/public/doc/h5Entry/index.html index 08e42e00..403e803b 100644 --- a/public/doc/h5Entry/index.html +++ b/public/doc/h5Entry/index.html @@ -17,4 +17,4 @@ // rootURL = "http://192.168.34.155:19111/" //本地 // locationURL=rootURL+'doc/h5Entry/index.html?userId=4&projectSn=a2ef0238b59146aa814b93f47710dbf2#/' locationURL=rootURL+'doc/h5Entry/index.html?userId=1779721457571291137&projectSn=BD3137498CB84BF0969979E0342CDBCA&educationId=1666278624304615426#/' - } \ No newline at end of file + } \ No newline at end of file diff --git a/public/doc/h5Entry/static/img/example.247a986.png b/public/doc/h5Entry/static/img/example.247a986.png new file mode 100644 index 00000000..2c44e9bb Binary files /dev/null and b/public/doc/h5Entry/static/img/example.247a986.png differ diff --git a/public/doc/h5Entry/static/js/3.373347e248f1e86d0c17.js b/public/doc/h5Entry/static/js/3.373347e248f1e86d0c17.js new file mode 100644 index 00000000..4d38a5a6 --- /dev/null +++ b/public/doc/h5Entry/static/js/3.373347e248f1e86d0c17.js @@ -0,0 +1,2 @@ +webpackJsonp([3],{"2SFc":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIoAAAAcCAYAAAHJvxesAAAAAXNSR0IArs4c6QAACX9JREFUaAXtWwtwlNUVPvsnJOS9m0QQhsHBB4V2OiV2aEULCGUsQUgJEK3aohGmUMBGsFYQdQrM0GqFACEiZUhDxxchDZVAoA8gBdu0ZYqAFgFhRAlMisk+k002m+Tv+e7m7v67m31kWeLW2TOTve/zvP+959x7Q9QL0zc2H5H5cNMj5xwvyr4KMtM3NKuk0hSVQTaEStH3lQO2tWIsd1ae22OtCDUoUPvYYYmiiXEukRkQCJsbiVgM0o7L39B8Xjb2Jz181lGD/orASDRayhkuEvRvuOgoxHjllYOt4Y7z6/fex50kxudvNE0W3PCPX68gFXLMc1VqlujGFRZULqwwqS/X2UR7YWnz2CA4Im5i5IkgADqgB5i71dgJhLrSP7Ue/k+jc2qjqduLwMEVOaRj8KqMQgHE8ze2UN7IQXT6ipN6WI8jDAm0o1hfIYjJDlpaN5uZoLSYoVH8d4n/xJeq7Rzt/Owt5jtWVVtaHtlmXOSFG1o5dt6hFpa1qF3dqvrRNWe/JqAXshAFngqCBmiBJgBDxCSC7QDTvppMMze10IsFGXTN1L1ruCHhcdEQpZ+6Mx01nzZ30cIKGy26P5XW77cJzFeZOS8zLJ6SKhrW7bPRML0yP0r03WhY0ELgBmyvt1PBuMEiP1yvkBcjovYm/nzS7PlCX2Kt7zvV4aamPPOOleaNTxEV88pNIsVXw+BSj6iJzs+zu01Te3HT2l7NSNqCgpgxmp+icuP16JD2x7LtSNtFDSn1wOkO/w/j2AXHr5ss/Nn0Aat/b0Vt1Bc6f1ajXzOrzIylqU/48KpTvdziXKulKoSctanlvX0l2fdBTTN6v2ZtJ+RhzgUTU8nJUy4pMfq7gC+9aJVrT3WoM7+RTDuP26n6RHufaOuws3HL6mrbnvVFmQ/pXqhpnb6uMO3g8Qud7mUGI6uWGChR0dGcrUYvRJj7+Pi+n5cS87MG6/fE0Ukkl20IUluSTbM2G+m2nAQayX+QG/D8zAxC3xmlxrVK3sgE4UqyfyAa5c9Dr5l4z/b/xNCe/3XX0ij9NKTaPPrEQh2E9AUohG1NWx7LcisEfdzyq+py3SOb/jv0rZIhTd09JDY/LZLqpQaSKy/qh+sTaOeTelq8y0Lbn9DH/ExptnWrOekKLagw0zWza6upXKinl/a69r7Wjh4ytrkMv//pHErgzW9GmfluIVhVlZowZy51ofLvFztJbphSQVIZKBfvNDVVLsweJttiPeXV9V/M43jwqVWO5Bse0L13JglPdna55fbap/SfyDZ3+th20/umth7V0t6jOpyuBXtRpRkZ16bt7vn/lckvbZkHIU5+2olENdt7VPiPJW9aGkJKAm8XgTA8XgR7fl5vSAyx24F1MQqBL6eXcEDAaXBvsb97eeyK7s9ZRP4XaywRUwmAkAfhK0IShLAyLEGbDGX9ycZuDbMtwn/wD1kgE2SDjJAVgBBPeyQgFtpIHJzYVYOHs0idUgVxIjw+7Dpajw/aGmHwfHLS0106La3IQza2c/DSwaHkHflJ7LsgHpYAmSH7oAQScTjqlfRkXSEy2m248O7B9OiEFPrKsEFocgO8P8Sy7CGucVfGaAaeOliTHivyBXmD6UyjU8TmMipFvZT9xOVOcSag3HOHv9e392QHvdngHyf87m924KC65dkjRCaGf3LS6VmwJ3lGPjVJR2a7y1kztrK36gPyEEPBtAkXWtpciHg6FsWCG68NLbR5yJObpkxFKnlG/p1/ugxd/J1U2nrYO6xBO4JdgO58U5c6emiCV9DkaiL6Lp97sa8iizRlbDL9PD8d5aV8XPqauyEGM7ge+NW8jGIcZR/9yCPD7p8Y2Cs3k73TO66TnxPOgZWcNLEBibgmlGzPfE8oBPFBaC8wFLKb3P7Z1fZVICF5Rv75mem0co+VcjMUESGjDoAwBoCYDqAr2Pz5lHd/mnsEBW2IjbIW5HkK6qBNbVus5le8bVE3/CAz6FkKeJezhLOpLFq7sq/klqNcOCEbpdZQloCgCQdMOP4v2Gq5XdbHenpPQmYion/wDhl8AbJKhSDQhUK8+vieV7p8Pc8vzi/dt0ReI2O7oL0Z80jjnQt6DnxDkWRs64aiFv3vfV/Vz9rccnbZG+LoQHVyrPA5H9wgBbRzFP7vy50idkB5fa3tKBQb4/r5UrM3YDYrKrfcyXFUc/05150dJkAk8GGj8/SDG40Tv9RWiRHhBsJmbm8DR0wPjBn0l2XTUr02XMSPO4/Z3ce+gXSDzW3BpFRx2in7XLf10JAMBZv9t3mz83YgZad4GrEGBtJmYqLwipFisqt2Q6p73oR0AYNJp3V90W8F31RfaHLOPbA8V7zuCTY23haeBgbaZrr8Laa8kVm6k6/Pdz1ngkv840rPxZEv21l8U/r0A+mEM5hXD7V6RdDavlhhfvOEXlwuyfo1lZTyi2Kd57GDbIin/dJAuDbDLeia2Rl0W67ravgWDoLHj0qiU585ac27rstALeFgNlPqntJPkJMEgzb8sTXgNnP/mCRKTtQJIm0O11mTlpA2jxtK4JIA5s60GffKcjyNXAPh2mz93Ew+zCCav8NMO/5q57cTrVRYZqQhmQo9yfGxLwSzmcJRystdGpv/45LrUYIvEpTrz3US/I5wQYtrHL87LHvUMCbcsfF+gTUQrs1WVlvphRrvlePhb6XQUJ4ofzjpfT4iqQWymXJweU5Voudeh3LSNAU5OsJUi6vVodLqGqs5QlTxYRoN9NdmufwO5dWHM+m3C/Ri28G7Gvn2RINWZAPZTOFnTI1vaO525t/nvyT5Igu3rMV13dpDSyan/DDcsfF+gTUQrs2wxdQsy6bCbw6mn+22itsLvrUJjJhbAtlMRj07HPzaONn1TxB9PmLyxY4XX9uO2gM6s/JhEMbhbmldre34usLMSb544uXINMBRT0ibvb3YQPrUvneIQx900OY/t3kRD2Yzdzw8p6y5/vXHDZPhGQNw6FER5MWp6NTHD0JjOEoS8f7TDjr0gaO2/EdZBX10j1fdgAYG0mbSnoLdpbusORZH97WVD6YnfW147/LCLQiZcfDWwI7ux7x0yZtq7Gd33ZpIEzhUxrNCPKmUwCsUR0hkLW2gW1fc63OzJDvF0xvWwBdqM17WdPy3im8K1TNXet+KckUowN0PgGP0t3BqeMNaiCMIWwOs9i/eZswE/weoJR/PTX95wFbPZTw9tXFMfpbzS65Y1LtmlJrGhS1VvONN10C0bfY/KsPf8kra5w8AAAAASUVORK5CYII="},SHNa:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=o("mvHQ"),r=o.n(i),n=o("woOf"),a=o.n(n),s=o("YDP2"),c=o.n(s),h=o("YZ0n"),p={components:{VueCropper:h.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:[c.a],needAudit:0,imgClipDialog:!1,cropperOption:{outputType:"jpeg",size:1,img:"",fixedBox:!0,centerBox:!0,autoCrop:!0,autoCropWidth:100,autoCropHeight:100},isSzProject:"",imgLibraryList:[]}},created:function(){this.httpUrl=rootURL;var e=JSON.parse(localStorage.getItem("infoData"));a()(this.form,e),this.userData=JSON.parse(localStorage.getItem("userData"));var t=new Date(1950,1,1);this.minDate=t,this.getToken(),this.showLoading=!0,this.form.enterDate=this.GetDateStr(0,"-")},methods:{priviewImg:function(e){var t=[e];this.previewImage2=!0,this.previewImages2=t},removeImg:function(){return this.form.fieldAcquisitionUrl="",this.form.personSerial="",!0},checkImg:function(){var e=this;console.log(this.radio),this.imgLibraryList.forEach(function(t){e.radio==t.personSerial&&(e.form.fieldAcquisitionUrl=t.imageUrl,e.form.personSerial=t.personSerial)})},getClipImgFn:function(e){var t=this;this.$refs.cropper.startCrop(),this.$refs.cropper.getCropBlob(function(e){console.log(e),t.afterRead({file:e},1,"clip")})},getProjectSetting:function(){var e=this,t=this.httpUrl+"xmgl/projectConfig/getProjectConfigList",o={projectSn:this.userData.projectSn};this.$axios.post(t,o,{headers:{Authorization:this.token}}).then(function(t){if(e.showLoading=!1,200==t.data.code){var o=t.data.result;if(console.log(t.data.result[0]),e.isSzProject=t.data.result[0].isSzProject,o&&0!=o.length){var i=o[0].workerAuditType;e.needAudit=i}else e.needAudit=0}else e.$toast(t.data.message)})},GetDateStr:function(e,t,o){var i=o?stringToDate(o,t):new Date;return i.setDate(i.getDate()+e),i.getFullYear()+t+(i.getMonth()+1<10?"0"+(i.getMonth()+1):i.getMonth()+1)+t+(i.getDate()<10?"0"+i.getDate():i.getDate())},goback:function(){this.$router.back()},beforeRead:function(e){console.log(e,777888);return"image/jpeg"!=e.type?(this.$toast("文件类型必须是jpg格式的图片"),!1):e.size<10240?(this.$toast("文件大小不能低于10kb"),!1):!(e.size>204800)||(this.$toast("文件大小不能超过200kb"),!1)},afterRead:function(e,t,o){var i=this;console.log(e),e.status="uploading",e.message="上传中...";var r=new FormData;r.append("files",e.file,"image.jpg");var n=this.httpUrl+"upload/image";this.$axios.post(n,r).then(function(r){"SUCCESS"==r.data.status?(e.status="success",1==t?1==i.isSzProject?(console.log(r.data.data[0].imageUrl),i.$axios.post(i.httpUrl+"xmgl/workerImage/list",{fileUrl:r.data.data[0].imageUrl,projectSn:i.userData.projectSn},{headers:{Authorization:i.token}}).then(function(e){if(console.log(e),200==e.data.code&&e.data.result)i.imgLibraryList=e.data.result,i.imgListDialog=!0;else{var t=r.data.data[0].imageUrl;i.form.fieldAcquisitionUrl=t,i.imgClipDialog="clip"!=o,i.cropperOption.img=i.httpUrl+"image/"+i.form.fieldAcquisitionUrl,i.fileList=[{url:i.cropperOption.img,isImage:!0}]}})):(i.showLoading=!0,i.$axios.post(i.httpUrl+"xmgl/recognition/checkfaceHikvision",{fileUrl:r.data.data[0].imageUrl},{headers:{Authorization:i.token}}).then(function(e){if(i.showLoading=!1,200==e.data.code||0==e.data.code)if(1==e.data.result.checkType){var t=r.data.data[0].imageUrl;i.form.fieldAcquisitionUrl=t,i.imgClipDialog="clip"!=o,i.cropperOption.img=i.httpUrl+"image/"+i.form.fieldAcquisitionUrl,i.fileList=[{url:i.cropperOption.img,isImage:!0}]}else if("0"==e.data.result.checkType)i.fileList=[],i.$toast(e.data.result.message),i.form.fieldAcquisitionUrl="";else{t=r.data.data[0].imageUrl;i.form.fieldAcquisitionUrl=t,i.imgClipDialog="clip"!=o,i.cropperOption.img=i.httpUrl+"image/"+i.form.fieldAcquisitionUrl,i.fileList=[{url:i.cropperOption.img,isImage:!0}]}else i.$toast(e.data.message)})):i.form.idCardBigPhotoUrl=r.data.data[0].imageUrl):(e.status="failed",e.message="上传失败")})},getToken:function(){var e=this,t=this.httpUrl+"xmgl/base/getToken",o={userId:this.userData.userId};this.$axios.post(t,o).then(function(t){e.showLoading=!1,200==t.data.code?(e.token="Bearer "+t.data.result.token,e.getCompanyList(),e.getSelectList(1),e.getProjectSetting()):e.$toast(t.message)})},getCompanyList:function(){var e=this,t=this.httpUrl+"xmgl/enterpriseInfo/list",o={projectSn:this.userData.projectSn};this.$axios.post(t,o,{headers:{Authorization:this.token}}).then(function(t){(e.showLoading=!1,200==t.data.code)?t.data.result.forEach(function(t){e.columns2.push(t.enterpriseName),e.pickerList2.push(t)}):e.$toast(t.data.message)})},getDutuiesList:function(){var e=this,t=this.httpUrl+"xmgl/dictionariesRecord/selectJobList?lang=zh_CN";this.$axios.get(t,{headers:{Authorization:e.token}}).then(function(t){if(console.log(t),200==t.data.code){var o=JSON.parse(r()(t.data.result.jobTypeList)),i=JSON.parse(r()(t.data.result.jobNameList));o.forEach(function(t){t.options.forEach(function(t){e.jobTypeList.push(t.remarks+"-"+t.dictionaryName),e.jobTypeList2.push(t)})}),e.jobList2=i,i.forEach(function(t){e.jobList.push(t.dictionaryName)})}})},getSelectList:function(e){var t=this,o="",i={projectSn:this.userData.projectSn,enterpriseId:""!==this.checkedIndex2?this.pickerList2[this.checkedIndex2].id:""};o=1==e?this.httpUrl+"xmgl/teamInfo/getProjectTeamList":this.httpUrl+"xmgl/departmentInfo/getDepartmentInfoList",this.$axios.post(o,i,{headers:{Authorization:this.token}}).then(function(o){(t.showLoading=!1,200==o.data.code)?(t.repetitionRender=!1,t.columns=[],t.pickerList=[],1==e?o.data.result.forEach(function(e){t.columns.push(e.teamName),t.pickerList.push(e)}):o.data.result.list.forEach(function(e){t.columns.push(e.departmentName),t.pickerList.push(e)})):t.$toast(o.data.message)})},changePersonType:function(e){this.form.personType=e,this.pickerList=[],1==this.form.personType?(this.form.departmentId="",this.form.jobType="",this.form.jobName=""):this.form.teamId="",this.showLoading=!0,1==e?this.getSelectList(1):(this.getSelectList(2),this.getDutuiesList())},onConfirm:function(e,t){this.checkedIndex=t,1==this.form.personType?this.form.teamId=e:this.form.departmentId=e,this.showPicker=!1},onConfirm2:function(e,t){this.form.enterpriseId=e,this.checkedIndex2=t,this.showPicker2=!1,1==this.form.personType?(this.showLoading=!0,this.getSelectList(1)):this.getSelectList(2),this.form.teamId="",this.form.departmentId=""},onConfirmJob:function(e,t){this.showJob=!1,this.form.jobName=e,this.checkedJobIndex=t},onConfirmJobType:function(e,t){this.showJobType=!1,this.form.jobType=e,this.checkedJobTypeIndex=t},onDateConfirm:function(e){var t=e.getFullYear(),o=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,i=e.getDate()<10?"0"+e.getDate():e.getDate();this.form.enterDate=t+"-"+o+"-"+i,this.currentDate=t+"-"+o+"-"+i,this.showCalendar=!1},onCancel:function(e){this.showCalendar=!1},onSubmit:function(e){var t=this,o=JSON.parse(r()(this.form));if(""!=o.fieldAcquisitionUrl)if(""==o.idCardBigPhotoUrl&&(o.idCardBigPhotoUrl=o.fieldAcquisitionUrl),this.checkPhone(o.phoneNumber)){o.longTerm.length>0?o.longTerm=1:o.longTerm=0,o.jobType=2==this.form.personType?this.jobTypeList2[this.checkedJobTypeIndex].id:"",o.jobName=2==this.form.personType?this.jobList2[this.checkedJobIndex].id:"",3!=e.personType&&(o.enterpriseId=this.pickerList2[this.checkedIndex2].id),1==e.personType?(o.teamId=this.pickerList[this.checkedIndex].id,delete o.departmentId,delete o.jobType,delete o.jobName):3!=e.personType?(o.departmentId=this.pickerList[this.checkedIndex].id,delete o.teamId):(delete o.teamId,delete o.departmentId);var i="";i=1==this.needAudit?this.httpUrl+"xmgl/xzWorkerInfoAuditRecord/add?lang=zh_CN":this.httpUrl+"xmgl/workerInfo/add?lang=zh_CN",o.projectSn=this.userData.projectSn,o.registerType=2,this.$axios.post(i,o,{headers:{Authorization:this.token}}).then(function(e){200==e.data.code?t.$router.push({path:"/finish"}):t.$toast(e.data.message)})}else this.$toast("请输入正确的手机号");else this.$toast("请上传现场采集照片")},checkPhone:function(e){return!!/^1(3|4|5|6|7|8|9)\d{9}$/.test(e)}}},l={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"submitPage"},[o("div",{staticClass:"title flex2"},[o("van-icon",{staticStyle:{margin:"3px 5px","font-size":"18px"},attrs:{name:"arrow-left"},on:{click:e.goback}}),e._v(" "),o("span",{staticStyle:{"margin-left":"-26px"}},[e._v(" 人员录入 ")]),e._v(" "),o("span")],1),e._v(" "),o("div",{staticClass:"upload_wrap"},[e._m(0),e._v(" "),o("div",{staticClass:"flex",staticStyle:{margin:"15px 0"}},[o("div",{staticClass:"uploader"},[o("van-uploader",{attrs:{"after-read":function(t){return e.afterRead(t,1)},"before-read":e.beforeRead,"before-delete":e.removeImg,"max-count":1},model:{value:e.fileList,callback:function(t){e.fileList=t},expression:"fileList"}}),e._v(" "),o("div",{staticStyle:{"padding-right":"8px"}},[e._v("现场采集照")]),e._v(" "),o("van-icon",{staticClass:"question",attrs:{name:"question-o"},on:{click:function(t){e.previewImage=!0}}})],1),e._v(" "),o("div",{staticClass:"uploader"},[o("van-uploader",{attrs:{"after-read":function(t){return e.afterRead(t,2)},"max-count":1},model:{value:e.fileList2,callback:function(t){e.fileList2=t},expression:"fileList2"}}),e._v(" "),o("div",{staticStyle:{"padding-right":"8px"}},[e._v("身份证头像照")])],1)]),e._v(" "),o("p",{staticStyle:{color:"red","font-size":"12px"}},[e._v("注:未上传身份证头像照,系统会默认使用现场采集照")])]),e._v(" "),o("div",{staticClass:"form_center"},[o("div",{staticClass:"flex info_wrap"},[o("van-icon",{staticClass:"icon",attrs:{name:"records"}}),e._v(" "),o("span",[e._v("详细信息")])],1),e._v(" "),o("van-form",{staticStyle:{"padding-bottom":"10px"},on:{submit:e.onSubmit}},[o("van-field",{attrs:{name:"personType",rules:[{required:!0}]},scopedSlots:e._u([{key:"input",fn:function(){return[o("van-radio-group",{attrs:{direction:"horizontal",disabled:e.repetitionRender},on:{change:e.changePersonType},model:{value:e.form.personType,callback:function(t){e.$set(e.form,"personType",t)},expression:"form.personType"}},[o("van-radio",{staticClass:"sex",attrs:{name:1}},[e._v("劳务人员")]),e._v(" "),o("van-radio",{staticClass:"sex",attrs:{name:2}},[e._v("管理人员")])],1)]},proxy:!0}])}),e._v(" "),3!=e.form.personType?o("van-field",{attrs:{readonly:"",clickable:"",name:"teamId",value:e.form.enterpriseId,label:"企业",placeholder:"点击选择企业",rules:[{required:!0}]},on:{click:function(t){e.showPicker2=!0}}}):e._e(),e._v(" "),2==e.form.personType?o("van-field",{attrs:{readonly:"",clickable:"",name:"departmentId",value:e.form.departmentId,label:"部门",placeholder:"点击选择部门",rules:[{required:!0}]},on:{click:function(t){e.showPicker=!0}}}):3!=e.form.personType?o("van-field",{attrs:{readonly:"",clickable:"",name:"teamId",value:e.form.teamId,label:"班组",placeholder:"点击选择班组",rules:[{required:!0}],disabled:""==e.form.enterpriseId},on:{click:function(t){e.showPicker=""!=e.form.enterpriseId}}}):e._e(),e._v(" "),2==e.form.personType?o("van-field",{attrs:{readonly:"",clickable:"",name:"jobType",value:e.form.jobType,label:"职务类型",placeholder:"点击选择职务类型",rules:[{required:!0}]},on:{click:function(t){e.showJobType=!0}}}):e._e(),e._v(" "),2==e.form.personType?o("van-field",{attrs:{readonly:"",clickable:"",name:"jobName",value:e.form.jobName,label:"职务",placeholder:"点击选择职务",rules:[{required:!0}]},on:{click:function(t){e.showJob=!0}}}):e._e(),e._v(" "),o("van-field",{attrs:{name:"phoneNumber",label:"手机号",placeholder:"请输入手机号",rules:[{required:!0}],maxlength:"11"},model:{value:e.form.phoneNumber,callback:function(t){e.$set(e.form,"phoneNumber",t)},expression:"form.phoneNumber"}}),e._v(" "),o("van-field",{attrs:{readonly:"",clickable:"",name:"enterDate",value:e.form.enterDate,label:"进场日期",placeholder:"点击选择进场日期",rules:[{required:!0}]},on:{click:function(t){e.showCalendar=!0}}}),e._v(" "),o("div",{staticStyle:{margin:"36px auto",width:"90%"}},[o("van-button",{attrs:{round:"",block:"",type:"info","native-type":"submit"}},[e._v("提交")])],1)],1)],1),e._v(" "),o("van-popup",{attrs:{position:"bottom"},model:{value:e.showPicker2,callback:function(t){e.showPicker2=t},expression:"showPicker2"}},[o("van-picker",{attrs:{"show-toolbar":"",columns:e.columns2},on:{confirm:e.onConfirm2,cancel:function(t){e.showPicker2=!1}}})],1),e._v(" "),o("van-popup",{attrs:{position:"bottom"},model:{value:e.showPicker,callback:function(t){e.showPicker=t},expression:"showPicker"}},[o("van-picker",{attrs:{"show-toolbar":"",columns:e.columns},on:{confirm:e.onConfirm,cancel:function(t){e.showPicker=!1}}})],1),e._v(" "),o("van-popup",{attrs:{position:"bottom"},model:{value:e.showJob,callback:function(t){e.showJob=t},expression:"showJob"}},[o("van-picker",{attrs:{"show-toolbar":"",columns:e.jobList},on:{confirm:e.onConfirmJob,cancel:function(t){e.showJob=!1}}})],1),e._v(" "),o("van-popup",{attrs:{position:"bottom"},model:{value:e.showJobType,callback:function(t){e.showJobType=t},expression:"showJobType"}},[o("van-picker",{attrs:{"show-toolbar":"",columns:e.jobTypeList},on:{confirm:e.onConfirmJobType,cancel:function(t){e.showJobType=!1}}})],1),e._v(" "),o("van-popup",{style:{height:"50%"},attrs:{position:"bottom"},model:{value:e.showCalendar,callback:function(t){e.showCalendar=t},expression:"showCalendar"}},[o("van-datetime-picker",{attrs:{type:"date",title:"选择进场日期","min-date":e.minDate},on:{confirm:e.onDateConfirm,cancel:e.onCancel},model:{value:e.currentDate,callback:function(t){e.currentDate=t},expression:"currentDate"}})],1),e._v(" "),o("van-popup",{staticStyle:{background:"none"},model:{value:e.showLoading,callback:function(t){e.showLoading=t},expression:"showLoading"}},[o("van-loading",{attrs:{type:"spinner",color:"#1989fa"}})],1),e._v(" "),o("van-image-preview",{attrs:{images:e.previewImages},model:{value:e.previewImage,callback:function(t){e.previewImage=t},expression:"previewImage"}}),e._v(" "),o("van-dialog",{attrs:{title:"图片裁剪"},on:{confirm:e.getClipImgFn},model:{value:e.imgClipDialog,callback:function(t){e.imgClipDialog=t},expression:"imgClipDialog"}},[o("div",{staticStyle:{height:"300px"}},[o("vueCropper",{ref:"cropper",attrs:{img:e.cropperOption.img,outputType:e.cropperOption.outputType,outputSize:.7,maxImgSize:300,mode:"contain",autoCrop:!0}})],1)]),e._v(" "),o("van-dialog",{attrs:{title:"照片比对结果"},on:{confirm:e.checkImg},model:{value:e.imgListDialog,callback:function(t){e.imgListDialog=t},expression:"imgListDialog"}},[o("div",{staticStyle:{height:"300px",overflow:"auto","padding-bottom":"10px"}},[o("van-radio-group",{staticClass:"radio-box",model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},e._l(e.imgLibraryList,function(t){return o("van-radio",{key:t.id,attrs:{name:t.personSerial}},[o("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:e.httpUrl+"image/"+t.imageUrl},on:{click:function(o){return e.priviewImg(e.httpUrl+"image/"+t.imageUrl)}}})])}),1)],1)]),e._v(" "),o("van-image-preview",{attrs:{images:e.previewImages2},model:{value:e.previewImage2,callback:function(t){e.previewImage2=t},expression:"previewImage2"}})],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"step"},[t("img",{staticStyle:{width:"auto",height:"28px"},attrs:{src:o("2SFc")}})])}]};var u=o("VU/8")(p,l,!1,function(e){o("WOqg")},"data-v-7e7a958a",null);t.default=u.exports},WOqg:function(e,t){},YDP2:function(e,t,o){e.exports=o.p+"static/img/example.247a986.png"},YZ0n:function(e,t,o){var i;window,i=function(){return function(e){var t={};function o(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(i,r,function(t){return e[t]}.bind(null,r));return i},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=6)}([function(e,t,o){var i=o(2);"string"==typeof i&&(i=[[e.i,i,""]]);o(4)(i,{hmr:!0,transform:void 0,insertInto:void 0}),i.locals&&(e.exports=i.locals)},function(e,t,o){"use strict";var i=o(0);o.n(i).a},function(e,t,o){(e.exports=o(3)(!1)).push([e.i,'\n.vue-cropper[data-v-6dae58fd] {\n position: relative;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n direction: ltr;\n touch-action: none;\n text-align: left;\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC");\n}\n.cropper-box[data-v-6dae58fd],\n.cropper-box-canvas[data-v-6dae58fd],\n.cropper-drag-box[data-v-6dae58fd],\n.cropper-crop-box[data-v-6dae58fd],\n.cropper-face[data-v-6dae58fd] {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n user-select: none;\n}\n.cropper-box-canvas img[data-v-6dae58fd] {\n position: relative;\n text-align: left;\n user-select: none;\n transform: none;\n max-width: none;\n max-height: none;\n}\n.cropper-box[data-v-6dae58fd] {\n overflow: hidden;\n}\n.cropper-move[data-v-6dae58fd] {\n cursor: move;\n}\n.cropper-crop[data-v-6dae58fd] {\n cursor: crosshair;\n}\n.cropper-modal[data-v-6dae58fd] {\n background: rgba(0, 0, 0, 0.5);\n}\n.cropper-crop-box[data-v-6dae58fd] {\n /*border: 2px solid #39f;*/\n}\n.cropper-view-box[data-v-6dae58fd] {\n display: block;\n overflow: hidden;\n width: 100%;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n user-select: none;\n}\n.cropper-view-box img[data-v-6dae58fd] {\n user-select: none;\n text-align: left;\n max-width: none;\n max-height: none;\n}\n.cropper-face[data-v-6dae58fd] {\n top: 0;\n left: 0;\n background-color: #fff;\n opacity: 0.1;\n}\n.crop-info[data-v-6dae58fd] {\n position: absolute;\n left: 0px;\n min-width: 65px;\n text-align: center;\n color: white;\n line-height: 20px;\n background-color: rgba(0, 0, 0, 0.8);\n font-size: 12px;\n}\n.crop-line[data-v-6dae58fd] {\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n opacity: 0.1;\n}\n.line-w[data-v-6dae58fd] {\n top: -3px;\n left: 0;\n height: 5px;\n cursor: n-resize;\n}\n.line-a[data-v-6dae58fd] {\n top: 0;\n left: -3px;\n width: 5px;\n cursor: w-resize;\n}\n.line-s[data-v-6dae58fd] {\n bottom: -3px;\n left: 0;\n height: 5px;\n cursor: s-resize;\n}\n.line-d[data-v-6dae58fd] {\n top: 0;\n right: -3px;\n width: 5px;\n cursor: e-resize;\n}\n.crop-point[data-v-6dae58fd] {\n position: absolute;\n width: 8px;\n height: 8px;\n opacity: 0.75;\n background-color: #39f;\n border-radius: 100%;\n}\n.point1[data-v-6dae58fd] {\n top: -4px;\n left: -4px;\n cursor: nw-resize;\n}\n.point2[data-v-6dae58fd] {\n top: -5px;\n left: 50%;\n margin-left: -3px;\n cursor: n-resize;\n}\n.point3[data-v-6dae58fd] {\n top: -4px;\n right: -4px;\n cursor: ne-resize;\n}\n.point4[data-v-6dae58fd] {\n top: 50%;\n left: -4px;\n margin-top: -3px;\n cursor: w-resize;\n}\n.point5[data-v-6dae58fd] {\n top: 50%;\n right: -4px;\n margin-top: -3px;\n cursor: e-resize;\n}\n.point6[data-v-6dae58fd] {\n bottom: -5px;\n left: -4px;\n cursor: sw-resize;\n}\n.point7[data-v-6dae58fd] {\n bottom: -5px;\n left: 50%;\n margin-left: -3px;\n cursor: s-resize;\n}\n.point8[data-v-6dae58fd] {\n bottom: -5px;\n right: -4px;\n cursor: se-resize;\n}\n@media screen and (max-width: 500px) {\n.crop-point[data-v-6dae58fd] {\n position: absolute;\n width: 20px;\n height: 20px;\n opacity: 0.45;\n background-color: #39f;\n border-radius: 100%;\n}\n.point1[data-v-6dae58fd] {\n top: -10px;\n left: -10px;\n}\n.point2[data-v-6dae58fd],\n .point4[data-v-6dae58fd],\n .point5[data-v-6dae58fd],\n .point7[data-v-6dae58fd] {\n display: none;\n}\n.point3[data-v-6dae58fd] {\n top: -10px;\n right: -10px;\n}\n.point4[data-v-6dae58fd] {\n top: 0;\n left: 0;\n}\n.point6[data-v-6dae58fd] {\n bottom: -10px;\n left: -10px;\n}\n.point8[data-v-6dae58fd] {\n bottom: -10px;\n right: -10px;\n}\n}\n',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o=function(e,t){var o=e[1]||"",i=e[3];if(!i)return o;if(t&&"function"==typeof btoa){var r=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(i),n=i.sources.map(function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"});return[o].concat(n).concat([r]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o}).join("")},t.i=function(e,o){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},r=0;r=0&&c.splice(t,1)}function f(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var i=o.nc;i&&(e.attrs.nonce=i)}return g(t,e.attrs),u(e,t),t}function g(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}function m(e,t){var o,i,r,n;if(t.transform&&e.css){if(!(n="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=n}if(t.singleton){var c=s++;o=a||(a=f(t)),i=w.bind(null,o,c,!1),r=w.bind(null,o,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),u(e,t),t}(t),i=function(e,t,o){var i=o.css,r=o.sourceMap,n=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||n)&&(i=h(i)),r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([i],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,o,t),r=function(){d(o),o.href&&URL.revokeObjectURL(o.href)}):(o=f(t),i=function(e,t){var o=t.css,i=t.media;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}.bind(null,o),r=function(){d(o)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=r()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var o=l(e,t);return p(o,t),function(e){for(var r=[],n=0;n=8&&(s=o+i))),s)for(l=p.getUint16(s,r),h=0;h21?"-21px":"0px",e.width=this.cropW>0?this.cropW:0,e.height=this.cropH>0?this.cropH:0,this.infoTrue){var t=1;this.high&&!this.full&&(t=window.devicePixelRatio),1!==this.enlarge&!this.full&&(t=Math.abs(Number(this.enlarge))),e.width=e.width*t,e.height=e.height*t,this.full&&(e.width=e.width/this.scale,e.height=e.height/this.scale)}return e.width=e.width.toFixed(0),e.height=e.height.toFixed(0),e},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(e){""!==e&&this.reload()},cropW:function(){this.showPreview()},cropH:function(){this.showPreview()},cropOffsertX:function(){this.showPreview()},cropOffsertY:function(){this.showPreview()},scale:function(e,t){this.showPreview()},x:function(){this.showPreview()},y:function(){this.showPreview()},autoCrop:function(e){e&&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(e){for(var t=navigator.userAgent.split(" "),o="",i=new RegExp(e,"i"),r=0;r=81)t=-1;else if(this.getVersion("safari")[0]>=605){var n=this.getVersion("version");n[0]>13&&n[1]>1&&(t=-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)&&(t=-1)}}var c=document.createElement("canvas"),h=c.getContext("2d");switch(h.save(),t){case 2:c.width=o,c.height=i,h.translate(o,0),h.scale(-1,1);break;case 3:c.width=o,c.height=i,h.translate(o/2,i/2),h.rotate(180*Math.PI/180),h.translate(-o/2,-i/2);break;case 4:c.width=o,c.height=i,h.translate(0,i),h.scale(1,-1);break;case 5:c.height=o,c.width=i,h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:c.width=i,c.height=o,h.translate(i/2,o/2),h.rotate(90*Math.PI/180),h.translate(-o/2,-i/2);break;case 7:c.height=o,c.width=i,h.rotate(.5*Math.PI),h.translate(o,-i),h.scale(-1,1);break;case 8:c.height=o,c.width=i,h.translate(i/2,o/2),h.rotate(-90*Math.PI/180),h.translate(-o/2,-i/2);break;default:c.width=o,c.height=i}h.drawImage(e,0,0,o,i),h.restore(),c.toBlob(function(e){var t=URL.createObjectURL(e);URL.revokeObjectURL(r.imgs),r.imgs=t},"image/"+this.outputType,1)},checkedImg:function(){var e=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 t=new Image;if(t.onload=function(){if(""===e.img)return e.$emit("imgLoad","error"),e.$emit("img-load","error"),!1;var o=t.width,i=t.height;n.getData(t).then(function(r){e.orientation=r.orientation||1;var n=Number(e.maxImgSize);!e.orientation&&on&&(i=i/o*n,o=n),i>n&&(o=o/i*n,i=n),e.checkOrientationImage(t,e.orientation,o,i))})},t.onerror=function(){e.$emit("imgLoad","error"),e.$emit("img-load","error")},"data"!==this.img.substr(0,4)&&(t.crossOrigin=""),this.isIE){var o=new XMLHttpRequest;o.onload=function(){var e=URL.createObjectURL(this.response);t.src=e},o.open("GET",this.img,!0),o.responseType="blob",o.send()}else t.src=this.img},startMove:function(e){if(e.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in e?e.clientX:e.touches[0].clientX)-this.x,this.moveY=("clientY"in e?e.clientY:e.touches[0].clientY)-this.y,e.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==e.touches.length&&(this.touches=e.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=e.offsetX?e.offsetX:e.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=e.offsetY?e.offsetY:e.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in e?e.clientX:e.touches[0].clientX,this.cropY="clientY"in e?e.clientY:e.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale:function(e){var t=this;e.preventDefault();var o=this.scale,i=this.touches[0].clientX,r=this.touches[0].clientY,n=e.touches[0].clientX,a=e.touches[0].clientY,s=this.touches[1].clientX,c=this.touches[1].clientY,h=e.touches[1].clientX,p=e.touches[1].clientY,l=Math.sqrt(Math.pow(i-s,2)+Math.pow(r-c,2)),u=Math.sqrt(Math.pow(n-h,2)+Math.pow(a-p,2))-l,d=1,f=(d=(d=d/this.trueWidth>d/this.trueHeight?d/this.trueHeight:d/this.trueWidth)>.1?.1:d)*u;if(!this.touchNow){if(this.touchNow=!0,u>0?o+=Math.abs(f):u<0&&o>Math.abs(f)&&(o-=Math.abs(f)),this.touches=e.touches,setTimeout(function(){t.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o}},cancelTouchScale:function(e){window.removeEventListener("touchmove",this.touchScale)},moveImg:function(e){var t=this;if(e.preventDefault(),e.touches&&2===e.touches.length)return this.touches=e.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;var o,i,r="clientX"in e?e.clientX:e.touches[0].clientX,n="clientY"in e?e.clientY:e.touches[0].clientY;o=r-this.moveX,i=n-this.moveY,this.$nextTick(function(){if(t.centerBox){var e,r,n,a,s=t.getImgAxis(o,i,t.scale),c=t.getCropAxis(),h=t.trueHeight*t.scale,p=t.trueWidth*t.scale;switch(t.rotate){case 1:case-1:case 3:case-3:e=t.cropOffsertX-t.trueWidth*(1-t.scale)/2+(h-p)/2,r=t.cropOffsertY-t.trueHeight*(1-t.scale)/2+(p-h)/2,n=e-h+t.cropW,a=r-p+t.cropH;break;default:e=t.cropOffsertX-t.trueWidth*(1-t.scale)/2,r=t.cropOffsertY-t.trueHeight*(1-t.scale)/2,n=e-p+t.cropW,a=r-h+t.cropH}s.x1>=c.x1&&(o=e),s.y1>=c.y1&&(i=r),s.x2<=c.x2&&(o=n),s.y2<=c.y2&&(i=a)}t.x=o,t.y=i,t.$emit("imgMoving",{moving:!0,axis:t.getImgAxis()}),t.$emit("img-moving",{moving:!0,axis:t.getImgAxis()})})},leaveImg:function(e){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(e){var t=this;e.preventDefault();var o=this.scale,i=e.deltaY||e.wheelDelta;i=navigator.userAgent.indexOf("Firefox")>0?30*i:i,this.isIE&&(i=-i);var r=this.coe,n=(r=r/this.trueWidth>r/this.trueHeight?r/this.trueHeight:r/this.trueWidth)*i;n<0?o+=Math.abs(n):o>Math.abs(n)&&(o-=Math.abs(n));var a=n<0?"add":"reduce";if(a!==this.coeStatus&&(this.coeStatus=a,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(function(){t.scaling=!1,t.coe=t.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},changeScale:function(e){var t=this.scale;e=e||1;var o=20;if((e*=o=o/this.trueWidth>o/this.trueHeight?o/this.trueHeight:o/this.trueWidth)>0?t+=Math.abs(e):t>Math.abs(e)&&(t-=Math.abs(e)),!this.checkoutImgAxis(this.x,this.y,t))return!1;this.scale=t},createCrop:function(e){var t=this;e.preventDefault();var o="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,i="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;this.$nextTick(function(){var e=o-t.cropX,r=i-t.cropY;if(e>0?(t.cropW=e+t.cropChangeX>t.w?t.w-t.cropChangeX:e,t.cropOffsertX=t.cropChangeX):(t.cropW=t.w-t.cropChangeX+Math.abs(e)>t.w?t.cropChangeX:Math.abs(e),t.cropOffsertX=t.cropChangeX+e>0?t.cropChangeX+e:0),t.fixed){var n=t.cropW/t.fixedNumber[0]*t.fixedNumber[1];n+t.cropOffsertY>t.h?(t.cropH=t.h-t.cropOffsertY,t.cropW=t.cropH/t.fixedNumber[1]*t.fixedNumber[0],t.cropOffsertX=e>0?t.cropChangeX:t.cropChangeX-t.cropW):t.cropH=n,t.cropOffsertY=t.cropOffsertY}else r>0?(t.cropH=r+t.cropChangeY>t.h?t.h-t.cropChangeY:r,t.cropOffsertY=t.cropChangeY):(t.cropH=t.h-t.cropChangeY+Math.abs(r)>t.h?t.cropChangeY:Math.abs(r),t.cropOffsertY=t.cropChangeY+r>0?t.cropChangeY+r:0)})},changeCropSize:function(e,t,o,i,r){e.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=t,this.canChangeY=o,this.changeCropTypeX=i,this.changeCropTypeY=r,this.cropX="clientX"in e?e.clientX:e.touches[0].clientX,this.cropY="clientY"in e?e.clientY:e.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(e){var t=this;e.preventDefault();var o="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,i="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0,r=this.w,n=this.h,a=0,s=0;if(this.centerBox){var c=this.getImgAxis(),h=c.x2,p=c.y2;a=c.x1>0?c.x1:0,s=c.y1>0?c.y1:0,r>h&&(r=h),n>p&&(n=p)}this.$nextTick(function(){var e=o-t.cropX,c=i-t.cropY;if(t.canChangeX&&(1===t.changeCropTypeX?t.cropOldW-e>0?(t.cropW=r-t.cropChangeX-e<=r-a?t.cropOldW-e:t.cropOldW+t.cropChangeX-a,t.cropOffsertX=r-t.cropChangeX-e<=r-a?t.cropChangeX+e:a):(t.cropW=Math.abs(e)+t.cropChangeX<=r?Math.abs(e)-t.cropOldW:r-t.cropOldW-t.cropChangeX,t.cropOffsertX=t.cropChangeX+t.cropOldW):2===t.changeCropTypeX&&(t.cropOldW+e>0?(t.cropW=t.cropOldW+e+t.cropOffsertX<=r?t.cropOldW+e:r-t.cropOffsertX,t.cropOffsertX=t.cropChangeX):(t.cropW=r-t.cropChangeX+Math.abs(e+t.cropOldW)<=r-a?Math.abs(e+t.cropOldW):t.cropChangeX-a,t.cropOffsertX=r-t.cropChangeX+Math.abs(e+t.cropOldW)<=r-a?t.cropChangeX-Math.abs(e+t.cropOldW):a))),t.canChangeY&&(1===t.changeCropTypeY?t.cropOldH-c>0?(t.cropH=n-t.cropChangeY-c<=n-s?t.cropOldH-c:t.cropOldH+t.cropChangeY-s,t.cropOffsertY=n-t.cropChangeY-c<=n-s?t.cropChangeY+c:s):(t.cropH=Math.abs(c)+t.cropChangeY<=n?Math.abs(c)-t.cropOldH:n-t.cropOldH-t.cropChangeY,t.cropOffsertY=t.cropChangeY+t.cropOldH):2===t.changeCropTypeY&&(t.cropOldH+c>0?(t.cropH=t.cropOldH+c+t.cropOffsertY<=n?t.cropOldH+c:n-t.cropOffsertY,t.cropOffsertY=t.cropChangeY):(t.cropH=n-t.cropChangeY+Math.abs(c+t.cropOldH)<=n-s?Math.abs(c+t.cropOldH):t.cropChangeY-s,t.cropOffsertY=n-t.cropChangeY+Math.abs(c+t.cropOldH)<=n-s?t.cropChangeY-Math.abs(c+t.cropOldH):s))),t.canChangeX&&t.fixed){var h=t.cropW/t.fixedNumber[0]*t.fixedNumber[1];h+t.cropOffsertY>n?(t.cropH=n-t.cropOffsertY,t.cropW=t.cropH/t.fixedNumber[1]*t.fixedNumber[0]):t.cropH=h}if(t.canChangeY&&t.fixed){var p=t.cropH/t.fixedNumber[1]*t.fixedNumber[0];p+t.cropOffsertX>r?(t.cropW=r-t.cropOffsertX,t.cropH=t.cropW/t.fixedNumber[0]*t.fixedNumber[1]):t.cropW=p}})},checkCropLimitSize:function(){this.cropW,this.cropH;var e=this.limitMinSize,t=new Array;return t=Array.isArray[e]?e:[e,e],[parseFloat(t[0]),parseFloat(t[1])]},changeCropEnd:function(e){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(e){if(e.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(e),!1;if(e.touches&&2===e.touches.length)return this.crop=!1,this.startMove(e),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);var t,o,i="clientX"in e?e.clientX:e.touches[0].clientX,r="clientY"in e?e.clientY:e.touches[0].clientY;t=i-this.cropOffsertX,o=r-this.cropOffsertY,this.cropX=t,this.cropY=o,this.$emit("cropMoving",{moving:!0,axis:this.getCropAxis()}),this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(e,t){var o=this,i=0,r=0;e&&(e.preventDefault(),i="clientX"in e?e.clientX:e.touches[0].clientX,r="clientY"in e?e.clientY:e.touches[0].clientY),this.$nextTick(function(){var e,n,a=i-o.cropX,s=r-o.cropY;if(t&&(a=o.cropOffsertX,s=o.cropOffsertY),e=a<=0?0:a+o.cropW>o.w?o.w-o.cropW:a,n=s<=0?0:s+o.cropH>o.h?o.h-o.cropH:s,o.centerBox){var c=o.getImgAxis();e<=c.x1&&(e=c.x1),e+o.cropW>c.x2&&(e=c.x2-o.cropW),n<=c.y1&&(n=c.y1),n+o.cropH>c.y2&&(n=c.y2-o.cropH)}o.cropOffsertX=e,o.cropOffsertY=n,o.$emit("cropMoving",{moving:!0,axis:o.getCropAxis()}),o.$emit("crop-moving",{moving:!0,axis:o.getCropAxis()})})},getImgAxis:function(e,t,o){e=e||this.x,t=t||this.y,o=o||this.scale;var i={x1:0,x2:0,y1:0,y2:0},r=this.trueWidth*o,n=this.trueHeight*o;switch(this.rotate){case 0:i.x1=e+this.trueWidth*(1-o)/2,i.x2=i.x1+this.trueWidth*o,i.y1=t+this.trueHeight*(1-o)/2,i.y2=i.y1+this.trueHeight*o;break;case 1:case-1:case 3:case-3:i.x1=e+this.trueWidth*(1-o)/2+(r-n)/2,i.x2=i.x1+this.trueHeight*o,i.y1=t+this.trueHeight*(1-o)/2+(n-r)/2,i.y2=i.y1+this.trueWidth*o;break;default:i.x1=e+this.trueWidth*(1-o)/2,i.x2=i.x1+this.trueWidth*o,i.y1=t+this.trueHeight*(1-o)/2,i.y2=i.y1+this.trueHeight*o}return i},getCropAxis:function(){var e={x1:0,x2:0,y1:0,y2:0};return e.x1=this.cropOffsertX,e.x2=e.x1+this.cropW,e.y1=this.cropOffsertY,e.y2=e.y1+this.cropH,e},leaveCrop:function(e){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(e){var t=this,o=document.createElement("canvas"),i=new Image,r=this.rotate,n=this.trueWidth,a=this.trueHeight,s=this.cropOffsertX,c=this.cropOffsertY;function h(e,t){o.width=Math.round(e),o.height=Math.round(t)}i.onload=function(){if(0!==t.cropW){var p=o.getContext("2d"),l=1;t.high&!t.full&&(l=window.devicePixelRatio),1!==t.enlarge&!t.full&&(l=Math.abs(Number(t.enlarge)));var u=t.cropW*l,d=t.cropH*l,f=n*t.scale*l,g=a*t.scale*l,m=(t.x-s+t.trueWidth*(1-t.scale)/2)*l,v=(t.y-c+t.trueHeight*(1-t.scale)/2)*l;switch(h(u,d),p.save(),r){case 0:t.full?(h(u/t.scale,d/t.scale),p.drawImage(i,m/t.scale,v/t.scale,f/t.scale,g/t.scale)):p.drawImage(i,m,v,f,g);break;case 1:case-3:t.full?(h(u/t.scale,d/t.scale),m=m/t.scale+(f/t.scale-g/t.scale)/2,v=v/t.scale+(g/t.scale-f/t.scale)/2,p.rotate(90*r*Math.PI/180),p.drawImage(i,v,-m-g/t.scale,f/t.scale,g/t.scale)):(m+=(f-g)/2,v+=(g-f)/2,p.rotate(90*r*Math.PI/180),p.drawImage(i,v,-m-g,f,g));break;case 2:case-2:t.full?(h(u/t.scale,d/t.scale),p.rotate(90*r*Math.PI/180),m/=t.scale,v/=t.scale,p.drawImage(i,-m-f/t.scale,-v-g/t.scale,f/t.scale,g/t.scale)):(p.rotate(90*r*Math.PI/180),p.drawImage(i,-m-f,-v-g,f,g));break;case 3:case-1:t.full?(h(u/t.scale,d/t.scale),m=m/t.scale+(f/t.scale-g/t.scale)/2,v=v/t.scale+(g/t.scale-f/t.scale)/2,p.rotate(90*r*Math.PI/180),p.drawImage(i,-v-f/t.scale,m,f/t.scale,g/t.scale)):(m+=(f-g)/2,v+=(g-f)/2,p.rotate(90*r*Math.PI/180),p.drawImage(i,-v-f,m,f,g));break;default:t.full?(h(u/t.scale,d/t.scale),p.drawImage(i,m/t.scale,v/t.scale,f/t.scale,g/t.scale)):p.drawImage(i,m,v,f,g)}p.restore()}else{var w=n*t.scale,x=a*t.scale,b=o.getContext("2d");switch(b.save(),r){case 0:h(w,x),b.drawImage(i,0,0,w,x);break;case 1:case-3:h(x,w),b.rotate(90*r*Math.PI/180),b.drawImage(i,0,-x,w,x);break;case 2:case-2:h(w,x),b.rotate(90*r*Math.PI/180),b.drawImage(i,-w,-x,w,x);break;case 3:case-1:h(x,w),b.rotate(90*r*Math.PI/180),b.drawImage(i,-w,0,w,x);break;default:h(w,x),b.drawImage(i,0,0,w,x)}b.restore()}e(o)},"data"!==this.img.substr(0,4)&&(i.crossOrigin="Anonymous"),i.src=this.imgs},getCropData:function(e){var t=this;this.getCropChecked(function(o){e(o.toDataURL("image/"+t.outputType,t.outputSize))})},getCropBlob:function(e){var t=this;this.getCropChecked(function(o){o.toBlob(function(t){return e(t)},"image/"+t.outputType,t.outputSize)})},showPreview:function(){var e=this;if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout(function(){e.isCanShow=!0},16);var t=this.cropW,o=this.cropH,i=this.scale,r={};r.div={width:"".concat(t,"px"),height:"".concat(o,"px")};var n=(this.x-this.cropOffsertX)/i,a=(this.y-this.cropOffsertY)/i;r.w=t,r.h=o,r.url=this.imgs,r.img={width:"".concat(this.trueWidth,"px"),height:"".concat(this.trueHeight,"px"),transform:"scale(".concat(i,")translate3d(").concat(n,"px, ").concat(a,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,"deg)")},r.html='\n
\n
\n \n
\n
'),this.$emit("realTime",r),this.$emit("real-time",r)},reload:function(){var e=this,t=new Image;t.onload=function(){e.w=parseFloat(window.getComputedStyle(e.$refs.cropper).width),e.h=parseFloat(window.getComputedStyle(e.$refs.cropper).height),e.trueWidth=t.width,e.trueHeight=t.height,e.original?e.scale=1:e.scale=e.checkedMode(),e.$nextTick(function(){e.x=-(e.trueWidth-e.trueWidth*e.scale)/2+(e.w-e.trueWidth*e.scale)/2,e.y=-(e.trueHeight-e.trueHeight*e.scale)/2+(e.h-e.trueHeight*e.scale)/2,e.loading=!1,e.autoCrop&&e.goAutoCrop(),e.$emit("img-load","success"),e.$emit("imgLoad","success"),setTimeout(function(){e.showPreview()},20)})},t.onerror=function(){e.$emit("imgLoad","error"),e.$emit("img-load","error")},t.src=this.imgs},checkedMode:function(){var e=1,t=(this.trueWidth,this.trueHeight),o=this.mode.split(" ");switch(o[0]){case"contain":this.trueWidth>this.w&&(e=this.w/this.trueWidth),this.trueHeight*e>this.h&&(e=this.h/this.trueHeight);break;case"cover":(t*=e=this.w/this.trueWidth)0,n=(r?this.trueHeight:this.trueWidth)*this.scale,a=(r?this.trueWidth:this.trueHeight)*this.scale;o=no?o:s,c=c>i?i: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(e,t){var o=this;if(this.centerBox){var i=this.getImgAxis();e>i.x2-i.x1&&(t=(e=i.x2-i.x1)/this.fixedNumber[0]*this.fixedNumber[1]),t>i.y2-i.y1&&(e=(t=i.y2-i.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=e,this.cropH=t,this.checkCropLimitSize(),this.$nextTick(function(){o.cropOffsertX=(o.w-o.cropW)/2,o.cropOffsertY=(o.h-o.cropH)/2,o.centerBox&&o.moveCrop(null,!0)})},refresh:function(){var e=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(){e.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(e,t,o){e=e||this.x,t=t||this.y,o=o||this.scale;var i=!0;if(this.centerBox){var r=this.getImgAxis(e,t,o),n=this.getCropAxis();r.x1>=n.x1&&(i=!1),r.x2<=n.x2&&(i=!1),r.y1>=n.y1&&(i=!1),r.y2<=n.y2&&(i=!1)}return i}},mounted:function(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";var e=this,t=navigator.userAgent;this.isIOS=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(t,o,i){for(var r=atob(this.toDataURL(o,i).split(",")[1]),n=r.length,a=new Uint8Array(n),s=0;s\r\n
\r\n
\r\n \r\n 人员录入 \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n afterRead(file, 1)\"\r\n :before-read=\"beforeRead\"\r\n :before-delete=\"removeImg\"\r\n v-model=\"fileList\"\r\n :max-count=\"1\"\r\n />\r\n
现场采集照
\r\n \r\n
\r\n
\r\n afterRead(file, 2)\"\r\n v-model=\"fileList2\"\r\n :max-count=\"1\"\r\n />\r\n
身份证头像照
\r\n
\r\n
\r\n

注:未上传身份证头像照,系统会默认使用现场采集照

\r\n
\r\n\r\n
\r\n
\r\n \r\n 详细信息\r\n
\r\n \r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n 提交\r\n
\r\n
\r\n
\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/pages/submit.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"submitPage\"},[_c('div',{staticClass:\"title flex2\"},[_c('van-icon',{staticStyle:{\"margin\":\"3px 5px\",\"font-size\":\"18px\"},attrs:{\"name\":\"arrow-left\"},on:{\"click\":_vm.goback}}),_vm._v(\" \"),_c('span',{staticStyle:{\"margin-left\":\"-26px\"}},[_vm._v(\" 人员录入 \")]),_vm._v(\" \"),_c('span')],1),_vm._v(\" \"),_c('div',{staticClass:\"upload_wrap\"},[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"flex\",staticStyle:{\"margin\":\"15px 0\"}},[_c('div',{staticClass:\"uploader\"},[_c('van-uploader',{attrs:{\"after-read\":function (file) { return _vm.afterRead(file, 1); },\"before-read\":_vm.beforeRead,\"before-delete\":_vm.removeImg,\"max-count\":1},model:{value:(_vm.fileList),callback:function ($$v) {_vm.fileList=$$v},expression:\"fileList\"}}),_vm._v(\" \"),_c('div',{staticStyle:{\"padding-right\":\"8px\"}},[_vm._v(\"现场采集照\")]),_vm._v(\" \"),_c('van-icon',{staticClass:\"question\",attrs:{\"name\":\"question-o\"},on:{\"click\":function($event){_vm.previewImage=true}}})],1),_vm._v(\" \"),_c('div',{staticClass:\"uploader\"},[_c('van-uploader',{attrs:{\"after-read\":function (file) { return _vm.afterRead(file, 2); },\"max-count\":1},model:{value:(_vm.fileList2),callback:function ($$v) {_vm.fileList2=$$v},expression:\"fileList2\"}}),_vm._v(\" \"),_c('div',{staticStyle:{\"padding-right\":\"8px\"}},[_vm._v(\"身份证头像照\")])],1)]),_vm._v(\" \"),_c('p',{staticStyle:{\"color\":\"red\",\"font-size\":\"12px\"}},[_vm._v(\"注:未上传身份证头像照,系统会默认使用现场采集照\")])]),_vm._v(\" \"),_c('div',{staticClass:\"form_center\"},[_c('div',{staticClass:\"flex info_wrap\"},[_c('van-icon',{staticClass:\"icon\",attrs:{\"name\":\"records\"}}),_vm._v(\" \"),_c('span',[_vm._v(\"详细信息\")])],1),_vm._v(\" \"),_c('van-form',{staticStyle:{\"padding-bottom\":\"10px\"},on:{\"submit\":_vm.onSubmit}},[_c('van-field',{attrs:{\"name\":\"personType\",\"rules\":[{ required: true }]},scopedSlots:_vm._u([{key:\"input\",fn:function(){return [_c('van-radio-group',{attrs:{\"direction\":\"horizontal\",\"disabled\":_vm.repetitionRender},on:{\"change\":_vm.changePersonType},model:{value:(_vm.form.personType),callback:function ($$v) {_vm.$set(_vm.form, \"personType\", $$v)},expression:\"form.personType\"}},[_c('van-radio',{staticClass:\"sex\",attrs:{\"name\":1}},[_vm._v(\"劳务人员\")]),_vm._v(\" \"),_c('van-radio',{staticClass:\"sex\",attrs:{\"name\":2}},[_vm._v(\"管理人员\")])],1)]},proxy:true}])}),_vm._v(\" \"),(_vm.form.personType != 3)?_c('van-field',{attrs:{\"readonly\":\"\",\"clickable\":\"\",\"name\":\"teamId\",\"value\":_vm.form.enterpriseId,\"label\":\"企业\",\"placeholder\":\"点击选择企业\",\"rules\":[{ required: true }]},on:{\"click\":function($event){_vm.showPicker2 = true}}}):_vm._e(),_vm._v(\" \"),(_vm.form.personType == 2)?_c('van-field',{attrs:{\"readonly\":\"\",\"clickable\":\"\",\"name\":\"departmentId\",\"value\":_vm.form.departmentId,\"label\":\"部门\",\"placeholder\":\"点击选择部门\",\"rules\":[{ required: true }]},on:{\"click\":function($event){_vm.showPicker = true}}}):(_vm.form.personType != 3)?_c('van-field',{attrs:{\"readonly\":\"\",\"clickable\":\"\",\"name\":\"teamId\",\"value\":_vm.form.teamId,\"label\":\"班组\",\"placeholder\":\"点击选择班组\",\"rules\":[{ required: true }],\"disabled\":_vm.form.enterpriseId == ''},on:{\"click\":function($event){_vm.showPicker = _vm.form.enterpriseId == '' ? false : true}}}):_vm._e(),_vm._v(\" \"),(_vm.form.personType == 2)?_c('van-field',{attrs:{\"readonly\":\"\",\"clickable\":\"\",\"name\":\"jobType\",\"value\":_vm.form.jobType,\"label\":\"职务类型\",\"placeholder\":\"点击选择职务类型\",\"rules\":[{ required: true }]},on:{\"click\":function($event){_vm.showJobType = true}}}):_vm._e(),_vm._v(\" \"),(_vm.form.personType == 2)?_c('van-field',{attrs:{\"readonly\":\"\",\"clickable\":\"\",\"name\":\"jobName\",\"value\":_vm.form.jobName,\"label\":\"职务\",\"placeholder\":\"点击选择职务\",\"rules\":[{ required: true }]},on:{\"click\":function($event){_vm.showJob = true}}}):_vm._e(),_vm._v(\" \"),_c('van-field',{attrs:{\"name\":\"phoneNumber\",\"label\":\"手机号\",\"placeholder\":\"请输入手机号\",\"rules\":[{ required: true }],\"maxlength\":\"11\"},model:{value:(_vm.form.phoneNumber),callback:function ($$v) {_vm.$set(_vm.form, \"phoneNumber\", $$v)},expression:\"form.phoneNumber\"}}),_vm._v(\" \"),_c('van-field',{attrs:{\"readonly\":\"\",\"clickable\":\"\",\"name\":\"enterDate\",\"value\":_vm.form.enterDate,\"label\":\"进场日期\",\"placeholder\":\"点击选择进场日期\",\"rules\":[{ required: true }]},on:{\"click\":function($event){_vm.showCalendar = true}}}),_vm._v(\" \"),_c('div',{staticStyle:{\"margin\":\"36px auto\",\"width\":\"90%\"}},[_c('van-button',{attrs:{\"round\":\"\",\"block\":\"\",\"type\":\"info\",\"native-type\":\"submit\"}},[_vm._v(\"提交\")])],1)],1)],1),_vm._v(\" \"),_c('van-popup',{attrs:{\"position\":\"bottom\"},model:{value:(_vm.showPicker2),callback:function ($$v) {_vm.showPicker2=$$v},expression:\"showPicker2\"}},[_c('van-picker',{attrs:{\"show-toolbar\":\"\",\"columns\":_vm.columns2},on:{\"confirm\":_vm.onConfirm2,\"cancel\":function($event){_vm.showPicker2 = false}}})],1),_vm._v(\" \"),_c('van-popup',{attrs:{\"position\":\"bottom\"},model:{value:(_vm.showPicker),callback:function ($$v) {_vm.showPicker=$$v},expression:\"showPicker\"}},[_c('van-picker',{attrs:{\"show-toolbar\":\"\",\"columns\":_vm.columns},on:{\"confirm\":_vm.onConfirm,\"cancel\":function($event){_vm.showPicker = false}}})],1),_vm._v(\" \"),_c('van-popup',{attrs:{\"position\":\"bottom\"},model:{value:(_vm.showJob),callback:function ($$v) {_vm.showJob=$$v},expression:\"showJob\"}},[_c('van-picker',{attrs:{\"show-toolbar\":\"\",\"columns\":_vm.jobList},on:{\"confirm\":_vm.onConfirmJob,\"cancel\":function($event){_vm.showJob = false}}})],1),_vm._v(\" \"),_c('van-popup',{attrs:{\"position\":\"bottom\"},model:{value:(_vm.showJobType),callback:function ($$v) {_vm.showJobType=$$v},expression:\"showJobType\"}},[_c('van-picker',{attrs:{\"show-toolbar\":\"\",\"columns\":_vm.jobTypeList},on:{\"confirm\":_vm.onConfirmJobType,\"cancel\":function($event){_vm.showJobType = false}}})],1),_vm._v(\" \"),_c('van-popup',{style:({ height: '50%' }),attrs:{\"position\":\"bottom\"},model:{value:(_vm.showCalendar),callback:function ($$v) {_vm.showCalendar=$$v},expression:\"showCalendar\"}},[_c('van-datetime-picker',{attrs:{\"type\":\"date\",\"title\":\"选择进场日期\",\"min-date\":_vm.minDate},on:{\"confirm\":_vm.onDateConfirm,\"cancel\":_vm.onCancel},model:{value:(_vm.currentDate),callback:function ($$v) {_vm.currentDate=$$v},expression:\"currentDate\"}})],1),_vm._v(\" \"),_c('van-popup',{staticStyle:{\"background\":\"none\"},model:{value:(_vm.showLoading),callback:function ($$v) {_vm.showLoading=$$v},expression:\"showLoading\"}},[_c('van-loading',{attrs:{\"type\":\"spinner\",\"color\":\"#1989fa\"}})],1),_vm._v(\" \"),_c('van-image-preview',{attrs:{\"images\":_vm.previewImages},model:{value:(_vm.previewImage),callback:function ($$v) {_vm.previewImage=$$v},expression:\"previewImage\"}}),_vm._v(\" \"),_c('van-dialog',{attrs:{\"title\":\"图片裁剪\"},on:{\"confirm\":_vm.getClipImgFn},model:{value:(_vm.imgClipDialog),callback:function ($$v) {_vm.imgClipDialog=$$v},expression:\"imgClipDialog\"}},[_c('div',{staticStyle:{\"height\":\"300px\"}},[_c('vueCropper',{ref:\"cropper\",attrs:{\"img\":_vm.cropperOption.img,\"outputType\":_vm.cropperOption.outputType,\"outputSize\":0.7,\"maxImgSize\":300,\"mode\":\"contain\",\"autoCrop\":true}})],1)]),_vm._v(\" \"),_c('van-dialog',{attrs:{\"title\":\"照片比对结果\"},on:{\"confirm\":_vm.checkImg},model:{value:(_vm.imgListDialog),callback:function ($$v) {_vm.imgListDialog=$$v},expression:\"imgListDialog\"}},[_c('div',{staticStyle:{\"height\":\"300px\",\"overflow\":\"auto\",\"padding-bottom\":\"10px\"}},[_c('van-radio-group',{staticClass:\"radio-box\",model:{value:(_vm.radio),callback:function ($$v) {_vm.radio=$$v},expression:\"radio\"}},_vm._l((_vm.imgLibraryList),function(item){return _c('van-radio',{key:item.id,attrs:{\"name\":item.personSerial}},[_c('img',{staticStyle:{\"width\":\"50px\",\"height\":\"50px\"},attrs:{\"src\":_vm.httpUrl + 'image/' +item.imageUrl},on:{\"click\":function($event){return _vm.priviewImg(_vm.httpUrl + 'image/' +item.imageUrl)}}})])}),1)],1)]),_vm._v(\" \"),_c('van-image-preview',{attrs:{\"images\":_vm.previewImages2},model:{value:(_vm.previewImage2),callback:function ($$v) {_vm.previewImage2=$$v},expression:\"previewImage2\"}})],1)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"step\"},[_c('img',{staticStyle:{\"width\":\"auto\",\"height\":\"28px\"},attrs:{\"src\":require(\"@/assets/step2.png\")}})])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-7e7a958a\",\"hasScoped\":true,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/pages/submit.vue\n// module id = null\n// module chunks = ","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/dist/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-7e7a958a\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":false}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./submit.vue\")\n}\nvar normalizeComponent = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./submit.vue\"\nimport __vue_script__ from \"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./submit.vue\"\n/* template */\nimport __vue_template__ from \"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-7e7a958a\\\",\\\"hasScoped\\\":true,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./submit.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-7e7a958a\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/pages/submit.vue\n// module id = null\n// module chunks = ","module.exports = __webpack_public_path__ + \"static/img/example.247a986.png\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/assets/example.png\n// module id = YDP2\n// module chunks = 3","!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(\"vue-cropper\",[],e):\"object\"==typeof exports?exports[\"vue-cropper\"]=e():t[\"vue-cropper\"]=e()}(window,function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&\"object\"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:t}),2&e&&\"string\"!=typeof t)for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,\"a\",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p=\"\",o(o.s=6)}([function(t,e,o){var n=o(2);\"string\"==typeof n&&(n=[[t.i,n,\"\"]]);var i={hmr:!0,transform:void 0,insertInto:void 0};o(4)(n,i);n.locals&&(t.exports=n.locals)},function(t,e,o){\"use strict\";var n=o(0);o.n(n).a},function(t,e,o){(t.exports=o(3)(!1)).push([t.i,'\\n.vue-cropper[data-v-6dae58fd] {\\n position: relative;\\n width: 100%;\\n height: 100%;\\n box-sizing: border-box;\\n user-select: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n direction: ltr;\\n touch-action: none;\\n text-align: left;\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC\");\\n}\\n.cropper-box[data-v-6dae58fd],\\n.cropper-box-canvas[data-v-6dae58fd],\\n.cropper-drag-box[data-v-6dae58fd],\\n.cropper-crop-box[data-v-6dae58fd],\\n.cropper-face[data-v-6dae58fd] {\\n position: absolute;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n user-select: none;\\n}\\n.cropper-box-canvas img[data-v-6dae58fd] {\\n position: relative;\\n text-align: left;\\n user-select: none;\\n transform: none;\\n max-width: none;\\n max-height: none;\\n}\\n.cropper-box[data-v-6dae58fd] {\\n overflow: hidden;\\n}\\n.cropper-move[data-v-6dae58fd] {\\n cursor: move;\\n}\\n.cropper-crop[data-v-6dae58fd] {\\n cursor: crosshair;\\n}\\n.cropper-modal[data-v-6dae58fd] {\\n background: rgba(0, 0, 0, 0.5);\\n}\\n.cropper-crop-box[data-v-6dae58fd] {\\n /*border: 2px solid #39f;*/\\n}\\n.cropper-view-box[data-v-6dae58fd] {\\n display: block;\\n overflow: hidden;\\n width: 100%;\\n height: 100%;\\n outline: 1px solid #39f;\\n outline-color: rgba(51, 153, 255, 0.75);\\n user-select: none;\\n}\\n.cropper-view-box img[data-v-6dae58fd] {\\n user-select: none;\\n text-align: left;\\n max-width: none;\\n max-height: none;\\n}\\n.cropper-face[data-v-6dae58fd] {\\n top: 0;\\n left: 0;\\n background-color: #fff;\\n opacity: 0.1;\\n}\\n.crop-info[data-v-6dae58fd] {\\n position: absolute;\\n left: 0px;\\n min-width: 65px;\\n text-align: center;\\n color: white;\\n line-height: 20px;\\n background-color: rgba(0, 0, 0, 0.8);\\n font-size: 12px;\\n}\\n.crop-line[data-v-6dae58fd] {\\n position: absolute;\\n display: block;\\n width: 100%;\\n height: 100%;\\n opacity: 0.1;\\n}\\n.line-w[data-v-6dae58fd] {\\n top: -3px;\\n left: 0;\\n height: 5px;\\n cursor: n-resize;\\n}\\n.line-a[data-v-6dae58fd] {\\n top: 0;\\n left: -3px;\\n width: 5px;\\n cursor: w-resize;\\n}\\n.line-s[data-v-6dae58fd] {\\n bottom: -3px;\\n left: 0;\\n height: 5px;\\n cursor: s-resize;\\n}\\n.line-d[data-v-6dae58fd] {\\n top: 0;\\n right: -3px;\\n width: 5px;\\n cursor: e-resize;\\n}\\n.crop-point[data-v-6dae58fd] {\\n position: absolute;\\n width: 8px;\\n height: 8px;\\n opacity: 0.75;\\n background-color: #39f;\\n border-radius: 100%;\\n}\\n.point1[data-v-6dae58fd] {\\n top: -4px;\\n left: -4px;\\n cursor: nw-resize;\\n}\\n.point2[data-v-6dae58fd] {\\n top: -5px;\\n left: 50%;\\n margin-left: -3px;\\n cursor: n-resize;\\n}\\n.point3[data-v-6dae58fd] {\\n top: -4px;\\n right: -4px;\\n cursor: ne-resize;\\n}\\n.point4[data-v-6dae58fd] {\\n top: 50%;\\n left: -4px;\\n margin-top: -3px;\\n cursor: w-resize;\\n}\\n.point5[data-v-6dae58fd] {\\n top: 50%;\\n right: -4px;\\n margin-top: -3px;\\n cursor: e-resize;\\n}\\n.point6[data-v-6dae58fd] {\\n bottom: -5px;\\n left: -4px;\\n cursor: sw-resize;\\n}\\n.point7[data-v-6dae58fd] {\\n bottom: -5px;\\n left: 50%;\\n margin-left: -3px;\\n cursor: s-resize;\\n}\\n.point8[data-v-6dae58fd] {\\n bottom: -5px;\\n right: -4px;\\n cursor: se-resize;\\n}\\n@media screen and (max-width: 500px) {\\n.crop-point[data-v-6dae58fd] {\\n position: absolute;\\n width: 20px;\\n height: 20px;\\n opacity: 0.45;\\n background-color: #39f;\\n border-radius: 100%;\\n}\\n.point1[data-v-6dae58fd] {\\n top: -10px;\\n left: -10px;\\n}\\n.point2[data-v-6dae58fd],\\n .point4[data-v-6dae58fd],\\n .point5[data-v-6dae58fd],\\n .point7[data-v-6dae58fd] {\\n display: none;\\n}\\n.point3[data-v-6dae58fd] {\\n top: -10px;\\n right: -10px;\\n}\\n.point4[data-v-6dae58fd] {\\n top: 0;\\n left: 0;\\n}\\n.point6[data-v-6dae58fd] {\\n bottom: -10px;\\n left: -10px;\\n}\\n.point8[data-v-6dae58fd] {\\n bottom: -10px;\\n right: -10px;\\n}\\n}\\n',\"\"])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o=function(t,e){var o=t[1]||\"\",n=t[3];if(!n)return o;if(e&&\"function\"==typeof btoa){var i=function(t){return\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+\" */\"}(n),r=n.sources.map(function(t){return\"/*# sourceURL=\"+n.sourceRoot+t+\" */\"});return[o].concat(r).concat([i]).join(\"\\n\")}return[o].join(\"\\n\")}(e,t);return e[2]?\"@media \"+e[2]+\"{\"+o+\"}\":o}).join(\"\")},e.i=function(t,o){\"string\"==typeof t&&(t=[[null,t,\"\"]]);for(var n={},i=0;i=0&&c.splice(e,1)}function f(t){var e=document.createElement(\"style\");if(void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),void 0===t.attrs.nonce){var n=function(){0;return o.nc}();n&&(t.attrs.nonce=n)}return g(e,t.attrs),l(t,e),e}function g(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}function v(t,e){var o,n,i,r;if(e.transform&&t.css){if(!(r=\"function\"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var c=a++;o=s||(s=f(e)),n=w.bind(null,o,c,!1),i=w.bind(null,o,c,!0)}else t.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(o=function(t){var e=document.createElement(\"link\");return void 0===t.attrs.type&&(t.attrs.type=\"text/css\"),t.attrs.rel=\"stylesheet\",g(e,t.attrs),l(t,e),e}(e),n=function(t,e,o){var n=o.css,i=o.sourceMap,r=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||r)&&(n=h(n));i&&(n+=\"\\n/*# sourceMappingURL=data:application/json;base64,\"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+\" */\");var s=new Blob([n],{type:\"text/css\"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,o,e),i=function(){d(o),o.href&&URL.revokeObjectURL(o.href)}):(o=f(e),n=function(t,e){var o=e.css,n=e.media;n&&t.setAttribute(\"media\",n);if(t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}.bind(null,o),i=function(){d(o)});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 i()}}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=i()),e.insertInto||(e.insertInto=\"head\"),e.insertAt||(e.insertAt=\"bottom\");var o=u(t,e);return p(o,e),function(t){for(var i=[],r=0;r=8&&(a=o+n)));if(a)for(u=p.getUint16(a,i),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(){navigator.userAgent;var t=!!window.ActiveXObject||\"ActiveXObject\"in window;return t},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(\" \"),o=\"\",n=new RegExp(t,\"i\"),i=0;i=81)e=-1;else if(this.getVersion(\"safari\")[0]>=605){var r=this.getVersion(\"version\");r[0]>13&&r[1]>1&&(e=-1)}else{var s=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(s){var a=s[1];((a=a.split(\"_\"))[0]>13||a[0]>=13&&a[1]>=4)&&(e=-1)}}var c=document.createElement(\"canvas\"),h=c.getContext(\"2d\");switch(h.save(),e){case 2:c.width=o,c.height=n,h.translate(o,0),h.scale(-1,1);break;case 3:c.width=o,c.height=n,h.translate(o/2,n/2),h.rotate(180*Math.PI/180),h.translate(-o/2,-n/2);break;case 4:c.width=o,c.height=n,h.translate(0,n),h.scale(1,-1);break;case 5:c.height=o,c.width=n,h.rotate(.5*Math.PI),h.scale(1,-1);break;case 6:c.width=n,c.height=o,h.translate(n/2,o/2),h.rotate(90*Math.PI/180),h.translate(-o/2,-n/2);break;case 7:c.height=o,c.width=n,h.rotate(.5*Math.PI),h.translate(o,-n),h.scale(-1,1);break;case 8:c.height=o,c.width=n,h.translate(n/2,o/2),h.rotate(-90*Math.PI/180),h.translate(-o/2,-n/2);break;default:c.width=o,c.height=n}h.drawImage(t,0,0,o,n),h.restore(),c.toBlob(function(t){var e=URL.createObjectURL(t);URL.revokeObjectURL(i.imgs),i.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 o=e.width,n=e.height;r.getData(e).then(function(i){t.orientation=i.orientation||1;var r=Number(t.maxImgSize);!t.orientation&&or&&(n=n/o*r,o=r),n>r&&(o=o/n*r,n=r),t.checkOrientationImage(e,t.orientation,o,n))})},e.onerror=function(){t.$emit(\"imgLoad\",\"error\"),t.$emit(\"img-load\",\"error\")},\"data\"!==this.img.substr(0,4)&&(e.crossOrigin=\"\"),this.isIE){var o=new XMLHttpRequest;o.onload=function(){var t=URL.createObjectURL(this.response);e.src=t},o.open(\"GET\",this.img,!0),o.responseType=\"blob\",o.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 o=this.scale,n=this.touches[0].clientX,i=this.touches[0].clientY,r=t.touches[0].clientX,s=t.touches[0].clientY,a=this.touches[1].clientX,c=this.touches[1].clientY,h=t.touches[1].clientX,p=t.touches[1].clientY,u=Math.sqrt(Math.pow(n-a,2)+Math.pow(i-c,2)),l=Math.sqrt(Math.pow(r-h,2)+Math.pow(s-p,2))-u,d=1,f=(d=(d=d/this.trueWidth>d/this.trueHeight?d/this.trueHeight:d/this.trueWidth)>.1?.1:d)*l;if(!this.touchNow){if(this.touchNow=!0,l>0?o+=Math.abs(f):l<0&&o>Math.abs(f)&&(o-=Math.abs(f)),this.touches=t.touches,setTimeout(function(){e.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o}},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 o,n,i=\"clientX\"in t?t.clientX:t.touches[0].clientX,r=\"clientY\"in t?t.clientY:t.touches[0].clientY;o=i-this.moveX,n=r-this.moveY,this.$nextTick(function(){if(e.centerBox){var t,i,r,s,a=e.getImgAxis(o,n,e.scale),c=e.getCropAxis(),h=e.trueHeight*e.scale,p=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-p)/2,i=e.cropOffsertY-e.trueHeight*(1-e.scale)/2+(p-h)/2,r=t-h+e.cropW,s=i-p+e.cropH;break;default:t=e.cropOffsertX-e.trueWidth*(1-e.scale)/2,i=e.cropOffsertY-e.trueHeight*(1-e.scale)/2,r=t-p+e.cropW,s=i-h+e.cropH}a.x1>=c.x1&&(o=t),a.y1>=c.y1&&(n=i),a.x2<=c.x2&&(o=r),a.y2<=c.y2&&(n=s)}e.x=o,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 o=this.scale,n=t.deltaY||t.wheelDelta;n=navigator.userAgent.indexOf(\"Firefox\")>0?30*n:n,this.isIE&&(n=-n);var i=this.coe,r=(i=i/this.trueWidth>i/this.trueHeight?i/this.trueHeight:i/this.trueWidth)*n;r<0?o+=Math.abs(r):o>Math.abs(r)&&(o-=Math.abs(r));var s=r<0?\"add\":\"reduce\";if(s!==this.coeStatus&&(this.coeStatus=s,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,o))return!1;this.scale=o},changeScale:function(t){var e=this.scale;t=t||1;var o=20;if((t*=o=o/this.trueWidth>o/this.trueHeight?o/this.trueHeight:o/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 o=\"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=o-e.cropX,i=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 r=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];r+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=r,e.cropOffsertY=e.cropOffsertY}else i>0?(e.cropH=i+e.cropChangeY>e.h?e.h-e.cropChangeY:i,e.cropOffsertY=e.cropChangeY):(e.cropH=e.h-e.cropChangeY+Math.abs(i)>e.h?e.cropChangeY:Math.abs(i),e.cropOffsertY=e.cropChangeY+i>0?e.cropChangeY+i:0)})},changeCropSize:function(t,e,o,n,i){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=o,this.changeCropTypeX=n,this.changeCropTypeY=i,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 o=\"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,i=this.w,r=this.h,s=0,a=0;if(this.centerBox){var c=this.getImgAxis(),h=c.x2,p=c.y2;s=c.x1>0?c.x1:0,a=c.y1>0?c.y1:0,i>h&&(i=h),r>p&&(r=p)}this.$nextTick(function(){var t=o-e.cropX,c=n-e.cropY;if(e.canChangeX&&(1===e.changeCropTypeX?e.cropOldW-t>0?(e.cropW=i-e.cropChangeX-t<=i-s?e.cropOldW-t:e.cropOldW+e.cropChangeX-s,e.cropOffsertX=i-e.cropChangeX-t<=i-s?e.cropChangeX+t:s):(e.cropW=Math.abs(t)+e.cropChangeX<=i?Math.abs(t)-e.cropOldW:i-e.cropOldW-e.cropChangeX,e.cropOffsertX=e.cropChangeX+e.cropOldW):2===e.changeCropTypeX&&(e.cropOldW+t>0?(e.cropW=e.cropOldW+t+e.cropOffsertX<=i?e.cropOldW+t:i-e.cropOffsertX,e.cropOffsertX=e.cropChangeX):(e.cropW=i-e.cropChangeX+Math.abs(t+e.cropOldW)<=i-s?Math.abs(t+e.cropOldW):e.cropChangeX-s,e.cropOffsertX=i-e.cropChangeX+Math.abs(t+e.cropOldW)<=i-s?e.cropChangeX-Math.abs(t+e.cropOldW):s))),e.canChangeY&&(1===e.changeCropTypeY?e.cropOldH-c>0?(e.cropH=r-e.cropChangeY-c<=r-a?e.cropOldH-c:e.cropOldH+e.cropChangeY-a,e.cropOffsertY=r-e.cropChangeY-c<=r-a?e.cropChangeY+c:a):(e.cropH=Math.abs(c)+e.cropChangeY<=r?Math.abs(c)-e.cropOldH:r-e.cropOldH-e.cropChangeY,e.cropOffsertY=e.cropChangeY+e.cropOldH):2===e.changeCropTypeY&&(e.cropOldH+c>0?(e.cropH=e.cropOldH+c+e.cropOffsertY<=r?e.cropOldH+c:r-e.cropOffsertY,e.cropOffsertY=e.cropChangeY):(e.cropH=r-e.cropChangeY+Math.abs(c+e.cropOldH)<=r-a?Math.abs(c+e.cropOldH):e.cropChangeY-a,e.cropOffsertY=r-e.cropChangeY+Math.abs(c+e.cropOldH)<=r-a?e.cropChangeY-Math.abs(c+e.cropOldH):a))),e.canChangeX&&e.fixed){var h=e.cropW/e.fixedNumber[0]*e.fixedNumber[1];h+e.cropOffsertY>r?(e.cropH=r-e.cropOffsertY,e.cropW=e.cropH/e.fixedNumber[1]*e.fixedNumber[0]):e.cropH=h}if(e.canChangeY&&e.fixed){var p=e.cropH/e.fixedNumber[1]*e.fixedNumber[0];p+e.cropOffsertX>i?(e.cropW=i-e.cropOffsertX,e.cropH=e.cropW/e.fixedNumber[0]*e.fixedNumber[1]):e.cropW=p}})},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,o,n=\"clientX\"in t?t.clientX:t.touches[0].clientX,i=\"clientY\"in t?t.clientY:t.touches[0].clientY;e=n-this.cropOffsertX,o=i-this.cropOffsertY,this.cropX=e,this.cropY=o,this.$emit(\"cropMoving\",{moving:!0,axis:this.getCropAxis()}),this.$emit(\"crop-moving\",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(t,e){var o=this,n=0,i=0;t&&(t.preventDefault(),n=\"clientX\"in t?t.clientX:t.touches[0].clientX,i=\"clientY\"in t?t.clientY:t.touches[0].clientY),this.$nextTick(function(){var t,r,s=n-o.cropX,a=i-o.cropY;if(e&&(s=o.cropOffsertX,a=o.cropOffsertY),t=s<=0?0:s+o.cropW>o.w?o.w-o.cropW:s,r=a<=0?0:a+o.cropH>o.h?o.h-o.cropH:a,o.centerBox){var c=o.getImgAxis();t<=c.x1&&(t=c.x1),t+o.cropW>c.x2&&(t=c.x2-o.cropW),r<=c.y1&&(r=c.y1),r+o.cropH>c.y2&&(r=c.y2-o.cropH)}o.cropOffsertX=t,o.cropOffsertY=r,o.$emit(\"cropMoving\",{moving:!0,axis:o.getCropAxis()}),o.$emit(\"crop-moving\",{moving:!0,axis:o.getCropAxis()})})},getImgAxis:function(t,e,o){t=t||this.x,e=e||this.y,o=o||this.scale;var n={x1:0,x2:0,y1:0,y2:0},i=this.trueWidth*o,r=this.trueHeight*o;switch(this.rotate){case 0:n.x1=t+this.trueWidth*(1-o)/2,n.x2=n.x1+this.trueWidth*o,n.y1=e+this.trueHeight*(1-o)/2,n.y2=n.y1+this.trueHeight*o;break;case 1:case-1:case 3:case-3:n.x1=t+this.trueWidth*(1-o)/2+(i-r)/2,n.x2=n.x1+this.trueHeight*o,n.y1=e+this.trueHeight*(1-o)/2+(r-i)/2,n.y2=n.y1+this.trueWidth*o;break;default:n.x1=t+this.trueWidth*(1-o)/2,n.x2=n.x1+this.trueWidth*o,n.y1=e+this.trueHeight*(1-o)/2,n.y2=n.y1+this.trueHeight*o}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,o=document.createElement(\"canvas\"),n=new Image,i=this.rotate,r=this.trueWidth,s=this.trueHeight,a=this.cropOffsertX,c=this.cropOffsertY;function h(t,e){o.width=Math.round(t),o.height=Math.round(e)}n.onload=function(){if(0!==e.cropW){var p=o.getContext(\"2d\"),u=1;e.high&!e.full&&(u=window.devicePixelRatio),1!==e.enlarge&!e.full&&(u=Math.abs(Number(e.enlarge)));var l=e.cropW*u,d=e.cropH*u,f=r*e.scale*u,g=s*e.scale*u,v=(e.x-a+e.trueWidth*(1-e.scale)/2)*u,m=(e.y-c+e.trueHeight*(1-e.scale)/2)*u;switch(h(l,d),p.save(),i){case 0:e.full?(h(l/e.scale,d/e.scale),p.drawImage(n,v/e.scale,m/e.scale,f/e.scale,g/e.scale)):p.drawImage(n,v,m,f,g);break;case 1:case-3:e.full?(h(l/e.scale,d/e.scale),v=v/e.scale+(f/e.scale-g/e.scale)/2,m=m/e.scale+(g/e.scale-f/e.scale)/2,p.rotate(90*i*Math.PI/180),p.drawImage(n,m,-v-g/e.scale,f/e.scale,g/e.scale)):(v+=(f-g)/2,m+=(g-f)/2,p.rotate(90*i*Math.PI/180),p.drawImage(n,m,-v-g,f,g));break;case 2:case-2:e.full?(h(l/e.scale,d/e.scale),p.rotate(90*i*Math.PI/180),v/=e.scale,m/=e.scale,p.drawImage(n,-v-f/e.scale,-m-g/e.scale,f/e.scale,g/e.scale)):(p.rotate(90*i*Math.PI/180),p.drawImage(n,-v-f,-m-g,f,g));break;case 3:case-1:e.full?(h(l/e.scale,d/e.scale),v=v/e.scale+(f/e.scale-g/e.scale)/2,m=m/e.scale+(g/e.scale-f/e.scale)/2,p.rotate(90*i*Math.PI/180),p.drawImage(n,-m-f/e.scale,v,f/e.scale,g/e.scale)):(v+=(f-g)/2,m+=(g-f)/2,p.rotate(90*i*Math.PI/180),p.drawImage(n,-m-f,v,f,g));break;default:e.full?(h(l/e.scale,d/e.scale),p.drawImage(n,v/e.scale,m/e.scale,f/e.scale,g/e.scale)):p.drawImage(n,v,m,f,g)}p.restore()}else{var w=r*e.scale,x=s*e.scale,C=o.getContext(\"2d\");switch(C.save(),i){case 0:h(w,x),C.drawImage(n,0,0,w,x);break;case 1:case-3:h(x,w),C.rotate(90*i*Math.PI/180),C.drawImage(n,0,-x,w,x);break;case 2:case-2:h(w,x),C.rotate(90*i*Math.PI/180),C.drawImage(n,-w,-x,w,x);break;case 3:case-1:h(x,w),C.rotate(90*i*Math.PI/180),C.drawImage(n,-w,0,w,x);break;default:h(w,x),C.drawImage(n,0,0,w,x)}C.restore()}t(o)},\"data\"!==this.img.substr(0,4)&&(n.crossOrigin=\"Anonymous\"),n.src=this.imgs},getCropData:function(t){var e=this;this.getCropChecked(function(o){t(o.toDataURL(\"image/\"+e.outputType,e.outputSize))})},getCropBlob:function(t){var e=this;this.getCropChecked(function(o){o.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,o=this.cropH,n=this.scale,i={};i.div={width:\"\".concat(e,\"px\"),height:\"\".concat(o,\"px\")};var r=(this.x-this.cropOffsertX)/n,s=(this.y-this.cropOffsertY)/n;i.w=e,i.h=o,i.url=this.imgs,i.img={width:\"\".concat(this.trueWidth,\"px\"),height:\"\".concat(this.trueHeight,\"px\"),transform:\"scale(\".concat(n,\")translate3d(\").concat(r,\"px, \").concat(s,\"px, \").concat(0,\"px)rotateZ(\").concat(90*this.rotate,\"deg)\")},i.html='\\n
\\n
\\n \\n
\\n
'),this.$emit(\"realTime\",i),this.$emit(\"real-time\",i)},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),o=this.mode.split(\" \");switch(o[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,r=(i?this.trueHeight:this.trueWidth)*this.scale,s=(i?this.trueWidth:this.trueHeight)*this.scale;o=ro?o:a,c=c>n?n:c,this.fixed&&(c=a/this.fixedNumber[0]*this.fixedNumber[1]),c>this.h&&(a=(c=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(a,c)}},changeCrop:function(t,e){var o=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(){o.cropOffsertX=(o.w-o.cropW)/2,o.cropOffsertY=(o.h-o.cropH)/2,o.centerBox&&o.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,o){t=t||this.x,e=e||this.y,o=o||this.scale;var n=!0;if(this.centerBox){var i=this.getImgAxis(t,e,o),r=this.getCropAxis();i.x1>=r.x1&&(n=!1),i.x2<=r.x2&&(n=!1),i.y1>=r.y1&&(n=!1),i.y2<=r.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,o,n){for(var i=atob(this.toDataURL(o,n).split(\",\")[1]),r=i.length,s=new Uint8Array(r),a=0;a